mailbox/frontend/dist/assets/index-4CluA2BD.js
2025-12-16 08:18:15 +09:00

794 lines
1.1 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var J5=Object.defineProperty;var e4=(e,t,r)=>t in e?J5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var me=(e,t,r)=>e4(e,typeof t!="symbol"?t+"":t,r);function t4(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function ti(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var KD={exports:{}},ng={},qD={exports:{}},Ye={};/**
* @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 Yd=Symbol.for("react.element"),r4=Symbol.for("react.portal"),n4=Symbol.for("react.fragment"),a4=Symbol.for("react.strict_mode"),o4=Symbol.for("react.profiler"),i4=Symbol.for("react.provider"),s4=Symbol.for("react.context"),l4=Symbol.for("react.forward_ref"),c4=Symbol.for("react.suspense"),u4=Symbol.for("react.memo"),d4=Symbol.for("react.lazy"),jk=Symbol.iterator;function f4(e){return e===null||typeof e!="object"?null:(e=jk&&e[jk]||e["@@iterator"],typeof e=="function"?e:null)}var GD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},XD=Object.assign,QD={};function Oc(e,t,r){this.props=e,this.context=t,this.refs=QD,this.updater=r||GD}Oc.prototype.isReactComponent={};Oc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Oc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZD(){}ZD.prototype=Oc.prototype;function Gb(e,t,r){this.props=e,this.context=t,this.refs=QD,this.updater=r||GD}var Xb=Gb.prototype=new ZD;Xb.constructor=Gb;XD(Xb,Oc.prototype);Xb.isPureReactComponent=!0;var Ak=Array.isArray,JD=Object.prototype.hasOwnProperty,Qb={current:null},e_={key:!0,ref:!0,__self:!0,__source:!0};function t_(e,t,r){var n,a={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)JD.call(t,n)&&!e_.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)a[n]===void 0&&(a[n]=s[n]);return{$$typeof:Yd,type:e,key:o,ref:i,props:a,_owner:Qb.current}}function p4(e,t){return{$$typeof:Yd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zb(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yd}function h4(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Rk=/\/+/g;function cy(e,t){return typeof e=="object"&&e!==null&&e.key!=null?h4(""+e.key):t.toString(36)}function Rp(e,t,r,n,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Yd:case r4:i=!0}}if(i)return i=e,a=a(i),e=n===""?"."+cy(i,0):n,Ak(a)?(r="",e!=null&&(r=e.replace(Rk,"$&/")+"/"),Rp(a,t,r,"",function(c){return c})):a!=null&&(Zb(a)&&(a=p4(a,r+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(Rk,"$&/")+"/")+e)),t.push(a)),1;if(i=0,n=n===""?".":n+":",Ak(e))for(var s=0;s<e.length;s++){o=e[s];var l=n+cy(o,s);i+=Rp(o,t,r,l,a)}else if(l=f4(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=n+cy(o,s++),i+=Rp(o,t,r,l,a);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Af(e,t,r){if(e==null)return e;var n=[],a=0;return Rp(e,n,"","",function(o){return t.call(r,o,a++)}),n}function m4(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yr={current:null},Ip={transition:null},g4={ReactCurrentDispatcher:Yr,ReactCurrentBatchConfig:Ip,ReactCurrentOwner:Qb};function r_(){throw Error("act(...) is not supported in production builds of React.")}Ye.Children={map:Af,forEach:function(e,t,r){Af(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Af(e,function(){t++}),t},toArray:function(e){return Af(e,function(t){return t})||[]},only:function(e){if(!Zb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ye.Component=Oc;Ye.Fragment=n4;Ye.Profiler=o4;Ye.PureComponent=Gb;Ye.StrictMode=a4;Ye.Suspense=c4;Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g4;Ye.act=r_;Ye.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=XD({},e.props),a=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Qb.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)JD.call(t,l)&&!e_.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Yd,type:e.type,key:a,ref:o,props:n,_owner:i}};Ye.createContext=function(e){return e={$$typeof:s4,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:i4,_context:e},e.Consumer=e};Ye.createElement=t_;Ye.createFactory=function(e){var t=t_.bind(null,e);return t.type=e,t};Ye.createRef=function(){return{current:null}};Ye.forwardRef=function(e){return{$$typeof:l4,render:e}};Ye.isValidElement=Zb;Ye.lazy=function(e){return{$$typeof:d4,_payload:{_status:-1,_result:e},_init:m4}};Ye.memo=function(e,t){return{$$typeof:u4,type:e,compare:t===void 0?null:t}};Ye.startTransition=function(e){var t=Ip.transition;Ip.transition={};try{e()}finally{Ip.transition=t}};Ye.unstable_act=r_;Ye.useCallback=function(e,t){return Yr.current.useCallback(e,t)};Ye.useContext=function(e){return Yr.current.useContext(e)};Ye.useDebugValue=function(){};Ye.useDeferredValue=function(e){return Yr.current.useDeferredValue(e)};Ye.useEffect=function(e,t){return Yr.current.useEffect(e,t)};Ye.useId=function(){return Yr.current.useId()};Ye.useImperativeHandle=function(e,t,r){return Yr.current.useImperativeHandle(e,t,r)};Ye.useInsertionEffect=function(e,t){return Yr.current.useInsertionEffect(e,t)};Ye.useLayoutEffect=function(e,t){return Yr.current.useLayoutEffect(e,t)};Ye.useMemo=function(e,t){return Yr.current.useMemo(e,t)};Ye.useReducer=function(e,t,r){return Yr.current.useReducer(e,t,r)};Ye.useRef=function(e){return Yr.current.useRef(e)};Ye.useState=function(e){return Yr.current.useState(e)};Ye.useSyncExternalStore=function(e,t,r){return Yr.current.useSyncExternalStore(e,t,r)};Ye.useTransition=function(){return Yr.current.useTransition()};Ye.version="18.3.1";qD.exports=Ye;var m=qD.exports;const U=ti(m),ql=t4({__proto__:null,default:U},[m]);/**
* @license React
* react-jsx-runtime.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 v4=m,y4=Symbol.for("react.element"),x4=Symbol.for("react.fragment"),b4=Object.prototype.hasOwnProperty,w4=v4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S4={key:!0,ref:!0,__self:!0,__source:!0};function n_(e,t,r){var n,a={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)b4.call(t,n)&&!S4.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:y4,type:e,key:o,ref:i,props:a,_owner:w4.current}}ng.Fragment=x4;ng.jsx=n_;ng.jsxs=n_;KD.exports=ng;var h=KD.exports,D0={},a_={exports:{}},Nn={},o_={exports:{}},i_={};/**
* @license React
* scheduler.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.
*/(function(e){function t(I,$){var z=I.length;I.push($);e:for(;0<z;){var V=z-1>>>1,F=I[V];if(0<a(F,$))I[V]=$,I[z]=F,z=V;else break e}}function r(I){return I.length===0?null:I[0]}function n(I){if(I.length===0)return null;var $=I[0],z=I.pop();if(z!==$){I[0]=z;e:for(var V=0,F=I.length,ne=F>>>1;V<ne;){var ee=2*(V+1)-1,X=I[ee],fe=ee+1,q=I[fe];if(0>a(X,z))fe<F&&0>a(q,X)?(I[V]=q,I[fe]=z,V=fe):(I[V]=X,I[ee]=z,V=ee);else if(fe<F&&0>a(q,z))I[V]=q,I[fe]=z,V=fe;else break e}}return $}function a(I,$){var z=I.sortIndex-$.sortIndex;return z!==0?z:I.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,g=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(I){for(var $=r(c);$!==null;){if($.callback===null)n(c);else if($.startTime<=I)n(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=r(c)}}function S(I){if(y=!1,b(I),!g)if(r(l)!==null)g=!0,A(k);else{var $=r(c);$!==null&&L(S,$.startTime-I)}}function k(I,$){g=!1,y&&(y=!1,x(O),O=-1),p=!0;var z=f;try{for(b($),d=r(l);d!==null&&(!(d.expirationTime>$)||I&&!_());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var F=V(d.expirationTime<=$);$=e.unstable_now(),typeof F=="function"?d.callback=F:d===r(l)&&n(l),b($)}else n(l);d=r(l)}if(d!==null)var ne=!0;else{var ee=r(c);ee!==null&&L(S,ee.startTime-$),ne=!1}return ne}finally{d=null,f=z,p=!1}}var P=!1,E=null,O=-1,D=5,N=-1;function _(){return!(e.unstable_now()-N<D)}function C(){if(E!==null){var I=e.unstable_now();N=I;var $=!0;try{$=E(!0,I)}finally{$?M():(P=!1,E=null)}}else P=!1}var M;if(typeof w=="function")M=function(){w(C)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,j=T.port2;T.port1.onmessage=C,M=function(){j.postMessage(null)}}else M=function(){v(C,0)};function A(I){E=I,P||(P=!0,M())}function L(I,$){O=v(function(){I(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,A(k))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(I){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var z=f;f=$;try{return I()}finally{f=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,$){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var z=f;f=I;try{return $()}finally{f=z}},e.unstable_scheduleCallback=function(I,$,z){var V=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?V+z:V):z=V,I){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=z+F,I={id:u++,callback:$,priorityLevel:I,startTime:z,expirationTime:F,sortIndex:-1},z>V?(I.sortIndex=z,t(c,I),r(l)===null&&I===r(c)&&(y?(x(O),O=-1):y=!0,L(S,z-V))):(I.sortIndex=F,t(l,I),g||p||(g=!0,A(k))),I},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(I){var $=f;return function(){var z=f;f=$;try{return I.apply(this,arguments)}finally{f=z}}}})(i_);o_.exports=i_;var k4=o_.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 C4=m,On=k4;function se(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s_=new Set,td={};function Qs(e,t){Gl(e,t),Gl(e+"Capture",t)}function Gl(e,t){for(td[e]=t,e=0;e<t.length;e++)s_.add(t[e])}var $o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_0=Object.prototype.hasOwnProperty,P4=/^[: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]*$/,Ik={},$k={};function E4(e){return _0.call($k,e)?!0:_0.call(Ik,e)?!1:P4.test(e)?$k[e]=!0:(Ik[e]=!0,!1)}function O4(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D4(e,t,r,n){if(t===null||typeof t>"u"||O4(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Vr(e,t,r,n,a,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Cr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Cr[e]=new Vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Cr[t]=new Vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Cr[e]=new Vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Cr[e]=new Vr(e,2,!1,e,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(e){Cr[e]=new Vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Cr[e]=new Vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Cr[e]=new Vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Cr[e]=new Vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Cr[e]=new Vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jb=/[\-:]([a-z])/g;function ew(e){return e[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(e){var t=e.replace(Jb,ew);Cr[t]=new Vr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Jb,ew);Cr[t]=new Vr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Jb,ew);Cr[t]=new Vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Cr[e]=new Vr(e,1,!1,e.toLowerCase(),null,!1,!1)});Cr.xlinkHref=new Vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Cr[e]=new Vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function tw(e,t,r,n){var a=Cr.hasOwnProperty(t)?Cr[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(D4(t,r,a,n)&&(r=null),n||a===null?E4(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var ri=C4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Rf=Symbol.for("react.element"),bl=Symbol.for("react.portal"),wl=Symbol.for("react.fragment"),rw=Symbol.for("react.strict_mode"),N0=Symbol.for("react.profiler"),l_=Symbol.for("react.provider"),c_=Symbol.for("react.context"),nw=Symbol.for("react.forward_ref"),M0=Symbol.for("react.suspense"),T0=Symbol.for("react.suspense_list"),aw=Symbol.for("react.memo"),xi=Symbol.for("react.lazy"),u_=Symbol.for("react.offscreen"),Lk=Symbol.iterator;function qc(e){return e===null||typeof e!="object"?null:(e=Lk&&e[Lk]||e["@@iterator"],typeof e=="function"?e:null)}var Rt=Object.assign,uy;function wu(e){if(uy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);uy=t&&t[1]||""}return`
`+uy+e}var dy=!1;function fy(e,t){if(!e||dy)return"";dy=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var a=c.stack.split(`
`),o=n.stack.split(`
`),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(i!==1||s!==1)do if(i--,s--,0>s||a[i]!==o[s]){var l=`
`+a[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{dy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?wu(e):""}function _4(e){switch(e.tag){case 5:return wu(e.type);case 16:return wu("Lazy");case 13:return wu("Suspense");case 19:return wu("SuspenseList");case 0:case 2:case 15:return e=fy(e.type,!1),e;case 11:return e=fy(e.type.render,!1),e;case 1:return e=fy(e.type,!0),e;default:return""}}function j0(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wl:return"Fragment";case bl:return"Portal";case N0:return"Profiler";case rw:return"StrictMode";case M0:return"Suspense";case T0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c_:return(e.displayName||"Context")+".Consumer";case l_:return(e._context.displayName||"Context")+".Provider";case nw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case aw:return t=e.displayName||null,t!==null?t:j0(e.type)||"Memo";case xi:t=e._payload,e=e._init;try{return j0(e(t))}catch{}}return null}function N4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return j0(t);case 8:return t===rw?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Hi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M4(e){var t=d_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function If(e){e._valueTracker||(e._valueTracker=M4(e))}function f_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=d_(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function hh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function A0(e,t){var r=t.checked;return Rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Fk(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Hi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function p_(e,t){t=t.checked,t!=null&&tw(e,"checked",t,!1)}function R0(e,t){p_(e,t);var r=Hi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?I0(e,t.type,r):t.hasOwnProperty("defaultValue")&&I0(e,t.type,Hi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zk(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function I0(e,t,r){(t!=="number"||hh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Su=Array.isArray;function Rl(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Hi(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function $0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(se(91));return Rt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bk(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(se(92));if(Su(r)){if(1<r.length)throw Error(se(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Hi(r)}}function h_(e,t){var r=Hi(t.value),n=Hi(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Wk(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function m_(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function L0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?m_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $f,g_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($f=$f||document.createElement("div"),$f.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$f.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Iu={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},T4=["Webkit","ms","Moz","O"];Object.keys(Iu).forEach(function(e){T4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Iu[t]=Iu[e]})});function v_(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}function y_(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=v_(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var j4=Rt({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 F0(e,t){if(t){if(j4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function z0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 B0=null;function ow(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var W0=null,Il=null,$l=null;function Hk(e){if(e=qd(e)){if(typeof W0!="function")throw Error(se(280));var t=e.stateNode;t&&(t=lg(t),W0(e.stateNode,e.type,t))}}function x_(e){Il?$l?$l.push(e):$l=[e]:Il=e}function b_(){if(Il){var e=Il,t=$l;if($l=Il=null,Hk(e),t)for(e=0;e<t.length;e++)Hk(t[e])}}function w_(e,t){return e(t)}function S_(){}var py=!1;function k_(e,t,r){if(py)return e(t,r);py=!0;try{return w_(e,t,r)}finally{py=!1,(Il!==null||$l!==null)&&(S_(),b_())}}function nd(e,t){var r=e.stateNode;if(r===null)return null;var n=lg(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(se(231,t,typeof r));return r}var H0=!1;if($o)try{var Gc={};Object.defineProperty(Gc,"passive",{get:function(){H0=!0}}),window.addEventListener("test",Gc,Gc),window.removeEventListener("test",Gc,Gc)}catch{H0=!1}function A4(e,t,r,n,a,o,i,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var $u=!1,mh=null,gh=!1,U0=null,R4={onError:function(e){$u=!0,mh=e}};function I4(e,t,r,n,a,o,i,s,l){$u=!1,mh=null,A4.apply(R4,arguments)}function $4(e,t,r,n,a,o,i,s,l){if(I4.apply(this,arguments),$u){if($u){var c=mh;$u=!1,mh=null}else throw Error(se(198));gh||(gh=!0,U0=c)}}function Zs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function C_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Uk(e){if(Zs(e)!==e)throw Error(se(188))}function L4(e){var t=e.alternate;if(!t){if(t=Zs(e),t===null)throw Error(se(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var o=a.alternate;if(o===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===r)return Uk(a),e;if(o===n)return Uk(a),t;o=o.sibling}throw Error(se(188))}if(r.return!==n.return)r=a,n=o;else{for(var i=!1,s=a.child;s;){if(s===r){i=!0,r=a,n=o;break}if(s===n){i=!0,n=a,r=o;break}s=s.sibling}if(!i){for(s=o.child;s;){if(s===r){i=!0,r=o,n=a;break}if(s===n){i=!0,n=o,r=a;break}s=s.sibling}if(!i)throw Error(se(189))}}if(r.alternate!==n)throw Error(se(190))}if(r.tag!==3)throw Error(se(188));return r.stateNode.current===r?e:t}function P_(e){return e=L4(e),e!==null?E_(e):null}function E_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=E_(e);if(t!==null)return t;e=e.sibling}return null}var O_=On.unstable_scheduleCallback,Yk=On.unstable_cancelCallback,F4=On.unstable_shouldYield,z4=On.unstable_requestPaint,Yt=On.unstable_now,B4=On.unstable_getCurrentPriorityLevel,iw=On.unstable_ImmediatePriority,D_=On.unstable_UserBlockingPriority,vh=On.unstable_NormalPriority,W4=On.unstable_LowPriority,__=On.unstable_IdlePriority,ag=null,eo=null;function H4(e){if(eo&&typeof eo.onCommitFiberRoot=="function")try{eo.onCommitFiberRoot(ag,e,void 0,(e.current.flags&128)===128)}catch{}}var Ca=Math.clz32?Math.clz32:V4,U4=Math.log,Y4=Math.LN2;function V4(e){return e>>>=0,e===0?32:31-(U4(e)/Y4|0)|0}var Lf=64,Ff=4194304;function ku(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~a;s!==0?n=ku(s):(o&=i,o!==0&&(n=ku(o)))}else i=r&~a,i!==0?n=ku(i):o!==0&&(n=ku(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ca(t),a=1<<r,n|=e[r],t&=~a;return n}function K4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function q4(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Ca(o),s=1<<i,l=a[i];l===-1?(!(s&r)||s&n)&&(a[i]=K4(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function Y0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function N_(){var e=Lf;return Lf<<=1,!(Lf&4194240)&&(Lf=64),e}function hy(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Vd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ca(t),e[t]=r}function G4(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Ca(r),o=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~o}}function sw(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ca(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var mt=0;function M_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var T_,lw,j_,A_,R_,V0=!1,zf=[],Ni=null,Mi=null,Ti=null,ad=new Map,od=new Map,ki=[],X4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vk(e,t){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Ti=null;break;case"pointerover":case"pointerout":ad.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":od.delete(t.pointerId)}}function Xc(e,t,r,n,a,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[a]},t!==null&&(t=qd(t),t!==null&&lw(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Q4(e,t,r,n,a){switch(t){case"focusin":return Ni=Xc(Ni,e,t,r,n,a),!0;case"dragenter":return Mi=Xc(Mi,e,t,r,n,a),!0;case"mouseover":return Ti=Xc(Ti,e,t,r,n,a),!0;case"pointerover":var o=a.pointerId;return ad.set(o,Xc(ad.get(o)||null,e,t,r,n,a)),!0;case"gotpointercapture":return o=a.pointerId,od.set(o,Xc(od.get(o)||null,e,t,r,n,a)),!0}return!1}function I_(e){var t=vs(e.target);if(t!==null){var r=Zs(t);if(r!==null){if(t=r.tag,t===13){if(t=C_(r),t!==null){e.blockedOn=t,R_(e.priority,function(){j_(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $p(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=K0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);B0=n,r.target.dispatchEvent(n),B0=null}else return t=qd(r),t!==null&&lw(t),e.blockedOn=r,!1;t.shift()}return!0}function Kk(e,t,r){$p(e)&&r.delete(t)}function Z4(){V0=!1,Ni!==null&&$p(Ni)&&(Ni=null),Mi!==null&&$p(Mi)&&(Mi=null),Ti!==null&&$p(Ti)&&(Ti=null),ad.forEach(Kk),od.forEach(Kk)}function Qc(e,t){e.blockedOn===t&&(e.blockedOn=null,V0||(V0=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,Z4)))}function id(e){function t(a){return Qc(a,e)}if(0<zf.length){Qc(zf[0],e);for(var r=1;r<zf.length;r++){var n=zf[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ni!==null&&Qc(Ni,e),Mi!==null&&Qc(Mi,e),Ti!==null&&Qc(Ti,e),ad.forEach(t),od.forEach(t),r=0;r<ki.length;r++)n=ki[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ki.length&&(r=ki[0],r.blockedOn===null);)I_(r),r.blockedOn===null&&ki.shift()}var Ll=ri.ReactCurrentBatchConfig,xh=!0;function J4(e,t,r,n){var a=mt,o=Ll.transition;Ll.transition=null;try{mt=1,cw(e,t,r,n)}finally{mt=a,Ll.transition=o}}function eL(e,t,r,n){var a=mt,o=Ll.transition;Ll.transition=null;try{mt=4,cw(e,t,r,n)}finally{mt=a,Ll.transition=o}}function cw(e,t,r,n){if(xh){var a=K0(e,t,r,n);if(a===null)Cy(e,t,n,bh,r),Vk(e,n);else if(Q4(a,e,t,r,n))n.stopPropagation();else if(Vk(e,n),t&4&&-1<X4.indexOf(e)){for(;a!==null;){var o=qd(a);if(o!==null&&T_(o),o=K0(e,t,r,n),o===null&&Cy(e,t,n,bh,r),o===a)break;a=o}a!==null&&n.stopPropagation()}else Cy(e,t,n,null,r)}}var bh=null;function K0(e,t,r,n){if(bh=null,e=ow(n),e=vs(e),e!==null)if(t=Zs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=C_(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bh=e,null}function $_(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(B4()){case iw:return 1;case D_:return 4;case vh:case W4:return 16;case __:return 536870912;default:return 16}default:return 16}}var Oi=null,uw=null,Lp=null;function L_(){if(Lp)return Lp;var e,t=uw,r=t.length,n,a="value"in Oi?Oi.value:Oi.textContent,o=a.length;for(e=0;e<r&&t[e]===a[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===a[o-n];n++);return Lp=a.slice(e,1<n?1-n:void 0)}function Fp(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Bf(){return!0}function qk(){return!1}function Mn(e){function t(r,n,a,o,i){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Bf:qk,this.isPropagationStopped=qk,this}return Rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Bf)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Bf)},persist:function(){},isPersistent:Bf}),t}var Dc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dw=Mn(Dc),Kd=Rt({},Dc,{view:0,detail:0}),tL=Mn(Kd),my,gy,Zc,og=Rt({},Kd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fw,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zc&&(Zc&&e.type==="mousemove"?(my=e.screenX-Zc.screenX,gy=e.screenY-Zc.screenY):gy=my=0,Zc=e),my)},movementY:function(e){return"movementY"in e?e.movementY:gy}}),Gk=Mn(og),rL=Rt({},og,{dataTransfer:0}),nL=Mn(rL),aL=Rt({},Kd,{relatedTarget:0}),vy=Mn(aL),oL=Rt({},Dc,{animationName:0,elapsedTime:0,pseudoElement:0}),iL=Mn(oL),sL=Rt({},Dc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lL=Mn(sL),cL=Rt({},Dc,{data:0}),Xk=Mn(cL),uL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dL={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fL[e])?!!t[e]:!1}function fw(){return pL}var hL=Rt({},Kd,{key:function(e){if(e.key){var t=uL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fw,charCode:function(e){return e.type==="keypress"?Fp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mL=Mn(hL),gL=Rt({},og,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qk=Mn(gL),vL=Rt({},Kd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fw}),yL=Mn(vL),xL=Rt({},Dc,{propertyName:0,elapsedTime:0,pseudoElement:0}),bL=Mn(xL),wL=Rt({},og,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),SL=Mn(wL),kL=[9,13,27,32],pw=$o&&"CompositionEvent"in window,Lu=null;$o&&"documentMode"in document&&(Lu=document.documentMode);var CL=$o&&"TextEvent"in window&&!Lu,F_=$o&&(!pw||Lu&&8<Lu&&11>=Lu),Zk=" ",Jk=!1;function z_(e,t){switch(e){case"keyup":return kL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sl=!1;function PL(e,t){switch(e){case"compositionend":return B_(t);case"keypress":return t.which!==32?null:(Jk=!0,Zk);case"textInput":return e=t.data,e===Zk&&Jk?null:e;default:return null}}function EL(e,t){if(Sl)return e==="compositionend"||!pw&&z_(e,t)?(e=L_(),Lp=uw=Oi=null,Sl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return F_&&t.locale!=="ko"?null:t.data;default:return null}}var OL={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function eC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OL[e.type]:t==="textarea"}function W_(e,t,r,n){x_(n),t=wh(t,"onChange"),0<t.length&&(r=new dw("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Fu=null,sd=null;function DL(e){J_(e,0)}function ig(e){var t=Pl(e);if(f_(t))return e}function _L(e,t){if(e==="change")return t}var H_=!1;if($o){var yy;if($o){var xy="oninput"in document;if(!xy){var tC=document.createElement("div");tC.setAttribute("oninput","return;"),xy=typeof tC.oninput=="function"}yy=xy}else yy=!1;H_=yy&&(!document.documentMode||9<document.documentMode)}function rC(){Fu&&(Fu.detachEvent("onpropertychange",U_),sd=Fu=null)}function U_(e){if(e.propertyName==="value"&&ig(sd)){var t=[];W_(t,sd,e,ow(e)),k_(DL,t)}}function NL(e,t,r){e==="focusin"?(rC(),Fu=t,sd=r,Fu.attachEvent("onpropertychange",U_)):e==="focusout"&&rC()}function ML(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ig(sd)}function TL(e,t){if(e==="click")return ig(t)}function jL(e,t){if(e==="input"||e==="change")return ig(t)}function AL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Da=typeof Object.is=="function"?Object.is:AL;function ld(e,t){if(Da(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!_0.call(t,a)||!Da(e[a],t[a]))return!1}return!0}function nC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function aC(e,t){var r=nC(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nC(r)}}function Y_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Y_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function V_(){for(var e=window,t=hh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=hh(e.document)}return t}function hw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RL(e){var t=V_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Y_(r.ownerDocument.documentElement,r)){if(n!==null&&hw(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,o=Math.min(n.start,a);n=n.end===void 0?o:Math.min(n.end,a),!e.extend&&o>n&&(a=n,n=o,o=a),a=aC(r,o);var i=aC(r,n);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var IL=$o&&"documentMode"in document&&11>=document.documentMode,kl=null,q0=null,zu=null,G0=!1;function oC(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;G0||kl==null||kl!==hh(n)||(n=kl,"selectionStart"in n&&hw(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zu&&ld(zu,n)||(zu=n,n=wh(q0,"onSelect"),0<n.length&&(t=new dw("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=kl)))}function Wf(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Cl={animationend:Wf("Animation","AnimationEnd"),animationiteration:Wf("Animation","AnimationIteration"),animationstart:Wf("Animation","AnimationStart"),transitionend:Wf("Transition","TransitionEnd")},by={},K_={};$o&&(K_=document.createElement("div").style,"AnimationEvent"in window||(delete Cl.animationend.animation,delete Cl.animationiteration.animation,delete Cl.animationstart.animation),"TransitionEvent"in window||delete Cl.transitionend.transition);function sg(e){if(by[e])return by[e];if(!Cl[e])return e;var t=Cl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in K_)return by[e]=t[r];return e}var q_=sg("animationend"),G_=sg("animationiteration"),X_=sg("animationstart"),Q_=sg("transitionend"),Z_=new Map,iC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Xi(e,t){Z_.set(e,t),Qs(t,[e])}for(var wy=0;wy<iC.length;wy++){var Sy=iC[wy],$L=Sy.toLowerCase(),LL=Sy[0].toUpperCase()+Sy.slice(1);Xi($L,"on"+LL)}Xi(q_,"onAnimationEnd");Xi(G_,"onAnimationIteration");Xi(X_,"onAnimationStart");Xi("dblclick","onDoubleClick");Xi("focusin","onFocus");Xi("focusout","onBlur");Xi(Q_,"onTransitionEnd");Gl("onMouseEnter",["mouseout","mouseover"]);Gl("onMouseLeave",["mouseout","mouseover"]);Gl("onPointerEnter",["pointerout","pointerover"]);Gl("onPointerLeave",["pointerout","pointerover"]);Qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),FL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cu));function sC(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,$4(n,t,void 0,e),e.currentTarget=null}function J_(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var s=n[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&a.isPropagationStopped())break e;sC(a,s,c),o=l}else for(i=0;i<n.length;i++){if(s=n[i],l=s.instance,c=s.currentTarget,s=s.listener,l!==o&&a.isPropagationStopped())break e;sC(a,s,c),o=l}}}if(gh)throw e=U0,gh=!1,U0=null,e}function St(e,t){var r=t[ex];r===void 0&&(r=t[ex]=new Set);var n=e+"__bubble";r.has(n)||(eN(t,e,2,!1),r.add(n))}function ky(e,t,r){var n=0;t&&(n|=4),eN(r,e,n,t)}var Hf="_reactListening"+Math.random().toString(36).slice(2);function cd(e){if(!e[Hf]){e[Hf]=!0,s_.forEach(function(r){r!=="selectionchange"&&(FL.has(r)||ky(r,!1,e),ky(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,ky("selectionchange",!1,t))}}function eN(e,t,r,n){switch($_(t)){case 1:var a=J4;break;case 4:a=eL;break;default:a=cw}r=a.bind(null,t,r,e),a=void 0,!H0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Cy(e,t,r,n,a){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var s=n.stateNode.containerInfo;if(s===a||s.nodeType===8&&s.parentNode===a)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===a||l.nodeType===8&&l.parentNode===a))return;i=i.return}for(;s!==null;){if(i=vs(s),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}s=s.parentNode}}n=n.return}k_(function(){var c=o,u=ow(r),d=[];e:{var f=Z_.get(e);if(f!==void 0){var p=dw,g=e;switch(e){case"keypress":if(Fp(r)===0)break e;case"keydown":case"keyup":p=mL;break;case"focusin":g="focus",p=vy;break;case"focusout":g="blur",p=vy;break;case"beforeblur":case"afterblur":p=vy;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Gk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=nL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=yL;break;case q_:case G_:case X_:p=iL;break;case Q_:p=bL;break;case"scroll":p=tL;break;case"wheel":p=SL;break;case"copy":case"cut":case"paste":p=lL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Qk}var y=(t&4)!==0,v=!y&&e==="scroll",x=y?f!==null?f+"Capture":null:f;y=[];for(var w=c,b;w!==null;){b=w;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,x!==null&&(S=nd(w,x),S!=null&&y.push(ud(w,S,b)))),v)break;w=w.return}0<y.length&&(f=new p(f,g,null,r,u),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==B0&&(g=r.relatedTarget||r.fromElement)&&(vs(g)||g[Lo]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=c,g=g?vs(g):null,g!==null&&(v=Zs(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(y=Gk,S="onMouseLeave",x="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(y=Qk,S="onPointerLeave",x="onPointerEnter",w="pointer"),v=p==null?f:Pl(p),b=g==null?f:Pl(g),f=new y(S,w+"leave",p,r,u),f.target=v,f.relatedTarget=b,S=null,vs(u)===c&&(y=new y(x,w+"enter",g,r,u),y.target=b,y.relatedTarget=v,S=y),v=S,p&&g)t:{for(y=p,x=g,w=0,b=y;b;b=al(b))w++;for(b=0,S=x;S;S=al(S))b++;for(;0<w-b;)y=al(y),w--;for(;0<b-w;)x=al(x),b--;for(;w--;){if(y===x||x!==null&&y===x.alternate)break t;y=al(y),x=al(x)}y=null}else y=null;p!==null&&lC(d,f,p,y,!1),g!==null&&v!==null&&lC(d,v,g,y,!0)}}e:{if(f=c?Pl(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var k=_L;else if(eC(f))if(H_)k=jL;else{k=ML;var P=NL}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=TL);if(k&&(k=k(e,c))){W_(d,k,r,u);break e}P&&P(e,f,c),e==="focusout"&&(P=f._wrapperState)&&P.controlled&&f.type==="number"&&I0(f,"number",f.value)}switch(P=c?Pl(c):window,e){case"focusin":(eC(P)||P.contentEditable==="true")&&(kl=P,q0=c,zu=null);break;case"focusout":zu=q0=kl=null;break;case"mousedown":G0=!0;break;case"contextmenu":case"mouseup":case"dragend":G0=!1,oC(d,r,u);break;case"selectionchange":if(IL)break;case"keydown":case"keyup":oC(d,r,u)}var E;if(pw)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Sl?z_(e,r)&&(O="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(F_&&r.locale!=="ko"&&(Sl||O!=="onCompositionStart"?O==="onCompositionEnd"&&Sl&&(E=L_()):(Oi=u,uw="value"in Oi?Oi.value:Oi.textContent,Sl=!0)),P=wh(c,O),0<P.length&&(O=new Xk(O,e,null,r,u),d.push({event:O,listeners:P}),E?O.data=E:(E=B_(r),E!==null&&(O.data=E)))),(E=CL?PL(e,r):EL(e,r))&&(c=wh(c,"onBeforeInput"),0<c.length&&(u=new Xk("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=E))}J_(d,t)})}function ud(e,t,r){return{instance:e,listener:t,currentTarget:r}}function wh(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,o=a.stateNode;a.tag===5&&o!==null&&(a=o,o=nd(e,r),o!=null&&n.unshift(ud(e,o,a)),o=nd(e,t),o!=null&&n.push(ud(e,o,a))),e=e.return}return n}function al(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lC(e,t,r,n,a){for(var o=t._reactName,i=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,a?(l=nd(r,o),l!=null&&i.unshift(ud(r,l,s))):a||(l=nd(r,o),l!=null&&i.push(ud(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var zL=/\r\n?/g,BL=/\u0000|\uFFFD/g;function cC(e){return(typeof e=="string"?e:""+e).replace(zL,`
`).replace(BL,"")}function Uf(e,t,r){if(t=cC(t),cC(e)!==t&&r)throw Error(se(425))}function Sh(){}var X0=null,Q0=null;function Z0(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var J0=typeof setTimeout=="function"?setTimeout:void 0,WL=typeof clearTimeout=="function"?clearTimeout:void 0,uC=typeof Promise=="function"?Promise:void 0,HL=typeof queueMicrotask=="function"?queueMicrotask:typeof uC<"u"?function(e){return uC.resolve(null).then(e).catch(UL)}:J0;function UL(e){setTimeout(function(){throw e})}function Py(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),id(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);id(t)}function ji(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function dC(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var _c=Math.random().toString(36).slice(2),Ua="__reactFiber$"+_c,dd="__reactProps$"+_c,Lo="__reactContainer$"+_c,ex="__reactEvents$"+_c,YL="__reactListeners$"+_c,VL="__reactHandles$"+_c;function vs(e){var t=e[Ua];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Lo]||r[Ua]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=dC(e);e!==null;){if(r=e[Ua])return r;e=dC(e)}return t}e=r,r=e.parentNode}return null}function qd(e){return e=e[Ua]||e[Lo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(se(33))}function lg(e){return e[dd]||null}var tx=[],El=-1;function Qi(e){return{current:e}}function Ct(e){0>El||(e.current=tx[El],tx[El]=null,El--)}function bt(e,t){El++,tx[El]=e.current,e.current=t}var Ui={},$r=Qi(Ui),en=Qi(!1),Ls=Ui;function Xl(e,t){var r=e.type.contextTypes;if(!r)return Ui;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in r)a[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function tn(e){return e=e.childContextTypes,e!=null}function kh(){Ct(en),Ct($r)}function fC(e,t,r){if($r.current!==Ui)throw Error(se(168));bt($r,t),bt(en,r)}function tN(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(se(108,N4(e)||"Unknown",a));return Rt({},r,n)}function Ch(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ui,Ls=$r.current,bt($r,e),bt(en,en.current),!0}function pC(e,t,r){var n=e.stateNode;if(!n)throw Error(se(169));r?(e=tN(e,t,Ls),n.__reactInternalMemoizedMergedChildContext=e,Ct(en),Ct($r),bt($r,e)):Ct(en),bt(en,r)}var wo=null,cg=!1,Ey=!1;function rN(e){wo===null?wo=[e]:wo.push(e)}function KL(e){cg=!0,rN(e)}function Zi(){if(!Ey&&wo!==null){Ey=!0;var e=0,t=mt;try{var r=wo;for(mt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}wo=null,cg=!1}catch(a){throw wo!==null&&(wo=wo.slice(e+1)),O_(iw,Zi),a}finally{mt=t,Ey=!1}}return null}var Ol=[],Dl=0,Ph=null,Eh=0,Fn=[],zn=0,Fs=null,Po=1,Eo="";function ls(e,t){Ol[Dl++]=Eh,Ol[Dl++]=Ph,Ph=e,Eh=t}function nN(e,t,r){Fn[zn++]=Po,Fn[zn++]=Eo,Fn[zn++]=Fs,Fs=e;var n=Po;e=Eo;var a=32-Ca(n)-1;n&=~(1<<a),r+=1;var o=32-Ca(t)+a;if(30<o){var i=a-a%5;o=(n&(1<<i)-1).toString(32),n>>=i,a-=i,Po=1<<32-Ca(t)+a|r<<a|n,Eo=o+e}else Po=1<<o|r<<a|n,Eo=e}function mw(e){e.return!==null&&(ls(e,1),nN(e,1,0))}function gw(e){for(;e===Ph;)Ph=Ol[--Dl],Ol[Dl]=null,Eh=Ol[--Dl],Ol[Dl]=null;for(;e===Fs;)Fs=Fn[--zn],Fn[zn]=null,Eo=Fn[--zn],Fn[zn]=null,Po=Fn[--zn],Fn[zn]=null}var kn=null,wn=null,Dt=!1,ma=null;function aN(e,t){var r=Hn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function hC(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,kn=e,wn=ji(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,kn=e,wn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Fs!==null?{id:Po,overflow:Eo}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Hn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,kn=e,wn=null,!0):!1;default:return!1}}function rx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nx(e){if(Dt){var t=wn;if(t){var r=t;if(!hC(e,t)){if(rx(e))throw Error(se(418));t=ji(r.nextSibling);var n=kn;t&&hC(e,t)?aN(n,r):(e.flags=e.flags&-4097|2,Dt=!1,kn=e)}}else{if(rx(e))throw Error(se(418));e.flags=e.flags&-4097|2,Dt=!1,kn=e}}}function mC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;kn=e}function Yf(e){if(e!==kn)return!1;if(!Dt)return mC(e),Dt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Z0(e.type,e.memoizedProps)),t&&(t=wn)){if(rx(e))throw oN(),Error(se(418));for(;t;)aN(e,t),t=ji(t.nextSibling)}if(mC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(se(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){wn=ji(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}wn=null}}else wn=kn?ji(e.stateNode.nextSibling):null;return!0}function oN(){for(var e=wn;e;)e=ji(e.nextSibling)}function Ql(){wn=kn=null,Dt=!1}function vw(e){ma===null?ma=[e]:ma.push(e)}var qL=ri.ReactCurrentBatchConfig;function Jc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(se(309));var n=r.stateNode}if(!n)throw Error(se(147,e));var a=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=a.refs;i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(se(284));if(!r._owner)throw Error(se(290,e))}return e}function Vf(e,t){throw e=Object.prototype.toString.call(t),Error(se(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gC(e){var t=e._init;return t(e._payload)}function iN(e){function t(x,w){if(e){var b=x.deletions;b===null?(x.deletions=[w],x.flags|=16):b.push(w)}}function r(x,w){if(!e)return null;for(;w!==null;)t(x,w),w=w.sibling;return null}function n(x,w){for(x=new Map;w!==null;)w.key!==null?x.set(w.key,w):x.set(w.index,w),w=w.sibling;return x}function a(x,w){return x=$i(x,w),x.index=0,x.sibling=null,x}function o(x,w,b){return x.index=b,e?(b=x.alternate,b!==null?(b=b.index,b<w?(x.flags|=2,w):b):(x.flags|=2,w)):(x.flags|=1048576,w)}function i(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,w,b,S){return w===null||w.tag!==6?(w=jy(b,x.mode,S),w.return=x,w):(w=a(w,b),w.return=x,w)}function l(x,w,b,S){var k=b.type;return k===wl?u(x,w,b.props.children,S,b.key):w!==null&&(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xi&&gC(k)===w.type)?(S=a(w,b.props),S.ref=Jc(x,w,b),S.return=x,S):(S=Vp(b.type,b.key,b.props,null,x.mode,S),S.ref=Jc(x,w,b),S.return=x,S)}function c(x,w,b,S){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=Ay(b,x.mode,S),w.return=x,w):(w=a(w,b.children||[]),w.return=x,w)}function u(x,w,b,S,k){return w===null||w.tag!==7?(w=_s(b,x.mode,S,k),w.return=x,w):(w=a(w,b),w.return=x,w)}function d(x,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=jy(""+w,x.mode,b),w.return=x,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Rf:return b=Vp(w.type,w.key,w.props,null,x.mode,b),b.ref=Jc(x,null,w),b.return=x,b;case bl:return w=Ay(w,x.mode,b),w.return=x,w;case xi:var S=w._init;return d(x,S(w._payload),b)}if(Su(w)||qc(w))return w=_s(w,x.mode,b,null),w.return=x,w;Vf(x,w)}return null}function f(x,w,b,S){var k=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:s(x,w,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Rf:return b.key===k?l(x,w,b,S):null;case bl:return b.key===k?c(x,w,b,S):null;case xi:return k=b._init,f(x,w,k(b._payload),S)}if(Su(b)||qc(b))return k!==null?null:u(x,w,b,S,null);Vf(x,b)}return null}function p(x,w,b,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(b)||null,s(w,x,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Rf:return x=x.get(S.key===null?b:S.key)||null,l(w,x,S,k);case bl:return x=x.get(S.key===null?b:S.key)||null,c(w,x,S,k);case xi:var P=S._init;return p(x,w,b,P(S._payload),k)}if(Su(S)||qc(S))return x=x.get(b)||null,u(w,x,S,k,null);Vf(w,S)}return null}function g(x,w,b,S){for(var k=null,P=null,E=w,O=w=0,D=null;E!==null&&O<b.length;O++){E.index>O?(D=E,E=null):D=E.sibling;var N=f(x,E,b[O],S);if(N===null){E===null&&(E=D);break}e&&E&&N.alternate===null&&t(x,E),w=o(N,w,O),P===null?k=N:P.sibling=N,P=N,E=D}if(O===b.length)return r(x,E),Dt&&ls(x,O),k;if(E===null){for(;O<b.length;O++)E=d(x,b[O],S),E!==null&&(w=o(E,w,O),P===null?k=E:P.sibling=E,P=E);return Dt&&ls(x,O),k}for(E=n(x,E);O<b.length;O++)D=p(E,x,O,b[O],S),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?O:D.key),w=o(D,w,O),P===null?k=D:P.sibling=D,P=D);return e&&E.forEach(function(_){return t(x,_)}),Dt&&ls(x,O),k}function y(x,w,b,S){var k=qc(b);if(typeof k!="function")throw Error(se(150));if(b=k.call(b),b==null)throw Error(se(151));for(var P=k=null,E=w,O=w=0,D=null,N=b.next();E!==null&&!N.done;O++,N=b.next()){E.index>O?(D=E,E=null):D=E.sibling;var _=f(x,E,N.value,S);if(_===null){E===null&&(E=D);break}e&&E&&_.alternate===null&&t(x,E),w=o(_,w,O),P===null?k=_:P.sibling=_,P=_,E=D}if(N.done)return r(x,E),Dt&&ls(x,O),k;if(E===null){for(;!N.done;O++,N=b.next())N=d(x,N.value,S),N!==null&&(w=o(N,w,O),P===null?k=N:P.sibling=N,P=N);return Dt&&ls(x,O),k}for(E=n(x,E);!N.done;O++,N=b.next())N=p(E,x,O,N.value,S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?O:N.key),w=o(N,w,O),P===null?k=N:P.sibling=N,P=N);return e&&E.forEach(function(C){return t(x,C)}),Dt&&ls(x,O),k}function v(x,w,b,S){if(typeof b=="object"&&b!==null&&b.type===wl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Rf:e:{for(var k=b.key,P=w;P!==null;){if(P.key===k){if(k=b.type,k===wl){if(P.tag===7){r(x,P.sibling),w=a(P,b.props.children),w.return=x,x=w;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xi&&gC(k)===P.type){r(x,P.sibling),w=a(P,b.props),w.ref=Jc(x,P,b),w.return=x,x=w;break e}r(x,P);break}else t(x,P);P=P.sibling}b.type===wl?(w=_s(b.props.children,x.mode,S,b.key),w.return=x,x=w):(S=Vp(b.type,b.key,b.props,null,x.mode,S),S.ref=Jc(x,w,b),S.return=x,x=S)}return i(x);case bl:e:{for(P=b.key;w!==null;){if(w.key===P)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){r(x,w.sibling),w=a(w,b.children||[]),w.return=x,x=w;break e}else{r(x,w);break}else t(x,w);w=w.sibling}w=Ay(b,x.mode,S),w.return=x,x=w}return i(x);case xi:return P=b._init,v(x,w,P(b._payload),S)}if(Su(b))return g(x,w,b,S);if(qc(b))return y(x,w,b,S);Vf(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(r(x,w.sibling),w=a(w,b),w.return=x,x=w):(r(x,w),w=jy(b,x.mode,S),w.return=x,x=w),i(x)):r(x,w)}return v}var Zl=iN(!0),sN=iN(!1),Oh=Qi(null),Dh=null,_l=null,yw=null;function xw(){yw=_l=Dh=null}function bw(e){var t=Oh.current;Ct(Oh),e._currentValue=t}function ax(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Fl(e,t){Dh=e,yw=_l=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zr=!0),e.firstContext=null)}function Gn(e){var t=e._currentValue;if(yw!==e)if(e={context:e,memoizedValue:t,next:null},_l===null){if(Dh===null)throw Error(se(308));_l=e,Dh.dependencies={lanes:0,firstContext:e}}else _l=_l.next=e;return t}var ys=null;function ww(e){ys===null?ys=[e]:ys.push(e)}function lN(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,ww(t)):(r.next=a.next,a.next=r),t.interleaved=r,Fo(e,n)}function Fo(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var bi=!1;function Sw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function No(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ai(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,et&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Fo(e,r)}return a=n.interleaved,a===null?(t.next=t,ww(n)):(t.next=a.next,a.next=t),n.interleaved=t,Fo(e,r)}function zp(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,sw(e,r)}}function vC(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?a=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?a=o=t:o=o.next=t}else a=o=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function _h(e,t,r,n){var a=e.updateQueue;bi=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var l=s,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==i&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=a.baseState;i=0,u=c=l=null,s=o;do{var f=s.lane,p=s.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,y=s;switch(f=t,p=r,y.tag){case 1:if(g=y.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=Rt({},d,f);break e;case 2:bi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=f;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;f=s,s=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(u===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=u,t=a.shared.interleaved,t!==null){a=t;do i|=a.lane,a=a.next;while(a!==t)}else o===null&&(a.shared.lanes=0);Bs|=i,e.lanes=i,e.memoizedState=d}}function yC(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(se(191,a));a.call(n)}}}var Gd={},to=Qi(Gd),fd=Qi(Gd),pd=Qi(Gd);function xs(e){if(e===Gd)throw Error(se(174));return e}function kw(e,t){switch(bt(pd,t),bt(fd,e),bt(to,Gd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:L0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=L0(t,e)}Ct(to),bt(to,t)}function Jl(){Ct(to),Ct(fd),Ct(pd)}function uN(e){xs(pd.current);var t=xs(to.current),r=L0(t,e.type);t!==r&&(bt(fd,e),bt(to,r))}function Cw(e){fd.current===e&&(Ct(to),Ct(fd))}var Tt=Qi(0);function Nh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Oy=[];function Pw(){for(var e=0;e<Oy.length;e++)Oy[e]._workInProgressVersionPrimary=null;Oy.length=0}var Bp=ri.ReactCurrentDispatcher,Dy=ri.ReactCurrentBatchConfig,zs=0,At=null,er=null,fr=null,Mh=!1,Bu=!1,hd=0,GL=0;function Dr(){throw Error(se(321))}function Ew(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Da(e[r],t[r]))return!1;return!0}function Ow(e,t,r,n,a,o){if(zs=o,At=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bp.current=e===null||e.memoizedState===null?JL:e3,e=r(n,a),Bu){o=0;do{if(Bu=!1,hd=0,25<=o)throw Error(se(301));o+=1,fr=er=null,t.updateQueue=null,Bp.current=t3,e=r(n,a)}while(Bu)}if(Bp.current=Th,t=er!==null&&er.next!==null,zs=0,fr=er=At=null,Mh=!1,t)throw Error(se(300));return e}function Dw(){var e=hd!==0;return hd=0,e}function La(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fr===null?At.memoizedState=fr=e:fr=fr.next=e,fr}function Xn(){if(er===null){var e=At.alternate;e=e!==null?e.memoizedState:null}else e=er.next;var t=fr===null?At.memoizedState:fr.next;if(t!==null)fr=t,er=e;else{if(e===null)throw Error(se(310));er=e,e={memoizedState:er.memoizedState,baseState:er.baseState,baseQueue:er.baseQueue,queue:er.queue,next:null},fr===null?At.memoizedState=fr=e:fr=fr.next=e}return fr}function md(e,t){return typeof t=="function"?t(e):t}function _y(e){var t=Xn(),r=t.queue;if(r===null)throw Error(se(311));r.lastRenderedReducer=e;var n=er,a=n.baseQueue,o=r.pending;if(o!==null){if(a!==null){var i=a.next;a.next=o.next,o.next=i}n.baseQueue=a=o,r.pending=null}if(a!==null){o=a.next,n=n.baseState;var s=i=null,l=null,c=o;do{var u=c.lane;if((zs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=d,i=n):l=l.next=d,At.lanes|=u,Bs|=u}c=c.next}while(c!==null&&c!==o);l===null?i=n:l.next=s,Da(n,t.memoizedState)||(Zr=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do o=a.lane,At.lanes|=o,Bs|=o,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ny(e){var t=Xn(),r=t.queue;if(r===null)throw Error(se(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,o=t.memoizedState;if(a!==null){r.pending=null;var i=a=a.next;do o=e(o,i.action),i=i.next;while(i!==a);Da(o,t.memoizedState)||(Zr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function dN(){}function fN(e,t){var r=At,n=Xn(),a=t(),o=!Da(n.memoizedState,a);if(o&&(n.memoizedState=a,Zr=!0),n=n.queue,_w(mN.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||fr!==null&&fr.memoizedState.tag&1){if(r.flags|=2048,gd(9,hN.bind(null,r,n,a,t),void 0,null),pr===null)throw Error(se(349));zs&30||pN(r,t,a)}return a}function pN(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=At.updateQueue,t===null?(t={lastEffect:null,stores:null},At.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function hN(e,t,r,n){t.value=r,t.getSnapshot=n,gN(t)&&vN(e)}function mN(e,t,r){return r(function(){gN(t)&&vN(e)})}function gN(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Da(e,r)}catch{return!0}}function vN(e){var t=Fo(e,1);t!==null&&Pa(t,e,1,-1)}function xC(e){var t=La();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:md,lastRenderedState:e},t.queue=e,e=e.dispatch=ZL.bind(null,At,e),[t.memoizedState,e]}function gd(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=At.updateQueue,t===null?(t={lastEffect:null,stores:null},At.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function yN(){return Xn().memoizedState}function Wp(e,t,r,n){var a=La();At.flags|=e,a.memoizedState=gd(1|t,r,void 0,n===void 0?null:n)}function ug(e,t,r,n){var a=Xn();n=n===void 0?null:n;var o=void 0;if(er!==null){var i=er.memoizedState;if(o=i.destroy,n!==null&&Ew(n,i.deps)){a.memoizedState=gd(t,r,o,n);return}}At.flags|=e,a.memoizedState=gd(1|t,r,o,n)}function bC(e,t){return Wp(8390656,8,e,t)}function _w(e,t){return ug(2048,8,e,t)}function xN(e,t){return ug(4,2,e,t)}function bN(e,t){return ug(4,4,e,t)}function wN(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function SN(e,t,r){return r=r!=null?r.concat([e]):null,ug(4,4,wN.bind(null,t,e),r)}function Nw(){}function kN(e,t){var r=Xn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ew(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function CN(e,t){var r=Xn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ew(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function PN(e,t,r){return zs&21?(Da(r,t)||(r=N_(),At.lanes|=r,Bs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Zr=!0),e.memoizedState=r)}function XL(e,t){var r=mt;mt=r!==0&&4>r?r:4,e(!0);var n=Dy.transition;Dy.transition={};try{e(!1),t()}finally{mt=r,Dy.transition=n}}function EN(){return Xn().memoizedState}function QL(e,t,r){var n=Ii(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ON(e))DN(t,r);else if(r=lN(e,t,r,n),r!==null){var a=Hr();Pa(r,e,n,a),_N(r,t,n)}}function ZL(e,t,r){var n=Ii(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ON(e))DN(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,r);if(a.hasEagerState=!0,a.eagerState=s,Da(s,i)){var l=t.interleaved;l===null?(a.next=a,ww(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=lN(e,t,a,n),r!==null&&(a=Hr(),Pa(r,e,n,a),_N(r,t,n))}}function ON(e){var t=e.alternate;return e===At||t!==null&&t===At}function DN(e,t){Bu=Mh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function _N(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,sw(e,r)}}var Th={readContext:Gn,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useInsertionEffect:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useDeferredValue:Dr,useTransition:Dr,useMutableSource:Dr,useSyncExternalStore:Dr,useId:Dr,unstable_isNewReconciler:!1},JL={readContext:Gn,useCallback:function(e,t){return La().memoizedState=[e,t===void 0?null:t],e},useContext:Gn,useEffect:bC,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wp(4194308,4,wN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wp(4,2,e,t)},useMemo:function(e,t){var r=La();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=La();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=QL.bind(null,At,e),[n.memoizedState,e]},useRef:function(e){var t=La();return e={current:e},t.memoizedState=e},useState:xC,useDebugValue:Nw,useDeferredValue:function(e){return La().memoizedState=e},useTransition:function(){var e=xC(!1),t=e[0];return e=XL.bind(null,e[1]),La().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=At,a=La();if(Dt){if(r===void 0)throw Error(se(407));r=r()}else{if(r=t(),pr===null)throw Error(se(349));zs&30||pN(n,t,r)}a.memoizedState=r;var o={value:r,getSnapshot:t};return a.queue=o,bC(mN.bind(null,n,o,e),[e]),n.flags|=2048,gd(9,hN.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=La(),t=pr.identifierPrefix;if(Dt){var r=Eo,n=Po;r=(n&~(1<<32-Ca(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=hd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=GL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},e3={readContext:Gn,useCallback:kN,useContext:Gn,useEffect:_w,useImperativeHandle:SN,useInsertionEffect:xN,useLayoutEffect:bN,useMemo:CN,useReducer:_y,useRef:yN,useState:function(){return _y(md)},useDebugValue:Nw,useDeferredValue:function(e){var t=Xn();return PN(t,er.memoizedState,e)},useTransition:function(){var e=_y(md)[0],t=Xn().memoizedState;return[e,t]},useMutableSource:dN,useSyncExternalStore:fN,useId:EN,unstable_isNewReconciler:!1},t3={readContext:Gn,useCallback:kN,useContext:Gn,useEffect:_w,useImperativeHandle:SN,useInsertionEffect:xN,useLayoutEffect:bN,useMemo:CN,useReducer:Ny,useRef:yN,useState:function(){return Ny(md)},useDebugValue:Nw,useDeferredValue:function(e){var t=Xn();return er===null?t.memoizedState=e:PN(t,er.memoizedState,e)},useTransition:function(){var e=Ny(md)[0],t=Xn().memoizedState;return[e,t]},useMutableSource:dN,useSyncExternalStore:fN,useId:EN,unstable_isNewReconciler:!1};function fa(e,t){if(e&&e.defaultProps){t=Rt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ox(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Rt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var dg={isMounted:function(e){return(e=e._reactInternals)?Zs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Hr(),a=Ii(e),o=No(n,a);o.payload=t,r!=null&&(o.callback=r),t=Ai(e,o,a),t!==null&&(Pa(t,e,a,n),zp(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Hr(),a=Ii(e),o=No(n,a);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Ai(e,o,a),t!==null&&(Pa(t,e,a,n),zp(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Hr(),n=Ii(e),a=No(r,n);a.tag=2,t!=null&&(a.callback=t),t=Ai(e,a,n),t!==null&&(Pa(t,e,n,r),zp(t,e,n))}};function wC(e,t,r,n,a,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!ld(r,n)||!ld(a,o):!0}function NN(e,t,r){var n=!1,a=Ui,o=t.contextType;return typeof o=="object"&&o!==null?o=Gn(o):(a=tn(t)?Ls:$r.current,n=t.contextTypes,o=(n=n!=null)?Xl(e,a):Ui),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dg,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function SC(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&dg.enqueueReplaceState(t,t.state,null)}function ix(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Sw(e);var o=t.contextType;typeof o=="object"&&o!==null?a.context=Gn(o):(o=tn(t)?Ls:$r.current,a.context=Xl(e,o)),a.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ox(e,t,o,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&dg.enqueueReplaceState(a,a.state,null),_h(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function ec(e,t){try{var r="",n=t;do r+=_4(n),n=n.return;while(n);var a=r}catch(o){a=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:a,digest:null}}function My(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function sx(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var r3=typeof WeakMap=="function"?WeakMap:Map;function MN(e,t,r){r=No(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ah||(Ah=!0,vx=n),sx(e,t)},r}function TN(e,t,r){r=No(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){sx(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){sx(e,t),typeof n!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function kC(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new r3;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=g3.bind(null,e,t,r),t.then(e,e))}function CC(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function PC(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=No(-1,1),t.tag=2,Ai(r,t,1))),r.lanes|=1),e)}var n3=ri.ReactCurrentOwner,Zr=!1;function Lr(e,t,r,n){t.child=e===null?sN(t,null,r,n):Zl(t,e.child,r,n)}function EC(e,t,r,n,a){r=r.render;var o=t.ref;return Fl(t,a),n=Ow(e,t,r,n,o,a),r=Dw(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,zo(e,t,a)):(Dt&&r&&mw(t),t.flags|=1,Lr(e,t,n,a),t.child)}function OC(e,t,r,n,a){if(e===null){var o=r.type;return typeof o=="function"&&!Lw(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,jN(e,t,o,n,a)):(e=Vp(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&a)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:ld,r(i,n)&&e.ref===t.ref)return zo(e,t,a)}return t.flags|=1,e=$i(o,n),e.ref=t.ref,e.return=t,t.child=e}function jN(e,t,r,n,a){if(e!==null){var o=e.memoizedProps;if(ld(o,n)&&e.ref===t.ref)if(Zr=!1,t.pendingProps=n=o,(e.lanes&a)!==0)e.flags&131072&&(Zr=!0);else return t.lanes=e.lanes,zo(e,t,a)}return lx(e,t,r,n,a)}function AN(e,t,r){var n=t.pendingProps,a=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Ml,mn),mn|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(Ml,mn),mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,bt(Ml,mn),mn|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,bt(Ml,mn),mn|=n;return Lr(e,t,a,r),t.child}function RN(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function lx(e,t,r,n,a){var o=tn(r)?Ls:$r.current;return o=Xl(t,o),Fl(t,a),r=Ow(e,t,r,n,o,a),n=Dw(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,zo(e,t,a)):(Dt&&n&&mw(t),t.flags|=1,Lr(e,t,r,a),t.child)}function DC(e,t,r,n,a){if(tn(r)){var o=!0;Ch(t)}else o=!1;if(Fl(t,a),t.stateNode===null)Hp(e,t),NN(t,r,n),ix(t,r,n,a),n=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=Gn(c):(c=tn(r)?Ls:$r.current,c=Xl(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==n||l!==c)&&SC(t,i,n,c),bi=!1;var f=t.memoizedState;i.state=f,_h(t,n,i,a),l=t.memoizedState,s!==n||f!==l||en.current||bi?(typeof u=="function"&&(ox(t,r,u,n),l=t.memoizedState),(s=bi||wC(t,r,s,n,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=c,n=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,cN(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:fa(t.type,s),i.props=c,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Gn(l):(l=tn(r)?Ls:$r.current,l=Xl(t,l));var p=r.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&SC(t,i,n,l),bi=!1,f=t.memoizedState,i.state=f,_h(t,n,i,a);var g=t.memoizedState;s!==d||f!==g||en.current||bi?(typeof p=="function"&&(ox(t,r,p,n),g=t.memoizedState),(c=bi||wC(t,r,c,n,f,g,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),i.props=n,i.state=g,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return cx(e,t,r,n,o,a)}function cx(e,t,r,n,a,o){RN(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return a&&pC(t,r,!1),zo(e,t,o);n=t.stateNode,n3.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Zl(t,e.child,null,o),t.child=Zl(t,null,s,o)):Lr(e,t,s,o),t.memoizedState=n.state,a&&pC(t,r,!0),t.child}function IN(e){var t=e.stateNode;t.pendingContext?fC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fC(e,t.context,!1),kw(e,t.containerInfo)}function _C(e,t,r,n,a){return Ql(),vw(a),t.flags|=256,Lr(e,t,r,n),t.child}var ux={dehydrated:null,treeContext:null,retryLane:0};function dx(e){return{baseLanes:e,cachePool:null,transitions:null}}function $N(e,t,r){var n=t.pendingProps,a=Tt.current,o=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(a&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),bt(Tt,a&1),e===null)return nx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=hg(i,n,0,null),e=_s(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=dx(r),t.memoizedState=ux,e):Mw(t,i));if(a=e.memoizedState,a!==null&&(s=a.dehydrated,s!==null))return a3(e,t,i,n,s,a,r);if(o){o=n.fallback,i=t.mode,a=e.child,s=a.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=$i(a,l),n.subtreeFlags=a.subtreeFlags&14680064),s!==null?o=$i(s,o):(o=_s(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?dx(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=ux,n}return o=e.child,e=o.sibling,n=$i(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Mw(e,t){return t=hg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Kf(e,t,r,n){return n!==null&&vw(n),Zl(t,e.child,null,r),e=Mw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function a3(e,t,r,n,a,o,i){if(r)return t.flags&256?(t.flags&=-257,n=My(Error(se(422))),Kf(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,a=t.mode,n=hg({mode:"visible",children:n.children},a,0,null),o=_s(o,a,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Zl(t,e.child,null,i),t.child.memoizedState=dx(i),t.memoizedState=ux,o);if(!(t.mode&1))return Kf(e,t,i,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(se(419)),n=My(o,n,void 0),Kf(e,t,i,n)}if(s=(i&e.childLanes)!==0,Zr||s){if(n=pr,n!==null){switch(i&-i){case 4:a=2;break;case 16:a=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|i)?0:a,a!==0&&a!==o.retryLane&&(o.retryLane=a,Fo(e,a),Pa(n,e,a,-1))}return $w(),n=My(Error(se(421))),Kf(e,t,i,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=v3.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,wn=ji(a.nextSibling),kn=t,Dt=!0,ma=null,e!==null&&(Fn[zn++]=Po,Fn[zn++]=Eo,Fn[zn++]=Fs,Po=e.id,Eo=e.overflow,Fs=t),t=Mw(t,n.children),t.flags|=4096,t)}function NC(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ax(e.return,t,r)}function Ty(e,t,r,n,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=a)}function LN(e,t,r){var n=t.pendingProps,a=n.revealOrder,o=n.tail;if(Lr(e,t,n.children,r),n=Tt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&NC(e,r,t);else if(e.tag===19)NC(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(bt(Tt,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&Nh(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Ty(t,!1,a,r,o);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Nh(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Ty(t,!0,r,null,o);break;case"together":Ty(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zo(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Bs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(se(153));if(t.child!==null){for(e=t.child,r=$i(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=$i(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function o3(e,t,r){switch(t.tag){case 3:IN(t),Ql();break;case 5:uN(t);break;case 1:tn(t.type)&&Ch(t);break;case 4:kw(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;bt(Oh,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(bt(Tt,Tt.current&1),t.flags|=128,null):r&t.child.childLanes?$N(e,t,r):(bt(Tt,Tt.current&1),e=zo(e,t,r),e!==null?e.sibling:null);bt(Tt,Tt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return LN(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),bt(Tt,Tt.current),n)break;return null;case 22:case 23:return t.lanes=0,AN(e,t,r)}return zo(e,t,r)}var FN,fx,zN,BN;FN=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};fx=function(){};zN=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,xs(to.current);var o=null;switch(r){case"input":a=A0(e,a),n=A0(e,n),o=[];break;case"select":a=Rt({},a,{value:void 0}),n=Rt({},n,{value:void 0}),o=[];break;case"textarea":a=$0(e,a),n=$0(e,n),o=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Sh)}F0(r,n);var i;r=null;for(c in a)if(!n.hasOwnProperty(c)&&a.hasOwnProperty(c)&&a[c]!=null)if(c==="style"){var s=a[c];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(td.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(s=a!=null?a[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(td.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&St("scroll",e),o||s===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};BN=function(e,t,r,n){r!==n&&(t.flags|=4)};function eu(e,t){if(!Dt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function _r(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function i3(e,t,r){var n=t.pendingProps;switch(gw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _r(t),null;case 1:return tn(t.type)&&kh(),_r(t),null;case 3:return n=t.stateNode,Jl(),Ct(en),Ct($r),Pw(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Yf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma!==null&&(bx(ma),ma=null))),fx(e,t),_r(t),null;case 5:Cw(t);var a=xs(pd.current);if(r=t.type,e!==null&&t.stateNode!=null)zN(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(se(166));return _r(t),null}if(e=xs(to.current),Yf(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Ua]=t,n[dd]=o,e=(t.mode&1)!==0,r){case"dialog":St("cancel",n),St("close",n);break;case"iframe":case"object":case"embed":St("load",n);break;case"video":case"audio":for(a=0;a<Cu.length;a++)St(Cu[a],n);break;case"source":St("error",n);break;case"img":case"image":case"link":St("error",n),St("load",n);break;case"details":St("toggle",n);break;case"input":Fk(n,o),St("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},St("invalid",n);break;case"textarea":Bk(n,o),St("invalid",n)}F0(r,o),a=null;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];i==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&Uf(n.textContent,s,e),a=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Uf(n.textContent,s,e),a=["children",""+s]):td.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&St("scroll",n)}switch(r){case"input":If(n),zk(n,o,!0);break;case"textarea":If(n),Wk(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Sh)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=m_(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Ua]=t,e[dd]=n,FN(e,t,!1,!1),t.stateNode=e;e:{switch(i=z0(r,n),r){case"dialog":St("cancel",e),St("close",e),a=n;break;case"iframe":case"object":case"embed":St("load",e),a=n;break;case"video":case"audio":for(a=0;a<Cu.length;a++)St(Cu[a],e);a=n;break;case"source":St("error",e),a=n;break;case"img":case"image":case"link":St("error",e),St("load",e),a=n;break;case"details":St("toggle",e),a=n;break;case"input":Fk(e,n),a=A0(e,n),St("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Rt({},n,{value:void 0}),St("invalid",e);break;case"textarea":Bk(e,n),a=$0(e,n),St("invalid",e);break;default:a=n}F0(r,a),s=a;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?y_(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g_(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&rd(e,l):typeof l=="number"&&rd(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(td.hasOwnProperty(o)?l!=null&&o==="onScroll"&&St("scroll",e):l!=null&&tw(e,o,l,i))}switch(r){case"input":If(e),zk(e,n,!1);break;case"textarea":If(e),Wk(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Hi(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Rl(e,!!n.multiple,o,!1):n.defaultValue!=null&&Rl(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Sh)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return _r(t),null;case 6:if(e&&t.stateNode!=null)BN(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(se(166));if(r=xs(pd.current),xs(to.current),Yf(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ua]=t,(o=n.nodeValue!==r)&&(e=kn,e!==null))switch(e.tag){case 3:Uf(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Uf(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ua]=t,t.stateNode=n}return _r(t),null;case 13:if(Ct(Tt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Dt&&wn!==null&&t.mode&1&&!(t.flags&128))oN(),Ql(),t.flags|=98560,o=!1;else if(o=Yf(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(se(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[Ua]=t}else Ql(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_r(t),o=!1}else ma!==null&&(bx(ma),ma=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Tt.current&1?nr===0&&(nr=3):$w())),t.updateQueue!==null&&(t.flags|=4),_r(t),null);case 4:return Jl(),fx(e,t),e===null&&cd(t.stateNode.containerInfo),_r(t),null;case 10:return bw(t.type._context),_r(t),null;case 17:return tn(t.type)&&kh(),_r(t),null;case 19:if(Ct(Tt),o=t.memoizedState,o===null)return _r(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)eu(o,!1);else{if(nr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Nh(e),i!==null){for(t.flags|=128,eu(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return bt(Tt,Tt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Yt()>tc&&(t.flags|=128,n=!0,eu(o,!1),t.lanes=4194304)}else{if(!n)if(e=Nh(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),eu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Dt)return _r(t),null}else 2*Yt()-o.renderingStartTime>tc&&r!==1073741824&&(t.flags|=128,n=!0,eu(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Yt(),t.sibling=null,r=Tt.current,bt(Tt,n?r&1|2:r&1),t):(_r(t),null);case 22:case 23:return Iw(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?mn&1073741824&&(_r(t),t.subtreeFlags&6&&(t.flags|=8192)):_r(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function s3(e,t){switch(gw(t),t.tag){case 1:return tn(t.type)&&kh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(),Ct(en),Ct($r),Pw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cw(t),null;case 13:if(Ct(Tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Tt),null;case 4:return Jl(),null;case 10:return bw(t.type._context),null;case 22:case 23:return Iw(),null;case 24:return null;default:return null}}var qf=!1,Tr=!1,l3=typeof WeakSet=="function"?WeakSet:Set,be=null;function Nl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Bt(e,t,n)}else r.current=null}function px(e,t,r){try{r()}catch(n){Bt(e,t,n)}}var MC=!1;function c3(e,t){if(X0=xh,e=V_(),hw(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==r||a!==0&&d.nodeType!==3||(s=i+a),d!==o||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===a&&(s=i),f===o&&++u===n&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Q0={focusedElem:e,selectionRange:r},xh=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,v=g.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?y:fa(t.type,y),v);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(S){Bt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return g=MC,MC=!1,g}function Wu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&px(t,r,o)}a=a.next}while(a!==n)}}function fg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function hx(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function WN(e){var t=e.alternate;t!==null&&(e.alternate=null,WN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ua],delete t[dd],delete t[ex],delete t[YL],delete t[VL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function HN(e){return e.tag===5||e.tag===3||e.tag===4}function TC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Sh));else if(n!==4&&(e=e.child,e!==null))for(mx(e,t,r),e=e.sibling;e!==null;)mx(e,t,r),e=e.sibling}function gx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(gx(e,t,r),e=e.sibling;e!==null;)gx(e,t,r),e=e.sibling}var xr=null,pa=!1;function vi(e,t,r){for(r=r.child;r!==null;)UN(e,t,r),r=r.sibling}function UN(e,t,r){if(eo&&typeof eo.onCommitFiberUnmount=="function")try{eo.onCommitFiberUnmount(ag,r)}catch{}switch(r.tag){case 5:Tr||Nl(r,t);case 6:var n=xr,a=pa;xr=null,vi(e,t,r),xr=n,pa=a,xr!==null&&(pa?(e=xr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):xr.removeChild(r.stateNode));break;case 18:xr!==null&&(pa?(e=xr,r=r.stateNode,e.nodeType===8?Py(e.parentNode,r):e.nodeType===1&&Py(e,r),id(e)):Py(xr,r.stateNode));break;case 4:n=xr,a=pa,xr=r.stateNode.containerInfo,pa=!0,vi(e,t,r),xr=n,pa=a;break;case 0:case 11:case 14:case 15:if(!Tr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var o=a,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&px(r,t,i),a=a.next}while(a!==n)}vi(e,t,r);break;case 1:if(!Tr&&(Nl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Bt(r,t,s)}vi(e,t,r);break;case 21:vi(e,t,r);break;case 22:r.mode&1?(Tr=(n=Tr)||r.memoizedState!==null,vi(e,t,r),Tr=n):vi(e,t,r);break;default:vi(e,t,r)}}function jC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new l3),t.forEach(function(n){var a=y3.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function ua(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var o=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:xr=s.stateNode,pa=!1;break e;case 3:xr=s.stateNode.containerInfo,pa=!0;break e;case 4:xr=s.stateNode.containerInfo,pa=!0;break e}s=s.return}if(xr===null)throw Error(se(160));UN(o,i,a),xr=null,pa=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(c){Bt(a,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)YN(t,e),t=t.sibling}function YN(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ua(t,e),Ra(e),n&4){try{Wu(3,e,e.return),fg(3,e)}catch(y){Bt(e,e.return,y)}try{Wu(5,e,e.return)}catch(y){Bt(e,e.return,y)}}break;case 1:ua(t,e),Ra(e),n&512&&r!==null&&Nl(r,r.return);break;case 5:if(ua(t,e),Ra(e),n&512&&r!==null&&Nl(r,r.return),e.flags&32){var a=e.stateNode;try{rd(a,"")}catch(y){Bt(e,e.return,y)}}if(n&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&p_(a,o),z0(s,i);var c=z0(s,o);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?y_(a,d):u==="dangerouslySetInnerHTML"?g_(a,d):u==="children"?rd(a,d):tw(a,u,d,c)}switch(s){case"input":R0(a,o);break;case"textarea":h_(a,o);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Rl(a,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Rl(a,!!o.multiple,o.defaultValue,!0):Rl(a,!!o.multiple,o.multiple?[]:"",!1))}a[dd]=o}catch(y){Bt(e,e.return,y)}}break;case 6:if(ua(t,e),Ra(e),n&4){if(e.stateNode===null)throw Error(se(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(y){Bt(e,e.return,y)}}break;case 3:if(ua(t,e),Ra(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{id(t.containerInfo)}catch(y){Bt(e,e.return,y)}break;case 4:ua(t,e),Ra(e);break;case 13:ua(t,e),Ra(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(Aw=Yt())),n&4&&jC(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(Tr=(c=Tr)||u,ua(t,e),Tr=c):ua(t,e),Ra(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(be=e,u=e.child;u!==null;){for(d=be=u;be!==null;){switch(f=be,p=f.child,f.tag){case 0:case 11:case 14:case 15:Wu(4,f,f.return);break;case 1:Nl(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){Bt(n,r,y)}}break;case 5:Nl(f,f.return);break;case 22:if(f.memoizedState!==null){RC(d);continue}}p!==null?(p.return=f,be=p):RC(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{a=d.stateNode,c?(o=a.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=v_("display",i))}catch(y){Bt(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Bt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ua(t,e),Ra(e),n&4&&jC(e);break;case 21:break;default:ua(t,e),Ra(e)}}function Ra(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(HN(r)){var n=r;break e}r=r.return}throw Error(se(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(rd(a,""),n.flags&=-33);var o=TC(e);gx(e,o,a);break;case 3:case 4:var i=n.stateNode.containerInfo,s=TC(e);mx(e,s,i);break;default:throw Error(se(161))}}catch(l){Bt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function u3(e,t,r){be=e,VN(e)}function VN(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var a=be,o=a.child;if(a.tag===22&&n){var i=a.memoizedState!==null||qf;if(!i){var s=a.alternate,l=s!==null&&s.memoizedState!==null||Tr;s=qf;var c=Tr;if(qf=i,(Tr=l)&&!c)for(be=a;be!==null;)i=be,l=i.child,i.tag===22&&i.memoizedState!==null?IC(a):l!==null?(l.return=i,be=l):IC(a);for(;o!==null;)be=o,VN(o),o=o.sibling;be=a,qf=s,Tr=c}AC(e)}else a.subtreeFlags&8772&&o!==null?(o.return=a,be=o):AC(e)}}function AC(e){for(;be!==null;){var t=be;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Tr||fg(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Tr)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:fa(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&yC(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}yC(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&id(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}Tr||t.flags&512&&hx(t)}catch(f){Bt(t,t.return,f)}}if(t===e){be=null;break}if(r=t.sibling,r!==null){r.return=t.return,be=r;break}be=t.return}}function RC(e){for(;be!==null;){var t=be;if(t===e){be=null;break}var r=t.sibling;if(r!==null){r.return=t.return,be=r;break}be=t.return}}function IC(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{fg(4,t)}catch(l){Bt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(l){Bt(t,a,l)}}var o=t.return;try{hx(t)}catch(l){Bt(t,o,l)}break;case 5:var i=t.return;try{hx(t)}catch(l){Bt(t,i,l)}}}catch(l){Bt(t,t.return,l)}if(t===e){be=null;break}var s=t.sibling;if(s!==null){s.return=t.return,be=s;break}be=t.return}}var d3=Math.ceil,jh=ri.ReactCurrentDispatcher,Tw=ri.ReactCurrentOwner,Vn=ri.ReactCurrentBatchConfig,et=0,pr=null,Zt=null,Sr=0,mn=0,Ml=Qi(0),nr=0,vd=null,Bs=0,pg=0,jw=0,Hu=null,Xr=null,Aw=0,tc=1/0,bo=null,Ah=!1,vx=null,Ri=null,Gf=!1,Di=null,Rh=0,Uu=0,yx=null,Up=-1,Yp=0;function Hr(){return et&6?Yt():Up!==-1?Up:Up=Yt()}function Ii(e){return e.mode&1?et&2&&Sr!==0?Sr&-Sr:qL.transition!==null?(Yp===0&&(Yp=N_()),Yp):(e=mt,e!==0||(e=window.event,e=e===void 0?16:$_(e.type)),e):1}function Pa(e,t,r,n){if(50<Uu)throw Uu=0,yx=null,Error(se(185));Vd(e,r,n),(!(et&2)||e!==pr)&&(e===pr&&(!(et&2)&&(pg|=r),nr===4&&Ci(e,Sr)),rn(e,n),r===1&&et===0&&!(t.mode&1)&&(tc=Yt()+500,cg&&Zi()))}function rn(e,t){var r=e.callbackNode;q4(e,t);var n=yh(e,e===pr?Sr:0);if(n===0)r!==null&&Yk(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Yk(r),t===1)e.tag===0?KL($C.bind(null,e)):rN($C.bind(null,e)),HL(function(){!(et&6)&&Zi()}),r=null;else{switch(M_(n)){case 1:r=iw;break;case 4:r=D_;break;case 16:r=vh;break;case 536870912:r=__;break;default:r=vh}r=eM(r,KN.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function KN(e,t){if(Up=-1,Yp=0,et&6)throw Error(se(327));var r=e.callbackNode;if(zl()&&e.callbackNode!==r)return null;var n=yh(e,e===pr?Sr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ih(e,n);else{t=n;var a=et;et|=2;var o=GN();(pr!==e||Sr!==t)&&(bo=null,tc=Yt()+500,Ds(e,t));do try{h3();break}catch(s){qN(e,s)}while(!0);xw(),jh.current=o,et=a,Zt!==null?t=0:(pr=null,Sr=0,t=nr)}if(t!==0){if(t===2&&(a=Y0(e),a!==0&&(n=a,t=xx(e,a))),t===1)throw r=vd,Ds(e,0),Ci(e,n),rn(e,Yt()),r;if(t===6)Ci(e,n);else{if(a=e.current.alternate,!(n&30)&&!f3(a)&&(t=Ih(e,n),t===2&&(o=Y0(e),o!==0&&(n=o,t=xx(e,o))),t===1))throw r=vd,Ds(e,0),Ci(e,n),rn(e,Yt()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(se(345));case 2:cs(e,Xr,bo);break;case 3:if(Ci(e,n),(n&130023424)===n&&(t=Aw+500-Yt(),10<t)){if(yh(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Hr(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=J0(cs.bind(null,e,Xr,bo),t);break}cs(e,Xr,bo);break;case 4:if(Ci(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var i=31-Ca(n);o=1<<i,i=t[i],i>a&&(a=i),n&=~o}if(n=a,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*d3(n/1960))-n,10<n){e.timeoutHandle=J0(cs.bind(null,e,Xr,bo),n);break}cs(e,Xr,bo);break;case 5:cs(e,Xr,bo);break;default:throw Error(se(329))}}}return rn(e,Yt()),e.callbackNode===r?KN.bind(null,e):null}function xx(e,t){var r=Hu;return e.current.memoizedState.isDehydrated&&(Ds(e,t).flags|=256),e=Ih(e,t),e!==2&&(t=Xr,Xr=r,t!==null&&bx(t)),e}function bx(e){Xr===null?Xr=e:Xr.push.apply(Xr,e)}function f3(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],o=a.getSnapshot;a=a.value;try{if(!Da(o(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ci(e,t){for(t&=~jw,t&=~pg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ca(t),n=1<<r;e[r]=-1,t&=~n}}function $C(e){if(et&6)throw Error(se(327));zl();var t=yh(e,0);if(!(t&1))return rn(e,Yt()),null;var r=Ih(e,t);if(e.tag!==0&&r===2){var n=Y0(e);n!==0&&(t=n,r=xx(e,n))}if(r===1)throw r=vd,Ds(e,0),Ci(e,t),rn(e,Yt()),r;if(r===6)throw Error(se(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cs(e,Xr,bo),rn(e,Yt()),null}function Rw(e,t){var r=et;et|=1;try{return e(t)}finally{et=r,et===0&&(tc=Yt()+500,cg&&Zi())}}function Ws(e){Di!==null&&Di.tag===0&&!(et&6)&&zl();var t=et;et|=1;var r=Vn.transition,n=mt;try{if(Vn.transition=null,mt=1,e)return e()}finally{mt=n,Vn.transition=r,et=t,!(et&6)&&Zi()}}function Iw(){mn=Ml.current,Ct(Ml)}function Ds(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,WL(r)),Zt!==null)for(r=Zt.return;r!==null;){var n=r;switch(gw(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&kh();break;case 3:Jl(),Ct(en),Ct($r),Pw();break;case 5:Cw(n);break;case 4:Jl();break;case 13:Ct(Tt);break;case 19:Ct(Tt);break;case 10:bw(n.type._context);break;case 22:case 23:Iw()}r=r.return}if(pr=e,Zt=e=$i(e.current,null),Sr=mn=t,nr=0,vd=null,jw=pg=Bs=0,Xr=Hu=null,ys!==null){for(t=0;t<ys.length;t++)if(r=ys[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=a,n.next=i}r.pending=n}ys=null}return e}function qN(e,t){do{var r=Zt;try{if(xw(),Bp.current=Th,Mh){for(var n=At.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Mh=!1}if(zs=0,fr=er=At=null,Bu=!1,hd=0,Tw.current=null,r===null||r.return===null){nr=1,vd=t,Zt=null;break}e:{var o=e,i=r.return,s=r,l=t;if(t=Sr,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=s,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=CC(i);if(p!==null){p.flags&=-257,PC(p,i,s,o,t),p.mode&1&&kC(o,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var y=new Set;y.add(l),t.updateQueue=y}else g.add(l);break e}else{if(!(t&1)){kC(o,c,t),$w();break e}l=Error(se(426))}}else if(Dt&&s.mode&1){var v=CC(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),PC(v,i,s,o,t),vw(ec(l,s));break e}}o=l=ec(l,s),nr!==4&&(nr=2),Hu===null?Hu=[o]:Hu.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=MN(o,l,t);vC(o,x);break e;case 1:s=l;var w=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ri===null||!Ri.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=TN(o,s,t);vC(o,S);break e}}o=o.return}while(o!==null)}QN(r)}catch(k){t=k,Zt===r&&r!==null&&(Zt=r=r.return);continue}break}while(!0)}function GN(){var e=jh.current;return jh.current=Th,e===null?Th:e}function $w(){(nr===0||nr===3||nr===2)&&(nr=4),pr===null||!(Bs&268435455)&&!(pg&268435455)||Ci(pr,Sr)}function Ih(e,t){var r=et;et|=2;var n=GN();(pr!==e||Sr!==t)&&(bo=null,Ds(e,t));do try{p3();break}catch(a){qN(e,a)}while(!0);if(xw(),et=r,jh.current=n,Zt!==null)throw Error(se(261));return pr=null,Sr=0,nr}function p3(){for(;Zt!==null;)XN(Zt)}function h3(){for(;Zt!==null&&!F4();)XN(Zt)}function XN(e){var t=JN(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?QN(e):Zt=t,Tw.current=null}function QN(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=s3(r,t),r!==null){r.flags&=32767,Zt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nr=6,Zt=null;return}}else if(r=i3(r,t,mn),r!==null){Zt=r;return}if(t=t.sibling,t!==null){Zt=t;return}Zt=t=e}while(t!==null);nr===0&&(nr=5)}function cs(e,t,r){var n=mt,a=Vn.transition;try{Vn.transition=null,mt=1,m3(e,t,r,n)}finally{Vn.transition=a,mt=n}return null}function m3(e,t,r,n){do zl();while(Di!==null);if(et&6)throw Error(se(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(se(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(G4(e,o),e===pr&&(Zt=pr=null,Sr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Gf||(Gf=!0,eM(vh,function(){return zl(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Vn.transition,Vn.transition=null;var i=mt;mt=1;var s=et;et|=4,Tw.current=null,c3(e,r),YN(r,e),RL(Q0),xh=!!X0,Q0=X0=null,e.current=r,u3(r),z4(),et=s,mt=i,Vn.transition=o}else e.current=r;if(Gf&&(Gf=!1,Di=e,Rh=a),o=e.pendingLanes,o===0&&(Ri=null),H4(r.stateNode),rn(e,Yt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(Ah)throw Ah=!1,e=vx,vx=null,e;return Rh&1&&e.tag!==0&&zl(),o=e.pendingLanes,o&1?e===yx?Uu++:(Uu=0,yx=e):Uu=0,Zi(),null}function zl(){if(Di!==null){var e=M_(Rh),t=Vn.transition,r=mt;try{if(Vn.transition=null,mt=16>e?16:e,Di===null)var n=!1;else{if(e=Di,Di=null,Rh=0,et&6)throw Error(se(331));var a=et;for(et|=4,be=e.current;be!==null;){var o=be,i=o.child;if(be.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(be=c;be!==null;){var u=be;switch(u.tag){case 0:case 11:case 15:Wu(8,u,o)}var d=u.child;if(d!==null)d.return=u,be=d;else for(;be!==null;){u=be;var f=u.sibling,p=u.return;if(WN(u),u===c){be=null;break}if(f!==null){f.return=p,be=f;break}be=p}}}var g=o.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var v=y.sibling;y.sibling=null,y=v}while(y!==null)}}be=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,be=i;else e:for(;be!==null;){if(o=be,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Wu(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,be=x;break e}be=o.return}}var w=e.current;for(be=w;be!==null;){i=be;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,be=b;else e:for(i=w;be!==null;){if(s=be,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:fg(9,s)}}catch(k){Bt(s,s.return,k)}if(s===i){be=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,be=S;break e}be=s.return}}if(et=a,Zi(),eo&&typeof eo.onPostCommitFiberRoot=="function")try{eo.onPostCommitFiberRoot(ag,e)}catch{}n=!0}return n}finally{mt=r,Vn.transition=t}}return!1}function LC(e,t,r){t=ec(r,t),t=MN(e,t,1),e=Ai(e,t,1),t=Hr(),e!==null&&(Vd(e,1,t),rn(e,t))}function Bt(e,t,r){if(e.tag===3)LC(e,e,r);else for(;t!==null;){if(t.tag===3){LC(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ri===null||!Ri.has(n))){e=ec(r,e),e=TN(t,e,1),t=Ai(t,e,1),e=Hr(),t!==null&&(Vd(t,1,e),rn(t,e));break}}t=t.return}}function g3(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Hr(),e.pingedLanes|=e.suspendedLanes&r,pr===e&&(Sr&r)===r&&(nr===4||nr===3&&(Sr&130023424)===Sr&&500>Yt()-Aw?Ds(e,0):jw|=r),rn(e,t)}function ZN(e,t){t===0&&(e.mode&1?(t=Ff,Ff<<=1,!(Ff&130023424)&&(Ff=4194304)):t=1);var r=Hr();e=Fo(e,t),e!==null&&(Vd(e,t,r),rn(e,r))}function v3(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ZN(e,r)}function y3(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(se(314))}n!==null&&n.delete(t),ZN(e,r)}var JN;JN=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||en.current)Zr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Zr=!1,o3(e,t,r);Zr=!!(e.flags&131072)}else Zr=!1,Dt&&t.flags&1048576&&nN(t,Eh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Hp(e,t),e=t.pendingProps;var a=Xl(t,$r.current);Fl(t,r),a=Ow(null,t,n,e,a,r);var o=Dw();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tn(n)?(o=!0,Ch(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Sw(t),a.updater=dg,t.stateNode=a,a._reactInternals=t,ix(t,n,e,r),t=cx(null,t,n,!0,o,r)):(t.tag=0,Dt&&o&&mw(t),Lr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Hp(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=b3(n),e=fa(n,e),a){case 0:t=lx(null,t,n,e,r);break e;case 1:t=DC(null,t,n,e,r);break e;case 11:t=EC(null,t,n,e,r);break e;case 14:t=OC(null,t,n,fa(n.type,e),r);break e}throw Error(se(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fa(n,a),lx(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fa(n,a),DC(e,t,n,a,r);case 3:e:{if(IN(t),e===null)throw Error(se(387));n=t.pendingProps,o=t.memoizedState,a=o.element,cN(e,t),_h(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=ec(Error(se(423)),t),t=_C(e,t,n,r,a);break e}else if(n!==a){a=ec(Error(se(424)),t),t=_C(e,t,n,r,a);break e}else for(wn=ji(t.stateNode.containerInfo.firstChild),kn=t,Dt=!0,ma=null,r=sN(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ql(),n===a){t=zo(e,t,r);break e}Lr(e,t,n,r)}t=t.child}return t;case 5:return uN(t),e===null&&nx(t),n=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,i=a.children,Z0(n,a)?i=null:o!==null&&Z0(n,o)&&(t.flags|=32),RN(e,t),Lr(e,t,i,r),t.child;case 6:return e===null&&nx(t),null;case 13:return $N(e,t,r);case 4:return kw(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Zl(t,null,n,r):Lr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fa(n,a),EC(e,t,n,a,r);case 7:return Lr(e,t,t.pendingProps,r),t.child;case 8:return Lr(e,t,t.pendingProps.children,r),t.child;case 12:return Lr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,bt(Oh,n._currentValue),n._currentValue=i,o!==null)if(Da(o.value,i)){if(o.children===a.children&&!en.current){t=zo(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=No(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),ax(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(se(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),ax(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Lr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Fl(t,r),a=Gn(a),n=n(a),t.flags|=1,Lr(e,t,n,r),t.child;case 14:return n=t.type,a=fa(n,t.pendingProps),a=fa(n.type,a),OC(e,t,n,a,r);case 15:return jN(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fa(n,a),Hp(e,t),t.tag=1,tn(n)?(e=!0,Ch(t)):e=!1,Fl(t,r),NN(t,n,a),ix(t,n,a,r),cx(null,t,n,!0,e,r);case 19:return LN(e,t,r);case 22:return AN(e,t,r)}throw Error(se(156,t.tag))};function eM(e,t){return O_(e,t)}function x3(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(e,t,r,n){return new x3(e,t,r,n)}function Lw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b3(e){if(typeof e=="function")return Lw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nw)return 11;if(e===aw)return 14}return 2}function $i(e,t){var r=e.alternate;return r===null?(r=Hn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Vp(e,t,r,n,a,o){var i=2;if(n=e,typeof e=="function")Lw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case wl:return _s(r.children,a,o,t);case rw:i=8,a|=8;break;case N0:return e=Hn(12,r,t,a|2),e.elementType=N0,e.lanes=o,e;case M0:return e=Hn(13,r,t,a),e.elementType=M0,e.lanes=o,e;case T0:return e=Hn(19,r,t,a),e.elementType=T0,e.lanes=o,e;case u_:return hg(r,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l_:i=10;break e;case c_:i=9;break e;case nw:i=11;break e;case aw:i=14;break e;case xi:i=16,n=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=Hn(i,r,t,a),t.elementType=e,t.type=n,t.lanes=o,t}function _s(e,t,r,n){return e=Hn(7,e,n,t),e.lanes=r,e}function hg(e,t,r,n){return e=Hn(22,e,n,t),e.elementType=u_,e.lanes=r,e.stateNode={isHidden:!1},e}function jy(e,t,r){return e=Hn(6,e,null,t),e.lanes=r,e}function Ay(e,t,r){return t=Hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function w3(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hy(0),this.expirationTimes=hy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Fw(e,t,r,n,a,o,i,s,l){return e=new w3(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Hn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sw(o),e}function S3(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bl,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function tM(e){if(!e)return Ui;e=e._reactInternals;e:{if(Zs(e)!==e||e.tag!==1)throw Error(se(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(se(171))}if(e.tag===1){var r=e.type;if(tn(r))return tN(e,r,t)}return t}function rM(e,t,r,n,a,o,i,s,l){return e=Fw(r,n,!0,e,a,o,i,s,l),e.context=tM(null),r=e.current,n=Hr(),a=Ii(r),o=No(n,a),o.callback=t??null,Ai(r,o,a),e.current.lanes=a,Vd(e,a,n),rn(e,n),e}function mg(e,t,r,n){var a=t.current,o=Hr(),i=Ii(a);return r=tM(r),t.context===null?t.context=r:t.pendingContext=r,t=No(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ai(a,t,i),e!==null&&(Pa(e,a,i,o),zp(e,a,i)),i}function $h(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function FC(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zw(e,t){FC(e,t),(e=e.alternate)&&FC(e,t)}function k3(){return null}var nM=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bw(e){this._internalRoot=e}gg.prototype.render=Bw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(se(409));mg(e,t,null,null)};gg.prototype.unmount=Bw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ws(function(){mg(null,e,null,null)}),t[Lo]=null}};function gg(e){this._internalRoot=e}gg.prototype.unstable_scheduleHydration=function(e){if(e){var t=A_();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ki.length&&t!==0&&t<ki[r].priority;r++);ki.splice(r,0,e),r===0&&I_(e)}};function Ww(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zC(){}function C3(e,t,r,n,a){if(a){if(typeof n=="function"){var o=n;n=function(){var c=$h(i);o.call(c)}}var i=rM(t,n,e,0,null,!1,!1,"",zC);return e._reactRootContainer=i,e[Lo]=i.current,cd(e.nodeType===8?e.parentNode:e),Ws(),i}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var s=n;n=function(){var c=$h(l);s.call(c)}}var l=Fw(e,0,!1,null,null,!1,!1,"",zC);return e._reactRootContainer=l,e[Lo]=l.current,cd(e.nodeType===8?e.parentNode:e),Ws(function(){mg(t,l,r,n)}),l}function yg(e,t,r,n,a){var o=r._reactRootContainer;if(o){var i=o;if(typeof a=="function"){var s=a;a=function(){var l=$h(i);s.call(l)}}mg(t,i,e,a)}else i=C3(r,t,e,a,n);return $h(i)}T_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ku(t.pendingLanes);r!==0&&(sw(t,r|1),rn(t,Yt()),!(et&6)&&(tc=Yt()+500,Zi()))}break;case 13:Ws(function(){var n=Fo(e,1);if(n!==null){var a=Hr();Pa(n,e,1,a)}}),zw(e,1)}};lw=function(e){if(e.tag===13){var t=Fo(e,134217728);if(t!==null){var r=Hr();Pa(t,e,134217728,r)}zw(e,134217728)}};j_=function(e){if(e.tag===13){var t=Ii(e),r=Fo(e,t);if(r!==null){var n=Hr();Pa(r,e,t,n)}zw(e,t)}};A_=function(){return mt};R_=function(e,t){var r=mt;try{return mt=e,t()}finally{mt=r}};W0=function(e,t,r){switch(t){case"input":if(R0(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=lg(n);if(!a)throw Error(se(90));f_(n),R0(n,a)}}}break;case"textarea":h_(e,r);break;case"select":t=r.value,t!=null&&Rl(e,!!r.multiple,t,!1)}};w_=Rw;S_=Ws;var P3={usingClientEntryPoint:!1,Events:[qd,Pl,lg,x_,b_,Rw]},tu={findFiberByHostInstance:vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},E3={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ri.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=P_(e),e===null?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||k3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xf.isDisabled&&Xf.supportsFiber)try{ag=Xf.inject(E3),eo=Xf}catch{}}Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P3;Nn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ww(t))throw Error(se(200));return S3(e,t,null,r)};Nn.createRoot=function(e,t){if(!Ww(e))throw Error(se(299));var r=!1,n="",a=nM;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Fw(e,1,!1,null,null,r,!1,n,a),e[Lo]=t.current,cd(e.nodeType===8?e.parentNode:e),new Bw(t)};Nn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(se(188)):(e=Object.keys(e).join(","),Error(se(268,e)));return e=P_(t),e=e===null?null:e.stateNode,e};Nn.flushSync=function(e){return Ws(e)};Nn.hydrate=function(e,t,r){if(!vg(t))throw Error(se(200));return yg(null,e,t,!0,r)};Nn.hydrateRoot=function(e,t,r){if(!Ww(e))throw Error(se(405));var n=r!=null&&r.hydratedSources||null,a=!1,o="",i=nM;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=rM(t,null,e,1,r??null,a,!1,o,i),e[Lo]=t.current,cd(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new gg(t)};Nn.render=function(e,t,r){if(!vg(t))throw Error(se(200));return yg(null,e,t,!1,r)};Nn.unmountComponentAtNode=function(e){if(!vg(e))throw Error(se(40));return e._reactRootContainer?(Ws(function(){yg(null,null,e,!1,function(){e._reactRootContainer=null,e[Lo]=null})}),!0):!1};Nn.unstable_batchedUpdates=Rw;Nn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!vg(r))throw Error(se(200));if(e==null||e._reactInternals===void 0)throw Error(se(38));return yg(e,t,r,!1,n)};Nn.version="18.3.1-next-f1338f8080-20240426";function aM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aM)}catch(e){console.error(e)}}aM(),a_.exports=Nn;var Nc=a_.exports;const Pu=ti(Nc);var BC=Nc;D0.createRoot=BC.createRoot,D0.hydrateRoot=BC.hydrateRoot;/**
* react-router v7.10.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var WC="popstate";function O3(e={}){function t(n,a){let{pathname:o,search:i,hash:s}=n.location;return wx("",{pathname:o,search:i,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:yd(a)}return _3(t,r,null,e)}function Nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function D3(){return Math.random().toString(36).substring(2,10)}function HC(e,t){return{usr:e.state,key:e.key,idx:t}}function wx(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mc(t):t,state:r,key:t&&t.key||n||D3()}}function yd({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Mc(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function _3(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s="POP",l=null,c=u();c==null&&(c=0,i.replaceState({...i.state,idx:c},""));function u(){return(i.state||{idx:null}).idx}function d(){s="POP";let v=u(),x=v==null?null:v-c;c=v,l&&l({action:s,location:y.location,delta:x})}function f(v,x){s="PUSH";let w=wx(y.location,v,x);c=u()+1;let b=HC(w,c),S=y.createHref(w);try{i.pushState(b,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(S)}o&&l&&l({action:s,location:y.location,delta:1})}function p(v,x){s="REPLACE";let w=wx(y.location,v,x);c=u();let b=HC(w,c),S=y.createHref(w);i.replaceState(b,"",S),o&&l&&l({action:s,location:y.location,delta:0})}function g(v){return N3(v)}let y={get action(){return s},get location(){return e(a,i)},listen(v){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(WC,d),l=v,()=>{a.removeEventListener(WC,d),l=null}},createHref(v){return t(a,v)},createURL:g,encodeLocation(v){let x=g(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:p,go(v){return i.go(v)}};return y}function N3(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Nt(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:yd(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function oM(e,t,r="/"){return M3(e,t,r,!1)}function M3(e,t,r,n){let a=typeof t=="string"?Mc(t):t,o=Bo(a.pathname||"/",r);if(o==null)return null;let i=iM(e);T3(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let c=H3(o);s=B3(i[l],c,n)}return s}function iM(e,t=[],r=[],n="",a=!1){let o=(i,s,l=a,c)=>{let u={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(n)&&l)return;Nt(u.relativePath.startsWith(n),`Absolute route path "${u.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(n.length)}let d=Mo([n,u.relativePath]),f=r.concat(u);i.children&&i.children.length>0&&(Nt(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),iM(i.children,t,f,d,l)),!(i.path==null&&!i.index)&&t.push({path:d,score:F3(d,i.index),routesMeta:f})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let c of sM(i.path))o(i,s,!0,c)}),t}function sM(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=sM(n.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function T3(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:z3(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var j3=/^:[\w-]+$/,A3=3,R3=2,I3=1,$3=10,L3=-2,UC=e=>e==="*";function F3(e,t){let r=e.split("/"),n=r.length;return r.some(UC)&&(n+=L3),t&&(n+=R3),r.filter(a=>!UC(a)).reduce((a,o)=>a+(j3.test(o)?A3:o===""?I3:$3),n)}function z3(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function B3(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",d=Lh({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=Lh({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(a,d.params),i.push({params:a,pathname:Mo([o,d.pathname]),pathnameBase:q3(Mo([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=Mo([o,d.pathnameBase]))}return i}function Lh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=W3(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((c,{paramName:u,isOptional:d},f)=>{if(u==="*"){let g=s[f]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return d&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function W3(e,t=!1,r=!0){Qn(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function H3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Bo(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)||"/"}var U3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y3=e=>U3.test(e);function V3(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Mc(e):e,o;if(r)if(Y3(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),Qn(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${r}`)}r.startsWith("/")?o=YC(r.substring(1),"/"):o=YC(r,t)}else o=t;return{pathname:o,search:G3(n),hash:X3(a)}}function YC(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Ry(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 <Link to="..."> and the router will parse it for you.`}function K3(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Hw(e){let t=K3(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Uw(e,t,r,n=!1){let a;typeof e=="string"?a=Mc(e):(a={...e},Nt(!a.pathname||!a.pathname.includes("?"),Ry("?","pathname","search",a)),Nt(!a.pathname||!a.pathname.includes("#"),Ry("#","pathname","hash",a)),Nt(!a.search||!a.search.includes("#"),Ry("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;a.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=V3(a,s),c=i&&i!=="/"&&i.endsWith("/"),u=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var Mo=e=>e.join("/").replace(/\/\/+/g,"/"),q3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),G3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,X3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Q3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Z3(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lM=["POST","PUT","PATCH","DELETE"];new Set(lM);var J3=["GET",...lM];new Set(J3);var Tc=m.createContext(null);Tc.displayName="DataRouter";var xg=m.createContext(null);xg.displayName="DataRouterState";m.createContext(!1);var cM=m.createContext({isTransitioning:!1});cM.displayName="ViewTransition";var e6=m.createContext(new Map);e6.displayName="Fetchers";var t6=m.createContext(null);t6.displayName="Await";var aa=m.createContext(null);aa.displayName="Navigation";var Xd=m.createContext(null);Xd.displayName="Location";var ja=m.createContext({outlet:null,matches:[],isDataRoute:!1});ja.displayName="Route";var Yw=m.createContext(null);Yw.displayName="RouteError";function r6(e,{relative:t}={}){Nt(jc(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=m.useContext(aa),{hash:a,pathname:o,search:i}=Qd(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:Mo([r,o])),n.createHref({pathname:s,search:i,hash:a})}function jc(){return m.useContext(Xd)!=null}function Aa(){return Nt(jc(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Xd).location}var uM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dM(e){m.useContext(aa).static||m.useLayoutEffect(e)}function ni(){let{isDataRoute:e}=m.useContext(ja);return e?g6():n6()}function n6(){Nt(jc(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Tc),{basename:t,navigator:r}=m.useContext(aa),{matches:n}=m.useContext(ja),{pathname:a}=Aa(),o=JSON.stringify(Hw(n)),i=m.useRef(!1);return dM(()=>{i.current=!0}),m.useCallback((l,c={})=>{if(Qn(i.current,uM),!i.current)return;if(typeof l=="number"){r.go(l);return}let u=Uw(l,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Mo([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,o,a,e])}m.createContext(null);function a6(){let{matches:e}=m.useContext(ja),t=e[e.length-1];return t?t.params:{}}function Qd(e,{relative:t}={}){let{matches:r}=m.useContext(ja),{pathname:n}=Aa(),a=JSON.stringify(Hw(r));return m.useMemo(()=>Uw(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function o6(e,t){return fM(e,t)}function fM(e,t,r,n,a){var w;Nt(jc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=m.useContext(aa),{matches:i}=m.useContext(ja),s=i[i.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let b=d&&d.path||"";pM(c,!d||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=Aa(),p;if(t){let b=typeof t=="string"?Mc(t):t;Nt(u==="/"||((w=b.pathname)==null?void 0:w.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),p=b}else p=f;let g=p.pathname||"/",y=g;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=oM(e,{pathname:y});Qn(d||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Qn(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=u6(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Mo([u,o.encodeLocation?o.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Mo([u,o.encodeLocation?o.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),i,r,n,a);return t&&x?m.createElement(Xd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},x):x}function i6(){let e=m6(),t=Q3(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:a},r):null,i)}var s6=m.createElement(i6,null),l6=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?m.createElement(ja.Provider,{value:this.props.routeContext},m.createElement(Yw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function c6({routeContext:e,match:t,children:r}){let n=m.useContext(Tc);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(ja.Provider,{value:e},r)}function u6(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let u=o.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);Nt(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,u+1))}let s=!1,l=-1;if(r)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=u),d.route.id){let{loaderData:f,errors:p}=r,g=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!p||p[d.route.id]===void 0);if(d.route.lazy||g){s=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}let c=r&&n?(u,d)=>{var f,p;n(u,{location:r.location,params:((p=(f=r.matches)==null?void 0:f[0])==null?void 0:p.params)??{},unstable_pattern:Z3(r.matches),errorInfo:d})}:void 0;return o.reduceRight((u,d,f)=>{let p,g=!1,y=null,v=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,y=d.route.errorElement||s6,s&&(l<0&&f===0?(pM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):l===f&&(g=!0,v=d.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,f+1)),w=()=>{let b;return p?b=y:g?b=v:d.route.Component?b=m.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=u,m.createElement(c6,{match:d,routeContext:{outlet:u,matches:x,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?m.createElement(l6,{location:r.location,revalidation:r.revalidation,component:y,error:p,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):w()},null)}function Vw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function d6(e){let t=m.useContext(Tc);return Nt(t,Vw(e)),t}function f6(e){let t=m.useContext(xg);return Nt(t,Vw(e)),t}function p6(e){let t=m.useContext(ja);return Nt(t,Vw(e)),t}function Kw(e){let t=p6(e),r=t.matches[t.matches.length-1];return Nt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function h6(){return Kw("useRouteId")}function m6(){var n;let e=m.useContext(Yw),t=f6("useRouteError"),r=Kw("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function g6(){let{router:e}=d6("useNavigate"),t=Kw("useNavigate"),r=m.useRef(!1);return dM(()=>{r.current=!0}),m.useCallback(async(a,o={})=>{Qn(r.current,uM),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var VC={};function pM(e,t,r){!t&&!VC[e]&&(VC[e]=!0,Qn(!1,r))}m.memo(v6);function v6({routes:e,future:t,state:r,unstable_onError:n}){return fM(e,void 0,r,n,t)}function Yu({to:e,replace:t,state:r,relative:n}){Nt(jc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=m.useContext(aa);Qn(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m.useContext(ja),{pathname:i}=Aa(),s=ni(),l=Uw(e,Hw(o),i,n==="path"),c=JSON.stringify(l);return m.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})},[s,c,n,t,r]),null}function ga(e){Nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function y6({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){Nt(!jc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=m.useMemo(()=>({basename:s,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[s,a,o,i]);typeof r=="string"&&(r=Mc(r));let{pathname:c="/",search:u="",hash:d="",state:f=null,key:p="default"}=r,g=m.useMemo(()=>{let y=Bo(c,s);return y==null?null:{location:{pathname:y,search:u,hash:d,state:f,key:p},navigationType:n}},[s,c,u,d,f,p,n]);return Qn(g!=null,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(aa.Provider,{value:l},m.createElement(Xd.Provider,{children:t,value:g}))}function hM({children:e,location:t}){return o6(Sx(e),t)}function Sx(e,t=[]){let r=[];return m.Children.forEach(e,(n,a)=>{if(!m.isValidElement(n))return;let o=[...t,a];if(n.type===m.Fragment){r.push.apply(r,Sx(n.props.children,o));return}Nt(n.type===ga,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Nt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={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,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Sx(n.props.children,o)),r.push(i)}),r}var Kp="get",qp="application/x-www-form-urlencoded";function bg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function x6(e){return bg(e)&&e.tagName.toLowerCase()==="button"}function b6(e){return bg(e)&&e.tagName.toLowerCase()==="form"}function w6(e){return bg(e)&&e.tagName.toLowerCase()==="input"}function S6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function k6(e,t){return e.button===0&&(!t||t==="_self")&&!S6(e)}var Qf=null;function C6(){if(Qf===null)try{new FormData(document.createElement("form"),0),Qf=!1}catch{Qf=!0}return Qf}var P6=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Iy(e){return e!=null&&!P6.has(e)?(Qn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qp}"`),null):e}function E6(e,t){let r,n,a,o,i;if(b6(e)){let s=e.getAttribute("action");n=s?Bo(s,t):null,r=e.getAttribute("method")||Kp,a=Iy(e.getAttribute("enctype"))||qp,o=new FormData(e)}else if(x6(e)||w6(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?Bo(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||Kp,a=Iy(e.getAttribute("formenctype"))||Iy(s.getAttribute("enctype"))||qp,o=new FormData(s,e),!C6()){let{name:c,type:u,value:d}=e;if(u==="image"){let f=c?`${c}.`:"";o.append(`${f}x`,"0"),o.append(`${f}y`,"0")}else c&&o.append(c,d)}}else{if(bg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Kp,n=null,a=qp,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function O6(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&Bo(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function D6(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _6(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function N6(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await D6(o,r);return i.links?i.links():[]}return[]}));return A6(n.flat(1).filter(_6).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function KC(e,t,r,n,a,o){let i=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,s=(l,c)=>{var u;return r[c].pathname!==l.pathname||((u=r[c].route.path)==null?void 0:u.endsWith("*"))&&r[c].params["*"]!==l.params["*"]};return o==="assets"?t.filter((l,c)=>i(l,c)||s(l,c)):o==="data"?t.filter((l,c)=>{var d;let u=n.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(i(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function M6(e,t,{includeHydrateFallback:r}={}){return T6(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function T6(e){return[...new Set(e)]}function j6(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function A6(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(j6(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function mM(){let e=m.useContext(Tc);return qw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function R6(){let e=m.useContext(xg);return qw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Gw=m.createContext(void 0);Gw.displayName="FrameworkContext";function gM(){let e=m.useContext(Gw);return qw(e,"You must render this element inside a <HydratedRouter> element"),e}function I6(e,t){let r=m.useContext(Gw),[n,a]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,f=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=x=>{x.forEach(w=>{i(w.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return f.current&&v.observe(f.current),()=>{v.disconnect()}}},[e]),m.useEffect(()=>{if(n){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[n]);let p=()=>{a(!0)},g=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,f,{}]:[o,f,{onFocus:ru(s,p),onBlur:ru(l,g),onMouseEnter:ru(c,p),onMouseLeave:ru(u,g),onTouchStart:ru(d,p)}]:[!1,f,{}]}function ru(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function $6({page:e,...t}){let{router:r}=mM(),n=m.useMemo(()=>oM(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?m.createElement(F6,{page:e,matches:n,...t}):null}function L6(e){let{manifest:t,routeModules:r}=gM(),[n,a]=m.useState([]);return m.useEffect(()=>{let o=!1;return N6(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function F6({page:e,matches:t,...r}){let n=Aa(),{manifest:a,routeModules:o}=gM(),{basename:i}=mM(),{loaderData:s,matches:l}=R6(),c=m.useMemo(()=>KC(e,t,l,a,n,"data"),[e,t,l,a,n]),u=m.useMemo(()=>KC(e,t,l,a,n,"assets"),[e,t,l,a,n]),d=m.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,y=!1;if(t.forEach(x=>{var b;let w=a.routes[x.route.id];!w||!w.hasLoader||(!c.some(S=>S.route.id===x.route.id)&&x.route.id in s&&((b=o[x.route.id])!=null&&b.shouldRevalidate)||w.hasClientLoader?y=!0:g.add(x.route.id))}),g.size===0)return[];let v=O6(e,i,"data");return y&&g.size>0&&v.searchParams.set("_routes",t.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[v.pathname+v.search]},[i,s,n,a,c,t,e,o]),f=m.useMemo(()=>M6(u,a),[u,a]),p=L6(u);return m.createElement(m.Fragment,null,d.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),f.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),p.map(({key:g,link:y})=>m.createElement("link",{key:g,nonce:r.nonce,...y})))}function z6(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var vM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vM&&(window.__reactRouterVersion="7.10.1")}catch{}function B6({basename:e,children:t,unstable_useTransitions:r,window:n}){let a=m.useRef();a.current==null&&(a.current=O3({window:n,v5Compat:!0}));let o=a.current,[i,s]=m.useState({action:o.action,location:o.location}),l=m.useCallback(c=>{r===!1?s(c):m.startTransition(()=>s(c))},[r]);return m.useLayoutEffect(()=>o.listen(l),[o,l]),m.createElement(y6,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,unstable_useTransitions:r===!0})}var yM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xM=m.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,...f},p){let{basename:g,unstable_useTransitions:y}=m.useContext(aa),v=typeof c=="string"&&yM.test(c),x,w=!1;if(typeof c=="string"&&v&&(x=c,vM))try{let N=new URL(window.location.href),_=c.startsWith("//")?new URL(N.protocol+c):new URL(c),C=Bo(_.pathname,g);_.origin===N.origin&&C!=null?c=C+_.search+_.hash:w=!0}catch{Qn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=r6(c,{relative:a}),[S,k,P]=I6(n,f),E=Y6(c,{replace:i,state:s,target:l,preventScrollReset:u,relative:a,viewTransition:d,unstable_useTransitions:y});function O(N){t&&t(N),N.defaultPrevented||E(N)}let D=m.createElement("a",{...f,...P,href:x||b,onClick:w||o?t:O,ref:z6(p,k),target:l,"data-discover":!v&&r==="render"?"true":void 0});return S&&!v?m.createElement(m.Fragment,null,D,m.createElement($6,{page:b})):D});xM.displayName="Link";var W6=m.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:s,children:l,...c},u){let d=Qd(i,{relative:c.relative}),f=Aa(),p=m.useContext(xg),{navigator:g,basename:y}=m.useContext(aa),v=p!=null&&X6(d)&&s===!0,x=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,w=f.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(w=w.toLowerCase(),b=b?b.toLowerCase():null,x=x.toLowerCase()),b&&y&&(b=Bo(b,y)||b);const S=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let k=w===x||!a&&w.startsWith(x)&&w.charAt(S)==="/",P=b!=null&&(b===x||!a&&b.startsWith(x)&&b.charAt(x.length)==="/"),E={isActive:k,isPending:P,isTransitioning:v},O=k?t:void 0,D;typeof n=="function"?D=n(E):D=[n,k?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let N=typeof o=="function"?o(E):o;return m.createElement(xM,{...c,"aria-current":O,className:D,ref:u,style:N,to:i,viewTransition:s},typeof l=="function"?l(E):l)});W6.displayName="NavLink";var H6=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Kp,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...f},p)=>{let{unstable_useTransitions:g}=m.useContext(aa),y=q6(),v=G6(s,{relative:c}),x=i.toLowerCase()==="get"?"get":"post",w=typeof s=="string"&&yM.test(s),b=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let k=S.nativeEvent.submitter,P=(k==null?void 0:k.getAttribute("formmethod"))||i,E=()=>y(k||S.currentTarget,{fetcherKey:t,method:P,navigate:r,replace:a,state:o,relative:c,preventScrollReset:u,viewTransition:d});g&&r!==!1?m.startTransition(()=>E()):E()};return m.createElement("form",{ref:p,method:x,action:v,onSubmit:n?l:b,...f,"data-discover":!w&&e==="render"?"true":void 0})});H6.displayName="Form";function U6(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bM(e){let t=m.useContext(Tc);return Nt(t,U6(e)),t}function Y6(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:i,unstable_useTransitions:s}={}){let l=ni(),c=Aa(),u=Qd(e,{relative:o});return m.useCallback(d=>{if(k6(d,t)){d.preventDefault();let f=r!==void 0?r:yd(c)===yd(u),p=()=>l(e,{replace:f,state:n,preventScrollReset:a,relative:o,viewTransition:i});s?m.startTransition(()=>p()):p()}},[c,l,u,r,n,t,e,a,o,i,s])}var V6=0,K6=()=>`__${String(++V6)}__`;function q6(){let{router:e}=bM("useSubmit"),{basename:t}=m.useContext(aa),r=h6(),n=e.fetch,a=e.navigate;return m.useCallback(async(o,i={})=>{let{action:s,method:l,encType:c,formData:u,body:d}=E6(o,t);if(i.navigate===!1){let f=i.fetcherKey||K6();await n(f,r,i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||l,formEncType:i.encType||c,flushSync:i.flushSync})}else await a(i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||l,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function G6(e,{relative:t}={}){let{basename:r}=m.useContext(aa),n=m.useContext(ja);Nt(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...Qd(e||".",{relative:t})},i=Aa();if(e==null){o.search=i.search;let s=new URLSearchParams(o.search),l=s.getAll("index");if(l.some(u=>u==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let u=s.toString();o.search=u?`?${u}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Mo([r,o.pathname])),yd(o)}function X6(e,{relative:t}={}){let r=m.useContext(cM);Nt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=bM("useViewTransitionState"),a=Qd(e,{relative:t});if(!r.isTransitioning)return!1;let o=Bo(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Bo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Lh(a.pathname,i)!=null||Lh(a.pathname,o)!=null}let Q6={data:""},Z6=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Q6},J6=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,eF=/\/\*[^]*?\*\/| +/g,qC=/\n+/g,Pi=(e,t)=>{let r="",n="",a="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+i+";":n+=o[1]=="f"?Pi(i,o):o+"{"+Pi(i,o[1]=="k"?"":t)+"}":typeof i=="object"?n+=Pi(i,t?t.replace(/([^,])+/g,s=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Pi.p?Pi.p(o,i):o+":"+i+";")}return r+(t&&a?t+"{"+a+"}":a)+n},vo={},wM=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+wM(e[r]);return t}return e},tF=(e,t,r,n,a)=>{let o=wM(e),i=vo[o]||(vo[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!vo[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=J6.exec(c.replace(eF,""));)u[4]?f.shift():u[3]?(d=u[3].replace(qC," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(qC," ").trim();return f[0]})(e);vo[i]=Pi(a?{["@keyframes "+i]:l}:l,r?"":"."+i)}let s=r&&vo.g?vo.g:null;return r&&(vo.g=vo[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(vo[i],t,n,s),i},rF=(e,t,r)=>e.reduce((n,a,o)=>{let i=t[o];if(i&&i.call){let s=i(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;i=l?"."+l:s&&typeof s=="object"?s.props?"":Pi(s,""):s===!1?"":s}return n+a+(i??"")},"");function wg(e){let t=this||{},r=e.call?e(t.p):e;return tF(r.unshift?r.raw?rF(r,[].slice.call(arguments,1),t.p):r.reduce((n,a)=>Object.assign(n,a&&a.call?a(t.p):a),{}):r,Z6(t.target),t.g,t.o,t.k)}let SM,kx,Cx;wg.bind({g:1});let Wo=wg.bind({k:1});function nF(e,t,r,n){Pi.p=t,SM=e,kx=r,Cx=n}function Ji(e,t){let r=this||{};return function(){let n=arguments;function a(o,i){let s=Object.assign({},o),l=s.className||a.className;r.p=Object.assign({theme:kx&&kx()},s),r.o=/ *go\d+/.test(l),s.className=wg.apply(r,n)+(l?" "+l:"");let c=e;return e[0]&&(c=s.as||e,delete s.as),Cx&&c[0]&&Cx(s),SM(c,s)}return a}}var aF=e=>typeof e=="function",Fh=(e,t)=>aF(e)?e(t):e,oF=(()=>{let e=0;return()=>(++e).toString()})(),kM=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),iF=20,Xw="default",CM=(e,t)=>{let{toastLimit:r}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return CM(e,{type:e.toasts.find(i=>i.id===n.id)?1:0,toast:n});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(i=>i.id===a||a===void 0?{...i,dismissed:!0,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},Gp=[],PM={toasts:[],pausedAt:void 0,settings:{toastLimit:iF}},Xa={},EM=(e,t=Xw)=>{Xa[t]=CM(Xa[t]||PM,e),Gp.forEach(([r,n])=>{r===t&&n(Xa[t])})},OM=e=>Object.keys(Xa).forEach(t=>EM(e,t)),sF=e=>Object.keys(Xa).find(t=>Xa[t].toasts.some(r=>r.id===e)),Sg=(e=Xw)=>t=>{EM(t,e)},lF={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},cF=(e={},t=Xw)=>{let[r,n]=m.useState(Xa[t]||PM),a=m.useRef(Xa[t]);m.useEffect(()=>(a.current!==Xa[t]&&n(Xa[t]),Gp.push([t,n]),()=>{let i=Gp.findIndex(([s])=>s===t);i>-1&&Gp.splice(i,1)}),[t]);let o=r.toasts.map(i=>{var s,l,c;return{...e,...e[i.type],...i,removeDelay:i.removeDelay||((s=e[i.type])==null?void 0:s.removeDelay)||(e==null?void 0:e.removeDelay),duration:i.duration||((l=e[i.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||lF[i.type],style:{...e.style,...(c=e[i.type])==null?void 0:c.style,...i.style}}});return{...r,toasts:o}},uF=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||oF()}),Zd=e=>(t,r)=>{let n=uF(t,e,r);return Sg(n.toasterId||sF(n.id))({type:2,toast:n}),n.id},rr=(e,t)=>Zd("blank")(e,t);rr.error=Zd("error");rr.success=Zd("success");rr.loading=Zd("loading");rr.custom=Zd("custom");rr.dismiss=(e,t)=>{let r={type:3,toastId:e};t?Sg(t)(r):OM(r)};rr.dismissAll=e=>rr.dismiss(void 0,e);rr.remove=(e,t)=>{let r={type:4,toastId:e};t?Sg(t)(r):OM(r)};rr.removeAll=e=>rr.remove(void 0,e);rr.promise=(e,t,r)=>{let n=rr.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let o=t.success?Fh(t.success,a):void 0;return o?rr.success(o,{id:n,...r,...r==null?void 0:r.success}):rr.dismiss(n),a}).catch(a=>{let o=t.error?Fh(t.error,a):void 0;o?rr.error(o,{id:n,...r,...r==null?void 0:r.error}):rr.dismiss(n)}),e};var dF=1e3,fF=(e,t="default")=>{let{toasts:r,pausedAt:n}=cF(e,t),a=m.useRef(new Map).current,o=m.useCallback((d,f=dF)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),i({type:4,toastId:d})},f);a.set(d,p)},[]);m.useEffect(()=>{if(n)return;let d=Date.now(),f=r.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&rr.dismiss(p.id);return}return setTimeout(()=>rr.dismiss(p.id,t),g)});return()=>{f.forEach(p=>p&&clearTimeout(p))}},[r,n,t]);let i=m.useCallback(Sg(t),[t]),s=m.useCallback(()=>{i({type:5,time:Date.now()})},[i]),l=m.useCallback((d,f)=>{i({type:1,toast:{id:d,height:f}})},[i]),c=m.useCallback(()=>{n&&i({type:6,time:Date.now()})},[n,i]),u=m.useCallback((d,f)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:y}=f||{},v=r.filter(b=>(b.position||y)===(d.position||y)&&b.height),x=v.findIndex(b=>b.id===d.id),w=v.filter((b,S)=>S<x&&b.visible).length;return v.filter(b=>b.visible).slice(...p?[w+1]:[0,w]).reduce((b,S)=>b+(S.height||0)+g,0)},[r]);return m.useEffect(()=>{r.forEach(d=>{if(d.dismissed)o(d.id,d.removeDelay);else{let f=a.get(d.id);f&&(clearTimeout(f),a.delete(d.id))}})},[r,o]),{toasts:r,handlers:{updateHeight:l,startPause:s,endPause:c,calculateOffset:u}}},pF=Wo`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,hF=Wo`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,mF=Wo`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,gF=Ji("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${pF} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${hF} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${mF} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,vF=Wo`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,yF=Ji("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${vF} 1s linear infinite;
`,xF=Wo`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,bF=Wo`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,wF=Ji("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${xF} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${bF} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,SF=Ji("div")`
position: absolute;
`,kF=Ji("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,CF=Wo`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,PF=Ji("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${CF} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,EF=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?m.createElement(PF,null,t):t:r==="blank"?null:m.createElement(kF,null,m.createElement(yF,{...n}),r!=="loading"&&m.createElement(SF,null,r==="error"?m.createElement(gF,{...n}):m.createElement(wF,{...n})))},OF=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,DF=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,_F="0%{opacity:0;} 100%{opacity:1;}",NF="0%{opacity:1;} 100%{opacity:0;}",MF=Ji("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,TF=Ji("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,jF=(e,t)=>{let r=e.includes("top")?1:-1,[n,a]=kM()?[_F,NF]:[OF(r),DF(r)];return{animation:t?`${Wo(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Wo(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},AF=m.memo(({toast:e,position:t,style:r,children:n})=>{let a=e.height?jF(e.position||t||"top-center",e.visible):{opacity:0},o=m.createElement(EF,{toast:e}),i=m.createElement(TF,{...e.ariaProps},Fh(e.message,e));return m.createElement(MF,{className:e.className,style:{...a,...r,...e.style}},typeof n=="function"?n({icon:o,message:i}):m.createElement(m.Fragment,null,o,i))});nF(m.createElement);var RF=({id:e,className:t,style:r,onHeightUpdate:n,children:a})=>{let o=m.useCallback(i=>{if(i){let s=()=>{let l=i.getBoundingClientRect().height;n(e,l)};s(),new MutationObserver(s).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return m.createElement("div",{ref:o,className:t,style:r},a)},IF=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:kM()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...a}},$F=wg`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Zf=16,LF=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:a,toasterId:o,containerStyle:i,containerClassName:s})=>{let{toasts:l,handlers:c}=fF(r,o);return m.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:Zf,left:Zf,right:Zf,bottom:Zf,pointerEvents:"none",...i},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(u=>{let d=u.position||t,f=c.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),p=IF(d,f);return m.createElement(RF,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?$F:"",style:p},u.type==="custom"?Fh(u.message,u):a?a(u):m.createElement(AF,{toast:u,position:d}))}))},Re=rr;const DM=m.createContext(),ln=()=>m.useContext(DM),FF=({children:e})=>{const[t,r]=m.useState(null),[n,a]=m.useState(!1),[o,i]=m.useState(!0),[s,l]=m.useState([]),[c,u]=m.useState([]),[d,f]=m.useState("INBOX"),[p,g]=m.useState(null),[y,v]=m.useState({}),[x,w]=m.useState(null),[b,S]=m.useState(1),[k,P]=m.useState(1),[E,O]=m.useState(0),[D,N]=m.useState({}),[_,C]=m.useState(!1),[M,T]=m.useState([]),[j,A]=m.useState(""),[L,I]=m.useState("ALL"),[$,z]=m.useState(0),[V,F]=m.useState(1),[ne,ee]=m.useState(0),[X,fe]=m.useState(null),[q,ke]=m.useState(()=>{try{const H=localStorage.getItem("email_search_history");return H?JSON.parse(H):[]}catch{return[]}}),B=m.useRef({}),W=m.useRef(0),G=H=>{if(!H)return null;const te={...H};try{typeof te.attachments=="string"&&(te.attachments=JSON.parse(te.attachments))}catch{te.attachments=[]}try{typeof te.flags=="string"&&(te.flags=JSON.parse(te.flags))}catch{te.flags=[]}return te},R=()=>{const H=localStorage.getItem("email_token");return H?{Authorization:`Bearer ${H}`,"Content-Type":"application/json"}:{"Content-Type":"application/json"}},ae=H=>{const te=c.find(Z=>Z.id===H);return(te==null?void 0:te.mailbox)||d};m.useEffect(()=>{(async()=>{const te=localStorage.getItem("email_user"),Z=localStorage.getItem("email_token");if(te&&Z){const Ee=JSON.parse(te);r({...Ee,token:Z});try{const ce=await fetch("/api/verify",{headers:{Authorization:`Bearer ${Z}`}});if(ce.ok){const Te=await ce.json();if(Te.valid&&Te.user){const qr={...Te.user,token:Z};if(r(qr),localStorage.setItem("email_user",JSON.stringify(Te.user)),window.location.pathname.startsWith("/admin")&&!Te.user.isAdmin){sessionStorage.setItem("admin_denied_message","권한이 없습니다. 메인 화면으로 이동합니다."),window.location.href="/mail/inbox";return}}}else r(null),localStorage.removeItem("email_user"),localStorage.removeItem("email_token")}catch(ce){console.error("세션 검증 오류:",ce)}}i(!1)})()},[]);const J=async(H,te)=>{a(!0),w(null);try{const Z=await fetch("/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:H,password:te})}),Ee=await Z.json();if(!Z.ok)throw new Error(Ee.error||"로그인 실패");const ce={...Ee.user,token:Ee.token};return r(ce),localStorage.setItem("email_user",JSON.stringify(Ee.user)),localStorage.setItem("email_token",Ee.token),!0}catch(Z){return console.error("로그인 오류:",Z),w(Z.message),!1}finally{a(!1)}},he=()=>{r(null),localStorage.removeItem("email_user"),localStorage.removeItem("email_token"),u([]),l([]),g(null)},Ce=async()=>{try{const H=await fetch("/api/user-names",{headers:R()});if(H.ok){const te=await H.json();return N(te),te}}catch(H){console.error("사용자 이름 조회 오류:",H)}return{}};m.useEffect(()=>{t&&Ce()},[t]);const re=async()=>{l([{name:"INBOX",label:"받은편지함"},{name:"SENT",label:"보낸편지함"},{name:"TRASH",label:"휴지통"}])},ie=async()=>{if(t)try{const te=await(await fetch("/api/emails/counts",{headers:R()})).json();v({...te,_timestamp:Date.now()})}catch(H){console.error("카운트 조회 오류:",H)}},$e=async(H="INBOX",te=1)=>{if(!t)return;const Z=++W.current;a(!0),w(null),S(te);const Ee=H.toUpperCase(),Te=["INBOX","SENT","TRASH","SPAM","DRAFTS","IMPORTANT"].includes(Ee)?Ee:"INBOX";f(Te),te===1&&u([]),ie();try{const qr=`/api/emails?mailbox=${Te}&page=${te}&limit=20`,Rn=await(await fetch(qr,{headers:R()})).json();if(Z!==W.current){console.log("[fetchEmails] 이전 요청 무시:",Te,Z,"!==",W.current);return}const as=Rn.emails||[],gi=Array.isArray(as)?as.map(G):[];B.current[H]=gi,u(gi),P(Rn.totalPages||1),O(Rn.total||0)}catch(qr){if(Z!==W.current)return;console.error("메일 목록 조회 오류:",qr),O(0)}finally{Z===W.current&&a(!1)}},Fe=async H=>{g(H),Ie(H.id,H.mailbox);try{const te=H.mailbox||d,Z=await fetch(`/api/emails/${H.id}?mailbox=${te}`,{headers:R()});if(Z.ok){const Ee=await Z.json();g(G(Ee))}}catch(te){console.error("메일 상세 조회 오류:",te)}},Ne=m.useRef(null),ve=m.useRef(null),It=m.useRef(0),Qe=()=>{const H=localStorage.getItem("email_token");if(!H)return;Ne.current&&Ne.current.close();const te=new EventSource(`/api/events?token=${H}`);Ne.current=te,te.onopen=()=>{console.log("[SSE] 연결됨"),It.current=0},te.onmessage=Z=>{var Ee;try{const ce=JSON.parse(Z.data);if(ce.type==="new-mail"){const Te=(Ee=t==null?void 0:t.email)==null?void 0:Ee.toLowerCase(),qr=ce.data.from||"",ca=ce.data.to||"";let Rn="";const as=qr.match(/<([^>]+)>/);as?Rn=as[1].toLowerCase():Rn=qr.trim().toLowerCase(),ca.toLowerCase().includes(Te)&&Rn!==Te&&(Re.success(`새로운 메일이 도착했습니다!
발신자: ${Rn}`,{id:"new-mail",duration:5e3,style:{background:"#333",color:"#fff",borderRadius:"8px",padding:"12px 16px"}}),d==="INBOX"&&$e("INBOX",b)),ie()}}catch(ce){console.error("[SSE] 메시지 파싱 오류:",ce)}},te.onerror=()=>{console.warn("[SSE] 연결 끊김, 재연결 예약..."),te.close(),Ne.current=null;const ce=Math.min(1e3*Math.pow(2,It.current),3e4);It.current+=1,console.log(`[SSE] ${ce/1e3}초 후 재연결 시도 (시도 횟수: ${It.current})`),ve.current=setTimeout(()=>{t&&Qe()},ce)}};m.useEffect(()=>{if(t)return Qe(),()=>{console.log("[SSE] 연결 종료"),Ne.current&&(Ne.current.close(),Ne.current=null),ve.current&&(clearTimeout(ve.current),ve.current=null)}},[t]);const lr=async(H,te,Z,Ee=[])=>{if(t)try{const ce=Ee.map(ca=>new Promise((Rn,as)=>{const gi=new FileReader;gi.onload=()=>{Rn({filename:ca.name,content:gi.result.split(",")[1],contentType:ca.type})},gi.onerror=as,gi.readAsDataURL(ca)})),Te=await Promise.all(ce);if(!(await fetch("/api/send",{method:"POST",headers:R(),body:JSON.stringify({to:H,subject:te,html:Z,text:Z,attachments:Te})})).ok)throw new Error("발송 실패");return ie(),d==="SENT"&&$e("SENT"),!0}catch(ce){throw console.error("메일 발송 오류:",ce),ce}},Gt=async(H,te,Z)=>{if(t)try{const Ee=await fetch("/api/drafts",{method:"POST",headers:R(),body:JSON.stringify({to:H,subject:te,html:Z,text:Z})});if(!Ee.ok)throw new Error("임시저장 실패");const ce=await Ee.json();return ie(),ce.id}catch(Ee){throw console.error("임시저장 오류:",Ee),Ee}},oe=async H=>{if(t)try{if(!(await fetch(`/api/drafts/${H}`,{method:"DELETE",headers:R()})).ok)throw new Error("임시저장 삭제 실패");return ie(),!0}catch(te){throw console.error("임시저장 삭제 오류:",te),te}},ye=async H=>{if(H)try{await oe(H)}catch{console.log("[임시저장] 삭제 생략 (이미 없음):",H)}g(null),d==="DRAFTS"&&await $e("DRAFTS")},Ie=async(H,te)=>{try{const Z=te||ae(H),Ee=ce=>{if(ce.id===H){let Te=Array.isArray(ce.flags)?ce.flags:[];if(!Te.includes("\\Seen"))return{...ce,isRead:!0,flags:[...Te,"\\Seen"]}}return ce};u(ce=>ce.map(Ee)),T(ce=>ce.map(Ee)),g(ce=>{if(ce&&ce.id===H){let Te=Array.isArray(ce.flags)?ce.flags:[];if(!Te.includes("\\Seen"))return{...ce,isRead:!0,flags:[...Te,"\\Seen"]}}return ce}),await fetch(`/api/emails/${H}/read?mailbox=${Z}`,{method:"PATCH",headers:R()})}catch(Z){console.error("읽음 처리 오류:",Z)}},Be=async(H,te)=>{try{const Z=Ee=>Ee.map(ce=>{if(H.includes(ce.id)){let Te=Array.isArray(ce.flags)?ce.flags:[];if(!Te.includes("\\Seen"))return{...ce,isRead:!0,flags:[...Te,"\\Seen"]}}return ce});u(Z),T(Z),await Promise.all(H.map(Ee=>{const ce=te||ae(Ee);return fetch(`/api/emails/${Ee}/read?mailbox=${ce}`,{method:"PATCH",headers:R()})}))}catch(Z){console.error("일괄 읽음 처리 오류:",Z)}},xe=async(H,te)=>{try{const Z=te||ae(H),Ee=ce=>{if(ce.id===H){let Te=Array.isArray(ce.flags)?ce.flags:[];return{...ce,isRead:!1,flags:Te.filter(qr=>qr!=="\\Seen")}}return ce};u(ce=>ce.map(Ee)),T(ce=>ce.map(Ee)),g(ce=>{if(ce&&ce.id===H){let Te=Array.isArray(ce.flags)?ce.flags:[];return{...ce,isRead:!1,flags:Te.filter(qr=>qr!=="\\Seen")}}return ce}),await fetch(`/api/emails/${H}/unread?mailbox=${Z}`,{method:"PATCH",headers:R()})}catch(Z){console.error("안읽음 처리 오류:",Z)}},je=async H=>{try{const te=ae(H)||d,Ee=await(await fetch(`/api/emails/${H}/star?mailbox=${te}`,{method:"PATCH",headers:R()})).json();return Ee.success?(await ie(),{movedTo:Ee.movedTo,newEmailId:Ee.newEmailId}):null}catch(te){return console.error("별표 처리 오류:",te),null}},ze=async(H,te)=>{try{const Z=te||ae(H);(p==null?void 0:p.id)===H&&g(null);const ce=await(await fetch(`/api/emails/${H}/trash?mailbox=${Z}`,{method:"PATCH",headers:R()})).json();return await ie(),_?await Mt():await $e(d,b),ce.trashId?{trashId:ce.trashId}:null}catch(Z){return console.error("휴지통 이동 오류:",Z),null}},lt=async(H,te)=>{try{const Z=te||ae(H);await fetch(`/api/emails/${H}/restore?mailbox=${Z}`,{method:"PATCH",headers:R()}),await ie(),_?await Mt():await $e(d,b)}catch(Z){console.error("복구 오류:",Z)}},mo=async(H,te)=>{try{const Z=te||ae(H);(p==null?void 0:p.id)===H&&g(null),await fetch(`/api/emails/${H}?mailbox=${Z}`,{method:"DELETE",headers:R()}),await ie(),_?await Mt():await $e(d,b)}catch(Z){console.error("삭제 오류:",Z)}},fn=async(H,te)=>{try{const Z=te||ae(H);(p==null?void 0:p.id)===H&&g(null);const ce=await(await fetch(`/api/emails/${H}/spam?mailbox=${Z}`,{method:"PATCH",headers:R()})).json();return await ie(),await $e(d,b),ce.spamId?{spamId:ce.spamId}:null}catch(Z){return console.error("스팸함 이동 오류:",Z),null}},pn=async(H,te,Z)=>{try{const Ee=te||ae(H);(p==null?void 0:p.id)===H&&g(null);const Te=await(await fetch(`/api/emails/${H}/move?mailbox=${Ee}&target=${Z}`,{method:"PATCH",headers:R()})).json();return await ie(),await $e(d,b),Te}catch(Ee){return console.error("메일 이동 오류:",Ee),null}},la=async H=>{try{const te=await fetch(`/api/emails?mailbox=${H}&page=1&limit=1000`,{headers:R()}).then(Z=>Z.json());if(te.emails&&te.emails.length>0)if(H==="TRASH")for(const Z of te.emails)await fetch(`/api/emails/${Z.id}?mailbox=TRASH`,{method:"DELETE",headers:R()});else for(const Z of te.emails)await fetch(`/api/emails/${Z.id}/trash?mailbox=${H}`,{method:"PATCH",headers:R()});await ie(),await $e(d,b),g(null)}catch(te){console.error("전체 삭제 오류:",te)}},Or=async H=>{if(H.status===403){const te=JSON.parse(localStorage.getItem("email_user")||"{}");return te.isAdmin=!1,localStorage.setItem("email_user",JSON.stringify(te)),sessionStorage.setItem("admin_denied_message","권한이 없습니다. 메인 화면으로 이동합니다."),window.location.href="/mail/inbox",new Promise(()=>{})}return H},go=async()=>{const H=await fetch("/api/admin/stats",{headers:R()});return await Or(H),H.json()},De=async()=>{const H=await fetch("/api/admin/users",{headers:R()});return await Or(H),H.json()},nt=async H=>{const te=await fetch("/api/admin/users",{method:"POST",headers:R(),body:JSON.stringify(H)});if(await Or(te),!te.ok){const Z=await te.json();throw new Error(Z.error||"사용자 생성 실패")}return te.json()},Q=async(H,te)=>{const Z=await fetch(`/api/admin/users/${H}`,{method:"PUT",headers:R(),body:JSON.stringify(te)});if(await Or(Z),!Z.ok){const Ee=await Z.json();throw new Error(Ee.error||"사용자 수정 실패")}return Z.json()},ue=async H=>{const te=await fetch(`/api/admin/users/${H}`,{method:"DELETE",headers:R()});if(await Or(te),!te.ok){const Z=await te.json();throw new Error(Z.error||"사용자 삭제 실패")}return te.json()},Ae=async()=>{const H=await fetch("/api/admin/config/email",{headers:R()});return await Or(H),H.json()},We=async H=>{const te=await fetch("/api/admin/config/email",{method:"POST",headers:R(),body:JSON.stringify(H)});if(await Or(te),!te.ok)throw new Error("설정 업데이트 실패");return te.json()},Pe=async H=>{const te=await fetch("/api/admin/config/email/test",{method:"POST",headers:R(),body:JSON.stringify(H)});if(await Or(te),!te.ok){const Z=await te.json();throw new Error(Z.error||"연결 실패")}return te.json()},st=async(H,te="ALL",Z=null,Ee=1)=>{const ce=Z&&Object.values(Z).some(Te=>Te);if(!t||!(H!=null&&H.trim())&&!ce){ct();return}a(!0),C(!0),A(H),I(te),fe(Z);try{const Te=new URLSearchParams;H&&Te.append("q",H),Te.append("scope",te),Te.append("page",Ee.toString()),Te.append("limit","20"),Z&&(Z.from&&Te.append("from",Z.from),Z.to&&Te.append("to",Z.to),Z.subject&&Te.append("subject",Z.subject),Z.includes&&Te.append("includes",Z.includes),Z.excludes&&Te.append("excludes",Z.excludes),Z.minSize&&Te.append("minSize",Z.minSize),Z.maxSize&&Te.append("maxSize",Z.maxSize),Z.dateAfter&&Te.append("dateAfter",Z.dateAfter),Z.dateBefore&&Te.append("dateBefore",Z.dateBefore),Z.hasAttachment&&Te.append("hasAttachment","true"));const ca=await(await fetch(`/api/emails/search?${Te.toString()}`,{headers:R()})).json(),Rn=(ca.emails||[]).map(G);T(Rn),z(ca.total||0),F(ca.page||1),ee(ca.totalPages||0),H!=null&&H.trim()&&hi(H.trim())}catch(Te){console.error("검색 오류:",Te),T([]),z(0)}finally{a(!1)}},ct=()=>{C(!1),T([]),A(""),I("ALL"),z(0),F(1),ee(0),fe(null)},Mt=async()=>{if(_)try{const H=new URLSearchParams;j&&H.append("q",j),H.append("scope",L),H.append("page",V.toString()),H.append("limit","20"),X&&(X.from&&H.append("from",X.from),X.to&&H.append("to",X.to),X.subject&&H.append("subject",X.subject),X.includes&&H.append("includes",X.includes),X.excludes&&H.append("excludes",X.excludes),X.minSize&&H.append("minSize",X.minSize),X.maxSize&&H.append("maxSize",X.maxSize),X.dateAfter&&H.append("dateAfter",X.dateAfter),X.dateBefore&&H.append("dateBefore",X.dateBefore),X.hasAttachment&&H.append("hasAttachment","true"));const Z=await(await fetch(`/api/emails/search?${H.toString()}`,{headers:R()})).json(),Ee=(Z.emails||[]).map(G);T(Ee),z(Z.total||0),F(Z.page||1),ee(Z.totalPages||0)}catch(H){console.error("검색 새로고침 오류:",H)}},hi=H=>{H!=null&&H.trim()&&ke(te=>{const Z=te.filter(ce=>ce.toLowerCase()!==H.toLowerCase()),Ee=[H,...Z].slice(0,10);try{localStorage.setItem("email_search_history",JSON.stringify(Ee))}catch(ce){console.error("검색 히스토리 저장 오류:",ce)}return Ee})},Kc=H=>{ke(te=>{const Z=te.filter((Ee,ce)=>ce!==H);try{localStorage.setItem("email_search_history",JSON.stringify(Z))}catch(Ee){console.error("검색 히스토리 저장 오류:",Ee)}return Z})},mi=()=>{ke([]);try{localStorage.removeItem("email_search_history")}catch(H){console.error("검색 히스토리 삭제 오류:",H)}};return h.jsx(DM.Provider,{value:{user:t,loading:n,initialLoading:o,error:x,mailboxes:s,emails:c,selectedBox:d,selectedEmail:p,counts:y,page:b,totalPages:k,totalEmails:E,userNames:D,login:J,logout:he,fetchMailboxes:re,fetchEmails:$e,fetchCounts:ie,setSelectedEmail:g,selectEmail:Fe,sendEmail:lr,saveDraft:Gt,deleteDraft:oe,handleDraftSendComplete:ye,markAsRead:Ie,markAllAsRead:Be,markAsUnread:xe,toggleStar:je,moveToTrash:ze,restoreEmail:lt,deleteEmail:mo,moveToSpam:fn,moveEmail:pn,deleteAllEmails:la,fetchStats:go,fetchUsers:De,addUser:nt,updateUser:Q,deleteUser:ue,fetchEmailConfig:Ae,updateEmailConfig:We,testEmailConnection:Pe,isSearchMode:_,searchResults:M,searchQuery:j,searchScope:L,searchTotal:$,searchPage:V,searchTotalPages:ne,searchFilters:X,searchEmails:st,clearSearch:ct,searchHistory:q,addSearchHistory:hi,removeSearchHistory:Kc,clearSearchHistory:mi},children:e})};/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var zF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Se=(e,t)=>{const r=m.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:s="",children:l,...c},u)=>m.createElement("svg",{ref:u,...zF,width:a,height:a,stroke:n,strokeWidth:i?Number(o)*24/Number(a):o,className:["lucide",`lucide-${BF(e)}`,s].join(" "),...c},[...t.map(([d,f])=>m.createElement(d,f)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WF=Se("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kg=Se("AlertOctagon",[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _M=Se("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NM=Se("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HF=Se("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UF=Se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YF=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GC=Se("Bold",[["path",{d:"M14 12a4 4 0 0 0 0-8H6v8",key:"v2sylx"}],["path",{d:"M15 20a4 4 0 0 0 0-8H6v8Z",key:"1ef5ya"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VF=Se("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KF=Se("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rc=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eu=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qF=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GF=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zh=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XF=Se("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QF=Se("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XC=Se("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QC=Se("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZF=Se("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MM=Se("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JF=Se("FolderInput",[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ez=Se("Forward",[["polyline",{points:"15 17 20 12 15 7",key:"1w3sku"}],["path",{d:"M4 18v-2a4 4 0 0 1 4-4h12",key:"jmiej9"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZC=Se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TM=Se("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tz=Se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JC=Se("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rz=Se("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e2=Se("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nz=Se("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const az=Se("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oz=Se("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iz=Se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jM=Se("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Px=Se("MailOpen",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wa=Se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sz=Se("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lz=Se("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AM=Se("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cz=Se("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vu=Se("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uz=Se("PenSquare",[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RM=Se("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dz=Se("Printer",[["polyline",{points:"6 9 6 2 18 2 18 9",key:"1306q4"}],["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["rect",{width:"12",height:"8",x:"6",y:"14",key:"5ipwut"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nu=Se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fz=Se("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pz=Se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hz=Se("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jf=Se("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bh=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nc=Se("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mz=Se("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IM=Se("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t2=Se("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xd=Se("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gz=Se("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ex=Se("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cg=Se("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Li=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vz=Se("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yz=Se("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xz=Se("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wh=Se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ku=Se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bz=Se("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.294.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qu=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $M(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=$M(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function le(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=$M(e))&&(n&&(n+=" "),n+=t);return n}function Hh(e,t,r=!1){const n={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],s=t[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=l;n[o][c]=Hh(i[c],s[c],r)}}}else o==="className"&&r&&t.className?n.className=le(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[o]===void 0&&(n[o]=e[o])}return n}function Ke(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let i="",s=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(i+=(s===!0?"":" ")+t(c),s=!1,r&&r[c]&&(i+=" "+r[c]))}n[a]=i}return n}const r2=e=>e,wz=()=>{let e=r2;return{configure(t){e=t},generate(t){return e(t)},reset(){e=r2}}},Sz=wz();function Ho(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function ge(e){if(typeof e!="string")throw new Error(Ho(7));return e.charAt(0).toUpperCase()+e.slice(1)}function n2(...e){return e.reduce((t,r)=>r==null?t:function(...a){t.apply(this,a),r.apply(this,a)},()=>{})}var LM={exports:{}},xt={};/**
* @license React
* react-is.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Qw=Symbol.for("react.transitional.element"),Zw=Symbol.for("react.portal"),Pg=Symbol.for("react.fragment"),Eg=Symbol.for("react.strict_mode"),Og=Symbol.for("react.profiler"),Dg=Symbol.for("react.consumer"),_g=Symbol.for("react.context"),Ng=Symbol.for("react.forward_ref"),Mg=Symbol.for("react.suspense"),Tg=Symbol.for("react.suspense_list"),jg=Symbol.for("react.memo"),Ag=Symbol.for("react.lazy"),kz=Symbol.for("react.view_transition"),Cz=Symbol.for("react.client.reference");function oa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Qw:switch(e=e.type,e){case Pg:case Og:case Eg:case Mg:case Tg:case kz:return e;default:switch(e=e&&e.$$typeof,e){case _g:case Ng:case Ag:case jg:return e;case Dg:return e;default:return t}}case Zw:return t}}}xt.ContextConsumer=Dg;xt.ContextProvider=_g;xt.Element=Qw;xt.ForwardRef=Ng;xt.Fragment=Pg;xt.Lazy=Ag;xt.Memo=jg;xt.Portal=Zw;xt.Profiler=Og;xt.StrictMode=Eg;xt.Suspense=Mg;xt.SuspenseList=Tg;xt.isContextConsumer=function(e){return oa(e)===Dg};xt.isContextProvider=function(e){return oa(e)===_g};xt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qw};xt.isForwardRef=function(e){return oa(e)===Ng};xt.isFragment=function(e){return oa(e)===Pg};xt.isLazy=function(e){return oa(e)===Ag};xt.isMemo=function(e){return oa(e)===jg};xt.isPortal=function(e){return oa(e)===Zw};xt.isProfiler=function(e){return oa(e)===Og};xt.isStrictMode=function(e){return oa(e)===Eg};xt.isSuspense=function(e){return oa(e)===Mg};xt.isSuspenseList=function(e){return oa(e)===Tg};xt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pg||e===Og||e===Eg||e===Mg||e===Tg||typeof e=="object"&&e!==null&&(e.$$typeof===Ag||e.$$typeof===jg||e.$$typeof===_g||e.$$typeof===Dg||e.$$typeof===Ng||e.$$typeof===Cz||e.getModuleId!==void 0)};xt.typeOf=oa;LM.exports=xt;var FM=LM.exports;function Ya(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zM(e){if(m.isValidElement(e)||FM.isValidElementType(e)||!Ya(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=zM(e[r])}),t}function Ar(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Ya(e)&&Ya(t)&&Object.keys(t).forEach(a=>{m.isValidElement(t[a])||FM.isValidElementType(t[a])?n[a]=t[a]:Ya(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Ya(e[a])?n[a]=Ar(e[a],t[a],r):r.clone?n[a]=Ya(t[a])?zM(t[a]):t[a]:n[a]=t[a]}),n}function Gu(e,t){return t?Ar(e,t,{clone:!1}):e}function a2(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{var i,s;const o=/min-width:\s*([0-9.]+)/;return+(((i=n.match(o))==null?void 0:i[1])||0)-+(((s=a.match(o))==null?void 0:s[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function Pz(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Ez(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function Oz(e){const t=(o,i)=>o.replace("@media",i?`@container ${i}`:"@container");function r(o,i){o.up=(...s)=>t(e.breakpoints.up(...s),i),o.down=(...s)=>t(e.breakpoints.down(...s),i),o.between=(...s)=>t(e.breakpoints.between(...s),i),o.only=(...s)=>t(e.breakpoints.only(...s),i),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const Rg={xs:0,sm:600,md:900,lg:1200,xl:1536},o2={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Rg[e]}px)`},Dz={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Rg[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Uo(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||o2;return t.reduce((i,s,l)=>(i[o.up(o.keys[l])]=r(t[l]),i),{})}if(typeof t=="object"){const o=n.breakpoints||o2;return Object.keys(t).reduce((i,s)=>{if(Pz(o.keys,s)){const l=Ez(n.containerQueries?n:Dz,s);l&&(i[l]=r(t[s],s))}else if(Object.keys(o.values||Rg).includes(s)){const l=o.up(s);i[l]=r(t[s],s)}else{const l=s;i[l]=t[l]}return i},{})}return r(t)}function _z(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function i2(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Ig(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Uh(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=Ig(e,r)||n,t&&(a=t(a,n,e)),a}function qt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=i=>{if(i[t]==null)return null;const s=i[t],l=i.theme,c=Ig(l,n)||{};return Uo(i,s,d=>{let f=Uh(c,a,d);return d===f&&typeof d=="string"&&(f=Uh(c,a,`${t}${d==="default"?"":ge(d)}`,d)),r===!1?f:{[r]:f}})};return o.propTypes={},o.filterProps=[t],o}function Nz(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Mz={m:"margin",p:"padding"},Tz={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s2={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},jz=Nz(e=>{if(e.length>2)if(s2[e])e=s2[e];else return[e];const[t,r]=e.split(""),n=Mz[t],a=Tz[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),Jw=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],e1=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Jw,...e1];function Jd(e,t,r,n){const a=Ig(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o:Array.isArray(a)?o=>{if(typeof o=="string")return o;const i=Math.abs(o),s=a[i];return o>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof a=="function"?a:()=>{}}function t1(e){return Jd(e,"spacing",8)}function ef(e,t){return typeof t=="string"||t==null?t:e(t)}function Az(e,t){return r=>e.reduce((n,a)=>(n[a]=ef(t,r),n),{})}function Rz(e,t,r,n){if(!t.includes(r))return null;const a=jz(r),o=Az(a,n),i=e[r];return Uo(e,i,o)}function BM(e,t){const r=t1(e.theme);return Object.keys(e).map(n=>Rz(e,t,n,r)).reduce(Gu,{})}function $t(e){return BM(e,Jw)}$t.propTypes={};$t.filterProps=Jw;function Lt(e){return BM(e,e1)}Lt.propTypes={};Lt.filterProps=e1;function $g(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?Gu(a,t[o](n)):a,{});return r.propTypes={},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function Bn(e){return typeof e!="number"?e:`${e}px solid`}function ia(e,t){return qt({prop:e,themeKey:"borders",transform:t})}const Iz=ia("border",Bn),$z=ia("borderTop",Bn),Lz=ia("borderRight",Bn),Fz=ia("borderBottom",Bn),zz=ia("borderLeft",Bn),Bz=ia("borderColor"),Wz=ia("borderTopColor"),Hz=ia("borderRightColor"),Uz=ia("borderBottomColor"),Yz=ia("borderLeftColor"),Vz=ia("outline",Bn),Kz=ia("outlineColor"),Lg=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Jd(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:ef(t,n)});return Uo(e,e.borderRadius,r)}return null};Lg.propTypes={};Lg.filterProps=["borderRadius"];$g(Iz,$z,Lz,Fz,zz,Bz,Wz,Hz,Uz,Yz,Lg,Vz,Kz);const Fg=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Jd(e.theme,"spacing",8),r=n=>({gap:ef(t,n)});return Uo(e,e.gap,r)}return null};Fg.propTypes={};Fg.filterProps=["gap"];const zg=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Jd(e.theme,"spacing",8),r=n=>({columnGap:ef(t,n)});return Uo(e,e.columnGap,r)}return null};zg.propTypes={};zg.filterProps=["columnGap"];const Bg=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Jd(e.theme,"spacing",8),r=n=>({rowGap:ef(t,n)});return Uo(e,e.rowGap,r)}return null};Bg.propTypes={};Bg.filterProps=["rowGap"];const qz=qt({prop:"gridColumn"}),Gz=qt({prop:"gridRow"}),Xz=qt({prop:"gridAutoFlow"}),Qz=qt({prop:"gridAutoColumns"}),Zz=qt({prop:"gridAutoRows"}),Jz=qt({prop:"gridTemplateColumns"}),eB=qt({prop:"gridTemplateRows"}),tB=qt({prop:"gridTemplateAreas"}),rB=qt({prop:"gridArea"});$g(Fg,zg,Bg,qz,Gz,Xz,Qz,Zz,Jz,eB,tB,rB);function Bl(e,t){return t==="grey"?t:e}const nB=qt({prop:"color",themeKey:"palette",transform:Bl}),aB=qt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Bl}),oB=qt({prop:"backgroundColor",themeKey:"palette",transform:Bl});$g(nB,aB,oB);function yn(e){return e<=1&&e!==0?`${e*100}%`:e}const iB=qt({prop:"width",transform:yn}),r1=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,i,s,l;const n=((i=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:i[r])||Rg[r];return n?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:yn(r)}};return Uo(e,e.maxWidth,t)}return null};r1.filterProps=["maxWidth"];const sB=qt({prop:"minWidth",transform:yn}),lB=qt({prop:"height",transform:yn}),cB=qt({prop:"maxHeight",transform:yn}),uB=qt({prop:"minHeight",transform:yn});qt({prop:"size",cssProperty:"width",transform:yn});qt({prop:"size",cssProperty:"height",transform:yn});const dB=qt({prop:"boxSizing"});$g(iB,r1,sB,lB,cB,uB,dB);const tf={border:{themeKey:"borders",transform:Bn},borderTop:{themeKey:"borders",transform:Bn},borderRight:{themeKey:"borders",transform:Bn},borderBottom:{themeKey:"borders",transform:Bn},borderLeft:{themeKey:"borders",transform:Bn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Bn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Lg},color:{themeKey:"palette",transform:Bl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Bl},backgroundColor:{themeKey:"palette",transform:Bl},p:{style:Lt},pt:{style:Lt},pr:{style:Lt},pb:{style:Lt},pl:{style:Lt},px:{style:Lt},py:{style:Lt},padding:{style:Lt},paddingTop:{style:Lt},paddingRight:{style:Lt},paddingBottom:{style:Lt},paddingLeft:{style:Lt},paddingX:{style:Lt},paddingY:{style:Lt},paddingInline:{style:Lt},paddingInlineStart:{style:Lt},paddingInlineEnd:{style:Lt},paddingBlock:{style:Lt},paddingBlockStart:{style:Lt},paddingBlockEnd:{style:Lt},m:{style:$t},mt:{style:$t},mr:{style:$t},mb:{style:$t},ml:{style:$t},mx:{style:$t},my:{style:$t},margin:{style:$t},marginTop:{style:$t},marginRight:{style:$t},marginBottom:{style:$t},marginLeft:{style:$t},marginX:{style:$t},marginY:{style:$t},marginInline:{style:$t},marginInlineStart:{style:$t},marginInlineEnd:{style:$t},marginBlock:{style:$t},marginBlockStart:{style:$t},marginBlockEnd:{style:$t},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Fg},rowGap:{style:Bg},columnGap:{style:zg},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:yn},maxWidth:{style:r1},minWidth:{transform:yn},height:{transform:yn},maxHeight:{transform:yn},minHeight:{transform:yn},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function fB(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function pB(e,t){return typeof e=="function"?e(t):e}function hB(){function e(r,n,a,o){const i={[r]:n,theme:a},s=o[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=s;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const f=Ig(a,c)||{};return d?d(i):Uo(i,n,g=>{let y=Uh(f,u,g);return g===y&&typeof g=="string"&&(y=Uh(f,u,`${r}${g==="default"?"":ge(g)}`,g)),l===!1?y:{[l]:y}})}function t(r){const{sx:n,theme:a={},nested:o}=r||{};if(!n)return null;const i=a.unstable_sxConfig??tf;function s(l){let c=l;if(typeof l=="function")c=l(a);else if(typeof l!="object")return l;if(!c)return null;const u=_z(a.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const g=pB(c[p],a);if(g!=null)if(typeof g=="object")if(i[p])f=Gu(f,e(p,g,a,i));else{const y=Uo({theme:a},g,v=>({[p]:v}));fB(y,g)?f[p]=t({sx:g,theme:a,nested:!0}):f=Gu(f,y)}else f=Gu(f,e(p,g,a,i))}),!o&&a.modularCssLayers?{"@layer sx":a2(a,i2(d,f))}:a2(a,i2(d,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ac=hB();ac.filterProps=["sx"];const mB=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??tf;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function gB(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=mB(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...i)=>{const s=t(...i);return Ya(s)?{...n,...s}:n}:o={...n,...t},{...a,sx:o}}function Yh(){return Yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yh.apply(null,arguments)}function vB(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function yB(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var xB=function(){function e(r){var n=this;this._insertTag=function(a){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,o),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(yB(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=vB(a);try{o.insertRule(n,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Nr="-ms-",Vh="-moz-",at="-webkit-",WM="comm",n1="rule",a1="decl",bB="@import",HM="@keyframes",wB="@layer",SB=Math.abs,Wg=String.fromCharCode,kB=Object.assign;function CB(e,t){return br(e,0)^45?(((t<<2^br(e,0))<<2^br(e,1))<<2^br(e,2))<<2^br(e,3):0}function UM(e){return e.trim()}function PB(e,t){return(e=t.exec(e))?e[0]:e}function ot(e,t,r){return e.replace(t,r)}function Ox(e,t){return e.indexOf(t)}function br(e,t){return e.charCodeAt(t)|0}function bd(e,t,r){return e.slice(t,r)}function za(e){return e.length}function o1(e){return e.length}function ep(e,t){return t.push(e),e}function EB(e,t){return e.map(t).join("")}var Hg=1,oc=1,YM=0,sn=0,Qt=0,Ac="";function Ug(e,t,r,n,a,o,i){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:Hg,column:oc,length:i,return:""}}function au(e,t){return kB(Ug("",null,null,"",null,null,0),e,{length:-e.length},t)}function OB(){return Qt}function DB(){return Qt=sn>0?br(Ac,--sn):0,oc--,Qt===10&&(oc=1,Hg--),Qt}function Cn(){return Qt=sn<YM?br(Ac,sn++):0,oc++,Qt===10&&(oc=1,Hg++),Qt}function ro(){return br(Ac,sn)}function Xp(){return sn}function rf(e,t){return bd(Ac,e,t)}function wd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function VM(e){return Hg=oc=1,YM=za(Ac=e),sn=0,[]}function KM(e){return Ac="",e}function Qp(e){return UM(rf(sn-1,Dx(e===91?e+2:e===40?e+1:e)))}function _B(e){for(;(Qt=ro())&&Qt<33;)Cn();return wd(e)>2||wd(Qt)>3?"":" "}function NB(e,t){for(;--t&&Cn()&&!(Qt<48||Qt>102||Qt>57&&Qt<65||Qt>70&&Qt<97););return rf(e,Xp()+(t<6&&ro()==32&&Cn()==32))}function Dx(e){for(;Cn();)switch(Qt){case e:return sn;case 34:case 39:e!==34&&e!==39&&Dx(Qt);break;case 40:e===41&&Dx(e);break;case 92:Cn();break}return sn}function MB(e,t){for(;Cn()&&e+Qt!==57;)if(e+Qt===84&&ro()===47)break;return"/*"+rf(t,sn-1)+"*"+Wg(e===47?e:Cn())}function TB(e){for(;!wd(ro());)Cn();return rf(e,sn)}function jB(e){return KM(Zp("",null,null,null,[""],e=VM(e),0,[0],e))}function Zp(e,t,r,n,a,o,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,g=0,y=1,v=1,x=1,w=0,b="",S=a,k=o,P=n,E=b;v;)switch(g=w,w=Cn()){case 40:if(g!=108&&br(E,d-1)==58){Ox(E+=ot(Qp(w),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:E+=Qp(w);break;case 9:case 10:case 13:case 32:E+=_B(g);break;case 92:E+=NB(Xp()-1,7);continue;case 47:switch(ro()){case 42:case 47:ep(AB(MB(Cn(),Xp()),t,r),l);break;default:E+="/"}break;case 123*y:s[c++]=za(E)*x;case 125*y:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+u:x==-1&&(E=ot(E,/\f/g,"")),p>0&&za(E)-d&&ep(p>32?c2(E+";",n,r,d-1):c2(ot(E," ","")+";",n,r,d-2),l);break;case 59:E+=";";default:if(ep(P=l2(E,t,r,c,u,a,s,b,S=[],k=[],d),o),w===123)if(u===0)Zp(E,t,P,P,S,o,d,s,k);else switch(f===99&&br(E,3)===110?100:f){case 100:case 108:case 109:case 115:Zp(e,P,P,n&&ep(l2(e,P,P,0,0,a,s,b,a,S=[],d),k),a,k,d,s,n?S:k);break;default:Zp(E,P,P,P,[""],k,0,s,k)}}c=u=p=0,y=x=1,b=E="",d=i;break;case 58:d=1+za(E),p=g;default:if(y<1){if(w==123)--y;else if(w==125&&y++==0&&DB()==125)continue}switch(E+=Wg(w),w*y){case 38:x=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(za(E)-1)*x,x=1;break;case 64:ro()===45&&(E+=Qp(Cn())),f=ro(),u=d=za(b=E+=TB(Xp())),w++;break;case 45:g===45&&za(E)==2&&(y=0)}}return o}function l2(e,t,r,n,a,o,i,s,l,c,u){for(var d=a-1,f=a===0?o:[""],p=o1(f),g=0,y=0,v=0;g<n;++g)for(var x=0,w=bd(e,d+1,d=SB(y=i[g])),b=e;x<p;++x)(b=UM(y>0?f[x]+" "+w:ot(w,/&\f/g,f[x])))&&(l[v++]=b);return Ug(e,t,r,a===0?n1:s,l,c,u)}function AB(e,t,r){return Ug(e,t,r,WM,Wg(OB()),bd(e,2,-2),0)}function c2(e,t,r,n){return Ug(e,t,r,a1,bd(e,0,n),bd(e,n+1,-1),n)}function Wl(e,t){for(var r="",n=o1(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function RB(e,t,r,n){switch(e.type){case wB:if(e.children.length)break;case bB:case a1:return e.return=e.return||e.value;case WM:return"";case HM:return e.return=e.value+"{"+Wl(e.children,n)+"}";case n1:e.value=e.props.join(",")}return za(r=Wl(e.children,n))?e.return=e.value+"{"+r+"}":""}function IB(e){var t=o1(e);return function(r,n,a,o){for(var i="",s=0;s<t;s++)i+=e[s](r,n,a,o)||"";return i}}function $B(e){return function(t){t.root||(t=t.return)&&e(t)}}function qM(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var LB=function(t,r,n){for(var a=0,o=0;a=o,o=ro(),a===38&&o===12&&(r[n]=1),!wd(o);)Cn();return rf(t,sn)},FB=function(t,r){var n=-1,a=44;do switch(wd(a)){case 0:a===38&&ro()===12&&(r[n]=1),t[n]+=LB(sn-1,r,n);break;case 2:t[n]+=Qp(a);break;case 4:if(a===44){t[++n]=ro()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Wg(a)}while(a=Cn());return t},zB=function(t,r){return KM(FB(VM(t),r))},u2=new WeakMap,BB=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!u2.get(n))&&!a){u2.set(t,!0);for(var o=[],i=zB(r,o),s=n.props,l=0,c=0;l<i.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=o[l]?i[l].replace(/&\f/g,s[u]):s[u]+" "+i[l]}}},WB=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function GM(e,t){switch(CB(e,t)){case 5103:return at+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return at+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return at+e+Vh+e+Nr+e+e;case 6828:case 4268:return at+e+Nr+e+e;case 6165:return at+e+Nr+"flex-"+e+e;case 5187:return at+e+ot(e,/(\w+).+(:[^]+)/,at+"box-$1$2"+Nr+"flex-$1$2")+e;case 5443:return at+e+Nr+"flex-item-"+ot(e,/flex-|-self/,"")+e;case 4675:return at+e+Nr+"flex-line-pack"+ot(e,/align-content|flex-|-self/,"")+e;case 5548:return at+e+Nr+ot(e,"shrink","negative")+e;case 5292:return at+e+Nr+ot(e,"basis","preferred-size")+e;case 6060:return at+"box-"+ot(e,"-grow","")+at+e+Nr+ot(e,"grow","positive")+e;case 4554:return at+ot(e,/([^-])(transform)/g,"$1"+at+"$2")+e;case 6187:return ot(ot(ot(e,/(zoom-|grab)/,at+"$1"),/(image-set)/,at+"$1"),e,"")+e;case 5495:case 3959:return ot(e,/(image-set\([^]*)/,at+"$1$`$1");case 4968:return ot(ot(e,/(.+:)(flex-)?(.*)/,at+"box-pack:$3"+Nr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+at+e+e;case 4095:case 3583:case 4068:case 2532:return ot(e,/(.+)-inline(.+)/,at+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(za(e)-1-t>6)switch(br(e,t+1)){case 109:if(br(e,t+4)!==45)break;case 102:return ot(e,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+Vh+(br(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ox(e,"stretch")?GM(ot(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(br(e,t+1)!==115)break;case 6444:switch(br(e,za(e)-3-(~Ox(e,"!important")&&10))){case 107:return ot(e,":",":"+at)+e;case 101:return ot(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(br(e,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Nr+"$2box$3")+e}break;case 5936:switch(br(e,t+11)){case 114:return at+e+Nr+ot(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return at+e+Nr+ot(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return at+e+Nr+ot(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return at+e+Nr+e+e}return e}var HB=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case a1:t.return=GM(t.value,t.length);break;case HM:return Wl([au(t,{value:ot(t.value,"@","@"+at)})],a);case n1:if(t.length)return EB(t.props,function(o){switch(PB(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wl([au(t,{props:[ot(o,/:(read-\w+)/,":"+Vh+"$1")]})],a);case"::placeholder":return Wl([au(t,{props:[ot(o,/:(plac\w+)/,":"+at+"input-$1")]}),au(t,{props:[ot(o,/:(plac\w+)/,":"+Vh+"$1")]}),au(t,{props:[ot(o,/:(plac\w+)/,Nr+"input-$1")]})],a)}return""})}},UB=[HB],YB=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var a=t.stylisPlugins||UB,o={},i,s=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),x=1;x<v.length;x++)o[v[x]]=!0;s.push(y)});var l,c=[BB,WB];{var u,d=[RB,$B(function(y){u.insert(y)})],f=IB(c.concat(a,d)),p=function(v){return Wl(jB(v),f)};l=function(v,x,w,b){u=w,p(v?v+"{"+x.styles+"}":x.styles),b&&(g.inserted[x.name]=!0)}}var g={key:r,sheet:new xB({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(s),g},XM={exports:{}},vt={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mr=typeof Symbol=="function"&&Symbol.for,i1=mr?Symbol.for("react.element"):60103,s1=mr?Symbol.for("react.portal"):60106,Yg=mr?Symbol.for("react.fragment"):60107,Vg=mr?Symbol.for("react.strict_mode"):60108,Kg=mr?Symbol.for("react.profiler"):60114,qg=mr?Symbol.for("react.provider"):60109,Gg=mr?Symbol.for("react.context"):60110,l1=mr?Symbol.for("react.async_mode"):60111,Xg=mr?Symbol.for("react.concurrent_mode"):60111,Qg=mr?Symbol.for("react.forward_ref"):60112,Zg=mr?Symbol.for("react.suspense"):60113,VB=mr?Symbol.for("react.suspense_list"):60120,Jg=mr?Symbol.for("react.memo"):60115,ev=mr?Symbol.for("react.lazy"):60116,KB=mr?Symbol.for("react.block"):60121,qB=mr?Symbol.for("react.fundamental"):60117,GB=mr?Symbol.for("react.responder"):60118,XB=mr?Symbol.for("react.scope"):60119;function Tn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case i1:switch(e=e.type,e){case l1:case Xg:case Yg:case Kg:case Vg:case Zg:return e;default:switch(e=e&&e.$$typeof,e){case Gg:case Qg:case ev:case Jg:case qg:return e;default:return t}}case s1:return t}}}function QM(e){return Tn(e)===Xg}vt.AsyncMode=l1;vt.ConcurrentMode=Xg;vt.ContextConsumer=Gg;vt.ContextProvider=qg;vt.Element=i1;vt.ForwardRef=Qg;vt.Fragment=Yg;vt.Lazy=ev;vt.Memo=Jg;vt.Portal=s1;vt.Profiler=Kg;vt.StrictMode=Vg;vt.Suspense=Zg;vt.isAsyncMode=function(e){return QM(e)||Tn(e)===l1};vt.isConcurrentMode=QM;vt.isContextConsumer=function(e){return Tn(e)===Gg};vt.isContextProvider=function(e){return Tn(e)===qg};vt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===i1};vt.isForwardRef=function(e){return Tn(e)===Qg};vt.isFragment=function(e){return Tn(e)===Yg};vt.isLazy=function(e){return Tn(e)===ev};vt.isMemo=function(e){return Tn(e)===Jg};vt.isPortal=function(e){return Tn(e)===s1};vt.isProfiler=function(e){return Tn(e)===Kg};vt.isStrictMode=function(e){return Tn(e)===Vg};vt.isSuspense=function(e){return Tn(e)===Zg};vt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yg||e===Xg||e===Kg||e===Vg||e===Zg||e===VB||typeof e=="object"&&e!==null&&(e.$$typeof===ev||e.$$typeof===Jg||e.$$typeof===qg||e.$$typeof===Gg||e.$$typeof===Qg||e.$$typeof===qB||e.$$typeof===GB||e.$$typeof===XB||e.$$typeof===KB)};vt.typeOf=Tn;XM.exports=vt;var QB=XM.exports,ZM=QB,ZB={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},JB={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},JM={};JM[ZM.ForwardRef]=ZB;JM[ZM.Memo]=JB;var e8=!0;function eT(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var c1=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||e8===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},u1=function(t,r,n){c1(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function t8(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var r8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},n8=/[A-Z]|^ms/g,a8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tT=function(t){return t.charCodeAt(1)===45},d2=function(t){return t!=null&&typeof t!="boolean"},$y=qM(function(e){return tT(e)?e:e.replace(n8,"-$&").toLowerCase()}),f2=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(a8,function(n,a,o){return Ba={name:a,styles:o,next:Ba},a})}return r8[t]!==1&&!tT(t)&&typeof r=="number"&&r!==0?r+"px":r};function Sd(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Ba={name:a.name,styles:a.styles,next:Ba},a.name;var o=r;if(o.styles!==void 0){var i=o.next;if(i!==void 0)for(;i!==void 0;)Ba={name:i.name,styles:i.styles,next:Ba},i=i.next;var s=o.styles+";";return s}return o8(e,t,r)}case"function":{if(e!==void 0){var l=Ba,c=r(e);return Ba=l,Sd(e,t,c)}break}}var u=r;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function o8(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=Sd(e,t,r[a])+";";else for(var o in r){var i=r[o];if(typeof i!="object"){var s=i;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":d2(s)&&(n+=$y(o)+":"+f2(o,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)d2(i[l])&&(n+=$y(o)+":"+f2(o,i[l])+";");else{var c=Sd(e,t,i);switch(o){case"animation":case"animationName":{n+=$y(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var p2=/label:\s*([^\s;{]+)\s*(;|$)/g,Ba;function nf(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";Ba=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=Sd(r,t,o);else{var i=o;a+=i[0]}for(var s=1;s<e.length;s++)if(a+=Sd(r,t,e[s]),n){var l=o;a+=l[s]}p2.lastIndex=0;for(var c="",u;(u=p2.exec(a))!==null;)c+="-"+u[1];var d=t8(a)+c;return{name:d,styles:a,next:Ba}}var i8=function(t){return t()},rT=ql.useInsertionEffect?ql.useInsertionEffect:!1,nT=rT||i8,h2=rT||m.useLayoutEffect,aT=m.createContext(typeof HTMLElement<"u"?YB({key:"css"}):null);aT.Provider;var d1=function(t){return m.forwardRef(function(r,n){var a=m.useContext(aT);return t(r,a,n)})},tv=m.createContext({}),f1={}.hasOwnProperty,_x="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",s8=function(t,r){var n={};for(var a in r)f1.call(r,a)&&(n[a]=r[a]);return n[_x]=t,n},l8=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return c1(r,n,a),nT(function(){return u1(r,n,a)}),null},c8=d1(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var a=e[_x],o=[n],i="";typeof e.className=="string"?i=eT(t.registered,o,e.className):e.className!=null&&(i=e.className+" ");var s=nf(o,void 0,m.useContext(tv));i+=t.key+"-"+s.name;var l={};for(var c in e)f1.call(e,c)&&c!=="css"&&c!==_x&&(l[c]=e[c]);return l.className=i,r&&(l.ref=r),m.createElement(m.Fragment,null,m.createElement(l8,{cache:t,serialized:s,isStringTag:typeof a=="string"}),m.createElement(a,l))}),u8=c8,m2=function(t,r){var n=arguments;if(r==null||!f1.call(r,"css"))return m.createElement.apply(void 0,n);var a=n.length,o=new Array(a);o[0]=u8,o[1]=s8(t,r);for(var i=2;i<a;i++)o[i]=n[i];return m.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(m2||(m2={}));var d8=d1(function(e,t){var r=e.styles,n=nf([r],void 0,m.useContext(tv)),a=m.useRef();return h2(function(){var o=t.key+"-global",i=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),i.hydrate([l])),a.current=[i,s],function(){i.flush()}},[t]),h2(function(){var o=a.current,i=o[0],s=o[1];if(s){o[1]=!1;return}if(n.next!==void 0&&u1(t,n.next,!0),i.tags.length){var l=i.tags[i.tags.length-1].nextElementSibling;i.before=l,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function p1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return nf(t)}function af(){var e=p1.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var f8=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,p8=qM(function(e){return f8.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),h8=p8,m8=function(t){return t!=="theme"},g2=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?h8:m8},v2=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(i){return t.__emotion_forwardProp(i)&&o(i)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},g8=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return c1(r,n,a),nT(function(){return u1(r,n,a)}),null},v8=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,i;r!==void 0&&(o=r.label,i=r.target);var s=v2(t,r,n),l=s||g2(a),c=!l("as");return function(){var u=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,g=1;g<p;g++)d.push(u[g],f[g])}var y=d1(function(v,x,w){var b=c&&v.as||a,S="",k=[],P=v;if(v.theme==null){P={};for(var E in v)P[E]=v[E];P.theme=m.useContext(tv)}typeof v.className=="string"?S=eT(x.registered,k,v.className):v.className!=null&&(S=v.className+" ");var O=nf(d.concat(k),x.registered,P);S+=x.key+"-"+O.name,i!==void 0&&(S+=" "+i);var D=c&&s===void 0?g2(b):l,N={};for(var _ in v)c&&_==="as"||D(_)&&(N[_]=v[_]);return N.className=S,w&&(N.ref=w),m.createElement(m.Fragment,null,m.createElement(g8,{cache:x,serialized:O,isStringTag:typeof b=="string"}),m.createElement(b,N))});return y.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=a,y.__emotion_styles=d,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return"."+i}}),y.withComponent=function(v,x){var w=e(v,Yh({},r,x,{shouldForwardProp:v2(y,x,!0)}));return w.apply(void 0,d)},y}},y8=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Nx=v8.bind(null);y8.forEach(function(e){Nx[e]=Nx(e)});function x8(e){return e==null||Object.keys(e).length===0}function b8(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?a=>t(x8(a)?r:a):t;return h.jsx(d8,{styles:n})}function w8(e,t){return Nx(e,t)}function S8(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const y2=[];function Fi(e){return y2[0]=e,nf(y2)}const k8=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function C8(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=k8(t),i=Object.keys(o);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-n/100}${r})`}function c(f,p){const g=i.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:p)-n/100}${r})`}function u(f){return i.indexOf(f)+1<i.length?c(f,i[i.indexOf(f)+1]):s(f)}function d(f){const p=i.indexOf(f);return p===0?s(i[1]):p===i.length-1?l(i[p]):c(f,i[i.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:i,values:o,up:s,down:l,between:c,only:u,not:d,unit:r,...a}}const P8={borderRadius:4};function oT(e=8,t=t1({spacing:e})){if(e.mui)return e;const r=(...n)=>(n.length===0?[1]:n).map(o=>{const i=t(o);return typeof i=="number"?`${i}px`:i}).join(" ");return r.mui=!0,r}function E8(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function h1(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...i}=e,s=C8(r),l=oT(a);let c=Ar({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...P8,...o}},i);return c=Oz(c),c.applyStyles=E8,c=t.reduce((u,d)=>Ar(u,d),c),c.unstable_sxConfig={...tf,...i==null?void 0:i.unstable_sxConfig},c.unstable_sx=function(d){return ac({sx:d,theme:this})},c}function O8(e){return Object.keys(e).length===0}function D8(e=null){const t=m.useContext(tv);return!t||O8(t)?e:t}const _8=h1();function iT(e=_8){return D8(e)}function Ly(e){const t=Fi(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function N8({styles:e,themeId:t,defaultTheme:r={}}){const n=iT(r),a=t&&n[t]||n;let o=typeof e=="function"?e(a):e;return a.modularCssLayers&&(Array.isArray(o)?o=o.map(i=>Ly(typeof i=="function"?i(a):i)):o=Ly(o)),h.jsx(b8,{styles:o})}const M8={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function qe(e,t,r="Mui"){const n=M8[t];return n?`${r}-${n}`:`${Sz.generate(e)}-${t}`}function Ge(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=qe(e,a,r)}),n}function sT(e){const{variants:t,...r}=e,n={variants:t,style:Fi(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Fi(a.style))}),n}const T8=h1();function Fy(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function bs(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function j8(e){return e?(t,r)=>r[e]:null}function A8(e,t,r){e.theme=$8(e.theme)?r:e.theme[t]||e.theme}function Jp(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(a=>Jp(e,a,r));if(Array.isArray(n==null?void 0:n.variants)){let a;if(n.isProcessed)a=r?bs(n.style,r):n.style;else{const{variants:o,...i}=n;a=r?bs(Fi(i),r):i}return lT(e,n.variants,[a],r)}return n!=null&&n.isProcessed?r?bs(Fi(n.style),r):n.style:r?bs(Fi(n),r):n}function lT(e,t,r=[],n=void 0){var o;let a;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(a??(a={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(a))continue}else for(const l in s.props)if(e[l]!==s.props[l]&&((o=e.ownerState)==null?void 0:o[l])!==s.props[l])continue e;typeof s.style=="function"?(a??(a={...e,...e.ownerState,ownerState:e.ownerState}),r.push(n?bs(Fi(s.style(a)),n):s.style(a))):r.push(n?bs(Fi(s.style),n):s.style)}return r}function R8(e={}){const{themeId:t,defaultTheme:r=T8,rootShouldForwardProp:n=Fy,slotShouldForwardProp:a=Fy}=e;function o(s){A8(s,t,r)}return(s,l={})=>{S8(s,P=>P.filter(E=>E!==ac));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=j8(F8(u)),...g}=l,y=c&&c.startsWith("Mui")||u?"components":"custom",v=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,x=f||!1;let w=Fy;u==="Root"||u==="root"?w=n:u?w=a:L8(s)&&(w=void 0);const b=w8(s,{shouldForwardProp:w,label:I8(),...g}),S=P=>{if(P.__emotion_real===P)return P;if(typeof P=="function")return function(O){return Jp(O,P,O.theme.modularCssLayers?y:void 0)};if(Ya(P)){const E=sT(P);return function(D){return E.variants?Jp(D,E,D.theme.modularCssLayers?y:void 0):D.theme.modularCssLayers?bs(E.style,y):E.style}}return P},k=(...P)=>{const E=[],O=P.map(S),D=[];if(E.push(o),c&&p&&D.push(function(M){var L,I;const j=(I=(L=M.theme.components)==null?void 0:L[c])==null?void 0:I.styleOverrides;if(!j)return null;const A={};for(const $ in j)A[$]=Jp(M,j[$],M.theme.modularCssLayers?"theme":void 0);return p(M,A)}),c&&!v&&D.push(function(M){var A,L;const T=M.theme,j=(L=(A=T==null?void 0:T.components)==null?void 0:A[c])==null?void 0:L.variants;return j?lT(M,j,[],M.theme.modularCssLayers?"theme":void 0):null}),x||D.push(ac),Array.isArray(O[0])){const C=O.shift(),M=new Array(E.length).fill(""),T=new Array(D.length).fill("");let j;j=[...M,...C,...T],j.raw=[...M,...C.raw,...T],E.unshift(j)}const N=[...E,...O,...D],_=b(...N);return s.muiName&&(_.muiName=s.muiName),_};return b.withConfig&&(k.withConfig=b.withConfig),k}}function I8(e,t){return void 0}function $8(e){for(const t in e)return!1;return!0}function L8(e){return typeof e=="string"&&e.charCodeAt(0)>96}function F8(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Yo=typeof window<"u"?m.useLayoutEffect:m.useEffect;function z8(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function m1(e,t=0,r=1){return z8(e,t,r)}function B8(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Yi(e){if(e.type)return e;if(e.charAt(0)==="#")return Yi(B8(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(Ho(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Ho(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const W8=e=>{const t=Yi(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Ou=(e,t)=>{try{return W8(e)}catch{return e}};function rv(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function cT(e){e=Yi(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),i=(c,u=(c+r/30)%12)=>a-o*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),rv({type:s,values:l})}function Mx(e){e=Yi(e);let t=e.type==="hsl"||e.type==="hsla"?Yi(cT(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function H8(e,t){const r=Mx(e),n=Mx(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Kh(e,t){return e=Yi(e),t=m1(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,rv(e)}function os(e,t,r){try{return Kh(e,t)}catch{return e}}function nv(e,t){if(e=Yi(e),t=m1(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return rv(e)}function ut(e,t,r){try{return nv(e,t)}catch{return e}}function av(e,t){if(e=Yi(e),t=m1(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return rv(e)}function dt(e,t,r){try{return av(e,t)}catch{return e}}function Tx(e,t=.15){return Mx(e)>.5?nv(e,t):av(e,t)}function tp(e,t,r){try{return Tx(e,t)}catch{return e}}const U8=m.createContext(),g1=()=>m.useContext(U8)??!1,Y8=m.createContext(void 0);function V8(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Hh(a.defaultProps,n,t.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?Hh(a,n,t.components.mergeClassNameAndStyle):n}function K8({props:e,name:t}){const r=m.useContext(Y8);return V8({props:e,name:t,theme:{components:r}})}let x2=0;function q8(e){const[t,r]=m.useState(e),n=e||t;return m.useEffect(()=>{t==null&&(x2+=1,r(`mui-${x2}`))},[t]),n}const G8={...ql},b2=G8.useId;function Rc(e){if(b2!==void 0){const t=b2();return e??t}return q8(e)}const w2={theme:void 0};function X8(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(w2.theme=a.theme,o=sT(e(w2)),t=o,r=a.theme),o}}function Q8(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const S2=(e,t,r,n=[])=>{let a=e;t.forEach((o,i)=>{i===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},Z8=(e,t,r)=>{function n(a,o=[],i=[]){Object.entries(a).forEach(([s,l])=>{(!r||r&&!r([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...o,s],Array.isArray(l)?[...i,s]:i):t([...o,s],l,i))})}n(e)},J8=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function zy(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},i={};return Z8(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const u=`--${r?`${r}-`:""}${s.join("-")}`,d=J8(s,l);Object.assign(a,{[u]:d}),S2(o,s,`var(${u})`,c),S2(i,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:a,vars:o,varsWithDefaults:i}}function eW(e,t={}){const{getSelector:r=x,disableCssColorScheme:n,colorSchemeSelector:a,enableContrastVars:o}=t,{colorSchemes:i={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=zy(c,t);let p=f;const g={},{[l]:y,...v}=i;if(Object.entries(v||{}).forEach(([S,k])=>{const{vars:P,css:E,varsWithDefaults:O}=zy(k,t);p=Ar(p,O),g[S]={css:E,vars:P}}),y){const{css:S,vars:k,varsWithDefaults:P}=zy(y,t);p=Ar(p,P),g[l]={css:S,vars:k}}function x(S,k){var E,O;let P=a;if(a==="class"&&(P=".%s"),a==="data"&&(P="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(P=`[${a}="%s"]`),S){if(P==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((O=(E=i[S])==null?void 0:E.palette)==null?void 0:O.mode)||S})`]:{":root":k}};if(P)return e.defaultColorScheme===S?`:root, ${P.replace("%s",String(S))}`:P.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S={...u};return Object.entries(g).forEach(([,{vars:k}])=>{S=Ar(S,k)}),S},generateStyleSheets:()=>{var D,N;const S=[],k=e.defaultColorScheme||"light";function P(_,C){Object.keys(C).length&&S.push(typeof _=="string"?{[_]:{...C}}:_)}P(r(void 0,{...d}),d);const{[k]:E,...O}=g;if(E){const{css:_}=E,C=(N=(D=i[k])==null?void 0:D.palette)==null?void 0:N.mode,M=!n&&C?{colorScheme:C,..._}:{..._};P(r(k,{...M}),M)}return Object.entries(O).forEach(([_,{css:C}])=>{var j,A;const M=(A=(j=i[_])==null?void 0:j.palette)==null?void 0:A.mode,T=!n&&M?{colorScheme:M,...C}:{...C};P(r(_,{...T}),T)}),o&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function tW(e){return function(r){return e==="media"?`@media (prefers-color-scheme: ${r})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}function By(e,t){var r,n,a;return m.isValidElement(e)&&t.indexOf(e.type.muiName??((a=(n=(r=e.type)==null?void 0:r._payload)==null?void 0:n.value)==null?void 0:a.muiName))!==-1}const kd={black:"#000",white:"#fff"},rW={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ol={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},il={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ou={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},sl={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ll={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},cl={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function uT(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kd.white,default:kd.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const dT=uT();function fT(){return{text:{primary:kd.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:kd.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const jx=fT();function k2(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=av(e.main,a):t==="dark"&&(e.dark=nv(e.main,o)))}function C2(e,t,r,n,a){const o=a.light||a,i=a.dark||a*1.5;t[r]||(t.hasOwnProperty(n)?t[r]=t[n]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(o*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(i*100).toFixed(0)}%)`))}function nW(e="light"){return e==="dark"?{main:sl[200],light:sl[50],dark:sl[400]}:{main:sl[700],light:sl[400],dark:sl[800]}}function aW(e="light"){return e==="dark"?{main:ol[200],light:ol[50],dark:ol[400]}:{main:ol[500],light:ol[300],dark:ol[700]}}function oW(e="light"){return e==="dark"?{main:il[500],light:il[300],dark:il[700]}:{main:il[700],light:il[400],dark:il[800]}}function iW(e="light"){return e==="dark"?{main:ll[400],light:ll[300],dark:ll[700]}:{main:ll[700],light:ll[500],dark:ll[900]}}function sW(e="light"){return e==="dark"?{main:cl[400],light:cl[300],dark:cl[700]}:{main:cl[800],light:cl[500],dark:cl[900]}}function lW(e="light"){return e==="dark"?{main:ou[400],light:ou[300],dark:ou[700]}:{main:"#ed6c02",light:ou[500],dark:ou[900]}}function cW(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function v1(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:a,...o}=e,i=e.primary||nW(t),s=e.secondary||aW(t),l=e.error||oW(t),c=e.info||iW(t),u=e.success||sW(t),d=e.warning||lW(t);function f(v){return a?cW(v):H8(v,jx.text.primary)>=r?jx.text.primary:dT.text.primary}const p=({color:v,name:x,mainShade:w=500,lightShade:b=300,darkShade:S=700})=>{if(v={...v},!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(Ho(11,x?` (${x})`:"",w));if(typeof v.main!="string")throw new Error(Ho(12,x?` (${x})`:"",JSON.stringify(v.main)));return a?(C2(a,v,"light",b,n),C2(a,v,"dark",S,n)):(k2(v,"light",b,n),k2(v,"dark",S,n)),v.contrastText||(v.contrastText=f(v.main)),v};let g;return t==="light"?g=uT():t==="dark"&&(g=fT()),Ar({common:{...kd},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:rW,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...g},o)}function uW(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function dW(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function fW(e){return Math.round(e*1e5)/1e5}const P2={textTransform:"uppercase"},E2='"Roboto", "Helvetica", "Arial", sans-serif';function pW(e,t){const{fontFamily:r=E2,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=n/14,p=u||(v=>`${v/l*f}rem`),g=(v,x,w,b,S)=>({fontFamily:r,fontWeight:v,fontSize:p(x),lineHeight:w,...r===E2?{letterSpacing:`${fW(b/x)}em`}:{},...S,...c}),y={h1:g(a,96,1.167,-1.5),h2:g(a,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(i,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(i,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(i,14,1.75,.4,P2),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,P2),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ar({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:i,fontWeightBold:s,...y},d,{clone:!1})}const hW=.2,mW=.14,gW=.12;function Et(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${hW})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${mW})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${gW})`].join(",")}const vW=["none",Et(0,2,1,-1,0,1,1,0,0,1,3,0),Et(0,3,1,-2,0,2,2,0,0,1,5,0),Et(0,3,3,-2,0,3,4,0,0,1,8,0),Et(0,2,4,-1,0,4,5,0,0,1,10,0),Et(0,3,5,-1,0,5,8,0,0,1,14,0),Et(0,3,5,-1,0,6,10,0,0,1,18,0),Et(0,4,5,-2,0,7,10,1,0,2,16,1),Et(0,5,5,-3,0,8,10,1,0,3,14,2),Et(0,5,6,-3,0,9,12,1,0,3,16,2),Et(0,6,6,-3,0,10,14,1,0,4,18,3),Et(0,6,7,-4,0,11,15,1,0,4,20,3),Et(0,7,8,-4,0,12,17,2,0,5,22,4),Et(0,7,8,-4,0,13,19,2,0,5,24,4),Et(0,7,9,-4,0,14,21,2,0,5,26,4),Et(0,8,9,-5,0,15,22,2,0,6,28,5),Et(0,8,10,-5,0,16,24,2,0,6,30,5),Et(0,8,11,-5,0,17,26,2,0,6,32,5),Et(0,9,11,-5,0,18,28,2,0,7,34,6),Et(0,9,12,-6,0,19,29,2,0,7,36,6),Et(0,10,13,-6,0,20,31,3,0,8,38,7),Et(0,10,13,-6,0,21,33,3,0,8,40,7),Et(0,10,14,-6,0,22,35,3,0,8,42,7),Et(0,11,14,-7,0,23,36,3,0,9,44,8),Et(0,11,15,-7,0,24,38,3,0,9,46,8)],yW={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},xW={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function O2(e){return`${Math.round(e)}ms`}function bW(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function wW(e){const t={...yW,...e.easing},r={...xW,...e.duration};return{getAutoHeightDuration:bW,create:(a=["all"],o={})=>{const{duration:i=r.standard,easing:s=t.easeInOut,delay:l=0,...c}=o;return(Array.isArray(a)?a:[a]).map(u=>`${u} ${typeof i=="string"?i:O2(i)} ${s} ${typeof l=="string"?l:O2(l)}`).join(",")},...e,easing:t,duration:r}}const SW={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function kW(e){return Ya(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function pT(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;o<a.length;o++){const[i,s]=a[o];!kW(s)||i.startsWith("unstable_")?delete n[i]:Ya(s)&&(n[i]={...s},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
const theme = ${JSON.stringify(t,null,2)};
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
theme.transitions = createTransitions(theme.transitions || {});
export default theme;`}function D2(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const CW=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let n=0;n<t.length;n+=1)r+=+t[n];return r};function PW(e){Object.assign(e,{alpha(t,r){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:Kh(t,CW(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${D2(r)})`:av(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${D2(r)})`:nv(t,r)}})}function Ax(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},transitions:i={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Ho(20));const d=v1({...o,colorSpace:c}),f=h1(e);let p=Ar(f,{mixins:dW(f.breakpoints,n),palette:d,shadows:vW.slice(),typography:pW(d,s),transitions:wW(i),zIndex:{...SW}});return p=Ar(p,u),p=t.reduce((g,y)=>Ar(g,y),p),p.unstable_sxConfig={...tf,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(y){return ac({sx:y,theme:this})},p.toRuntimeSource=pT,PW(p),p}function Rx(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const EW=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Rx(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function hT(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function mT(e){return e==="dark"?EW:[]}function OW(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:a,...o}=e,i=v1({...t,colorSpace:a});return{palette:i,opacity:{...hT(i.mode),...r},overlays:n||mT(i.mode),...o}}function DW(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const _W=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],NW=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return _W(e.cssVarPrefix).forEach(s=>{i[s]=r[s],delete r[s]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:o?{[o.replace("%s",t)]:i,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function MW(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function K(e,t,r){!e[t]&&r&&(e[t]=r)}function Du(e){return typeof e!="string"||!e.startsWith("hsl")?e:cT(e)}function yo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ou(Du(e[t])))}function TW(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ia=e=>{try{return e()}catch{}},jW=(e="mui")=>Q8(e);function Wy(e,t,r,n,a){if(!r)return;r=r===!0?{}:r;const o=a==="dark"?"dark":"light";if(!n){t[a]=OW({...r,palette:{mode:o,...r==null?void 0:r.palette},colorSpace:e});return}const{palette:i,...s}=Ax({...n,palette:{mode:o,...r==null?void 0:r.palette},colorSpace:e});return t[a]={...r,palette:i,opacity:{...hT(o),...r==null?void 0:r.opacity},overlays:(r==null?void 0:r.overlays)||mT(o)},s}function AW(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",nativeColor:i=!1,shouldSkipGeneratingVar:s=DW,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(r)[0],f=n||(r.light&&d!=="light"?"light":d),p=jW(o),{[f]:g,light:y,dark:v,...x}=r,w={...x};let b=g;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(b=!0),!b)throw new Error(Ho(21,f));let S;i&&(S="oklch");const k=Wy(S,w,b,u,f);y&&!w.light&&Wy(S,w,y,void 0,"light"),v&&!w.dark&&Wy(S,w,v,void 0,"dark");let P={defaultColorScheme:f,...k,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:w,font:{...uW(k.typography),...k.font},spacing:TW(u.spacing)};Object.keys(P.colorSchemes).forEach(_=>{const C=P.colorSchemes[_].palette,M=j=>{const A=j.split("-"),L=A[1],I=A[2];return p(j,C[L][I])};C.mode==="light"&&(K(C.common,"background","#fff"),K(C.common,"onBackground","#000")),C.mode==="dark"&&(K(C.common,"background","#000"),K(C.common,"onBackground","#fff"));function T(j,A,L){if(S){let I;return j===os&&(I=`transparent ${((1-L)*100).toFixed(0)}%`),j===ut&&(I=`#000 ${(L*100).toFixed(0)}%`),j===dt&&(I=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${S}, ${A}, ${I})`}return j(A,L)}if(MW(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){K(C.Alert,"errorColor",T(ut,C.error.light,.6)),K(C.Alert,"infoColor",T(ut,C.info.light,.6)),K(C.Alert,"successColor",T(ut,C.success.light,.6)),K(C.Alert,"warningColor",T(ut,C.warning.light,.6)),K(C.Alert,"errorFilledBg",M("palette-error-main")),K(C.Alert,"infoFilledBg",M("palette-info-main")),K(C.Alert,"successFilledBg",M("palette-success-main")),K(C.Alert,"warningFilledBg",M("palette-warning-main")),K(C.Alert,"errorFilledColor",Ia(()=>C.getContrastText(C.error.main))),K(C.Alert,"infoFilledColor",Ia(()=>C.getContrastText(C.info.main))),K(C.Alert,"successFilledColor",Ia(()=>C.getContrastText(C.success.main))),K(C.Alert,"warningFilledColor",Ia(()=>C.getContrastText(C.warning.main))),K(C.Alert,"errorStandardBg",T(dt,C.error.light,.9)),K(C.Alert,"infoStandardBg",T(dt,C.info.light,.9)),K(C.Alert,"successStandardBg",T(dt,C.success.light,.9)),K(C.Alert,"warningStandardBg",T(dt,C.warning.light,.9)),K(C.Alert,"errorIconColor",M("palette-error-main")),K(C.Alert,"infoIconColor",M("palette-info-main")),K(C.Alert,"successIconColor",M("palette-success-main")),K(C.Alert,"warningIconColor",M("palette-warning-main")),K(C.AppBar,"defaultBg",M("palette-grey-100")),K(C.Avatar,"defaultBg",M("palette-grey-400")),K(C.Button,"inheritContainedBg",M("palette-grey-300")),K(C.Button,"inheritContainedHoverBg",M("palette-grey-A100")),K(C.Chip,"defaultBorder",M("palette-grey-400")),K(C.Chip,"defaultAvatarColor",M("palette-grey-700")),K(C.Chip,"defaultIconColor",M("palette-grey-700")),K(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),K(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),K(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),K(C.LinearProgress,"primaryBg",T(dt,C.primary.main,.62)),K(C.LinearProgress,"secondaryBg",T(dt,C.secondary.main,.62)),K(C.LinearProgress,"errorBg",T(dt,C.error.main,.62)),K(C.LinearProgress,"infoBg",T(dt,C.info.main,.62)),K(C.LinearProgress,"successBg",T(dt,C.success.main,.62)),K(C.LinearProgress,"warningBg",T(dt,C.warning.main,.62)),K(C.Skeleton,"bg",S?T(os,C.text.primary,.11):`rgba(${M("palette-text-primaryChannel")} / 0.11)`),K(C.Slider,"primaryTrack",T(dt,C.primary.main,.62)),K(C.Slider,"secondaryTrack",T(dt,C.secondary.main,.62)),K(C.Slider,"errorTrack",T(dt,C.error.main,.62)),K(C.Slider,"infoTrack",T(dt,C.info.main,.62)),K(C.Slider,"successTrack",T(dt,C.success.main,.62)),K(C.Slider,"warningTrack",T(dt,C.warning.main,.62));const j=S?T(ut,C.background.default,.6825):tp(C.background.default,.8);K(C.SnackbarContent,"bg",j),K(C.SnackbarContent,"color",Ia(()=>S?jx.text.primary:C.getContrastText(j))),K(C.SpeedDialAction,"fabHoverBg",tp(C.background.paper,.15)),K(C.StepConnector,"border",M("palette-grey-400")),K(C.StepContent,"border",M("palette-grey-400")),K(C.Switch,"defaultColor",M("palette-common-white")),K(C.Switch,"defaultDisabledColor",M("palette-grey-100")),K(C.Switch,"primaryDisabledColor",T(dt,C.primary.main,.62)),K(C.Switch,"secondaryDisabledColor",T(dt,C.secondary.main,.62)),K(C.Switch,"errorDisabledColor",T(dt,C.error.main,.62)),K(C.Switch,"infoDisabledColor",T(dt,C.info.main,.62)),K(C.Switch,"successDisabledColor",T(dt,C.success.main,.62)),K(C.Switch,"warningDisabledColor",T(dt,C.warning.main,.62)),K(C.TableCell,"border",T(dt,T(os,C.divider,1),.88)),K(C.Tooltip,"bg",T(os,C.grey[700],.92))}if(C.mode==="dark"){K(C.Alert,"errorColor",T(dt,C.error.light,.6)),K(C.Alert,"infoColor",T(dt,C.info.light,.6)),K(C.Alert,"successColor",T(dt,C.success.light,.6)),K(C.Alert,"warningColor",T(dt,C.warning.light,.6)),K(C.Alert,"errorFilledBg",M("palette-error-dark")),K(C.Alert,"infoFilledBg",M("palette-info-dark")),K(C.Alert,"successFilledBg",M("palette-success-dark")),K(C.Alert,"warningFilledBg",M("palette-warning-dark")),K(C.Alert,"errorFilledColor",Ia(()=>C.getContrastText(C.error.dark))),K(C.Alert,"infoFilledColor",Ia(()=>C.getContrastText(C.info.dark))),K(C.Alert,"successFilledColor",Ia(()=>C.getContrastText(C.success.dark))),K(C.Alert,"warningFilledColor",Ia(()=>C.getContrastText(C.warning.dark))),K(C.Alert,"errorStandardBg",T(ut,C.error.light,.9)),K(C.Alert,"infoStandardBg",T(ut,C.info.light,.9)),K(C.Alert,"successStandardBg",T(ut,C.success.light,.9)),K(C.Alert,"warningStandardBg",T(ut,C.warning.light,.9)),K(C.Alert,"errorIconColor",M("palette-error-main")),K(C.Alert,"infoIconColor",M("palette-info-main")),K(C.Alert,"successIconColor",M("palette-success-main")),K(C.Alert,"warningIconColor",M("palette-warning-main")),K(C.AppBar,"defaultBg",M("palette-grey-900")),K(C.AppBar,"darkBg",M("palette-background-paper")),K(C.AppBar,"darkColor",M("palette-text-primary")),K(C.Avatar,"defaultBg",M("palette-grey-600")),K(C.Button,"inheritContainedBg",M("palette-grey-800")),K(C.Button,"inheritContainedHoverBg",M("palette-grey-700")),K(C.Chip,"defaultBorder",M("palette-grey-700")),K(C.Chip,"defaultAvatarColor",M("palette-grey-300")),K(C.Chip,"defaultIconColor",M("palette-grey-300")),K(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),K(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),K(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),K(C.LinearProgress,"primaryBg",T(ut,C.primary.main,.5)),K(C.LinearProgress,"secondaryBg",T(ut,C.secondary.main,.5)),K(C.LinearProgress,"errorBg",T(ut,C.error.main,.5)),K(C.LinearProgress,"infoBg",T(ut,C.info.main,.5)),K(C.LinearProgress,"successBg",T(ut,C.success.main,.5)),K(C.LinearProgress,"warningBg",T(ut,C.warning.main,.5)),K(C.Skeleton,"bg",S?T(os,C.text.primary,.13):`rgba(${M("palette-text-primaryChannel")} / 0.13)`),K(C.Slider,"primaryTrack",T(ut,C.primary.main,.5)),K(C.Slider,"secondaryTrack",T(ut,C.secondary.main,.5)),K(C.Slider,"errorTrack",T(ut,C.error.main,.5)),K(C.Slider,"infoTrack",T(ut,C.info.main,.5)),K(C.Slider,"successTrack",T(ut,C.success.main,.5)),K(C.Slider,"warningTrack",T(ut,C.warning.main,.5));const j=S?T(dt,C.background.default,.985):tp(C.background.default,.98);K(C.SnackbarContent,"bg",j),K(C.SnackbarContent,"color",Ia(()=>S?dT.text.primary:C.getContrastText(j))),K(C.SpeedDialAction,"fabHoverBg",tp(C.background.paper,.15)),K(C.StepConnector,"border",M("palette-grey-600")),K(C.StepContent,"border",M("palette-grey-600")),K(C.Switch,"defaultColor",M("palette-grey-300")),K(C.Switch,"defaultDisabledColor",M("palette-grey-600")),K(C.Switch,"primaryDisabledColor",T(ut,C.primary.main,.55)),K(C.Switch,"secondaryDisabledColor",T(ut,C.secondary.main,.55)),K(C.Switch,"errorDisabledColor",T(ut,C.error.main,.55)),K(C.Switch,"infoDisabledColor",T(ut,C.info.main,.55)),K(C.Switch,"successDisabledColor",T(ut,C.success.main,.55)),K(C.Switch,"warningDisabledColor",T(ut,C.warning.main,.55)),K(C.TableCell,"border",T(ut,T(os,C.divider,1),.68)),K(C.Tooltip,"bg",T(os,C.grey[700],.92))}yo(C.background,"default"),yo(C.background,"paper"),yo(C.common,"background"),yo(C.common,"onBackground"),yo(C,"divider"),Object.keys(C).forEach(j=>{const A=C[j];j!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&K(C[j],"mainChannel",Ou(Du(A.main))),A.light&&K(C[j],"lightChannel",Ou(Du(A.light))),A.dark&&K(C[j],"darkChannel",Ou(Du(A.dark))),A.contrastText&&K(C[j],"contrastTextChannel",Ou(Du(A.contrastText))),j==="text"&&(yo(C[j],"primary"),yo(C[j],"secondary")),j==="action"&&(A.active&&yo(C[j],"active"),A.selected&&yo(C[j],"selected")))})}),P=t.reduce((_,C)=>Ar(_,C),P);const E={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:NW(P),enableContrastVars:i},{vars:O,generateThemeVars:D,generateStyleSheets:N}=eW(P,E);return P.vars=O,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([_,C])=>{P[_]=C}),P.generateThemeVars=D,P.generateStyleSheets=N,P.generateSpacing=function(){return oT(u.spacing,t1(this))},P.getColorSchemeSelector=tW(l),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=s,P.unstable_sxConfig={...tf,...u==null?void 0:u.unstable_sxConfig},P.unstable_sx=function(C){return ac({sx:C,theme:this})},P.toRuntimeSource=pT,P}function _2(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:v1({...r===!0?{}:r.palette,mode:t})})}function RW(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...i}=e,s=o||"light",l=a==null?void 0:a[s],c={...a,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Ax(e,...t);let u=r;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=Ax({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},_2(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},_2(d,"light",c.light)),d}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),AW({...i,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const y1=RW(),x1="$$material";function Ic(){const e=iT(y1);return e[x1]||e}function IW(e){return h.jsx(N8,{...e,defaultTheme:y1,themeId:x1})}function gT(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const jn=e=>gT(e)&&e!=="classes",de=R8({themeId:x1,defaultTheme:y1,rootShouldForwardProp:jn});function $W(e){return function(r){return h.jsx(IW,{styles:typeof e=="function"?n=>e({theme:n,...r}):e})}}function LW(){return gB}const Xe=X8;function Ze(e){return K8(e)}function FW(e){return qe("MuiSvgIcon",e)}Ge("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const zW=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(r)}`]};return Ke(a,FW,n)},BW=de("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ge(r.color)}`],t[`fontSize${ge(r.fontSize)}`]]}})(Xe(({theme:e})=>{var t,r,n,a,o,i,s,l,c,u,d,f,p,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:i.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var v,x;return{props:{color:y},style:{color:(x=(v=(e.vars??e).palette)==null?void 0:v[y])==null?void 0:x.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(g=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ix=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:i="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=n,g=m.isValidElement(a)&&a.type==="svg",y={...n,color:i,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:g},v={};u||(v.viewBox=f);const x=zW(y);return h.jsxs(BW,{as:s,className:le(x.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...v,...p,...g&&a.props,ownerState:y,children:[g?a.props.children:a,d?h.jsx("title",{children:d}):null]})});Ix.muiName="SvgIcon";function cn(e,t){function r(n,a){return h.jsx(Ix,{"data-testid":void 0,ref:a,...n,children:e})}return r.muiName=Ix.muiName,m.memo(m.forwardRef(r))}function vT(e,t=166){let r;function n(...a){const o=()=>{e.apply(this,a)};clearTimeout(r),r=setTimeout(o,t)}return n.clear=()=>{clearTimeout(r)},n}function Rr(e){return e&&e.ownerDocument||document}function Vo(e){return Rr(e).defaultView||window}function N2(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function qh(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=m.useRef(t!==void 0),[i,s]=m.useState(r),l=o?t:i,c=m.useCallback(u=>{o||s(u)},[]);return[l,c]}function Kn(e){const t=m.useRef(e);return Yo(()=>{t.current=e}),m.useRef((...r)=>(0,t.current)(...r)).current}function hr(...e){const t=m.useRef(void 0),r=m.useCallback(n=>{const a=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const i=o,s=i(n);return typeof s=="function"?s:()=>{i(null)}}return o.current=n,()=>{o.current=null}});return()=>{a.forEach(o=>o==null?void 0:o())}},e);return m.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function WW(e,t){const r=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&r>=65&&r<=90&&typeof t=="function"}function yT(e,t){if(!e)return t;function r(i,s){const l={};return Object.keys(s).forEach(c=>{WW(c,s[c])&&typeof i[c]=="function"&&(l[c]=(...u)=>{i[c](...u),s[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const s=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...s}):e,c=le(i==null?void 0:i.className,s==null?void 0:s.className,l==null?void 0:l.className),u=r(l,s);return{...s,...l,...u,...!!c&&{className:c},...(s==null?void 0:s.style)&&(l==null?void 0:l.style)&&{style:{...s.style,...l.style}},...(s==null?void 0:s.sx)&&(l==null?void 0:l.sx)&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const n=t,a=r(e,n),o=le(n==null?void 0:n.className,e==null?void 0:e.className);return{...t,...e,...a,...!!o&&{className:o},...(n==null?void 0:n.style)&&(e==null?void 0:e.style)&&{style:{...n.style,...e.style}},...(n==null?void 0:n.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Gh(e){try{return e.matches(":focus-visible")}catch{}return!1}const M2={};function xT(e,t){const r=m.useRef(M2);return r.current===M2&&(r.current=e(t)),r}class Xh{constructor(){me(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new Xh}static use(){const t=xT(Xh.create).current,[r,n]=m.useState(!1);return t.shouldMount=r,t.setShouldMount=n,m.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=UW(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function HW(){return Xh.use()}function UW(){let e,t;const r=new Promise((n,a)=>{e=n,t=a});return r.resolve=e,r.reject=t,r}function bT(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function $x(e,t){return $x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},$x(e,t)}function wT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$x(e,t)}const T2={disabled:!1},Qh=U.createContext(null);var YW=function(t){return t.scrollTop},_u="unmounted",us="exited",ds="entering",vl="entered",Lx="exiting",po=function(e){wT(t,e);function t(n,a){var o;o=e.call(this,n,a)||this;var i=a,s=i&&!i.isMounting?n.enter:n.appear,l;return o.appearStatus=null,n.in?s?(l=us,o.appearStatus=ds):l=vl:n.unmountOnExit||n.mountOnEnter?l=_u:l=us,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(a,o){var i=a.in;return i&&o.status===_u?{status:us}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var o=null;if(a!==this.props){var i=this.state.status;this.props.in?i!==ds&&i!==vl&&(o=ds):(i===ds||i===vl)&&(o=Lx)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,o,i,s;return o=i=s=a,a!=null&&typeof a!="number"&&(o=a.exit,i=a.enter,s=a.appear!==void 0?a.appear:i),{exit:o,enter:i,appear:s}},r.updateStatus=function(a,o){if(a===void 0&&(a=!1),o!==null)if(this.cancelNextCallback(),o===ds){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Pu.findDOMNode(this);i&&YW(i)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===us&&this.setState({status:_u})},r.performEnter=function(a){var o=this,i=this.props.enter,s=this.context?this.context.isMounting:a,l=this.props.nodeRef?[s]:[Pu.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!a&&!i||T2.disabled){this.safeSetState({status:vl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:ds},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:vl},function(){o.props.onEntered(c,u)})})})},r.performExit=function(){var a=this,o=this.props.exit,i=this.getTimeouts(),s=this.props.nodeRef?void 0:Pu.findDOMNode(this);if(!o||T2.disabled){this.safeSetState({status:us},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Lx},function(){a.props.onExiting(s),a.onTransitionEnd(i.exit,function(){a.safeSetState({status:us},function(){a.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,o){o=this.setNextCallback(o),this.setState(a,o)},r.setNextCallback=function(a){var o=this,i=!0;return this.nextCallback=function(s){i&&(i=!1,o.nextCallback=null,a(s))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(a,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Pu.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!i||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===_u)return null;var o=this.props,i=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 s=bT(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return U.createElement(Qh.Provider,{value:null},typeof i=="function"?i(a,s):U.cloneElement(U.Children.only(i),s))},t}(U.Component);po.contextType=Qh;po.propTypes={};function ul(){}po.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ul,onEntering:ul,onEntered:ul,onExit:ul,onExiting:ul,onExited:ul};po.UNMOUNTED=_u;po.EXITED=us;po.ENTERING=ds;po.ENTERED=vl;po.EXITING=Lx;function VW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b1(e,t){var r=function(o){return t&&m.isValidElement(o)?t(o):o},n=Object.create(null);return e&&m.Children.map(e,function(a){return a}).forEach(function(a){n[a.key]=r(a)}),n}function KW(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),a=[];for(var o in e)o in t?a.length&&(n[o]=a,a=[]):a.push(o);var i,s={};for(var l in t){if(n[l])for(i=0;i<n[l].length;i++){var c=n[l][i];s[n[l][i]]=r(c)}s[l]=r(l)}for(i=0;i<a.length;i++)s[a[i]]=r(a[i]);return s}function ws(e,t,r){return r[t]!=null?r[t]:e.props[t]}function qW(e,t){return b1(e.children,function(r){return m.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:ws(r,"appear",e),enter:ws(r,"enter",e),exit:ws(r,"exit",e)})})}function GW(e,t,r){var n=b1(e.children),a=KW(t,n);return Object.keys(a).forEach(function(o){var i=a[o];if(m.isValidElement(i)){var s=o in t,l=o in n,c=t[o],u=m.isValidElement(c)&&!c.props.in;l&&(!s||u)?a[o]=m.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:ws(i,"exit",e),enter:ws(i,"enter",e)}):!l&&s&&!u?a[o]=m.cloneElement(i,{in:!1}):l&&s&&m.isValidElement(c)&&(a[o]=m.cloneElement(i,{onExited:r.bind(null,i),in:c.props.in,exit:ws(i,"exit",e),enter:ws(i,"enter",e)}))}}),a}var XW=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},QW={component:"div",childFactory:function(t){return t}},w1=function(e){wT(t,e);function t(n,a){var o;o=e.call(this,n,a)||this;var i=o.handleExited.bind(VW(o));return o.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},o}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(a,o){var i=o.children,s=o.handleExited,l=o.firstRender;return{children:l?qW(a,s):GW(a,i,s),firstRender:!1}},r.handleExited=function(a,o){var i=b1(this.props.children);a.key in i||(a.props.onExited&&a.props.onExited(o),this.mounted&&this.setState(function(s){var l=Yh({},s.children);return delete l[a.key],{children:l}}))},r.render=function(){var a=this.props,o=a.component,i=a.childFactory,s=bT(a,["component","childFactory"]),l=this.state.contextValue,c=XW(this.state.children).map(i);return delete s.appear,delete s.enter,delete s.exit,o===null?U.createElement(Qh.Provider,{value:l},c):U.createElement(Qh.Provider,{value:l},U.createElement(o,s,c))},t}(U.Component);w1.propTypes={};w1.defaultProps=QW;const ZW=[];function JW(e){m.useEffect(e,ZW)}class ov{constructor(){me(this,"currentId",null);me(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});me(this,"disposeEffect",()=>this.clear)}static create(){return new ov}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Ss(){const e=xT(ov.create).current;return JW(e.disposeEffect),e}function e7(e){const{className:t,classes:r,pulsate:n=!1,rippleX:a,rippleY:o,rippleSize:i,in:s,onExited:l,timeout:c}=e,[u,d]=m.useState(!1),f=le(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),p={width:i,height:i,top:-(i/2)+o,left:-(i/2)+a},g=le(r.child,u&&r.childLeaving,n&&r.childPulsate);return!s&&!u&&d(!0),m.useEffect(()=>{if(!s&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,s,c]),h.jsx("span",{className:f,style:p,children:h.jsx("span",{className:g})})}const Ln=Ge("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Fx=550,t7=80,r7=af`
0% {
transform: scale(0);
opacity: 0.1;
}
100% {
transform: scale(1);
opacity: 0.3;
}
`,n7=af`
0% {
opacity: 1;
}
100% {
opacity: 0;
}
`,a7=af`
0% {
transform: scale(1);
}
50% {
transform: scale(0.92);
}
100% {
transform: scale(1);
}
`,o7=de("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),i7=de(e7,{name:"MuiTouchRipple",slot:"Ripple"})`
opacity: 0;
position: absolute;
&.${Ln.rippleVisible} {
opacity: 0.3;
transform: scale(1);
animation-name: ${r7};
animation-duration: ${Fx}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
&.${Ln.ripplePulsate} {
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
}
& .${Ln.child} {
opacity: 1;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: currentColor;
}
& .${Ln.childLeaving} {
opacity: 0;
animation-name: ${n7};
animation-duration: ${Fx}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
& .${Ln.childPulsate} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
animation-name: ${a7};
animation-duration: 2500ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
`,s7=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:o={},className:i,...s}=n,[l,c]=m.useState([]),u=m.useRef(0),d=m.useRef(null);m.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=m.useRef(!1),p=Ss(),g=m.useRef(null),y=m.useRef(null),v=m.useCallback(S=>{const{pulsate:k,rippleX:P,rippleY:E,rippleSize:O,cb:D}=S;c(N=>[...N,h.jsx(i7,{classes:{ripple:le(o.ripple,Ln.ripple),rippleVisible:le(o.rippleVisible,Ln.rippleVisible),ripplePulsate:le(o.ripplePulsate,Ln.ripplePulsate),child:le(o.child,Ln.child),childLeaving:le(o.childLeaving,Ln.childLeaving),childPulsate:le(o.childPulsate,Ln.childPulsate)},timeout:Fx,pulsate:k,rippleX:P,rippleY:E,rippleSize:O},u.current)]),u.current+=1,d.current=D},[o]),x=m.useCallback((S={},k={},P=()=>{})=>{const{pulsate:E=!1,center:O=a||k.pulsate,fakeElement:D=!1}=k;if((S==null?void 0:S.type)==="mousedown"&&f.current){f.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(f.current=!0);const N=D?null:y.current,_=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,M,T;if(O||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)C=Math.round(_.width/2),M=Math.round(_.height/2);else{const{clientX:j,clientY:A}=S.touches&&S.touches.length>0?S.touches[0]:S;C=Math.round(j-_.left),M=Math.round(A-_.top)}if(O)T=Math.sqrt((2*_.width**2+_.height**2)/3),T%2===0&&(T+=1);else{const j=Math.max(Math.abs((N?N.clientWidth:0)-C),C)*2+2,A=Math.max(Math.abs((N?N.clientHeight:0)-M),M)*2+2;T=Math.sqrt(j**2+A**2)}S!=null&&S.touches?g.current===null&&(g.current=()=>{v({pulsate:E,rippleX:C,rippleY:M,rippleSize:T,cb:P})},p.start(t7,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:E,rippleX:C,rippleY:M,rippleSize:T,cb:P})},[a,v,p]),w=m.useCallback(()=>{x({},{pulsate:!0})},[x]),b=m.useCallback((S,k)=>{if(p.clear(),(S==null?void 0:S.type)==="touchend"&&g.current){g.current(),g.current=null,p.start(0,()=>{b(S,k)});return}g.current=null,c(P=>P.length>0?P.slice(1):P),d.current=k},[p]);return m.useImperativeHandle(r,()=>({pulsate:w,start:x,stop:b}),[w,x,b]),h.jsx(o7,{className:le(Ln.root,o.root,i),ref:y,...s,children:h.jsx(w1,{component:null,exit:!0,children:l})})});function l7(e){return qe("MuiButtonBase",e)}const c7=Ge("MuiButtonBase",["root","disabled","focusVisible"]),u7=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:a}=e,i=Ke({root:["root",t&&"disabled",r&&"focusVisible"]},l7,a);return r&&n&&(i.root+=` ${n}`),i},d7=de("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${c7.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),S1=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:o=!1,children:i,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:g="a",onBlur:y,onClick:v,onContextMenu:x,onDragLeave:w,onFocus:b,onFocusVisible:S,onKeyDown:k,onKeyUp:P,onMouseDown:E,onMouseLeave:O,onMouseUp:D,onTouchEnd:N,onTouchMove:_,onTouchStart:C,tabIndex:M=0,TouchRippleProps:T,touchRippleRef:j,type:A,...L}=n,I=m.useRef(null),$=HW(),z=hr($.ref,j),[V,F]=m.useState(!1);c&&V&&F(!1),m.useImperativeHandle(a,()=>({focusVisible:()=>{F(!0),I.current.focus()}}),[]);const ne=$.shouldMount&&!u&&!c;m.useEffect(()=>{V&&f&&!u&&$.pulsate()},[u,f,V,$]);const ee=xo($,"start",E,d),X=xo($,"stop",x,d),fe=xo($,"stop",w,d),q=xo($,"stop",D,d),ke=xo($,"stop",ve=>{V&&ve.preventDefault(),O&&O(ve)},d),B=xo($,"start",C,d),W=xo($,"stop",N,d),G=xo($,"stop",_,d),R=xo($,"stop",ve=>{Gh(ve.target)||F(!1),y&&y(ve)},!1),ae=Kn(ve=>{I.current||(I.current=ve.currentTarget),Gh(ve.target)&&(F(!0),S&&S(ve)),b&&b(ve)}),J=()=>{const ve=I.current;return l&&l!=="button"&&!(ve.tagName==="A"&&ve.href)},he=Kn(ve=>{f&&!ve.repeat&&V&&ve.key===" "&&$.stop(ve,()=>{$.start(ve)}),ve.target===ve.currentTarget&&J()&&ve.key===" "&&ve.preventDefault(),k&&k(ve),ve.target===ve.currentTarget&&J()&&ve.key==="Enter"&&!c&&(ve.preventDefault(),v&&v(ve))}),Ce=Kn(ve=>{f&&ve.key===" "&&V&&!ve.defaultPrevented&&$.stop(ve,()=>{$.pulsate(ve)}),P&&P(ve),v&&ve.target===ve.currentTarget&&J()&&ve.key===" "&&!ve.defaultPrevented&&v(ve)});let re=l;re==="button"&&(L.href||L.to)&&(re=g);const ie={};if(re==="button"){const ve=!!L.formAction;ie.type=A===void 0&&!ve?"button":A,ie.disabled=c}else!L.href&&!L.to&&(ie.role="button"),c&&(ie["aria-disabled"]=c);const $e=hr(r,I),Fe={...n,centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:M,focusVisible:V},Ne=u7(Fe);return h.jsxs(d7,{as:re,className:le(Ne.root,s),ownerState:Fe,onBlur:R,onClick:v,onContextMenu:X,onFocus:ae,onKeyDown:he,onKeyUp:Ce,onMouseDown:ee,onMouseLeave:ke,onMouseUp:q,onDragLeave:fe,onTouchEnd:W,onTouchMove:G,onTouchStart:B,ref:$e,tabIndex:c?-1:M,type:A,...ie,...L,children:[i,ne?h.jsx(s7,{ref:z,center:o,...T}):null]})});function xo(e,t,r,n=!1){return Kn(a=>(r&&r(a),n||e[t](a),!0))}function f7(e){return typeof e.main=="string"}function p7(e,t=[]){if(!f7(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function nn(e=[]){return([,t])=>t&&p7(t,e)}function h7(e){return qe("MuiCircularProgress",e)}Ge("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const da=44,zx=af`
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
`,Bx=af`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -15px;
}
100% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: -126px;
}
`,m7=typeof zx!="string"?p1`
animation: ${zx} 1.4s linear infinite;
`:null,g7=typeof Bx!="string"?p1`
animation: ${Bx} 1.4s ease-in-out infinite;
`:null,v7=e=>{const{classes:t,variant:r,color:n,disableShrink:a}=e,o={root:["root",r,`color${ge(n)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ge(r)}`,a&&"circleDisableShrink"]};return Ke(o,h7,t)},y7=de("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${ge(r.color)}`]]}})(Xe(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:m7||{animation:`${zx} 1.4s linear infinite`}},...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),x7=de("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),b7=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${ge(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Xe(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:g7||{animation:`${Bx} 1.4s ease-in-out infinite`}}]}))),w7=de("circle",{name:"MuiCircularProgress",slot:"Track"})(Xe(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),ST=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiCircularProgress"}),{className:a,color:o="primary",disableShrink:i=!1,enableTrackSlot:s=!1,size:l=40,style:c,thickness:u=3.6,value:d=0,variant:f="indeterminate",...p}=n,g={...n,color:o,disableShrink:i,size:l,thickness:u,value:d,variant:f,enableTrackSlot:s},y=v7(g),v={},x={},w={};if(f==="determinate"){const b=2*Math.PI*((da-u)/2);v.strokeDasharray=b.toFixed(3),w["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*b).toFixed(3)}px`,x.transform="rotate(-90deg)"}return h.jsx(y7,{className:le(y.root,a),style:{width:l,height:l,...x,...c},ownerState:g,ref:r,role:"progressbar",...w,...p,children:h.jsxs(x7,{className:y.svg,ownerState:g,viewBox:`${da/2} ${da/2} ${da} ${da}`,children:[s?h.jsx(w7,{className:y.track,ownerState:g,cx:da,cy:da,r:(da-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,h.jsx(b7,{className:y.circle,style:v,ownerState:g,cx:da,cy:da,r:(da-u)/2,fill:"none",strokeWidth:u})]})})});function S7(e){return qe("MuiButton",e)}const is=Ge("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),k7=m.createContext({}),C7=m.createContext(void 0),P7=e=>{const{color:t,disableElevation:r,fullWidth:n,size:a,variant:o,loading:i,loadingPosition:s,classes:l}=e,c={root:["root",i&&"loading",o,`${o}${ge(t)}`,`size${ge(a)}`,`${o}Size${ge(a)}`,`color${ge(t)}`,r&&"disableElevation",n&&"fullWidth",i&&`loadingPosition${ge(s)}`],startIcon:["icon","startIcon",`iconSize${ge(a)}`],endIcon:["icon","endIcon",`iconSize${ge(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=Ke(c,S7,l);return{...l,...u}},kT=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],E7=de(S1,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${ge(r.color)}`],t[`size${ge(r.size)}`],t[`${r.variant}Size${ge(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${is.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${is.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${is.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${is.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(nn()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(e.vars||e).palette[n].main,"--variant-outlinedColor":(e.vars||e).palette[n].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[n].main,.5),"--variant-containedColor":(e.vars||e).palette[n].contrastText,"--variant-containedBg":(e.vars||e).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[n].dark,"--variant-textBg":e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[n].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${is.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${is.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${is.loading}`]:{color:"transparent"}}}]}})),O7=de("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${ge(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...kT]})),D7=de("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${ge(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...kT]})),_7=de("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),j2=de("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),ha=m.forwardRef(function(t,r){const n=m.useContext(k7),a=m.useContext(C7),o=Hh(n,t),i=Ze({props:o,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:g,focusVisibleClassName:y,fullWidth:v=!1,id:x,loading:w=null,loadingIndicator:b,loadingPosition:S="center",size:k="medium",startIcon:P,type:E,variant:O="text",...D}=i,N=Rc(x),_=b??h.jsx(ST,{"aria-labelledby":N,color:"inherit",size:16}),C={...i,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:v,loading:w,loadingIndicator:_,loadingPosition:S,size:k,type:E,variant:O},M=P7(C),T=(P||w&&S==="start")&&h.jsx(O7,{className:M.startIcon,ownerState:C,children:P||h.jsx(j2,{className:M.loadingIconPlaceholder,ownerState:C})}),j=(g||w&&S==="end")&&h.jsx(D7,{className:M.endIcon,ownerState:C,children:g||h.jsx(j2,{className:M.loadingIconPlaceholder,ownerState:C})}),A=a||"",L=typeof w=="boolean"?h.jsx("span",{className:M.loadingWrapper,style:{display:"contents"},children:w&&h.jsx(_7,{className:M.loadingIndicator,ownerState:C,children:_})}):null;return h.jsxs(E7,{ownerState:C,className:le(n.className,M.root,u,A),component:c,disabled:d||w,focusRipple:!p,focusVisibleClassName:le(M.focusVisible,y),ref:r,type:E,id:w?N:x,...D,classes:M,children:[T,S!=="end"&&L,s,S==="end"&&L,j]})}),N7=()=>{var p,g;const{login:e,error:t,user:r}=ln(),n=ni(),a=Aa(),[o,i]=m.useState(""),[s,l]=m.useState(""),[c,u]=m.useState(!1),d=((g=(p=a.state)==null?void 0:p.from)==null?void 0:g.pathname)||"/";m.useEffect(()=>{r&&(d.startsWith("/admin")?n(d,{replace:!0}):n("/",{replace:!0}))},[r,n,d]);const f=async y=>{y.preventDefault(),u(!0),await e(o,s),u(!1)};return h.jsxs("div",{className:"min-h-screen flex items-center justify-center relative overflow-hidden",children:[h.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50"}),h.jsx("div",{className:"absolute top-0 left-0 w-96 h-96 bg-blue-400/20 rounded-full blur-3xl -translate-x-1/2 -translate-y-1/2"}),h.jsx("div",{className:"absolute bottom-0 right-0 w-96 h-96 bg-indigo-400/20 rounded-full blur-3xl translate-x-1/2 translate-y-1/2"}),h.jsx("div",{className:"absolute top-1/2 left-1/2 w-64 h-64 bg-purple-400/10 rounded-full blur-2xl -translate-x-1/2 -translate-y-1/2"}),h.jsxs("div",{className:"relative z-10 w-full max-w-md px-4",children:[h.jsxs("div",{className:"text-center mb-8",children:[h.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-2xl shadow-lg shadow-blue-500/30 mb-6 animate-pulse",children:h.jsx(wa,{className:"w-8 h-8 text-white"})}),h.jsx("h1",{className:"text-3xl font-bold text-gray-800 mb-2",children:"Mailbox"}),h.jsx("p",{className:"text-gray-500",children:"안전한 이메일 서비스"})]}),h.jsxs("div",{className:"bg-white/80 backdrop-blur-xl rounded-3xl shadow-xl shadow-gray-200/50 border border-white/50 p-8",children:[h.jsxs("form",{className:"space-y-5",onSubmit:f,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"email",className:"block text-sm font-semibold text-gray-700 mb-2",children:"아이디"}),h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:h.jsx(Wh,{className:"h-5 w-5 text-gray-400"})}),h.jsx("input",{id:"email",name:"email",type:"text",autoComplete:"username",required:!0,placeholder:"아이디를 입력하세요",value:o,onChange:y=>i(y.target.value),className:"w-full pl-12 pr-4 py-3.5 bg-gray-50/50 border border-gray-200 rounded-xl text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-400 transition-all duration-200"})]})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-semibold text-gray-700 mb-2",children:"비밀번호"}),h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:h.jsx(iz,{className:"h-5 w-5 text-gray-400"})}),h.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,placeholder:"비밀번호를 입력하세요",value:s,onChange:y=>l(y.target.value),className:"w-full pl-12 pr-4 py-3.5 bg-gray-50/50 border border-gray-200 rounded-xl text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-400 transition-all duration-200"})]})]}),t&&h.jsx("div",{className:"bg-red-50 border border-red-100 rounded-xl p-4",children:h.jsx("p",{className:"text-sm text-red-600 font-medium text-center",children:t})}),h.jsx(ha,{type:"submit",fullWidth:!0,disabled:c,variant:"contained",disableElevation:!0,sx:{py:1.75,fontSize:"0.95rem",fontWeight:600,borderRadius:"0.85rem",textTransform:"none",background:"linear-gradient(135deg, #4F8EF7 0%, #6366F1 100%)",boxShadow:"0 8px 24px rgba(99, 102, 241, 0.25)","&:hover":{background:"linear-gradient(135deg, #3B7EE5 0%, #5355E8 100%)",boxShadow:"0 12px 28px rgba(99, 102, 241, 0.35)"},"&:disabled":{background:"#e5e7eb"}},children:c?h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"로그인 중..."]}):"로그인"})]}),h.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100",children:h.jsx("p",{className:"text-center text-sm text-gray-400",children:"로그인 문제 발생 시 관리자에게 문의하세요"})})]}),h.jsx("div",{className:"mt-8 text-center text-xs text-gray-400",children:"© 2024 Mailbox Service. All rights reserved."})]})]})};function Js(e){var t;return parseInt(m.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const CT=e=>e.scrollTop;function Zh(e,t){const{timeout:r,easing:n,style:a={}}=e;return{duration:a.transitionDuration??(typeof r=="number"?r:r[t.mode]||0),easing:a.transitionTimingFunction??(typeof n=="object"?n[t.mode]:n),delay:a.transitionDelay}}function Wx(e){return`scale(${e}, ${e**2})`}const M7={entering:{opacity:1,transform:Wx(1)},entered:{opacity:1,transform:"none"}},Hy=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Cd=m.forwardRef(function(t,r){const{addEndListener:n,appear:a=!0,children:o,easing:i,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:g,timeout:y="auto",TransitionComponent:v=po,...x}=t,w=Ss(),b=m.useRef(),S=Ic(),k=m.useRef(null),P=hr(k,Js(o),r),E=j=>A=>{if(j){const L=k.current;A===void 0?j(L):j(L,A)}},O=E(u),D=E((j,A)=>{CT(j);const{duration:L,delay:I,easing:$}=Zh({style:g,timeout:y,easing:i},{mode:"enter"});let z;y==="auto"?(z=S.transitions.getAutoHeightDuration(j.clientHeight),b.current=z):z=L,j.style.transition=[S.transitions.create("opacity",{duration:z,delay:I}),S.transitions.create("transform",{duration:Hy?z:z*.666,delay:I,easing:$})].join(","),l&&l(j,A)}),N=E(c),_=E(p),C=E(j=>{const{duration:A,delay:L,easing:I}=Zh({style:g,timeout:y,easing:i},{mode:"exit"});let $;y==="auto"?($=S.transitions.getAutoHeightDuration(j.clientHeight),b.current=$):$=A,j.style.transition=[S.transitions.create("opacity",{duration:$,delay:L}),S.transitions.create("transform",{duration:Hy?$:$*.666,delay:Hy?L:L||$*.333,easing:I})].join(","),j.style.opacity=0,j.style.transform=Wx(.75),d&&d(j)}),M=E(f),T=j=>{y==="auto"&&w.start(b.current||0,j),n&&n(k.current,j)};return h.jsx(v,{appear:a,in:s,nodeRef:k,onEnter:D,onEntered:N,onEntering:O,onExit:C,onExited:M,onExiting:_,addEndListener:T,timeout:y==="auto"?null:y,...x,children:(j,{ownerState:A,...L})=>m.cloneElement(o,{style:{opacity:0,transform:Wx(.75),visibility:j==="exited"&&!s?"hidden":void 0,...M7[j],...g,...o.props.style},ref:P,...L})})});Cd&&(Cd.muiSupportAuto=!0);var an="top",Zn="bottom",Jn="right",on="left",k1="auto",of=[an,Zn,Jn,on],ic="start",Pd="end",T7="clippingParents",PT="viewport",iu="popper",j7="reference",A2=of.reduce(function(e,t){return e.concat([t+"-"+ic,t+"-"+Pd])},[]),ET=[].concat(of,[k1]).reduce(function(e,t){return e.concat([t,t+"-"+ic,t+"-"+Pd])},[]),A7="beforeRead",R7="read",I7="afterRead",$7="beforeMain",L7="main",F7="afterMain",z7="beforeWrite",B7="write",W7="afterWrite",H7=[A7,R7,I7,$7,L7,F7,z7,B7,W7];function io(e){return e?(e.nodeName||"").toLowerCase():null}function Dn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Hs(e){var t=Dn(e).Element;return e instanceof t||e instanceof Element}function qn(e){var t=Dn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function C1(e){if(typeof ShadowRoot>"u")return!1;var t=Dn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function U7(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},o=t.elements[r];!qn(o)||!io(o)||(Object.assign(o.style,n),Object.keys(a).forEach(function(i){var s=a[i];s===!1?o.removeAttribute(i):o.setAttribute(i,s===!0?"":s)}))})}function Y7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],o=t.attributes[n]||{},i=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=i.reduce(function(l,c){return l[c]="",l},{});!qn(a)||!io(a)||(Object.assign(a.style,s),Object.keys(o).forEach(function(l){a.removeAttribute(l)}))})}}const V7={name:"applyStyles",enabled:!0,phase:"write",fn:U7,effect:Y7,requires:["computeStyles"]};function no(e){return e.split("-")[0]}var Ns=Math.max,Jh=Math.min,sc=Math.round;function Hx(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function OT(){return!/^((?!chrome|android).)*safari/i.test(Hx())}function lc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,o=1;t&&qn(e)&&(a=e.offsetWidth>0&&sc(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&sc(n.height)/e.offsetHeight||1);var i=Hs(e)?Dn(e):window,s=i.visualViewport,l=!OT()&&r,c=(n.left+(l&&s?s.offsetLeft:0))/a,u=(n.top+(l&&s?s.offsetTop:0))/o,d=n.width/a,f=n.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function P1(e){var t=lc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function DT(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&C1(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ko(e){return Dn(e).getComputedStyle(e)}function K7(e){return["table","td","th"].indexOf(io(e))>=0}function es(e){return((Hs(e)?e.ownerDocument:e.document)||window.document).documentElement}function iv(e){return io(e)==="html"?e:e.assignedSlot||e.parentNode||(C1(e)?e.host:null)||es(e)}function R2(e){return!qn(e)||Ko(e).position==="fixed"?null:e.offsetParent}function q7(e){var t=/firefox/i.test(Hx()),r=/Trident/i.test(Hx());if(r&&qn(e)){var n=Ko(e);if(n.position==="fixed")return null}var a=iv(e);for(C1(a)&&(a=a.host);qn(a)&&["html","body"].indexOf(io(a))<0;){var o=Ko(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function sf(e){for(var t=Dn(e),r=R2(e);r&&K7(r)&&Ko(r).position==="static";)r=R2(r);return r&&(io(r)==="html"||io(r)==="body"&&Ko(r).position==="static")?t:r||q7(e)||t}function E1(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xu(e,t,r){return Ns(e,Jh(t,r))}function G7(e,t,r){var n=Xu(e,t,r);return n>r?r:n}function _T(){return{top:0,right:0,bottom:0,left:0}}function NT(e){return Object.assign({},_T(),e)}function MT(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var X7=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,NT(typeof t!="number"?t:MT(t,of))};function Q7(e){var t,r=e.state,n=e.name,a=e.options,o=r.elements.arrow,i=r.modifiersData.popperOffsets,s=no(r.placement),l=E1(s),c=[on,Jn].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!i)){var d=X7(a.padding,r),f=P1(o),p=l==="y"?an:on,g=l==="y"?Zn:Jn,y=r.rects.reference[u]+r.rects.reference[l]-i[l]-r.rects.popper[u],v=i[l]-r.rects.reference[l],x=sf(o),w=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,b=y/2-v/2,S=d[p],k=w-f[u]-d[g],P=w/2-f[u]/2+b,E=Xu(S,P,k),O=l;r.modifiersData[n]=(t={},t[O]=E,t.centerOffset=E-P,t)}}function Z7(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||DT(t.elements.popper,a)&&(t.elements.arrow=a))}const J7={name:"arrow",enabled:!0,phase:"main",fn:Q7,effect:Z7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cc(e){return e.split("-")[1]}var eH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tH(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:sc(r*a)/a||0,y:sc(n*a)/a||0}}function I2(e){var t,r=e.popper,n=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=i.x,p=f===void 0?0:f,g=i.y,y=g===void 0?0:g,v=typeof u=="function"?u({x:p,y}):{x:p,y};p=v.x,y=v.y;var x=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),b=on,S=an,k=window;if(c){var P=sf(r),E="clientHeight",O="clientWidth";if(P===Dn(r)&&(P=es(r),Ko(P).position!=="static"&&s==="absolute"&&(E="scrollHeight",O="scrollWidth")),P=P,a===an||(a===on||a===Jn)&&o===Pd){S=Zn;var D=d&&P===k&&k.visualViewport?k.visualViewport.height:P[E];y-=D-n.height,y*=l?1:-1}if(a===on||(a===an||a===Zn)&&o===Pd){b=Jn;var N=d&&P===k&&k.visualViewport?k.visualViewport.width:P[O];p-=N-n.width,p*=l?1:-1}}var _=Object.assign({position:s},c&&eH),C=u===!0?tH({x:p,y},Dn(r)):{x:p,y};if(p=C.x,y=C.y,l){var M;return Object.assign({},_,(M={},M[S]=w?"0":"",M[b]=x?"0":"",M.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+y+"px)":"translate3d("+p+"px, "+y+"px, 0)",M))}return Object.assign({},_,(t={},t[S]=w?y+"px":"",t[b]=x?p+"px":"",t.transform="",t))}function rH(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,o=r.adaptive,i=o===void 0?!0:o,s=r.roundOffsets,l=s===void 0?!0:s,c={placement:no(t.placement),variation:cc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,I2(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,I2(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rH,data:{}};var rp={passive:!0};function aH(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,o=a===void 0?!0:a,i=n.resize,s=i===void 0?!0:i,l=Dn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",r.update,rp)}),s&&l.addEventListener("resize",r.update,rp),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",r.update,rp)}),s&&l.removeEventListener("resize",r.update,rp)}}const oH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:aH,data:{}};var iH={left:"right",right:"left",bottom:"top",top:"bottom"};function eh(e){return e.replace(/left|right|bottom|top/g,function(t){return iH[t]})}var sH={start:"end",end:"start"};function $2(e){return e.replace(/start|end/g,function(t){return sH[t]})}function O1(e){var t=Dn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function D1(e){return lc(es(e)).left+O1(e).scrollLeft}function lH(e,t){var r=Dn(e),n=es(e),a=r.visualViewport,o=n.clientWidth,i=n.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;var c=OT();(c||!c&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s+D1(e),y:l}}function cH(e){var t,r=es(e),n=O1(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=Ns(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Ns(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+D1(e),l=-n.scrollTop;return Ko(a||r).direction==="rtl"&&(s+=Ns(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:l}}function _1(e){var t=Ko(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function TT(e){return["html","body","#document"].indexOf(io(e))>=0?e.ownerDocument.body:qn(e)&&_1(e)?e:TT(iv(e))}function Qu(e,t){var r;t===void 0&&(t=[]);var n=TT(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),o=Dn(n),i=a?[o].concat(o.visualViewport||[],_1(n)?n:[]):n,s=t.concat(i);return a?s:s.concat(Qu(iv(i)))}function Ux(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function uH(e,t){var r=lc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function L2(e,t,r){return t===PT?Ux(lH(e,r)):Hs(t)?uH(t,r):Ux(cH(es(e)))}function dH(e){var t=Qu(iv(e)),r=["absolute","fixed"].indexOf(Ko(e).position)>=0,n=r&&qn(e)?sf(e):e;return Hs(n)?t.filter(function(a){return Hs(a)&&DT(a,n)&&io(a)!=="body"}):[]}function fH(e,t,r,n){var a=t==="clippingParents"?dH(e):[].concat(t),o=[].concat(a,[r]),i=o[0],s=o.reduce(function(l,c){var u=L2(e,c,n);return l.top=Ns(u.top,l.top),l.right=Jh(u.right,l.right),l.bottom=Jh(u.bottom,l.bottom),l.left=Ns(u.left,l.left),l},L2(e,i,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function jT(e){var t=e.reference,r=e.element,n=e.placement,a=n?no(n):null,o=n?cc(n):null,i=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(a){case an:l={x:i,y:t.y-r.height};break;case Zn:l={x:i,y:t.y+t.height};break;case Jn:l={x:t.x+t.width,y:s};break;case on:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=a?E1(a):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case ic:l[c]=l[c]-(t[u]/2-r[u]/2);break;case Pd:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function Ed(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,o=r.strategy,i=o===void 0?e.strategy:o,s=r.boundary,l=s===void 0?T7:s,c=r.rootBoundary,u=c===void 0?PT:c,d=r.elementContext,f=d===void 0?iu:d,p=r.altBoundary,g=p===void 0?!1:p,y=r.padding,v=y===void 0?0:y,x=NT(typeof v!="number"?v:MT(v,of)),w=f===iu?j7:iu,b=e.rects.popper,S=e.elements[g?w:f],k=fH(Hs(S)?S:S.contextElement||es(e.elements.popper),l,u,i),P=lc(e.elements.reference),E=jT({reference:P,element:b,placement:a}),O=Ux(Object.assign({},b,E)),D=f===iu?O:P,N={top:k.top-D.top+x.top,bottom:D.bottom-k.bottom+x.bottom,left:k.left-D.left+x.left,right:D.right-k.right+x.right},_=e.modifiersData.offset;if(f===iu&&_){var C=_[a];Object.keys(N).forEach(function(M){var T=[Jn,Zn].indexOf(M)>=0?1:-1,j=[an,Zn].indexOf(M)>=0?"y":"x";N[M]+=C[j]*T})}return N}function pH(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,o=r.rootBoundary,i=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?ET:l,u=cc(n),d=u?s?A2:A2.filter(function(g){return cc(g)===u}):of,f=d.filter(function(g){return c.indexOf(g)>=0});f.length===0&&(f=d);var p=f.reduce(function(g,y){return g[y]=Ed(e,{placement:y,boundary:a,rootBoundary:o,padding:i})[no(y)],g},{});return Object.keys(p).sort(function(g,y){return p[g]-p[y]})}function hH(e){if(no(e)===k1)return[];var t=eh(e);return[$2(e),t,$2(t)]}function mH(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,o=a===void 0?!0:a,i=r.altAxis,s=i===void 0?!0:i,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,g=p===void 0?!0:p,y=r.allowedAutoPlacements,v=t.options.placement,x=no(v),w=x===v,b=l||(w||!g?[eh(v)]:hH(v)),S=[v].concat(b).reduce(function(ee,X){return ee.concat(no(X)===k1?pH(t,{placement:X,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:y}):X)},[]),k=t.rects.reference,P=t.rects.popper,E=new Map,O=!0,D=S[0],N=0;N<S.length;N++){var _=S[N],C=no(_),M=cc(_)===ic,T=[an,Zn].indexOf(C)>=0,j=T?"width":"height",A=Ed(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),L=T?M?Jn:on:M?Zn:an;k[j]>P[j]&&(L=eh(L));var I=eh(L),$=[];if(o&&$.push(A[C]<=0),s&&$.push(A[L]<=0,A[I]<=0),$.every(function(ee){return ee})){D=_,O=!1;break}E.set(_,$)}if(O)for(var z=g?3:1,V=function(X){var fe=S.find(function(q){var ke=E.get(q);if(ke)return ke.slice(0,X).every(function(B){return B})});if(fe)return D=fe,"break"},F=z;F>0;F--){var ne=V(F);if(ne==="break")break}t.placement!==D&&(t.modifiersData[n]._skip=!0,t.placement=D,t.reset=!0)}}const gH={name:"flip",enabled:!0,phase:"main",fn:mH,requiresIfExists:["offset"],data:{_skip:!1}};function F2(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function z2(e){return[an,Jn,Zn,on].some(function(t){return e[t]>=0})}function vH(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=Ed(t,{elementContext:"reference"}),s=Ed(t,{altBoundary:!0}),l=F2(i,n),c=F2(s,a,o),u=z2(l),d=z2(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const yH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vH};function xH(e,t,r){var n=no(e),a=[on,an].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=o[0],s=o[1];return i=i||0,s=(s||0)*a,[on,Jn].indexOf(n)>=0?{x:s,y:i}:{x:i,y:s}}function bH(e){var t=e.state,r=e.options,n=e.name,a=r.offset,o=a===void 0?[0,0]:a,i=ET.reduce(function(u,d){return u[d]=xH(d,t.rects,o),u},{}),s=i[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}const wH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bH};function SH(e){var t=e.state,r=e.name;t.modifiersData[r]=jT({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const kH={name:"popperOffsets",enabled:!0,phase:"read",fn:SH,data:{}};function CH(e){return e==="x"?"y":"x"}function PH(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,o=a===void 0?!0:a,i=r.altAxis,s=i===void 0?!1:i,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=f===void 0?!0:f,g=r.tetherOffset,y=g===void 0?0:g,v=Ed(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),x=no(t.placement),w=cc(t.placement),b=!w,S=E1(x),k=CH(S),P=t.modifiersData.popperOffsets,E=t.rects.reference,O=t.rects.popper,D=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(P){if(o){var M,T=S==="y"?an:on,j=S==="y"?Zn:Jn,A=S==="y"?"height":"width",L=P[S],I=L+v[T],$=L-v[j],z=p?-O[A]/2:0,V=w===ic?E[A]:O[A],F=w===ic?-O[A]:-E[A],ne=t.elements.arrow,ee=p&&ne?P1(ne):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_T(),fe=X[T],q=X[j],ke=Xu(0,E[A],ee[A]),B=b?E[A]/2-z-ke-fe-N.mainAxis:V-ke-fe-N.mainAxis,W=b?-E[A]/2+z+ke+q+N.mainAxis:F+ke+q+N.mainAxis,G=t.elements.arrow&&sf(t.elements.arrow),R=G?S==="y"?G.clientTop||0:G.clientLeft||0:0,ae=(M=_==null?void 0:_[S])!=null?M:0,J=L+B-ae-R,he=L+W-ae,Ce=Xu(p?Jh(I,J):I,L,p?Ns($,he):$);P[S]=Ce,C[S]=Ce-L}if(s){var re,ie=S==="x"?an:on,$e=S==="x"?Zn:Jn,Fe=P[k],Ne=k==="y"?"height":"width",ve=Fe+v[ie],It=Fe-v[$e],Qe=[an,on].indexOf(x)!==-1,lr=(re=_==null?void 0:_[k])!=null?re:0,Gt=Qe?ve:Fe-E[Ne]-O[Ne]-lr+N.altAxis,oe=Qe?Fe+E[Ne]+O[Ne]-lr-N.altAxis:It,ye=p&&Qe?G7(Gt,Fe,oe):Xu(p?Gt:ve,Fe,p?oe:It);P[k]=ye,C[k]=ye-Fe}t.modifiersData[n]=C}}const EH={name:"preventOverflow",enabled:!0,phase:"main",fn:PH,requiresIfExists:["offset"]};function OH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function DH(e){return e===Dn(e)||!qn(e)?O1(e):OH(e)}function _H(e){var t=e.getBoundingClientRect(),r=sc(t.width)/e.offsetWidth||1,n=sc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function NH(e,t,r){r===void 0&&(r=!1);var n=qn(t),a=qn(t)&&_H(t),o=es(t),i=lc(e,a,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((io(t)!=="body"||_1(o))&&(s=DH(t)),qn(t)?(l=lc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=D1(o))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function MH(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function a(o){r.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&a(l)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||a(o)}),n}function TH(e){var t=MH(e);return H7.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function jH(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function AH(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var B2={placement:"bottom",modifiers:[],strategy:"absolute"};function W2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function RH(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,a=t.defaultOptions,o=a===void 0?B2:a;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},B2,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(x){var w=typeof x=="function"?x(u.options):x;y(),u.options=Object.assign({},o,u.options,w),u.scrollParents={reference:Hs(s)?Qu(s):s.contextElement?Qu(s.contextElement):[],popper:Qu(l)};var b=TH(AH([].concat(n,u.options.modifiers)));return u.orderedModifiers=b.filter(function(S){return S.enabled}),g(),p.update()},forceUpdate:function(){if(!f){var x=u.elements,w=x.reference,b=x.popper;if(W2(w,b)){u.rects={reference:NH(w,sf(b),u.options.strategy==="fixed"),popper:P1(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(N){return u.modifiersData[N.name]=Object.assign({},N.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var k=u.orderedModifiers[S],P=k.fn,E=k.options,O=E===void 0?{}:E,D=k.name;typeof P=="function"&&(u=P({state:u,options:O,name:D,instance:p})||u)}}}},update:jH(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){y(),f=!0}};if(!W2(s,l))return p;p.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var x=v.name,w=v.options,b=w===void 0?{}:w,S=v.effect;if(typeof S=="function"){var k=S({state:u,name:x,instance:p,options:b}),P=function(){};d.push(k||P)}})}function y(){d.forEach(function(v){return v()}),d=[]}return p}}var IH=[oH,kH,nH,V7,wH,gH,EH,J7,yH],$H=RH({defaultModifiers:IH});function em(e){return typeof e=="string"}function AT(e,t,r){return e===void 0||em(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function tm(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function H2(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function RT(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=le(r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),g={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},y={...r,...a,...n};return p.length>0&&(y.className=p),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const i=tm({...a,...n}),s=H2(n),l=H2(a),c=t(i),u=le(c==null?void 0:c.className,r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},f={...c,...r,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function IT(e,t,r){return typeof e=="function"?e(t,r):e}function $T(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,i=a?{}:IT(r,n),{props:s,internalRef:l}=RT({...o,externalSlotProps:i}),c=hr(l,i==null?void 0:i.ref,(d=e.additionalProps)==null?void 0:d.ref);return AT(t,{...s,ref:c},n)}function LH(e){return typeof e=="function"?e():e}const LT=m.forwardRef(function(t,r){const{children:n,container:a,disablePortal:o=!1}=t,[i,s]=m.useState(null),l=hr(m.isValidElement(n)?Js(n):null,r);if(Yo(()=>{o||s(LH(a)||document.body)},[a,o]),Yo(()=>{if(i&&!o)return N2(r,i),()=>{N2(r,null)}},[r,i,o]),o){if(m.isValidElement(n)){const c={ref:l};return m.cloneElement(n,c)}return n}return i&&Nc.createPortal(n,i)});function FH(e){return qe("MuiPopper",e)}Ge("MuiPopper",["root"]);function zH(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Yx(e){return typeof e=="function"?e():e}function BH(e){return e.nodeType!==void 0}const WH=e=>{const{classes:t}=e;return Ke({root:["root"]},FH,t)},HH={},UH=m.forwardRef(function(t,r){const{anchorEl:n,children:a,direction:o,disablePortal:i,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:g,ownerState:y,...v}=t,x=m.useRef(null),w=hr(x,r),b=m.useRef(null),S=hr(b,d),k=m.useRef(S);Yo(()=>{k.current=S},[S]),m.useImperativeHandle(d,()=>b.current,[]);const P=zH(c,o),[E,O]=m.useState(P),[D,N]=m.useState(Yx(n));m.useEffect(()=>{b.current&&b.current.forceUpdate()}),m.useEffect(()=>{n&&N(Yx(n))},[n]),Yo(()=>{if(!D||!l)return;const j=I=>{O(I.placement)};let A=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:I})=>{j(I)}}];s!=null&&(A=A.concat(s)),u&&u.modifiers!=null&&(A=A.concat(u.modifiers));const L=$H(D,x.current,{placement:P,...u,modifiers:A});return k.current(L),()=>{L.destroy(),k.current(null)}},[D,i,s,l,u,P]);const _={placement:E};g!==null&&(_.TransitionProps=g);const C=WH(t),M=p.root??"div",T=$T({elementType:M,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:C.root});return h.jsx(M,{...T,children:typeof a=="function"?a(_):a})}),YH=m.forwardRef(function(t,r){const{anchorEl:n,children:a,container:o,direction:i="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=HH,popperRef:p,style:g,transition:y=!1,slotProps:v={},slots:x={},...w}=t,[b,S]=m.useState(!0),k=()=>{S(!1)},P=()=>{S(!0)};if(!l&&!u&&(!y||b))return null;let E;if(o)E=o;else if(n){const N=Yx(n);E=N&&BH(N)?Rr(N).body:Rr(null).body}const O=!u&&l&&(!y||b)?"none":void 0,D=y?{in:u,onEnter:k,onExited:P}:void 0;return h.jsx(LT,{disablePortal:s,container:E,children:h.jsx(UH,{anchorEl:n,direction:i,disablePortal:s,modifiers:c,ref:r,open:y?!b:u,placement:d,popperOptions:f,popperRef:p,slotProps:v,slots:x,...w,style:{position:"fixed",top:0,left:0,display:O,...g},TransitionProps:D,children:a})})}),VH=de(YH,{name:"MuiPopper",slot:"Root"})({}),FT=m.forwardRef(function(t,r){const n=g1(),a=Ze({props:t,name:"MuiPopper"}),{anchorEl:o,component:i,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:g,popperOptions:y,popperRef:v,transition:x,slots:w,slotProps:b,...S}=a,k=(w==null?void 0:w.root)??(s==null?void 0:s.Root),P={anchorEl:o,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:g,popperOptions:y,popperRef:v,transition:x,...S};return h.jsx(VH,{as:i,direction:n?"rtl":"ltr",slots:{root:k},slotProps:b??l,...P,ref:r})});function Le(e,t){const{className:r,elementType:n,ownerState:a,externalForwardedProps:o,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=o,p=u[e]||n,g=IT(d[e],a),{props:{component:y,...v},internalRef:x}=RT({className:r,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:g}),w=hr(x,g==null?void 0:g.ref,t.ref),b=e==="root"?y||c:y,S=AT(p,{...e==="root"&&!c&&!u[e]&&i,...e!=="root"&&!u[e]&&i,...v,...b&&!s&&{as:b},...b&&s&&{component:b},ref:w},a);return[p,S]}function KH(e){return qe("MuiTooltip",e)}const Ft=Ge("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function qH(e){return Math.round(e*1e5)/1e5}const GH=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:o}=e,i={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${ge(o.split("-")[0])}`],arrow:["arrow"]};return Ke(i,KH,t)},XH=de(FT,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(Xe(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Ft.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ft.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ft.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Ft.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Ft.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Ft.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Ft.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Ft.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),QH=de("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${ge(r.placement.split("-")[0])}`]]}})(Xe(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Ft.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Ft.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Ft.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Ft.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${qH(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Ft.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Ft.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Ft.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Ft.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Ft.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Ft.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Ft.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Ft.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Ft.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Ft.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),ZH=de("span",{name:"MuiTooltip",slot:"Arrow"})(Xe(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let np=!1;const U2=new ov;let su={x:0,y:0};function ap(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const pt=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiTooltip"}),{arrow:a=!1,children:o,classes:i,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:g=100,enterNextDelay:y=0,enterTouchDelay:v=700,followCursor:x=!1,id:w,leaveDelay:b=0,leaveTouchDelay:S=1500,onClose:k,onOpen:P,open:E,placement:O="bottom",PopperComponent:D,PopperProps:N={},slotProps:_={},slots:C={},title:M,TransitionComponent:T,TransitionProps:j,...A}=n,L=m.isValidElement(o)?o:h.jsx("span",{children:o}),I=Ic(),$=g1(),[z,V]=m.useState(),[F,ne]=m.useState(null),ee=m.useRef(!1),X=f||x,fe=Ss(),q=Ss(),ke=Ss(),B=Ss(),[W,G]=qh({controlled:E,default:!1,name:"Tooltip",state:"open"});let R=W;const ae=Rc(w),J=m.useRef(),he=Kn(()=>{J.current!==void 0&&(document.body.style.WebkitUserSelect=J.current,J.current=void 0),B.clear()});m.useEffect(()=>he,[he]);const Ce=Pe=>{U2.clear(),np=!0,G(!0),P&&!R&&P(Pe)},re=Kn(Pe=>{U2.start(800+b,()=>{np=!1}),G(!1),k&&R&&k(Pe),fe.start(I.transitions.duration.shortest,()=>{ee.current=!1})}),ie=Pe=>{ee.current&&Pe.type!=="touchstart"||(z&&z.removeAttribute("title"),q.clear(),ke.clear(),g||np&&y?q.start(np?y:g,()=>{Ce(Pe)}):Ce(Pe))},$e=Pe=>{q.clear(),ke.start(b,()=>{re(Pe)})},[,Fe]=m.useState(!1),Ne=Pe=>{Gh(Pe.target)||(Fe(!1),$e(Pe))},ve=Pe=>{z||V(Pe.currentTarget),Gh(Pe.target)&&(Fe(!0),ie(Pe))},It=Pe=>{ee.current=!0;const st=L.props;st.onTouchStart&&st.onTouchStart(Pe)},Qe=Pe=>{It(Pe),ke.clear(),fe.clear(),he(),J.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",B.start(v,()=>{document.body.style.WebkitUserSelect=J.current,ie(Pe)})},lr=Pe=>{L.props.onTouchEnd&&L.props.onTouchEnd(Pe),he(),ke.start(S,()=>{re(Pe)})};m.useEffect(()=>{if(!R)return;function Pe(st){st.key==="Escape"&&re(st)}return document.addEventListener("keydown",Pe),()=>{document.removeEventListener("keydown",Pe)}},[re,R]);const Gt=hr(Js(L),V,r);!M&&M!==0&&(R=!1);const oe=m.useRef(),ye=Pe=>{const st=L.props;st.onMouseMove&&st.onMouseMove(Pe),su={x:Pe.clientX,y:Pe.clientY},oe.current&&oe.current.update()},Ie={},Be=typeof M=="string";c?(Ie.title=!R&&Be&&!d?M:null,Ie["aria-describedby"]=R?ae:null):(Ie["aria-label"]=Be?M:null,Ie["aria-labelledby"]=R&&!Be?ae:null);const xe={...Ie,...A,...L.props,className:le(A.className,L.props.className),onTouchStart:It,ref:Gt,...x?{onMouseMove:ye}:{}},je={};p||(xe.onTouchStart=Qe,xe.onTouchEnd=lr),d||(xe.onMouseOver=ap(ie,xe.onMouseOver),xe.onMouseLeave=ap($e,xe.onMouseLeave),X||(je.onMouseOver=ie,je.onMouseLeave=$e)),u||(xe.onFocus=ap(ve,xe.onFocus),xe.onBlur=ap(Ne,xe.onBlur),X||(je.onFocus=ve,je.onBlur=Ne));const ze={...n,isRtl:$,arrow:a,disableInteractive:X,placement:O,PopperComponentProp:D,touch:ee.current},lt=typeof _.popper=="function"?_.popper(ze):_.popper,mo=m.useMemo(()=>{var st,ct;let Pe=[{name:"arrow",enabled:!!F,options:{element:F,padding:4}}];return(st=N.popperOptions)!=null&&st.modifiers&&(Pe=Pe.concat(N.popperOptions.modifiers)),(ct=lt==null?void 0:lt.popperOptions)!=null&&ct.modifiers&&(Pe=Pe.concat(lt.popperOptions.modifiers)),{...N.popperOptions,...lt==null?void 0:lt.popperOptions,modifiers:Pe}},[F,N.popperOptions,lt==null?void 0:lt.popperOptions]),fn=GH(ze),pn=typeof _.transition=="function"?_.transition(ze):_.transition,la={slots:{popper:s.Popper,transition:s.Transition??T,tooltip:s.Tooltip,arrow:s.Arrow,...C},slotProps:{arrow:_.arrow??l.arrow,popper:{...N,...lt??l.popper},tooltip:_.tooltip??l.tooltip,transition:{...j,...pn??l.transition}}},[Or,go]=Le("popper",{elementType:XH,externalForwardedProps:la,ownerState:ze,className:le(fn.popper,N==null?void 0:N.className)}),[De,nt]=Le("transition",{elementType:Cd,externalForwardedProps:la,ownerState:ze}),[Q,ue]=Le("tooltip",{elementType:QH,className:fn.tooltip,externalForwardedProps:la,ownerState:ze}),[Ae,We]=Le("arrow",{elementType:ZH,className:fn.arrow,externalForwardedProps:la,ownerState:ze,ref:ne});return h.jsxs(m.Fragment,{children:[m.cloneElement(L,xe),h.jsx(Or,{as:D??FT,placement:O,anchorEl:x?{getBoundingClientRect:()=>({top:su.y,left:su.x,right:su.x,bottom:su.y,width:0,height:0})}:z,popperRef:oe,open:z?R:!1,id:ae,transition:!0,...je,...go,popperOptions:mo,children:({TransitionProps:Pe})=>h.jsx(De,{timeout:I.transitions.duration.shorter,...Pe,...nt,children:h.jsxs(Q,{...ue,children:[M,a?h.jsx(Ae,{...We}):null]})})})]})}),JH={entering:{opacity:1},entered:{opacity:1}},Je=m.forwardRef(function(t,r){const n=Ic(),a={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:g,onExiting:y,style:v,timeout:x=a,TransitionComponent:w=po,...b}=t,S=m.useRef(null),k=hr(S,Js(s),r),P=T=>j=>{if(T){const A=S.current;j===void 0?T(A):T(A,j)}},E=P(f),O=P((T,j)=>{CT(T);const A=Zh({style:v,timeout:x,easing:l},{mode:"enter"});T.style.webkitTransition=n.transitions.create("opacity",A),T.style.transition=n.transitions.create("opacity",A),u&&u(T,j)}),D=P(d),N=P(y),_=P(T=>{const j=Zh({style:v,timeout:x,easing:l},{mode:"exit"});T.style.webkitTransition=n.transitions.create("opacity",j),T.style.transition=n.transitions.create("opacity",j),p&&p(T)}),C=P(g),M=T=>{o&&o(S.current,T)};return h.jsx(w,{appear:i,in:c,nodeRef:S,onEnter:O,onEntered:D,onEntering:E,onExit:_,onExited:C,onExiting:N,addEndListener:M,timeout:x,...b,children:(T,{ownerState:j,...A})=>m.cloneElement(s,{style:{opacity:0,visibility:T==="exited"&&!c?"hidden":void 0,...JH[T],...v,...s.props.style},ref:k,...A})})}),sv=m.createContext(void 0);function ai(){return m.useContext(sv)}function e9(e){return qe("PrivateSwitchBase",e)}Ge("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const t9=e=>{const{classes:t,checked:r,disabled:n,edge:a}=e,o={root:["root",r&&"checked",n&&"disabled",a&&`edge${ge(a)}`],input:["input"]};return Ke(o,e9,t)},r9=de(S1,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),n9=de("input",{name:"MuiSwitchBase",shouldForwardProp:jn})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),a9=m.forwardRef(function(t,r){const{autoFocus:n,checked:a,checkedIcon:o,defaultChecked:i,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:f,inputRef:p,name:g,onBlur:y,onChange:v,onFocus:x,readOnly:w,required:b=!1,tabIndex:S,type:k,value:P,slots:E={},slotProps:O={},...D}=t,[N,_]=qh({controlled:a,default:!!i,name:"SwitchBase",state:"checked"}),C=ai(),M=X=>{x&&x(X),C&&C.onFocus&&C.onFocus(X)},T=X=>{y&&y(X),C&&C.onBlur&&C.onBlur(X)},j=X=>{if(X.nativeEvent.defaultPrevented)return;const fe=X.target.checked;_(fe),v&&v(X,fe)};let A=s;C&&typeof A>"u"&&(A=C.disabled);const L=k==="checkbox"||k==="radio",I={...t,checked:N,disabled:A,disableFocusRipple:l,edge:c},$=t9(I),z={slots:E,slotProps:{input:f,...O}},[V,F]=Le("root",{ref:r,elementType:r9,className:$.root,shouldForwardComponentProp:!0,externalForwardedProps:{...z,component:"span",...D},getSlotProps:X=>({...X,onFocus:fe=>{var q;(q=X.onFocus)==null||q.call(X,fe),M(fe)},onBlur:fe=>{var q;(q=X.onBlur)==null||q.call(X,fe),T(fe)}}),ownerState:I,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:A,role:void 0,tabIndex:null}}),[ne,ee]=Le("input",{ref:p,elementType:n9,className:$.input,externalForwardedProps:z,getSlotProps:X=>({...X,onChange:fe=>{var q;(q=X.onChange)==null||q.call(X,fe),j(fe)}}),ownerState:I,additionalProps:{autoFocus:n,checked:a,defaultChecked:i,disabled:A,id:L?d:void 0,name:g,readOnly:w,required:b,tabIndex:S,type:k,...k==="checkbox"&&P===void 0?{}:{value:P}}});return h.jsxs(V,{...F,children:[h.jsx(ne,{...ee}),N?o:u]})}),o9=cn(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),i9=cn(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),s9=cn(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function l9(e){return qe("MuiCheckbox",e)}const Uy=Ge("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),c9=e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,o={root:["root",r&&"indeterminate",`color${ge(n)}`,`size${ge(a)}`]},i=Ke(o,l9,t);return{...t,...i}},u9=de(a9,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${ge(r.size)}`],r.color!=="default"&&t[`color${ge(r.color)}`]]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{[`&.${Uy.checked}, &.${Uy.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Uy.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),d9=h.jsx(i9,{}),f9=h.jsx(o9,{}),p9=h.jsx(s9,{}),h9=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiCheckbox"}),{checkedIcon:a=d9,color:o="primary",icon:i=f9,indeterminate:s=!1,indeterminateIcon:l=p9,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,slots:p={},slotProps:g={},...y}=n,v=s?l:i,x=s?l:a,w={...n,disableRipple:d,color:o,indeterminate:s,size:u},b=c9(w),S=g.input??c,[k,P]=Le("root",{ref:r,elementType:u9,className:le(b.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:g,...y},ownerState:w,additionalProps:{type:"checkbox",icon:m.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:m.cloneElement(x,{fontSize:x.props.fontSize??u}),disableRipple:d,slots:p,slotProps:{input:yT(typeof S=="function"?S(w):S,{"data-indeterminate":s})}}});return h.jsx(k,{...P,classes:b})});function Y2(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function rm(e,t=!1){return e&&(Y2(e.value)&&e.value!==""||t&&Y2(e.defaultValue)&&e.defaultValue!=="")}function m9(e){return e.startAdornment}function g9(e){return qe("MuiFormControl",e)}Ge("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const v9=e=>{const{classes:t,margin:r,fullWidth:n}=e,a={root:["root",r!=="none"&&`margin${ge(r)}`,n&&"fullWidth"]};return Ke(a,g9,t)},y9=de("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`margin${ge(r.margin)}`],r.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),x9=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiFormControl"}),{children:a,className:o,color:i="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:g=!1,size:y="medium",variant:v="outlined",...x}=n,w={...n,color:i,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:g,size:y,variant:v},b=v9(w),[S,k]=m.useState(()=>{let j=!1;return a&&m.Children.forEach(a,A=>{if(!By(A,["Input","Select"]))return;const L=By(A,["Select"])?A.props.input:A;L&&m9(L.props)&&(j=!0)}),j}),[P,E]=m.useState(()=>{let j=!1;return a&&m.Children.forEach(a,A=>{By(A,["Input","Select"])&&(rm(A.props,!0)||rm(A.props.inputProps,!0))&&(j=!0)}),j}),[O,D]=m.useState(!1);l&&O&&D(!1);const N=u!==void 0&&!l?u:O;let _;m.useRef(!1);const C=m.useCallback(()=>{E(!0)},[]),M=m.useCallback(()=>{E(!1)},[]),T=m.useMemo(()=>({adornedStart:S,setAdornedStart:k,color:i,disabled:l,error:c,filled:P,focused:N,fullWidth:d,hiddenLabel:f,size:y,onBlur:()=>{D(!1)},onFocus:()=>{D(!0)},onEmpty:M,onFilled:C,registerEffect:_,required:g,variant:v}),[S,i,l,c,P,N,d,f,_,M,C,g,y,v]);return h.jsx(sv.Provider,{value:T,children:h.jsx(y9,{as:s,ownerState:w,className:le(b.root,o),ref:r,...x,children:a})})});function b9(e){return qe("MuiTypography",e)}Ge("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const w9={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},S9=LW(),k9=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:a,variant:o,classes:i}=e,s={root:["root",o,e.align!=="inherit"&&`align${ge(t)}`,r&&"gutterBottom",n&&"noWrap",a&&"paragraph"]};return Ke(s,b9,i)},C9=de("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${ge(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Xe(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(nn()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${ge(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),V2={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},uc=m.forwardRef(function(t,r){const{color:n,...a}=Ze({props:t,name:"MuiTypography"}),o=!w9[n],i=S9({...a,...o&&{color:n}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:g=V2,...y}=i,v={...i,align:s,color:n,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:g},x=c||(f?"p":g[p]||V2[p])||"span",w=k9(v);return h.jsx(C9,{as:x,ref:r,className:le(w.root,l),...y,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...y.style}})});function P9(e){return qe("MuiFormControlLabel",e)}const Nu=Ge("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function el({props:e,states:t,muiFormControl:r}){return t.reduce((n,a)=>(n[a]=e[a],r&&typeof e[a]>"u"&&(n[a]=r[a]),n),{})}const E9=e=>{const{classes:t,disabled:r,labelPlacement:n,error:a,required:o}=e,i={root:["root",r&&"disabled",`labelPlacement${ge(n)}`,a&&"error",o&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",a&&"error"]};return Ke(i,P9,t)},O9=de("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Nu.label}`]:t.label},t.root,t[`labelPlacement${ge(r.labelPlacement)}`]]}})(Xe(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Nu.disabled}`]:{cursor:"default"},[`& .${Nu.label}`]:{[`&.${Nu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),D9=de("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Xe(({theme:e})=>({[`&.${Nu.error}`]:{color:(e.vars||e).palette.error.main}}))),_9=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiFormControlLabel"}),{checked:a,className:o,componentsProps:i={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:g,required:y,slots:v={},slotProps:x={},value:w,...b}=n,S=ai(),k=l??s.props.disabled??(S==null?void 0:S.disabled),P=y??s.props.required,E={disabled:k,required:P};["checked","name","onChange","value","inputRef"].forEach(j=>{typeof s.props[j]>"u"&&typeof n[j]<"u"&&(E[j]=n[j])});const O=el({props:n,muiFormControl:S,states:["error"]}),D={...n,disabled:k,labelPlacement:f,required:P,error:O.error},N=E9(D),_={slots:v,slotProps:{...i,...x}},[C,M]=Le("typography",{elementType:uc,externalForwardedProps:_,ownerState:D});let T=d;return T!=null&&T.type!==uc&&!c&&(T=h.jsx(C,{component:"span",...M,className:le(N.label,M==null?void 0:M.className),children:T})),h.jsxs(O9,{className:le(N.root,o),ownerState:D,ref:r,...b,children:[m.cloneElement(s,E),P?h.jsxs("div",{children:[T,h.jsxs(D9,{ownerState:D,"aria-hidden":!0,className:N.asterisk,children:["","*"]})]}):T]})}),zT=6048e5,N9=864e5,lv=6e4,cv=36e5,M9=1e3,K2=Symbol.for("constructDateFrom");function gt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&K2 in e?e[K2](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oe(e,t){return gt(t||e,e)}function Ea(e,t,r){const n=Oe(e,r==null?void 0:r.in);return isNaN(t)?gt((r==null?void 0:r.in)||e,NaN):(t&&n.setDate(n.getDate()+t),n)}function _a(e,t,r){const n=Oe(e,r==null?void 0:r.in);if(isNaN(t))return gt(e,NaN);if(!t)return n;const a=n.getDate(),o=gt(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return a>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}function BT(e,t,r){return gt(e,+Oe(e)+t)}function T9(e,t,r){return BT(e,t*cv)}let j9={};function tl(){return j9}function qo(e,t){var s,l,c,u;const r=tl(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,a=Oe(e,t==null?void 0:t.in),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function dc(e,t){return qo(e,{...t,weekStartsOn:1})}function WT(e,t){const r=Oe(e,t==null?void 0:t.in),n=r.getFullYear(),a=gt(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=dc(a),i=gt(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=dc(i);return r.getTime()>=o.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function nm(e){const t=Oe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function oi(e,...t){const r=gt.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Us(e,t){const r=Oe(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function fc(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t),o=Us(n),i=Us(a),s=+o-nm(o),l=+i-nm(i);return Math.round((s-l)/N9)}function A9(e,t){const r=WT(e,t),n=gt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),dc(n)}function Od(e,t,r){const n=Oe(e,r==null?void 0:r.in);return n.setTime(n.getTime()+t*lv),n}function N1(e,t,r){return _a(e,t*3,r)}function R9(e,t,r){return BT(e,t*1e3)}function am(e,t,r){return Ea(e,t*7,r)}function To(e,t,r){return _a(e,t*12,r)}function q2(e,t){let r,n=t==null?void 0:t.in;return e.forEach(a=>{!n&&typeof a=="object"&&(n=gt.bind(null,a));const o=Oe(a,n);(!r||r<o||isNaN(+o))&&(r=o)}),gt(n,r||NaN)}function G2(e,t){let r,n=t==null?void 0:t.in;return e.forEach(a=>{!n&&typeof a=="object"&&(n=gt.bind(null,a));const o=Oe(a,n);(!r||r>o||isNaN(+o))&&(r=o)}),gt(n,r||NaN)}function I9(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t);return+Us(n)==+Us(a)}function jo(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function om(e){return!(!jo(e)&&typeof e!="number"||isNaN(+Oe(e)))}function im(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t),o=n.getFullYear()-a.getFullYear(),i=n.getMonth()-a.getMonth();return o*12+i}function _i(e,t){const r=Oe(e,t==null?void 0:t.in);return Math.trunc(r.getMonth()/3)+1}function sm(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t),o=n.getFullYear()-a.getFullYear(),i=_i(n)-_i(a);return o*4+i}function lm(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t);return n.getFullYear()-a.getFullYear()}function $9(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t),o=X2(n,a),i=Math.abs(fc(n,a));n.setDate(n.getDate()-o*i);const s=+(X2(n,a)===-o),l=o*(i-s);return l===0?0:l}function X2(e,t){const r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function HT(e,t){const r=Oe(e,t==null?void 0:t.in);return r.setHours(23,59,59,999),r}function UT(e,t){const r=Oe(e,t==null?void 0:t.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Vx(e,t){const r=Oe(e,t==null?void 0:t.in),n=r.getMonth(),a=n-n%3;return r.setMonth(a,1),r.setHours(0,0,0,0),r}function YT(e,t){const r=Oe(e,t==null?void 0:t.in);return r.setDate(1),r.setHours(0,0,0,0),r}function VT(e,t){const r=Oe(e,t==null?void 0:t.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function uv(e,t){const r=Oe(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function L9(e,t){var s,l;const r=tl(),n=r.weekStartsOn??((l=(s=r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,a=Oe(e,t==null?void 0:t.in),o=a.getDay(),i=(o<n?-7:0)+6-(o-n);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}const F9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z9=(e,t,r)=>{let n;const a=F9[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Hl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const B9={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},W9={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H9={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U9={date:Hl({formats:B9,defaultWidth:"full"}),time:Hl({formats:W9,defaultWidth:"full"}),dateTime:Hl({formats:H9,defaultWidth:"full"})},Y9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},V9=(e,t,r,n)=>Y9[e];function Va(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):i;a=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[s]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const K9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q9={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},X9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Q9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Z9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},J9=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},eU={ordinalNumber:J9,era:Va({values:K9,defaultWidth:"wide"}),quarter:Va({values:q9,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Va({values:G9,defaultWidth:"wide"}),day:Va({values:X9,defaultWidth:"wide"}),dayPeriod:Va({values:Q9,defaultWidth:"wide",formattingValues:Z9,defaultFormattingWidth:"wide"})};function Ka(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?rU(s,d=>d.test(i)):tU(s,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function tU(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function rU(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function KT(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const s=t.slice(a.length);return{value:i,rest:s}}}const nU=/^(\d+)(th|st|nd|rd)?/i,aU=/\d+/i,oU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iU={any:[/^b/i,/^(a|c)/i]},sU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lU={any:[/1/i,/2/i,/3/i,/4/i]},cU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pU={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mU={ordinalNumber:KT({matchPattern:nU,parsePattern:aU,valueCallback:e=>parseInt(e,10)}),era:Ka({matchPatterns:oU,defaultMatchWidth:"wide",parsePatterns:iU,defaultParseWidth:"any"}),quarter:Ka({matchPatterns:sU,defaultMatchWidth:"wide",parsePatterns:lU,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ka({matchPatterns:cU,defaultMatchWidth:"wide",parsePatterns:uU,defaultParseWidth:"any"}),day:Ka({matchPatterns:dU,defaultMatchWidth:"wide",parsePatterns:fU,defaultParseWidth:"any"}),dayPeriod:Ka({matchPatterns:pU,defaultMatchWidth:"any",parsePatterns:hU,defaultParseWidth:"any"})},qT={code:"en-US",formatDistance:z9,formatLong:U9,formatRelative:V9,localize:eU,match:mU,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gU(e,t){const r=Oe(e,t==null?void 0:t.in);return fc(r,uv(r))+1}function M1(e,t){const r=Oe(e,t==null?void 0:t.in),n=+dc(r)-+A9(r);return Math.round(n/zT)+1}function T1(e,t){var u,d,f,p;const r=Oe(e,t==null?void 0:t.in),n=r.getFullYear(),a=tl(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=gt((t==null?void 0:t.in)||e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const s=qo(i,t),l=gt((t==null?void 0:t.in)||e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=qo(l,t);return+r>=+s?n+1:+r>=+c?n:n-1}function vU(e,t){var s,l,c,u;const r=tl(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,a=T1(e,t),o=gt((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),qo(o,t)}function GT(e,t){const r=Oe(e,t==null?void 0:t.in),n=+qo(r,t)-+vU(r,t);return Math.round(n/zT)+1}function ft(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const yi={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return ft(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):ft(r+1,2)},d(e,t){return ft(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return ft(e.getHours()%12||12,t.length)},H(e,t){return ft(e.getHours(),t.length)},m(e,t){return ft(e.getMinutes(),t.length)},s(e,t){return ft(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return ft(a,t.length)}},dl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Q2={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return yi.y(e,t)},Y:function(e,t,r,n){const a=T1(e,n),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return ft(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):ft(o,t.length)},R:function(e,t){const r=WT(e);return ft(r,t.length)},u:function(e,t){const r=e.getFullYear();return ft(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ft(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ft(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return yi.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ft(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=GT(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):ft(a,t.length)},I:function(e,t,r){const n=M1(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):ft(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):yi.d(e,t)},D:function(e,t,r){const n=gU(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):ft(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ft(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ft(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return ft(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=dl.noon:n===0?a=dl.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=dl.evening:n>=12?a=dl.afternoon:n>=4?a=dl.morning:a=dl.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return yi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):yi.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):ft(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):ft(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):yi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):yi.s(e,t)},S:function(e,t){return yi.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return J2(n);case"XXXX":case"XX":return fs(n);case"XXXXX":case"XXX":default:return fs(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return J2(n);case"xxxx":case"xx":return fs(n);case"xxxxx":case"xxx":default:return fs(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Z2(n,":");case"OOOO":default:return"GMT"+fs(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Z2(n,":");case"zzzz":default:return"GMT"+fs(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return ft(n,t.length)},T:function(e,t,r){return ft(+e,t.length)}};function Z2(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+ft(o,2)}function J2(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):fs(e,t)}function fs(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=ft(Math.trunc(n/60),2),o=ft(n%60,2);return r+a+t+o}const eP=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},XT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},yU=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return eP(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",eP(n,t)).replace("{{time}}",XT(a,t))},Kx={p:XT,P:yU},xU=/^D+$/,bU=/^Y+$/,wU=["D","DD","YY","YYYY"];function SU(e){return xU.test(e)}function kU(e){return bU.test(e)}function CU(e,t,r){const n=PU(e,t,r);if(console.warn(n),wU.includes(e))throw new RangeError(n)}function PU(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const EU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DU=/^'([^]*?)'?$/,_U=/''/g,NU=/[a-zA-Z]/;function tP(e,t,r){var u,d,f,p,g,y,v,x;const n=tl(),a=(r==null?void 0:r.locale)??n.locale??qT,o=(r==null?void 0:r.firstWeekContainsDate)??((d=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=(r==null?void 0:r.weekStartsOn)??((y=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??n.weekStartsOn??((x=(v=n.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,s=Oe(e,r==null?void 0:r.in);if(!om(s))throw new RangeError("Invalid time value");let l=t.match(OU).map(w=>{const b=w[0];if(b==="p"||b==="P"){const S=Kx[b];return S(w,a.formatLong)}return w}).join("").match(EU).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const b=w[0];if(b==="'")return{isToken:!1,value:MU(w)};if(Q2[b])return{isToken:!0,value:w};if(b.match(NU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:w}});a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map(w=>{if(!w.isToken)return w.value;const b=w.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&kU(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&SU(b))&&CU(b,t,String(e));const S=Q2[b[0]];return S(s,b,a.localize,c)}).join("")}function MU(e){const t=e.match(DU);return t?t[1].replace(_U,"'"):e}function rP(e,t){return Oe(e,t==null?void 0:t.in).getDate()}function TU(e,t){return Oe(e,t==null?void 0:t.in).getDay()}function jU(e,t){const r=Oe(e,t==null?void 0:t.in),n=r.getFullYear(),a=r.getMonth(),o=gt(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}function AU(){return Object.assign({},tl())}function Sa(e,t){return Oe(e,t==null?void 0:t.in).getHours()}function RU(e,t){const r=Oe(e,t==null?void 0:t.in).getDay();return r===0?7:r}function ka(e,t){return Oe(e,t==null?void 0:t.in).getMinutes()}function Qr(e,t){return Oe(e,t==null?void 0:t.in).getMonth()}function zi(e){return Oe(e).getSeconds()}function qx(e){return+Oe(e)}function Ue(e,t){return Oe(e,t==null?void 0:t.in).getFullYear()}function Vi(e,t){return+Oe(e)>+Oe(t)}function Qa(e,t){return+Oe(e)<+Oe(t)}function IU(e,t){return+Oe(e)==+Oe(t)}function $U(e,t){const r=LU(t)?new t(0):gt(t,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}function LU(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const FU=10;class QT{constructor(){me(this,"subPriority",0)}validate(t,r){return!0}}class zU extends QT{constructor(t,r,n,a,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=a,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class BU extends QT{constructor(r,n){super();me(this,"priority",FU);me(this,"subPriority",-1);this.context=r||(a=>gt(n,a))}set(r,n){return n.timestampIsSet?r:gt(r,$U(r,this.context))}}class it{run(t,r,n,a){const o=this.parse(t,r,n,a);return o?{setter:new zU(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class WU extends it{constructor(){super(...arguments);me(this,"priority",140);me(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})||a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"})}}set(r,n,a){return n.era=a,r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}}const Vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},qa={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Kt(e,t){return e&&{value:t(e.value),rest:e.rest}}function jt(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function Ga(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(a*cv+o*lv+i*M9),rest:t.slice(r[0].length)}}function ZT(e){return jt(Vt.anyDigitsSigned,e)}function Wt(e,t){switch(e){case 1:return jt(Vt.singleDigit,t);case 2:return jt(Vt.twoDigits,t);case 3:return jt(Vt.threeDigits,t);case 4:return jt(Vt.fourDigits,t);default:return jt(new RegExp("^\\d{1,"+e+"}"),t)}}function cm(e,t){switch(e){case 1:return jt(Vt.singleDigitSigned,t);case 2:return jt(Vt.twoDigitsSigned,t);case 3:return jt(Vt.threeDigitsSigned,t);case 4:return jt(Vt.fourDigitsSigned,t);default:return jt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function j1(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function JT(e,t){const r=t>0,n=r?t:1-t;let a;if(n<=50)a=e||100;else{const o=n+50,i=Math.trunc(o/100)*100,s=e>=o%100;a=e+i-(s?100:0)}return r?a:1-a}function ej(e){return e%400===0||e%4===0&&e%100!==0}class HU extends it{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,a){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Kt(Wt(4,r),o);case"yo":return Kt(a.ordinalNumber(r,{unit:"year"}),o);default:return Kt(Wt(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a){const o=r.getFullYear();if(a.isTwoDigitYear){const s=JT(a.year,o);return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}const i=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}}class UU extends it{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,a){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Kt(Wt(4,r),o);case"Yo":return Kt(a.ordinalNumber(r,{unit:"year"}),o);default:return Kt(Wt(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a,o){const i=T1(r,o);if(a.isTwoDigitYear){const l=JT(a.year,i);return r.setFullYear(l,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),qo(r,o)}const s=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(s,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),qo(r,o)}}class YU extends it{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return cm(n==="R"?4:n.length,r)}set(r,n,a){const o=gt(r,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),dc(o)}}class VU extends it{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return cm(n==="u"?4:n.length,r)}set(r,n,a){return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}}class KU extends it{constructor(){super(...arguments);me(this,"priority",120);me(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"Q":case"QQ":return Wt(n.length,r);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})||a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}}class qU extends it{constructor(){super(...arguments);me(this,"priority",120);me(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"q":case"qq":return Wt(n.length,r);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})||a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}}class GU extends it{constructor(){super(...arguments);me(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);me(this,"priority",110)}parse(r,n,a){const o=i=>i-1;switch(n){case"M":return Kt(jt(Vt.month,r),o);case"MM":return Kt(Wt(2,r),o);case"Mo":return Kt(a.ordinalNumber(r,{unit:"month"}),o);case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})||a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}}class XU extends it{constructor(){super(...arguments);me(this,"priority",110);me(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,a){const o=i=>i-1;switch(n){case"L":return Kt(jt(Vt.month,r),o);case"LL":return Kt(Wt(2,r),o);case"Lo":return Kt(a.ordinalNumber(r,{unit:"month"}),o);case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})||a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}}function QU(e,t,r){const n=Oe(e,r==null?void 0:r.in),a=GT(n,r)-t;return n.setDate(n.getDate()-a*7),Oe(n,r==null?void 0:r.in)}class ZU extends it{constructor(){super(...arguments);me(this,"priority",100);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,a){switch(n){case"w":return jt(Vt.week,r);case"wo":return a.ordinalNumber(r,{unit:"week"});default:return Wt(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a,o){return qo(QU(r,a,o),o)}}function JU(e,t,r){const n=Oe(e,r==null?void 0:r.in),a=M1(n,r)-t;return n.setDate(n.getDate()-a*7),n}class eY extends it{constructor(){super(...arguments);me(this,"priority",100);me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,a){switch(n){case"I":return jt(Vt.week,r);case"Io":return a.ordinalNumber(r,{unit:"week"});default:return Wt(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a){return dc(JU(r,a))}}const tY=[31,28,31,30,31,30,31,31,30,31,30,31],rY=[31,29,31,30,31,30,31,31,30,31,30,31];class nY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"subPriority",1);me(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"d":return jt(Vt.date,r);case"do":return a.ordinalNumber(r,{unit:"date"});default:return Wt(n.length,r)}}validate(r,n){const a=r.getFullYear(),o=ej(a),i=r.getMonth();return o?n>=1&&n<=rY[i]:n>=1&&n<=tY[i]}set(r,n,a){return r.setDate(a),r.setHours(0,0,0,0),r}}class aY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"subpriority",1);me(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,a){switch(n){case"D":case"DD":return jt(Vt.dayOfYear,r);case"Do":return a.ordinalNumber(r,{unit:"date"});default:return Wt(n.length,r)}}validate(r,n){const a=r.getFullYear();return ej(a)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,a){return r.setMonth(0,a),r.setHours(0,0,0,0),r}}function A1(e,t,r){var d,f,p,g;const n=tl(),a=(r==null?void 0:r.weekStartsOn)??((f=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??n.weekStartsOn??((g=(p=n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,o=Oe(e,r==null?void 0:r.in),i=o.getDay(),l=(t%7+7)%7,c=7-a,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return Ea(o,u,r)}class oY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,o){return r=A1(r,a,o),r.setHours(0,0,0,0),r}}class iY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,a,o){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return Kt(Wt(n.length,r),i);case"eo":return Kt(a.ordinalNumber(r,{unit:"day"}),i);case"eee":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeeee":return a.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,o){return r=A1(r,a,o),r.setHours(0,0,0,0),r}}class sY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,a,o){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return Kt(Wt(n.length,r),i);case"co":return Kt(a.ordinalNumber(r,{unit:"day"}),i);case"ccc":return a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"ccccc":return a.day(r,{width:"narrow",context:"standalone"});case"cccccc":return a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(r,{width:"wide",context:"standalone"})||a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,o){return r=A1(r,a,o),r.setHours(0,0,0,0),r}}function lY(e,t,r){const n=Oe(e,r==null?void 0:r.in),a=RU(n,r),o=t-a;return Ea(n,o,r)}class cY extends it{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,a){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Wt(n.length,r);case"io":return a.ordinalNumber(r,{unit:"day"});case"iii":return Kt(a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Kt(a.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Kt(a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Kt(a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,a){return r=lY(r,a),r.setHours(0,0,0,0),r}}class uY extends it{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(j1(a),0,0,0),r}}class dY extends it{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(j1(a),0,0,0),r}}class fY extends it{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(j1(a),0,0,0),r}}class pY extends it{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,a){switch(n){case"h":return jt(Vt.hour12h,r);case"ho":return a.ordinalNumber(r,{unit:"hour"});default:return Wt(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,a){const o=r.getHours()>=12;return o&&a<12?r.setHours(a+12,0,0,0):!o&&a===12?r.setHours(0,0,0,0):r.setHours(a,0,0,0),r}}class hY extends it{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,a){switch(n){case"H":return jt(Vt.hour23h,r);case"Ho":return a.ordinalNumber(r,{unit:"hour"});default:return Wt(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,a){return r.setHours(a,0,0,0),r}}class mY extends it{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,a){switch(n){case"K":return jt(Vt.hour11h,r);case"Ko":return a.ordinalNumber(r,{unit:"hour"});default:return Wt(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.getHours()>=12&&a<12?r.setHours(a+12,0,0,0):r.setHours(a,0,0,0),r}}class gY extends it{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,a){switch(n){case"k":return jt(Vt.hour24h,r);case"ko":return a.ordinalNumber(r,{unit:"hour"});default:return Wt(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,a){const o=a<=24?a%24:a;return r.setHours(o,0,0,0),r}}class vY extends it{constructor(){super(...arguments);me(this,"priority",60);me(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"m":return jt(Vt.minute,r);case"mo":return a.ordinalNumber(r,{unit:"minute"});default:return Wt(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setMinutes(a,0,0),r}}class yY extends it{constructor(){super(...arguments);me(this,"priority",50);me(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"s":return jt(Vt.second,r);case"so":return a.ordinalNumber(r,{unit:"second"});default:return Wt(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setSeconds(a,0),r}}class xY extends it{constructor(){super(...arguments);me(this,"priority",30);me(this,"incompatibleTokens",["t","T"])}parse(r,n){const a=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Kt(Wt(n.length,r),a)}set(r,n,a){return r.setMilliseconds(a),r}}class bY extends it{constructor(){super(...arguments);me(this,"priority",10);me(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return Ga(qa.basicOptionalMinutes,r);case"XX":return Ga(qa.basic,r);case"XXXX":return Ga(qa.basicOptionalSeconds,r);case"XXXXX":return Ga(qa.extendedOptionalSeconds,r);case"XXX":default:return Ga(qa.extended,r)}}set(r,n,a){return n.timestampIsSet?r:gt(r,r.getTime()-nm(r)-a)}}class wY extends it{constructor(){super(...arguments);me(this,"priority",10);me(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return Ga(qa.basicOptionalMinutes,r);case"xx":return Ga(qa.basic,r);case"xxxx":return Ga(qa.basicOptionalSeconds,r);case"xxxxx":return Ga(qa.extendedOptionalSeconds,r);case"xxx":default:return Ga(qa.extended,r)}}set(r,n,a){return n.timestampIsSet?r:gt(r,r.getTime()-nm(r)-a)}}class SY extends it{constructor(){super(...arguments);me(this,"priority",40);me(this,"incompatibleTokens","*")}parse(r){return ZT(r)}set(r,n,a){return[gt(r,a*1e3),{timestampIsSet:!0}]}}class kY extends it{constructor(){super(...arguments);me(this,"priority",20);me(this,"incompatibleTokens","*")}parse(r){return ZT(r)}set(r,n,a){return[gt(r,a),{timestampIsSet:!0}]}}const CY={G:new WU,y:new HU,Y:new UU,R:new YU,u:new VU,Q:new KU,q:new qU,M:new GU,L:new XU,w:new ZU,I:new eY,d:new nY,D:new aY,E:new oY,e:new iY,c:new sY,i:new cY,a:new uY,b:new dY,B:new fY,h:new pY,H:new hY,K:new mY,k:new gY,m:new vY,s:new yY,S:new xY,X:new bY,x:new wY,t:new SY,T:new kY},PY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OY=/^'([^]*?)'?$/,DY=/''/g,_Y=/\S/,NY=/[a-zA-Z]/;function MY(e,t,r,n){var v,x,w,b,S,k,P,E;const a=()=>gt((n==null?void 0:n.in)||r,NaN),o=AU(),i=(n==null?void 0:n.locale)??o.locale??qT,s=(n==null?void 0:n.firstWeekContainsDate)??((x=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:x.firstWeekContainsDate)??o.firstWeekContainsDate??((b=(w=o.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??1,l=(n==null?void 0:n.weekStartsOn)??((k=(S=n==null?void 0:n.locale)==null?void 0:S.options)==null?void 0:k.weekStartsOn)??o.weekStartsOn??((E=(P=o.locale)==null?void 0:P.options)==null?void 0:E.weekStartsOn)??0;if(!t)return e?a():Oe(r,n==null?void 0:n.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:i},u=[new BU(n==null?void 0:n.in,r)],d=t.match(EY).map(O=>{const D=O[0];if(D in Kx){const N=Kx[D];return N(O,i.formatLong)}return O}).join("").match(PY),f=[];for(let O of d){const D=O[0],N=CY[D];if(N){const{incompatibleTokens:_}=N;if(Array.isArray(_)){const M=f.find(T=>_.includes(T.token)||T.token===D);if(M)throw new RangeError(`The format string mustn't contain \`${M.fullToken}\` and \`${O}\` at the same time`)}else if(N.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${O}\` and any other token at the same time`);f.push({token:D,fullToken:O});const C=N.run(e,O,i.match,c);if(!C)return a();u.push(C.setter),e=C.rest}else{if(D.match(NY))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");if(O==="''"?O="'":D==="'"&&(O=TY(O)),e.indexOf(O)===0)e=e.slice(O.length);else return a()}}if(e.length>0&&_Y.test(e))return a();const p=u.map(O=>O.priority).sort((O,D)=>D-O).filter((O,D,N)=>N.indexOf(O)===D).map(O=>u.filter(D=>D.priority===O).sort((D,N)=>N.subPriority-D.subPriority)).map(O=>O[0]);let g=Oe(r,n==null?void 0:n.in);if(isNaN(+g))return a();const y={};for(const O of p){if(!O.validate(g,c))return a();const D=O.set(g,y,c);Array.isArray(D)?(g=D[0],Object.assign(y,D[1])):g=D}return g}function TY(e){return e.match(OY)[1].replace(DY,"'")}function jY(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function AY(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t);return+Vx(n)==+Vx(a)}function RY(e,t,r){const[n,a]=oi(r==null?void 0:r.in,e,t);return n.getFullYear()===a.getFullYear()}function Dd(e,t,r){const n=+Oe(e,r==null?void 0:r.in),[a,o]=[+Oe(t.start,r==null?void 0:r.in),+Oe(t.end,r==null?void 0:r.in)].sort((i,s)=>i-s);return n>=a&&n<=o}function IY(e,t,r){return Ea(e,-1,r)}function $Y(e,t){const r=()=>gt(t==null?void 0:t.in,NaN),a=BY(e);let o;if(a.date){const c=WY(a.date,2);o=HY(c.restDateString,c.year)}if(!o||isNaN(+o))return r();const i=+o;let s=0,l;if(a.time&&(s=UY(a.time),isNaN(s)))return r();if(a.timezone){if(l=YY(a.timezone),isNaN(l))return r()}else{const c=new Date(i+s),u=Oe(0,t==null?void 0:t.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return Oe(i+s+l,t==null?void 0:t.in)}const op={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},LY=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,FY=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,zY=/^([+-])(\d{2})(?::?(\d{2}))?$/;function BY(e){const t={},r=e.split(op.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],op.timeZoneDelimiter.test(t.date)&&(t.date=e.split(op.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const a=op.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function WY(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const a=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?a:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function HY(e,t){if(t===null)return new Date(NaN);const r=e.match(LY);if(!r)return new Date(NaN);const n=!!r[4],a=lu(r[1]),o=lu(r[2])-1,i=lu(r[3]),s=lu(r[4]),l=lu(r[5])-1;if(n)return XY(t,s,l)?VY(t,s,l):new Date(NaN);{const c=new Date(0);return!qY(t,o,i)||!GY(t,a)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(a,i)),c)}}function lu(e){return e?parseInt(e):1}function UY(e){const t=e.match(FY);if(!t)return NaN;const r=Yy(t[1]),n=Yy(t[2]),a=Yy(t[3]);return QY(r,n,a)?r*cv+n*lv+a*1e3:NaN}function Yy(e){return e&&parseFloat(e.replace(",","."))||0}function YY(e){if(e==="Z")return 0;const t=e.match(zY);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return ZY(n,a)?r*(n*cv+a*lv):NaN}function VY(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,o=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+o),n}const KY=[31,null,31,30,31,30,31,31,30,31,30,31];function tj(e){return e%400===0||e%4===0&&e%100!==0}function qY(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(KY[t]||(tj(e)?29:28))}function GY(e,t){return t>=1&&t<=(tj(e)?366:365)}function XY(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function QY(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function ZY(e,t){return t>=0&&t<=59}function gn(e,t,r){const n=Oe(e,r==null?void 0:r.in),a=n.getFullYear(),o=n.getDate(),i=gt(e,0);i.setFullYear(a,t,15),i.setHours(0,0,0,0);const s=jU(i);return n.setMonth(t,Math.min(o,s)),n}function th(e,t,r){const n=Oe(e,r==null?void 0:r.in);return n.setHours(t),n}function rh(e,t,r){const n=Oe(e,r==null?void 0:r.in);return n.setMinutes(t),n}function yl(e,t,r){const n=Oe(e,r==null?void 0:r.in),a=Math.trunc(n.getMonth()/3)+1,o=t-a;return gn(n,n.getMonth()+o*3)}function nh(e,t,r){const n=Oe(e,r==null?void 0:r.in);return n.setSeconds(t),n}function Fa(e,t,r){const n=Oe(e,r==null?void 0:r.in);return isNaN(+n)?gt(e,NaN):(n.setFullYear(t),n)}function Ms(e,t,r){return _a(e,-t,r)}function rj(e,t,r){return N1(e,-1,r)}function nP(e,t,r){return am(e,-1,r)}function pc(e,t,r){return To(e,-t,r)}function dv(){return typeof window<"u"}function $c(e){return nj(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ho(e){var t;return(t=(nj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nj(e){return dv()?e instanceof Node||e instanceof Pn(e).Node:!1}function zr(e){return dv()?e instanceof Element||e instanceof Pn(e).Element:!1}function so(e){return dv()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function aP(e){return!dv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}const JY=new Set(["inline","contents"]);function lf(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!JY.has(a)}const eV=new Set(["table","td","th"]);function tV(e){return eV.has($c(e))}const rV=[":popover-open",":modal"];function fv(e){return rV.some(t=>{try{return e.matches(t)}catch{return!1}})}const nV=["transform","translate","scale","rotate","perspective"],aV=["transform","translate","scale","rotate","perspective","filter"],oV=["paint","layout","strict","content"];function R1(e){const t=I1(),r=zr(e)?ea(e):e;return nV.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||aV.some(n=>(r.willChange||"").includes(n))||oV.some(n=>(r.contain||"").includes(n))}function iV(e){let t=Ki(e);for(;so(t)&&!hc(t);){if(R1(t))return t;if(fv(t))return null;t=Ki(t)}return null}function I1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sV=new Set(["html","body","#document"]);function hc(e){return sV.has($c(e))}function ea(e){return Pn(e).getComputedStyle(e)}function pv(e){return zr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ki(e){if($c(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aP(e)&&e.host||ho(e);return aP(t)?t.host:t}function aj(e){const t=Ki(e);return hc(t)?e.ownerDocument?e.ownerDocument.body:e.body:so(t)&&lf(t)?t:aj(t)}function _d(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=aj(e),o=a===((n=e.ownerDocument)==null?void 0:n.body),i=Pn(a);if(o){const s=Gx(i);return t.concat(i,i.visualViewport||[],lf(a)?a:[],s&&r?_d(s):[])}return t.concat(a,_d(a,[],r))}function Gx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const mc=Math.min,Ts=Math.max,um=Math.round,ip=Math.floor,ao=e=>({x:e,y:e}),lV={left:"right",right:"left",bottom:"top",top:"bottom"},cV={start:"end",end:"start"};function uV(e,t,r){return Ts(e,mc(t,r))}function hv(e,t){return typeof e=="function"?e(t):e}function gc(e){return e.split("-")[0]}function cf(e){return e.split("-")[1]}function dV(e){return e==="x"?"y":"x"}function $1(e){return e==="y"?"height":"width"}const fV=new Set(["top","bottom"]);function ks(e){return fV.has(gc(e))?"y":"x"}function L1(e){return dV(ks(e))}function pV(e,t,r){r===void 0&&(r=!1);const n=cf(e),a=L1(e),o=$1(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=dm(i)),[i,dm(i)]}function hV(e){const t=dm(e);return[Xx(e),t,Xx(t)]}function Xx(e){return e.replace(/start|end/g,t=>cV[t])}const oP=["left","right"],iP=["right","left"],mV=["top","bottom"],gV=["bottom","top"];function vV(e,t,r){switch(e){case"top":case"bottom":return r?t?iP:oP:t?oP:iP;case"left":case"right":return t?mV:gV;default:return[]}}function yV(e,t,r,n){const a=cf(e);let o=vV(gc(e),r==="start",n);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(Xx)))),o}function dm(e){return e.replace(/left|right|bottom|top/g,t=>lV[t])}function xV(e){return{top:0,right:0,bottom:0,left:0,...e}}function oj(e){return typeof e!="number"?xV(e):{top:e,right:e,bottom:e,left:e}}function fm(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}var bV=typeof document<"u",wV=function(){},pm=bV?m.useLayoutEffect:wV;const SV={...ql},kV=SV.useInsertionEffect,CV=kV||(e=>e());function PV(e){const t=m.useRef(()=>{});return CV(()=>{t.current=e}),m.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.current==null?void 0:t.current(...n)},[])}function sP(e,t,r){let{reference:n,floating:a}=e;const o=ks(t),i=L1(t),s=$1(i),l=gc(t),c=o==="y",u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,f=n[s]/2-a[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-a.width,y:d};break;default:p={x:n.x,y:n.y}}switch(cf(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}const EV=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=sP(c,n,l),f=n,p={},g=0;for(let y=0;y<s.length;y++){const{name:v,fn:x}=s[y],{x:w,y:b,data:S,reset:k}=await x({x:u,y:d,initialPlacement:n,placement:f,strategy:a,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,d=b??d,p={...p,[v]:{...p[v],...S}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:u,y:d}=sP(c,f,l)),y=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:p}};async function OV(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=hv(t,e),g=oj(p),v=s[f?d==="floating"?"reference":"floating":d],x=fm(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(v)))==null||r?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},k=fm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:l}):w);return{top:(x.top-k.top+g.top)/S.y,bottom:(k.bottom-x.bottom+g.bottom)/S.y,left:(x.left-k.left+g.left)/S.x,right:(k.right-x.right+g.right)/S.x}}const DV=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=hv(e,t)||{};if(c==null)return{};const d=oj(u),f={x:r,y:n},p=L1(a),g=$1(p),y=await i.getDimensions(c),v=p==="y",x=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=o.reference[g]+o.reference[p]-f[p]-o.floating[g],k=f[p]-o.reference[p],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=P?P[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(P)))&&(E=s.floating[b]||o.floating[g]);const O=S/2-k/2,D=E/2-y[g]/2-1,N=mc(d[x],D),_=mc(d[w],D),C=N,M=E-y[g]-_,T=E/2-y[g]/2+O,j=uV(C,T,M),A=!l.arrow&&cf(a)!=null&&T!==j&&o.reference[g]/2-(T<C?N:_)-y[g]/2<0,L=A?T<C?T-C:T-M:0;return{[p]:f[p]+L,data:{[p]:j,centerOffset:T-j-L,...A&&{alignmentOffset:L}},reset:A}}}),_V=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=hv(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const x=gc(a),w=ks(s),b=gc(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=f||(b||!y?[dm(s)]:hV(s)),P=g!=="none";!f&&P&&k.push(...yV(s,y,g,S));const E=[s,...k],O=await OV(t,v),D=[];let N=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(O[x]),d){const T=pV(a,i,S);D.push(O[T[0]],O[T[1]])}if(N=[...N,{placement:a,overflows:D}],!D.every(T=>T<=0)){var _,C;const T=(((_=o.flip)==null?void 0:_.index)||0)+1,j=E[T];if(j&&(!(d==="alignment"?w!==ks(j):!1)||N.every(I=>ks(I.placement)===w?I.overflows[0]>0:!0)))return{data:{index:T,overflows:N},reset:{placement:j}};let A=(C=N.filter(L=>L.overflows[0]<=0).sort((L,I)=>L.overflows[1]-I.overflows[1])[0])==null?void 0:C.placement;if(!A)switch(p){case"bestFit":{var M;const L=(M=N.filter(I=>{if(P){const $=ks(I.placement);return $===w||$==="y"}return!0}).map(I=>[I.placement,I.overflows.filter($=>$>0).reduce(($,z)=>$+z,0)]).sort((I,$)=>I[1]-$[1])[0])==null?void 0:M[0];L&&(A=L);break}case"initialPlacement":A=s;break}if(a!==A)return{reset:{placement:A}}}return{}}}},NV=new Set(["left","top"]);async function MV(e,t){const{placement:r,platform:n,elements:a}=e,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=gc(r),s=cf(r),l=ks(r)==="y",c=NV.has(i)?-1:1,u=o&&l?-1:1,d=hv(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const TV=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await MV(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}};function ij(e){const t=ea(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=so(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=um(r)!==o||um(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function F1(e){return zr(e)?e:e.contextElement}function Ul(e){const t=F1(e);if(!so(t))return ao(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=ij(t);let i=(o?um(r.width):r.width)/n,s=(o?um(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const jV=ao(0);function sj(e){const t=Pn(e);return!I1()||!t.visualViewport?jV:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AV(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Pn(e)?!1:t}function Ys(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),o=F1(e);let i=ao(1);t&&(n?zr(n)&&(i=Ul(n)):i=Ul(e));const s=AV(o,r,n)?sj(o):ao(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const f=Pn(o),p=n&&zr(n)?Pn(n):n;let g=f,y=Gx(g);for(;y&&n&&p!==g;){const v=Ul(y),x=y.getBoundingClientRect(),w=ea(y),b=x.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,S=x.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=b,c+=S,g=Pn(y),y=Gx(g)}}return fm({width:u,height:d,x:l,y:c})}function mv(e,t){const r=pv(e).scrollLeft;return t?t.left+r:Ys(ho(e)).left+r}function lj(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-mv(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function RV(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o=a==="fixed",i=ho(n),s=t?fv(t.floating):!1;if(n===i||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ao(1);const u=ao(0),d=so(n);if((d||!d&&!o)&&(($c(n)!=="body"||lf(i))&&(l=pv(n)),so(n))){const p=Ys(n);c=Ul(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const f=i&&!d&&!o?lj(i,l):ao(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function IV(e){return Array.from(e.getClientRects())}function $V(e){const t=ho(e),r=pv(e),n=e.ownerDocument.body,a=Ts(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Ts(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+mv(e);const s=-r.scrollTop;return ea(n).direction==="rtl"&&(i+=Ts(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:i,y:s}}const lP=25;function LV(e,t){const r=Pn(e),n=ho(e),a=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const u=I1();(!u||u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}const c=mv(n);if(c<=0){const u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(n.clientWidth-d.clientWidth-p);g<=lP&&(o-=g)}else c<=lP&&(o+=c);return{width:o,height:i,x:s,y:l}}const FV=new Set(["absolute","fixed"]);function zV(e,t){const r=Ys(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=so(e)?Ul(e):ao(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,l=a*o.x,c=n*o.y;return{width:i,height:s,x:l,y:c}}function cP(e,t,r){let n;if(t==="viewport")n=LV(e,r);else if(t==="document")n=$V(ho(e));else if(zr(t))n=zV(t,r);else{const a=sj(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return fm(n)}function cj(e,t){const r=Ki(e);return r===t||!zr(r)||hc(r)?!1:ea(r).position==="fixed"||cj(r,t)}function BV(e,t){const r=t.get(e);if(r)return r;let n=_d(e,[],!1).filter(s=>zr(s)&&$c(s)!=="body"),a=null;const o=ea(e).position==="fixed";let i=o?Ki(e):e;for(;zr(i)&&!hc(i);){const s=ea(i),l=R1(i);!l&&s.position==="fixed"&&(a=null),(o?!l&&!a:!l&&s.position==="static"&&!!a&&FV.has(a.position)||lf(i)&&!l&&cj(e,i))?n=n.filter(u=>u!==i):a=s,i=Ki(i)}return t.set(e,n),n}function WV(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?fv(t)?[]:BV(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{const d=cP(t,u,a);return c.top=Ts(d.top,c.top),c.right=mc(d.right,c.right),c.bottom=mc(d.bottom,c.bottom),c.left=Ts(d.left,c.left),c},cP(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function HV(e){const{width:t,height:r}=ij(e);return{width:t,height:r}}function UV(e,t,r){const n=so(t),a=ho(t),o=r==="fixed",i=Ys(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=ao(0);function c(){l.x=mv(a)}if(n||!n&&!o)if(($c(t)!=="body"||lf(a))&&(s=pv(t)),n){const p=Ys(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else a&&c();o&&!n&&a&&c();const u=a&&!n&&!o?lj(a,s):ao(0),d=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function Vy(e){return ea(e).position==="static"}function uP(e,t){if(!so(e)||ea(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ho(e)===r&&(r=r.ownerDocument.body),r}function uj(e,t){const r=Pn(e);if(fv(e))return r;if(!so(e)){let a=Ki(e);for(;a&&!hc(a);){if(zr(a)&&!Vy(a))return a;a=Ki(a)}return r}let n=uP(e,t);for(;n&&tV(n)&&Vy(n);)n=uP(n,t);return n&&hc(n)&&Vy(n)&&!R1(n)?r:n||iV(e)||r}const YV=async function(e){const t=this.getOffsetParent||uj,r=this.getDimensions,n=await r(e.floating);return{reference:UV(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function VV(e){return ea(e).direction==="rtl"}const KV={convertOffsetParentRelativeRectToViewportRelativeRect:RV,getDocumentElement:ho,getClippingRect:WV,getOffsetParent:uj,getElementRects:YV,getClientRects:IV,getDimensions:HV,getScale:Ul,isElement:zr,isRTL:VV};function dj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qV(e,t){let r=null,n;const a=ho(e);function o(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const g=ip(d),y=ip(a.clientWidth-(u+f)),v=ip(a.clientHeight-(d+p)),x=ip(u),b={rootMargin:-g+"px "+-y+"px "+-v+"px "+-x+"px",threshold:Ts(0,mc(1,l))||1};let S=!0;function k(P){const E=P[0].intersectionRatio;if(E!==l){if(!S)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!dj(c,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(k,{...b,root:a.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(e)}return i(!0),o}function GV(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=F1(e),u=a||o?[...c?_d(c):[],..._d(t)]:[];u.forEach(x=>{a&&x.addEventListener("scroll",r,{passive:!0}),o&&x.addEventListener("resize",r)});const d=c&&s?qV(c,r):null;let f=-1,p=null;i&&(p=new ResizeObserver(x=>{let[w]=x;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let g,y=l?Ys(e):null;l&&v();function v(){const x=Ys(e);y&&!dj(y,x)&&r(),y=x,g=requestAnimationFrame(v)}return r(),()=>{var x;u.forEach(w=>{a&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d==null||d(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const XV=TV,QV=_V,dP=DV,ZV=(e,t,r)=>{const n=new Map,a={platform:KV,...r},o={...a.platform,_c:n};return EV(e,t,{...a,platform:o})};var JV=typeof document<"u",eK=function(){},ah=JV?m.useLayoutEffect:eK;function hm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!hm(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const o=a[n];if(!(o==="_owner"&&e.$$typeof)&&!hm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function fj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fP(e,t){const r=fj(e);return Math.round(t*r)/r}function Ky(e){const t=m.useRef(e);return ah(()=>{t.current=e}),t}function tK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=m.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(n);hm(f,n)||p(n);const[g,y]=m.useState(null),[v,x]=m.useState(null),w=m.useCallback(I=>{I!==P.current&&(P.current=I,y(I))},[]),b=m.useCallback(I=>{I!==E.current&&(E.current=I,x(I))},[]),S=o||g,k=i||v,P=m.useRef(null),E=m.useRef(null),O=m.useRef(u),D=l!=null,N=Ky(l),_=Ky(a),C=Ky(c),M=m.useCallback(()=>{if(!P.current||!E.current)return;const I={placement:t,strategy:r,middleware:f};_.current&&(I.platform=_.current),ZV(P.current,E.current,I).then($=>{const z={...$,isPositioned:C.current!==!1};T.current&&!hm(O.current,z)&&(O.current=z,Nc.flushSync(()=>{d(z)}))})},[f,t,r,_,C]);ah(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[c]);const T=m.useRef(!1);ah(()=>(T.current=!0,()=>{T.current=!1}),[]),ah(()=>{if(S&&(P.current=S),k&&(E.current=k),S&&k){if(N.current)return N.current(S,k,M);M()}},[S,k,M,N,D]);const j=m.useMemo(()=>({reference:P,floating:E,setReference:w,setFloating:b}),[w,b]),A=m.useMemo(()=>({reference:S,floating:k}),[S,k]),L=m.useMemo(()=>{const I={position:r,left:0,top:0};if(!A.floating)return I;const $=fP(A.floating,u.x),z=fP(A.floating,u.y);return s?{...I,transform:"translate("+$+"px, "+z+"px)",...fj(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:z}},[r,s,A.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:M,refs:j,elements:A,floatingStyles:L}),[u,M,j,A,L])}const rK=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?dP({element:n.current,padding:a}).fn(r):{}:n?dP({element:n,padding:a}).fn(r):{}}}},nK=(e,t)=>({...XV(e),options:[e,t]}),aK=(e,t)=>({...QV(e),options:[e,t]}),oK=(e,t)=>({...rK(e),options:[e,t]}),iK={...ql};let pP=!1,sK=0;const hP=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sK++;function lK(){const[e,t]=m.useState(()=>pP?hP():void 0);return pm(()=>{e==null&&t(hP())},[]),m.useEffect(()=>{pP=!0},[]),e}const cK=iK.useId,pj=cK||lK,uK=m.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:a},middlewareData:{arrow:o,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:g,...y}={},...v}=t,x=pj(),[w,b]=m.useState(!1);if(pm(()=>{if(!a)return;ea(a).direction==="rtl"&&b(!0)},[a]),!a)return null;const[S,k]=n.split("-"),P=S==="top"||S==="bottom";let E=d;(P&&i!=null&&i.x||!P&&i!=null&&i.y)&&(E=null);const O=u*2,D=O/2,N=s/2*(c/-8+1),_=l/2*c/4,C=!!p,M=E&&k==="end"?"bottom":"top";let T=E&&k==="end"?"right":"left";E&&w&&(T=k==="end"?"left":"right");const j=(o==null?void 0:o.x)!=null?E||o.x:"",A=(o==null?void 0:o.y)!=null?E||o.y:"",L=p||"M0,0"+(" H"+s)+(" L"+(s-N)+","+(l-_))+(" Q"+s/2+","+l+" "+N+","+(l-_))+" Z",I={top:C?"rotate(180deg)":"",left:C?"rotate(90deg)":"rotate(-90deg)",bottom:C?"":"rotate(180deg)",right:C?"rotate(-90deg)":"rotate(90deg)"}[S];return h.jsxs("svg",{...v,"aria-hidden":!0,ref:r,width:C?s:s+O,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[T]:j,[M]:A,[S]:P||C?"100%":"calc(100% - "+O/2+"px)",transform:[I,g].filter($=>!!$).join(" "),...y},children:[O>0&&h.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:f,strokeWidth:O+(p?0:1),d:L}),h.jsx("path",{stroke:O&&!p?v.fill:"none",d:L}),h.jsx("clipPath",{id:x,children:h.jsx("rect",{x:-D,y:D*(C?-1:1),width:s+O,height:s})})]})});function dK(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(a=>a(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}const fK=m.createContext(null),pK=m.createContext(null),hK=()=>{var e;return((e=m.useContext(fK))==null?void 0:e.id)||null},mK=()=>m.useContext(pK);function gK(e){const{open:t=!1,onOpenChange:r,elements:n}=e,a=pj(),o=m.useRef({}),[i]=m.useState(()=>dK()),s=hK()!=null,[l,c]=m.useState(n.reference),u=PV((p,g,y)=>{o.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:y,nested:s}),r==null||r(p,g,y)}),d=m.useMemo(()=>({setPositionReference:c}),[]),f=m.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return m.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:i,floatingId:a,refs:d}),[t,u,f,i,a,d])}function vK(e){e===void 0&&(e={});const{nodeId:t}=e,r=gK({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,a=n.elements,[o,i]=m.useState(null),[s,l]=m.useState(null),u=(a==null?void 0:a.domReference)||o,d=m.useRef(null),f=mK();pm(()=>{u&&(d.current=u)},[u]);const p=tK({...e,elements:{...a,...s&&{reference:s}}}),g=m.useCallback(b=>{const S=zr(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(S),p.refs.setReference(S)},[p.refs]),y=m.useCallback(b=>{(zr(b)||b===null)&&(d.current=b,i(b)),(zr(p.refs.reference.current)||p.refs.reference.current===null||b!==null&&!zr(b))&&p.refs.setReference(b)},[p.refs]),v=m.useMemo(()=>({...p.refs,setReference:y,setPositionReference:g,domReference:d}),[p.refs,y,g]),x=m.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),w=m.useMemo(()=>({...p,...n,refs:v,elements:x,nodeId:t}),[p,v,x,t,n]);return pm(()=>{n.dataRef.current.floatingContext=w;const b=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);b&&(b.context=w)}),m.useMemo(()=>({...p,context:w,refs:v,elements:x}),[p,v,x,w])}/*!
react-datepicker v8.10.0
https://github.com/Hacker0x01/react-datepicker
Released under the MIT License.
*/var Qx=function(t,r){return Qx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])},Qx(t,r)};function Pr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var He=function(){return He=Object.assign||function(r){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},He.apply(this,arguments)};function Za(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var yK=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,a=n===void 0?!1:n,o=e.className,i=e.children,s=e.inline,l=r?"Choose Time":"Choose Date".concat(a?" and Time":"");return U.createElement("div",{className:o,"aria-label":l,role:s?void 0:"dialog","aria-modal":s?void 0:"true"},i)},xK=function(e,t){var r=m.useRef(null),n=m.useRef(e);m.useEffect(function(){n.current=e},[e]);var a=m.useCallback(function(o){var i,s=o.composed&&o.composedPath&&o.composedPath().find(function(l){return l instanceof Node})||o.target;r.current&&!r.current.contains(s)&&(t&&s instanceof HTMLElement&&s.classList.contains(t)||(i=n.current)===null||i===void 0||i.call(n,o))},[t]);return m.useEffect(function(){return document.addEventListener("mousedown",a),function(){document.removeEventListener("mousedown",a)}},[a]),r},gv=function(e){var t=e.children,r=e.onClickOutside,n=e.className,a=e.containerRef,o=e.style,i=e.ignoreClass,s=xK(r,i);return U.createElement("div",{className:n,style:o,ref:function(l){s.current=l,a&&(a.current=l)}},t)},pe;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(pe||(pe={}));function z1(){var e=typeof window<"u"?window:globalThis;return e}var uf=12;function tt(e){if(e==null)return new Date;var t=typeof e=="string"?$Y(e):Oe(e);return xn(t)?t:new Date}function fl(e,t,r,n,a){a===void 0&&(a=tt());for(var o=vc(r)||vc(B1()),i=Array.isArray(t)?t:[t],s=0,l=i;s<l.length;s++){var c=l[s],u=MY(e,c,a,{locale:o});if(xn(u)&&(!n||e===Pt(u,c,r)))return u}return null}function xn(e,t){return om(e)&&!Qa(e,new Date("1/1/1800"))}function Pt(e,t,r){if(r==="en")return tP(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?vc(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||vc(B1()),tP(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function hn(e,t){var r=t.dateFormat,n=t.locale,a=Array.isArray(r)&&r.length>0?r[0]:r;return e&&Pt(e,a,n)||""}var hj=" - ";function bK(e,t,r){if(!e&&!t)return"";var n=e?hn(e,r):"",a=t?hn(t,r):"",o=r.rangeSeparator||hj;return"".concat(n).concat(o).concat(a)}function wK(e,t){if(!(e!=null&&e.length))return"";var r=e[0]?hn(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=hn(e[1],t);return"".concat(r,", ").concat(n)}var a=e.length-1;return"".concat(r," (+").concat(a,")")}function sp(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,o=a===void 0?0:a,i=t.second,s=i===void 0?0:i;return th(rh(nh(e,s),o),n)}function SK(e){return M1(e)}function kK(e,t){return Pt(e,"ddd",t)}function Mu(e){return Us(e)}function Bi(e,t,r){var n=vc(t||B1());return qo(e,{locale:n,weekStartsOn:r})}function Ao(e){return YT(e)}function Tu(e){return uv(e)}function mP(e){return Vx(e)}function gP(){return Us(tt())}function vP(e){return HT(e)}function CK(e){return L9(e)}function PK(e){return UT(e)}function Wa(e,t){return e&&t?RY(e,t):!e&&!t}function Fr(e,t){return e&&t?jY(e,t):!e&&!t}function mm(e,t){return e&&t?AY(e,t):!e&&!t}function Ve(e,t){return e&&t?I9(e,t):!e&&!t}function Cs(e,t){return e&&t?IU(e,t):!e&&!t}function ps(e,t,r){var n,a=Us(t),o=HT(r);try{n=Dd(e,{start:a,end:o})}catch{n=!1}return n}function EK(e,t){var r=z1();r.__localeData__||(r.__localeData__={}),r.__localeData__[e]=t}function B1(){var e=z1();return e.__localeId__}function vc(e){if(typeof e=="string"){var t=z1();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function OK(e,t,r){return t(Pt(e,"EEEE",r))}function DK(e,t){return Pt(e,"EEEEEE",t)}function _K(e,t){return Pt(e,"EEE",t)}function W1(e,t){return Pt(gn(tt(),e),"LLLL",t)}function mj(e,t){return Pt(gn(tt(),e),"LLL",t)}function NK(e,t){return Pt(yl(tt(),e),"QQQ",t)}function Wn(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,o=r.excludeDates,i=r.excludeDateIntervals,s=r.includeDates,l=r.includeDateIntervals,c=r.filterDate,u=r.disabled;return u?!0:df(e,{minDate:n,maxDate:a})||o&&o.some(function(d){return d instanceof Date?Ve(e,d):Ve(e,d.date)})||i&&i.some(function(d){var f=d.start,p=d.end;return Dd(e,{start:f,end:p})})||s&&!s.some(function(d){return Ve(e,d)})||l&&!l.some(function(d){var f=d.start,p=d.end;return Dd(e,{start:f,end:p})})||c&&!c(tt(e))||!1}function H1(e,t){var r=t===void 0?{}:t,n=r.excludeDates,a=r.excludeDateIntervals;return a&&a.length>0?a.some(function(o){var i=o.start,s=o.end;return Dd(e,{start:i,end:s})}):n&&n.some(function(o){var i;return o instanceof Date?Ve(e,o):Ve(e,(i=o.date)!==null&&i!==void 0?i:new Date)})||!1}function gj(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,o=r.excludeDates,i=r.includeDates,s=r.filterDate;return df(e,{minDate:n?YT(n):void 0,maxDate:a?UT(a):void 0})||(o==null?void 0:o.some(function(l){return Fr(e,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Fr(e,l)})||s&&!s(tt(e))||!1}function lp(e,t,r,n){var a=Ue(e),o=Qr(e),i=Ue(t),s=Qr(t),l=Ue(n);return a===i&&a===l?o<=r&&r<=s:a<i?l===a&&o<=r||l===i&&s>=r||l<i&&l>a:!1}function MK(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,o=r.excludeDates,i=r.includeDates;return df(e,{minDate:n,maxDate:a})||o&&o.some(function(s){return Fr(s instanceof Date?s:s.date,e)})||i&&!i.some(function(s){return Fr(s,e)})||!1}function cp(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,o=r.excludeDates,i=r.includeDates,s=r.filterDate,l=r.disabled;return l?!0:df(e,{minDate:n,maxDate:a})||(o==null?void 0:o.some(function(c){return mm(e,c instanceof Date?c:c.date)}))||i&&!i.some(function(c){return mm(e,c)})||s&&!s(tt(e))||!1}function up(e,t,r){if(!t||!r||!om(t)||!om(r))return!1;var n=Ue(t),a=Ue(r);return n<=e&&a>=e}function oh(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,o=r.excludeDates,i=r.includeDates,s=r.filterDate,l=r.disabled;if(l)return!0;var c=new Date(e,0,1);return df(c,{minDate:n?uv(n):void 0,maxDate:a?VT(a):void 0})||(o==null?void 0:o.some(function(u){return Wa(c,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return Wa(c,u)})||s&&!s(tt(c))||!1}function dp(e,t,r,n){var a=Ue(e),o=_i(e),i=Ue(t),s=_i(t),l=Ue(n);return a===i&&a===l?o<=r&&r<=s:a<i?l===a&&o<=r||l===i&&s>=r||l<i&&l>a:!1}function df(e,t){var r,n=t===void 0?{}:t,a=n.minDate,o=n.maxDate;return(r=a&&fc(e,a)<0||o&&fc(e,o)>0)!==null&&r!==void 0?r:!1}function yP(e,t){return t.some(function(r){return Sa(r)===Sa(e)&&ka(r)===ka(e)&&zi(r)===zi(e)})}function xP(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,a=r.includeTimes,o=r.filterTime;return n&&yP(e,n)||a&&!yP(e,a)||o&&!o(e)||!1}function bP(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a=tt();a=th(a,Sa(e)),a=rh(a,ka(e)),a=nh(a,zi(e));var o=tt();o=th(o,Sa(r)),o=rh(o,ka(r)),o=nh(o,zi(r));var i=tt();i=th(i,Sa(n)),i=rh(i,ka(n)),i=nh(i,zi(n));var s;try{s=!Dd(a,{start:o,end:i})}catch{s=!1}return s}function wP(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,o=Ms(e,1);return n&&im(n,o)>0||a&&a.every(function(i){return im(i,o)>0})||!1}function SP(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,o=_a(e,1);return n&&im(o,n)>0||a&&a.every(function(i){return im(o,i)>0})||!1}function TK(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,o=uv(e),i=rj(o);return n&&sm(n,i)>0||a&&a.every(function(s){return sm(s,i)>0})||!1}function jK(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,o=VT(e),i=N1(o,1);return n&&sm(i,n)>0||a&&a.every(function(s){return sm(i,s)>0})||!1}function kP(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,o=pc(e,1);return n&&lm(n,o)>0||a&&a.every(function(i){return lm(i,o)>0})||!1}function AK(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.yearItemNumber,o=a===void 0?uf:a,i=Tu(pc(e,o)),s=Oo(i,o).endPeriod,l=n&&Ue(n);return l&&l>s||!1}function CP(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,o=To(e,1);return n&&lm(o,n)>0||a&&a.every(function(i){return lm(o,i)>0})||!1}function RK(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.yearItemNumber,o=a===void 0?uf:a,i=To(e,o),s=Oo(i,o).startPeriod,l=n&&Ue(n);return l&&l<s||!1}function vj(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return fc(a,t)>=0});return G2(n)}else return r?G2(r):t}function yj(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return fc(a,t)<=0});return q2(n)}else return r?q2(r):t}function PP(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,a=0,o=e.length;a<o;a++){var i=e[a];if(jo(i)){var s=Pt(i,"MM.dd.yyyy"),l=n.get(s)||[];l.includes(t)||(l.push(t),n.set(s,l))}else if(typeof i=="object"){var c=Object.keys(i),u=(r=c[0])!==null&&r!==void 0?r:"",d=i[u];if(typeof u=="string"&&Array.isArray(d))for(var f=0,p=d.length;f<p;f++){var g=d[f];if(g){var s=Pt(g,"MM.dd.yyyy"),l=n.get(s)||[];l.includes(u)||(l.push(u),n.set(s,l))}}}}return n}function IK(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function $K(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var a=n.date,o=n.holidayName;if(jo(a)){var i=Pt(a,"MM.dd.yyyy"),s=r.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===t&&IK(s.holidayNames,[o]))){s.className=t;var l=s.holidayNames;s.holidayNames=l?Za(Za([],l,!0),[o],!1):[o],r.set(i,s)}}}),r}function LK(e,t,r,n,a){for(var o=a.length,i=[],s=0;s<o;s++){var l=e,c=a[s];c&&(l=T9(l,Sa(c)),l=Od(l,ka(c)),l=R9(l,zi(c)));var u=Od(e,(r+1)*n);Vi(l,t)&&Qa(l,u)&&c!=null&&i.push(c)}return i}function EP(e){return e<10?"0".concat(e):"".concat(e)}function Oo(e,t){t===void 0&&(t=uf);var r=Math.ceil(Ue(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function FK(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function OP(e){var t=e.getSeconds(),r=e.getMilliseconds();return Oe(e.getTime()-t*1e3-r)}function xj(e,t){return OP(e).getTime()===OP(t).getTime()}function DP(e){if(!jo(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function qy(e,t){if(!jo(e)||!jo(t))throw new Error("Invalid date received");var r=DP(e),n=DP(t);return Qa(r,n)}function bj(e){return e.key===pe.Space}var zK=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=U.createRef(),n.onTimeChange=function(a){var o,i;n.setState({time:a});var s=n.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(a!=null&&a.includes(":")){var u=a.split(":"),d=u[0],f=u[1];c.setHours(Number(d)),c.setMinutes(Number(f))}(i=(o=n.props).onChange)===null||i===void 0||i.call(o,c)},n.renderTimeInput=function(){var a=n.state.time,o=n.props,i=o.date,s=o.timeString,l=o.customTimeInput;return l?m.cloneElement(l,{date:i,value:a,onChange:n.onTimeChange}):U.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var c;(c=n.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:a,onChange:function(c){n.onTimeChange(c.target.value||s)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return U.createElement("div",{className:"react-datepicker__input-time-container"},U.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),U.createElement("div",{className:"react-datepicker-time__input-container"},U.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t}(m.Component),BK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=m.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var a,o,i=n.key;i===pe.Space&&(n.preventDefault(),n.key=pe.Enter),(o=(a=r.props).handleOnKeyDown)===null||o===void 0||o.call(a,n)},r.isSameDay=function(n){return Ve(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var a=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return r.isSameDayOrWeek(i)}):r.isSameDayOrWeek(r.props.selected),o=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!a&&r.isSameDayOrWeek(r.props.preSelection)&&!o},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),Wn(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate,disabled:r.props.disabled})},r.isExcluded=function(){return H1(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Ve(r.props.day,Bi(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Ve(n,Bi(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,a=n.day,o=n.highlightDates;if(!o)return!1;var i=Pt(a,"MM.dd.yyyy");return o.get(i)},r.getHolidaysClass=function(){var n,a=r.props,o=a.day,i=a.holidays;if(!i)return[void 0];var s=Pt(o,"MM.dd.yyyy");return i.has(s)?[(n=i.get(s))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,a=n.day,o=n.startDate,i=n.endDate;return!o||!i?!1:ps(a,o,i)},r.isInSelectingRange=function(){var n,a=r.props,o=a.day,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,c=a.selectsDisabledDaysInRange,u=a.startDate,d=a.swapRange,f=a.endDate,p=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||s||l)||!p||!c&&r.isDisabled())return!1;if(i&&f&&(Qa(p,f)||Cs(p,f)))return ps(o,p,f);if(s&&u&&(Vi(p,u)||Cs(p,u)))return ps(o,u,p);if(l&&u&&!f){if(Cs(p,u)||Vi(p,u))return ps(o,u,p);if(d&&Qa(p,u))return ps(o,p,u)}return!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var a=r.props,o=a.day,i=a.startDate,s=a.selectsStart,l=a.swapRange,c=a.selectsRange,u=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return s?Ve(o,u):c&&l&&i&&u?Ve(o,Qa(u,i)?u:i):Ve(o,i)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var a=r.props,o=a.day,i=a.endDate,s=a.selectsEnd,l=a.selectsRange,c=a.swapRange,u=a.startDate,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return s?Ve(o,d):l&&c&&u&&d?Ve(o,Qa(d,u)?u:d):l?Ve(o,d):Ve(o,i)},r.isRangeStart=function(){var n=r.props,a=n.day,o=n.startDate,i=n.endDate;return!o||!i?!1:Ve(o,a)},r.isRangeEnd=function(){var n=r.props,a=n.day,o=n.startDate,i=n.endDate;return!o||!i?!1:Ve(i,a)},r.isWeekend=function(){var n=TU(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===Qr(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(Qr(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(tt())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(a){return r.isSameDayOrWeek(a)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var a=r.props.dayClassName?r.props.dayClassName(n):void 0;return le("react-datepicker__day",a,"react-datepicker__day--"+kK(r.props.day),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,a=n.day,o=n.ariaLabelPrefixWhenEnabled,i=o===void 0?"Choose":o,s=n.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,c=r.isDisabled()||r.isExcluded()?l:i;return"".concat(c," ").concat(Pt(a,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,a=n.day,o=n.holidays,i=o===void 0?new Map:o,s=n.excludeDates,l=Pt(a,"MM.dd.yyyy"),c=[];return i.has(l)&&c.push.apply(c,i.get(l).holidayNames),r.isExcluded()&&c.push(s==null?void 0:s.filter(function(u){return u instanceof Date?Ve(u,a):Ve(u==null?void 0:u.date,a)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),c.join(", ")},r.getTabIndex=function(){var n=r.props.selected,a=r.props.preSelection,o=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&Ve(a,n))?0:-1;return o},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(rP(r.props.day),r.props.day):rP(r.props.day)},r.render=function(){return U.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"gridcell",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&U.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,a;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((a=document.activeElement)===null||a===void 0?void 0:a.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t}(m.Component),WK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=m.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var a,o,i=n.key;i===pe.Space&&(n.preventDefault(),n.key=pe.Enter),(o=(a=r.props).handleOnKeyDown)===null||o===void 0||o.call(a,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ve(r.props.date,r.props.selected)&&Ve(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||Ve(r.props.date,r.props.selected)&&Ve(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var a=!1;r.getTabIndex()===0&&!(n!=null&&n.isInputFocused)&&Ve(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(a=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(a=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(a=!0)),a&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,a=r.isWeekDisabled,o=r.ariaLabelPrefix,i=o===void 0?t.defaultProps.ariaLabelPrefix:o,s=r.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!a,"react-datepicker__week-number--selected":!!s&&Ve(this.props.date,this.props.selected)};return U.createElement("div",{ref:this.weekNumberEl,className:le(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t}(m.Component),HK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return Wn(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,a){r.props.onDayClick&&r.props.onDayClick(n,a)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,a,o){for(var i,s,l,c=new Date(n),u=0;u<7;u++){var d=new Date(n);d.setDate(d.getDate()+u);var f=!r.isDisabled(d);if(f){c=d;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(c,a,o),r.props.showWeekPicker&&r.handleDayClick(c,o),((i=r.props.shouldCloseOnSelect)!==null&&i!==void 0?i:t.defaultProps.shouldCloseOnSelect)&&((l=(s=r.props).setOpen)===null||l===void 0||l.call(s,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):SK(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),a=Ea(n,6),o=new Date(n);o<=a;){if(!r.isDisabled(o))return!1;o=Ea(o,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),a=[],o=r.formatWeekNumber(n);if(r.props.showWeekNumber){var i=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,o):void 0;a.push(U.createElement(WK,He({key:"W"},t.defaultProps,r.props,{weekNumber:o,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:i})))}return a.concat([0,1,2,3,4,5,6].map(function(s){var l=Ea(n,s);return U.createElement(BK,He({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:r.handleDayClick.bind(r,l),onMouseEnter:r.handleDayMouseEnter.bind(r,l)}))}))},r.startOfWeek=function(){return Bi(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ve(r.startOfWeek(),r.props.selected)&&Ve(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":Ve(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return U.createElement("div",{className:le(r,n),role:"row"},this.renderDays())},t}(m.Component),cu,UK=6,Yl={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Gy=(cu={},cu[Yl.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},cu[Yl.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},cu[Yl.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},cu),fp=1;function _P(e,t){return e?Yl.FOUR_COLUMNS:t?Yl.TWO_COLUMNS:Yl.THREE_COLUMNS}var YK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Za([],Array(12),!0).map(function(){return m.createRef()}),r.QUARTER_REFS=Za([],Array(4),!0).map(function(){return m.createRef()}),r.isDisabled=function(n){return Wn(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate,disabled:r.props.disabled})},r.isExcluded=function(n){return H1(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,a){var o,i;(i=(o=r.props).onDayClick)===null||i===void 0||i.call(o,n,a,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var a,o;(o=(a=r.props).onDayMouseEnter)===null||o===void 0||o.call(a,n)},r.handleMouseLeave=function(){var n,a;(a=(n=r.props).onMouseLeave)===null||a===void 0||a.call(n)},r.isRangeStartMonth=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate;return!i||!s?!1:Fr(gn(o,n),i)},r.isRangeStartQuarter=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate;return!i||!s?!1:mm(yl(o,n),i)},r.isRangeEndMonth=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate;return!i||!s?!1:Fr(gn(o,n),s)},r.isRangeEndQuarter=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate;return!i||!s?!1:mm(yl(o,n),s)},r.isInSelectingRangeMonth=function(n){var a,o=r.props,i=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,d=o.endDate,f=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return!(s||l||c)||!f?!1:s&&d?lp(f,d,n,i):l&&u||c&&u&&!d?lp(u,f,n,i):!1},r.isSelectingMonthRangeStart=function(n){var a;if(!r.isInSelectingRangeMonth(n))return!1;var o=r.props,i=o.day,s=o.startDate,l=o.selectsStart,c=gn(i,n),u=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return l?Fr(c,u):Fr(c,s)},r.isSelectingMonthRangeEnd=function(n){var a;if(!r.isInSelectingRangeMonth(n))return!1;var o=r.props,i=o.day,s=o.endDate,l=o.selectsEnd,c=o.selectsRange,u=gn(i,n),d=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return l||c?Fr(u,d):Fr(u,s)},r.isInSelectingRangeQuarter=function(n){var a,o=r.props,i=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,d=o.endDate,f=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return!(s||l||c)||!f?!1:s&&d?dp(f,d,n,i):l&&u||c&&u&&!d?dp(u,f,n,i):!1},r.isWeekInMonth=function(n){var a=r.props.day,o=Ea(n,6);return Fr(n,a)||Fr(o,a)},r.isCurrentMonth=function(n,a){return Ue(n)===Ue(tt())&&a===Qr(tt())},r.isCurrentQuarter=function(n,a){return Ue(n)===Ue(tt())&&a===_i(tt())},r.isSelectedMonth=function(n,a,o){return Qr(o)===a&&Ue(n)===Ue(o)},r.isSelectMonthInList=function(n,a,o){return o.some(function(i){return r.isSelectedMonth(n,a,i)})},r.isSelectedQuarter=function(n,a,o){return _i(o)===a&&Ue(n)===Ue(o)},r.isSelectQuarterInList=function(n,a,o){return o.some(function(i){return r.isSelectedQuarter(n,a,i)})},r.isMonthSelected=function(){var n=r.props,a=n.day,o=n.selected,i=n.selectedDates,s=n.selectsMultiple,l=Qr(a);return s?i==null?void 0:i.some(function(c){return r.isSelectedMonth(a,l,c)}):!!o&&r.isSelectedMonth(a,l,o)},r.isQuarterSelected=function(){var n=r.props,a=n.day,o=n.selected,i=n.selectedDates,s=n.selectsMultiple,l=_i(a);return s?i==null?void 0:i.some(function(c){return r.isSelectedQuarter(a,l,c)}):!!o&&r.isSelectedQuarter(a,l,o)},r.renderWeeks=function(){if(!xn(r.props.day))return[];for(var n=[],a=r.props.fixedHeight,o=0,i=!1,s=Bi(Ao(r.props.day),r.props.locale,r.props.calendarStartDay),l=function(g){return r.props.showWeekPicker?Bi(g,r.props.locale,r.props.calendarStartDay):r.props.preSelection},c=function(g){return r.props.showWeekPicker?Bi(g,r.props.locale,r.props.calendarStartDay):r.props.selected},u=r.props.selected?c(r.props.selected):void 0,d=r.props.preSelection?l(r.props.preSelection):void 0;n.push(U.createElement(HK,He({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:o,day:s,month:Qr(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:u,preSelection:d,showWeekNumber:r.props.showWeekNumbers}))),!i;){o++,s=am(s,1);var f=a&&o>=UK,p=!a&&!r.isWeekInMonth(s);if(f||p)if(r.props.peekNextMonth)i=!0;else break}return n},r.onMonthClick=function(n,a){var o=r.isMonthDisabledForLabelDate(a),i=o.isDisabled,s=o.labelDate;i||r.handleDayClick(Ao(s),n)},r.onMonthMouseEnter=function(n){var a=r.isMonthDisabledForLabelDate(n),o=a.isDisabled,i=a.labelDate;o||r.handleDayMouseEnter(Ao(i))},r.handleMonthNavigation=function(n,a){var o,i,s,l;(i=(o=r.props).setPreSelection)===null||i===void 0||i.call(o,a),(l=(s=r.MONTH_REFS[n])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},r.handleKeyboardNavigation=function(n,a,o){var i,s=r.props,l=s.selected,c=s.preSelection,u=s.setPreSelection,d=s.minDate,f=s.maxDate,p=s.showFourColumnMonthYearPicker,g=s.showTwoColumnMonthYearPicker;if(c){var y=_P(p,g),v=r.getVerticalOffset(y),x=(i=Gy[y])===null||i===void 0?void 0:i.grid,w=function(E,O,D){var N,_,C=O,M=D;switch(E){case pe.ArrowRight:C=_a(O,fp),M=D===11?0:D+fp;break;case pe.ArrowLeft:C=Ms(O,fp),M=D===0?11:D-fp;break;case pe.ArrowUp:C=Ms(O,v),M=!((N=x==null?void 0:x[0])===null||N===void 0)&&N.includes(D)?D+12-v:D-v;break;case pe.ArrowDown:C=_a(O,v),M=!((_=x==null?void 0:x[x.length-1])===null||_===void 0)&&_.includes(D)?D-12+v:D+v;break}return{newCalculatedDate:C,newCalculatedMonth:M}},b=function(E,O,D){for(var N=40,_=E,C=!1,M=0,T=w(_,O,D),j=T.newCalculatedDate,A=T.newCalculatedMonth;!C;){if(M>=N){j=O,A=D;break}if(d&&j<d){_=pe.ArrowRight;var L=w(_,j,A);j=L.newCalculatedDate,A=L.newCalculatedMonth}if(f&&j>f){_=pe.ArrowLeft;var L=w(_,j,A);j=L.newCalculatedDate,A=L.newCalculatedMonth}if(MK(j,r.props)){var L=w(_,j,A);j=L.newCalculatedDate,A=L.newCalculatedMonth}else C=!0;M++}return{newCalculatedDate:j,newCalculatedMonth:A}};if(a===pe.Enter){r.isMonthDisabled(o)||(r.onMonthClick(n,o),u==null||u(l));return}var S=b(a,c,o),k=S.newCalculatedDate,P=S.newCalculatedMonth;switch(a){case pe.ArrowRight:case pe.ArrowLeft:case pe.ArrowUp:case pe.ArrowDown:r.handleMonthNavigation(P,k);break}}},r.getVerticalOffset=function(n){var a,o;return(o=(a=Gy[n])===null||a===void 0?void 0:a.verticalNavigationOffset)!==null&&o!==void 0?o:0},r.onMonthKeyDown=function(n,a){var o=r.props,i=o.disabledKeyboardNavigation,s=o.handleOnMonthKeyDown,l=n.key;l!==pe.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,l,a),s&&s(n)},r.onQuarterClick=function(n,a){var o=yl(r.props.day,a);cp(o,r.props)||r.handleDayClick(mP(o),n)},r.onQuarterMouseEnter=function(n){var a=yl(r.props.day,n);cp(a,r.props)||r.handleDayMouseEnter(mP(a))},r.handleQuarterNavigation=function(n,a){var o,i,s,l;r.isDisabled(a)||r.isExcluded(a)||((i=(o=r.props).setPreSelection)===null||i===void 0||i.call(o,a),(l=(s=r.QUARTER_REFS[n-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},r.onQuarterKeyDown=function(n,a){var o,i,s=n.key;if(!r.props.disabledKeyboardNavigation)switch(s){case pe.Enter:r.onQuarterClick(n,a),(i=(o=r.props).setPreSelection)===null||i===void 0||i.call(o,r.props.selected);break;case pe.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(a===4?1:a+1,N1(r.props.preSelection,1));break;case pe.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(a===1?4:a-1,rj(r.props.preSelection));break}},r.isMonthDisabledForLabelDate=function(n){var a,o=r.props,i=o.day,s=o.disabled,l=o.minDate,c=o.maxDate,u=o.excludeDates,d=o.includeDates,f=gn(i,n);return s?{isDisabled:!0,labelDate:gn(i,n)}:{isDisabled:(a=(l||c||u||d)&&gj(f,r.props))!==null&&a!==void 0?a:!1,labelDate:f}},r.isMonthDisabled=function(n){var a=r.isMonthDisabledForLabelDate(n).isDisabled;return a},r.getMonthClassNames=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate,l=a.preSelection,c=a.monthClassName,u=c?c(gn(o,n)):void 0,d=r.getSelection();return le("react-datepicker__month-text","react-datepicker__month-".concat(n),u,{"react-datepicker__month-text--disabled":r.isMonthDisabled(n),"react-datepicker__month-text--selected":d?r.isSelectMonthInList(o,n,d):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&l&&r.isSelectedMonth(o,n,l)&&!r.isMonthSelected()&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&s?lp(i,s,n,o):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(o,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var a=Qr(r.props.preSelection),o=r.isMonthDisabledForLabelDate(a).isDisabled,i=n===a&&!(o||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var a=_i(r.props.preSelection),o=cp(r.props.day,r.props),i=n===a&&!(o||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getAriaLabel=function(n){var a=r.props,o=a.chooseDayAriaLabelPrefix,i=o===void 0?"Choose":o,s=a.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,c=a.day,u=a.locale,d=gn(c,n),f=r.isDisabled(d)||r.isExcluded(d)?l:i;return"".concat(f," ").concat(Pt(d,"MMMM yyyy",u))},r.getQuarterClassNames=function(n){var a=r.props,o=a.day,i=a.startDate,s=a.endDate,l=a.minDate,c=a.maxDate,u=a.excludeDates,d=a.includeDates,f=a.filterDate,p=a.preSelection,g=a.disabledKeyboardNavigation,y=a.disabled,v=(l||c||u||d||f||y)&&cp(yl(o,n),r.props),x=r.getSelection();return le("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":x?r.isSelectQuarterInList(o,n,x):void 0,"react-datepicker__quarter-text--keyboard-selected":!g&&p&&r.isSelectedQuarter(o,n,p)&&!r.isQuarterSelected()&&!v,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&s?dp(i,s,n,o):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.isCurrentQuarter(o,n)})},r.getMonthContent=function(n){var a=r.props,o=a.showFullMonthYearPicker,i=a.renderMonthContent,s=a.locale,l=a.day,c=mj(n,s),u=W1(n,s);return i?i(n,c,u,l):o?u:c},r.getQuarterContent=function(n){var a,o=r.props,i=o.renderQuarterContent,s=o.locale,l=NK(n,s);return(a=i==null?void 0:i(n,l))!==null&&a!==void 0?a:l},r.renderMonths=function(){var n,a=r.props,o=a.showTwoColumnMonthYearPicker,i=a.showFourColumnMonthYearPicker,s=a.day,l=a.selected,c=(n=Gy[_P(i,o)])===null||n===void 0?void 0:n.grid;return c==null?void 0:c.map(function(u,d){return U.createElement("div",{className:"react-datepicker__month-wrapper",key:d},u.map(function(f,p){return U.createElement("div",{ref:r.MONTH_REFS[f],key:p,onClick:function(g){r.onMonthClick(g,f)},onKeyDown:function(g){bj(g)&&(g.preventDefault(),g.key=pe.Enter),r.onMonthKeyDown(g,f)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(f)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(f)}:void 0,tabIndex:Number(r.getTabIndex(f)),className:r.getMonthClassNames(f),"aria-disabled":r.isMonthDisabled(f),role:"option","aria-label":r.getAriaLabel(f),"aria-current":r.isCurrentMonth(s,f)?"date":void 0,"aria-selected":l?r.isSelectedMonth(s,f,l):void 0},r.getMonthContent(f))}))})},r.renderQuarters=function(){var n=r.props,a=n.day,o=n.selected,i=[1,2,3,4];return U.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return U.createElement("div",{key:l,ref:r.QUARTER_REFS[l],role:"option",onClick:function(c){r.onQuarterClick(c,s)},onKeyDown:function(c){r.onQuarterKeyDown(c,s)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(s)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(s)}:void 0,className:r.getQuarterClassNames(s),"aria-selected":o?r.isSelectedQuarter(a,s,o):void 0,tabIndex:Number(r.getQuarterTabIndex(s)),"aria-current":r.isCurrentQuarter(a,s)?"date":void 0},r.getQuarterContent(s))}))},r.getClassNames=function(){var n=r.props,a=n.selectingDate,o=n.selectsStart,i=n.selectsEnd,s=n.showMonthYearPicker,l=n.showQuarterYearPicker,c=n.showWeekPicker;return le("react-datepicker__month",{"react-datepicker__month--selecting-range":a&&(o||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,a=r.selectedDates,o=r.selectsMultiple;if(o)return a;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,a=r.showQuarterYearPicker,o=r.day,i=r.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"",c=xn(o)?"".concat(l).concat(Pt(o,"MMMM, yyyy",this.props.locale)):"",u=n||a;return u?U.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"listbox"},n?this.renderMonths():this.renderQuarters()):U.createElement("div",{role:"table"},this.props.dayNamesHeader&&U.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),U.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"rowgroup"},this.renderWeeks()))},t}(m.Component),VK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.monthOptionButtonsRef={},r.isSelectedMonth=function(n){return r.props.month===n},r.handleOptionKeyDown=function(n,a){var o;switch(a.key){case"Enter":a.preventDefault(),r.onChange(n);break;case"Escape":a.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{a.preventDefault();var i=(n+(a.key==="ArrowUp"?-1:1)+r.props.monthNames.length)%r.props.monthNames.length;(o=r.monthOptionButtonsRef[i])===null||o===void 0||o.focus();break}}},r.renderOptions=function(){return r.monthOptionButtonsRef={},r.props.monthNames.map(function(n,a){return U.createElement("div",{ref:function(o){r.monthOptionButtonsRef[a]=o,r.isSelectedMonth(a)&&(o==null||o.focus())},role:"button",tabIndex:0,className:r.isSelectedMonth(a)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,a),onKeyDown:r.handleOptionKeyDown.bind(r,a),"aria-selected":r.isSelectedMonth(a)?"true":void 0},r.isSelectedMonth(a)?U.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return U.createElement(gv,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t}(m.Component),KK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(a,o){return U.createElement("option",{key:a,value:o},a)})},r.renderSelectMode=function(n){return U.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(a){return r.onChange(parseInt(a.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,a){return U.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},U.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),U.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},a[r.props.month]))},r.renderDropdown=function(n){return U.createElement(VK,He({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var a=r.state.dropdownVisible,o=[r.renderReadView(!a,n)];return a&&o.unshift(r.renderDropdown(n)),o},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(o){return mj(o,r.props.locale)}:function(o){return W1(o,r.props.locale)}),a;switch(this.props.dropdownMode){case"scroll":a=this.renderScrollMode(n);break;case"select":a=this.renderSelectMode(n);break}return U.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},a)},t}(m.Component);function qK(e,t){for(var r=[],n=Ao(e),a=Ao(t);!Vi(n,a);)r.push(tt(n)),n=_a(n,1);return r}var GK=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(a){var o=qx(a),i=Wa(n.props.date,a)&&Fr(n.props.date,a);return U.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:n.onChange.bind(n,o),"aria-selected":i?"true":void 0},i?U.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Pt(a,n.props.dateFormat,n.props.locale))})},n.onChange=function(a){return n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:qK(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=le({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return U.createElement(gv,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(m.Component),XK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Ao(r.props.minDate),a=Ao(r.props.maxDate),o=[];!Vi(n,a);){var i=qx(n);o.push(U.createElement("option",{key:i,value:i},Pt(n,r.props.dateFormat,r.props.locale))),n=_a(n,1)}return o},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return U.createElement("select",{value:qx(Ao(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var a=Pt(r.props.date,r.props.dateFormat,r.props.locale);return U.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},U.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),U.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},a))},r.renderDropdown=function(){return U.createElement(GK,He({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,a=[r.renderReadView(!n)];return n&&a.unshift(r.renderDropdown()),a},r.onChange=function(n){r.toggleDropdown();var a=tt(n);Wa(r.props.date,a)&&Fr(r.props.date,a)||r.props.onChange(a)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return U.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t}(m.Component),QK=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,a,o;r.list&&(r.list.scrollTop=(o=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((a=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&a!==void 0?a:0):r.list.clientHeight,r.centerLi))!==null&&o!==void 0?o:0)})},r.handleClick=function(n){var a,o;(r.props.minTime||r.props.maxTime)&&bP(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xP(n,r.props)||(o=(a=r.props).onChange)===null||o===void 0||o.call(a,n)},r.isSelectedTime=function(n){return r.props.selected&&xj(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&bP(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xP(n,r.props)},r.liClasses=function(n){var a,o=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&o.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&o.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(Sa(n)*3600+ka(n)*60+zi(n))%(((a=r.props.intervals)!==null&&a!==void 0?a:t.defaultProps.intervals)*60)!==0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")},r.handleOnKeyDown=function(n,a){var o,i;n.key===pe.Space&&(n.preventDefault(),n.key=pe.Enter),(n.key===pe.ArrowUp||n.key===pe.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===pe.ArrowDown||n.key===pe.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===pe.Enter&&r.handleClick(a),(i=(o=r.props).handleOnKeyDown)===null||i===void 0||i.call(o,n)},r.renderTimes=function(){for(var n,a=[],o=typeof r.props.format=="string"?r.props.format:"p",i=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,s=r.props.selected||r.props.openToDate||tt(),l=Mu(s),c=r.props.injectTimes&&r.props.injectTimes.sort(function(v,x){return v.getTime()-x.getTime()}),u=60*FK(s),d=u/i,f=0;f<d;f++){var p=Od(l,f*i);if(a.push(p),c){var g=LK(l,p,f,i,c);a=a.concat(g)}}var y=a.reduce(function(v,x){return x.getTime()<=s.getTime()?x:v},a[0]);return a.map(function(v){return U.createElement("li",{key:v.valueOf(),onClick:r.handleClick.bind(r,v),className:r.liClasses(v),ref:function(x){v===y&&(r.centerLi=x)},onKeyDown:function(x){r.handleOnKeyDown(x,v)},tabIndex:v===y?0:-1,role:"option","aria-selected":r.isSelectedTime(v)?"true":void 0,"aria-disabled":r.isDisabledTime(v)?"true":void 0},Pt(v,o,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?U.createElement(U.Fragment,null):U.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},U.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var r;(r=this.resizeObserver)===null||r===void 0||r.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var r=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){r.updateContainerHeight()}),this.resizeObserver.observe(n))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,a=this.state.height;return U.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),U.createElement("div",{className:"react-datepicker__time"},U.createElement("div",{className:"react-datepicker__time-box"},U.createElement("ul",{className:"react-datepicker__time-list",ref:function(o){r.list=o},style:a?{height:a}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t}(m.Component),NP=3,ZK=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Za([],Array(n.props.yearItemNumber),!0).map(function(){return m.createRef()}),n.isDisabled=function(a){return Wn(a,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(a){return H1(a,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var a;return(a=n.props.selectingDate)!==null&&a!==void 0?a:n.props.preSelection},n.updateFocusOnPaginate=function(a){var o=function(){var i,s;(s=(i=n.YEAR_REFS[a])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(o)},n.handleYearClick=function(a,o){n.props.onDayClick&&n.props.onDayClick(a,o)},n.handleYearNavigation=function(a,o){var i,s,l,c,u=n.props,d=u.date,f=u.yearItemNumber;if(!(d===void 0||f===void 0)){var p=Oo(d,f).startPeriod;n.isDisabled(o)||n.isExcluded(o)||((s=(i=n.props).setPreSelection)===null||s===void 0||s.call(i,o),a-p<0?n.updateFocusOnPaginate(f-(p-a)):a-p>=f?n.updateFocusOnPaginate(Math.abs(f-(a-p))):(c=(l=n.YEAR_REFS[a-p])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},n.isSameDay=function(a,o){return Ve(a,o)},n.isCurrentYear=function(a){return a===Ue(tt())},n.isRangeStart=function(a){return n.props.startDate&&n.props.endDate&&Wa(Fa(tt(),a),n.props.startDate)},n.isRangeEnd=function(a){return n.props.startDate&&n.props.endDate&&Wa(Fa(tt(),a),n.props.endDate)},n.isInRange=function(a){return up(a,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(a){var o=n.props,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,c=o.startDate,u=o.endDate;return!(i||s||l)||!n.selectingDate()?!1:i&&u?up(a,n.selectingDate(),u):s&&c||l&&c&&!u?up(a,c,n.selectingDate()):!1},n.isSelectingRangeStart=function(a){var o;if(!n.isInSelectingRange(a))return!1;var i=n.props,s=i.startDate,l=i.selectsStart,c=Fa(tt(),a);return l?Wa(c,(o=n.selectingDate())!==null&&o!==void 0?o:null):Wa(c,s??null)},n.isSelectingRangeEnd=function(a){var o;if(!n.isInSelectingRange(a))return!1;var i=n.props,s=i.endDate,l=i.selectsEnd,c=i.selectsRange,u=Fa(tt(),a);return l||c?Wa(u,(o=n.selectingDate())!==null&&o!==void 0?o:null):Wa(u,s??null)},n.isKeyboardSelected=function(a){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var o=n.props,i=o.minDate,s=o.maxDate,l=o.excludeDates,c=o.includeDates,u=o.filterDate,d=o.selected,f=Tu(Fa(n.props.date,a)),p=(i||s||l||c||u)&&oh(a,n.props),g=!!d&&Ve(f,Tu(d)),y=Ve(f,Tu(n.props.preSelection));return!n.props.inline&&!g&&y&&!p}},n.isSelectedYear=function(a){var o=n.props,i=o.selectsMultiple,s=o.selected,l=o.selectedDates;return i?l==null?void 0:l.some(function(c){return a===Ue(c)}):!!s&&a===Ue(s)},n.onYearClick=function(a,o){var i=n.props.date;i!==void 0&&n.handleYearClick(Tu(Fa(i,o)),a)},n.onYearKeyDown=function(a,o){var i,s,l=a.key,c=n.props,u=c.date,d=c.yearItemNumber,f=c.handleOnKeyDown;if(l!==pe.Tab&&a.preventDefault(),!n.props.disabledKeyboardNavigation)switch(l){case pe.Enter:if(n.props.selected==null)break;n.onYearClick(a,o),(s=(i=n.props).setPreSelection)===null||s===void 0||s.call(i,n.props.selected);break;case pe.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(o+1,To(n.props.preSelection,1));break;case pe.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(o-1,pc(n.props.preSelection,1));break;case pe.ArrowUp:{if(u===void 0||d===void 0||n.props.preSelection==null)break;var p=Oo(u,d).startPeriod,g=NP,y=o-g;if(y<p){var v=d%g;o>=p&&o<p+v?g=v:g+=v,y=o-g}n.handleYearNavigation(y,pc(n.props.preSelection,g));break}case pe.ArrowDown:{if(u===void 0||d===void 0||n.props.preSelection==null)break;var x=Oo(u,d).endPeriod,g=NP,y=o+g;if(y>x){var v=d%g;o<=x&&o>x-v?g=v:g+=v,y=o+g}n.handleYearNavigation(y,To(n.props.preSelection,g));break}}f&&f(a)},n.getYearClassNames=function(a){var o=n.props,i=o.date,s=o.disabled,l=o.minDate,c=o.maxDate,u=o.excludeDates,d=o.includeDates,f=o.filterDate,p=o.yearClassName;return le("react-datepicker__year-text","react-datepicker__year-".concat(a),i?p==null?void 0:p(Fa(i,a)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(a),"react-datepicker__year-text--disabled":(l||c||u||d||f||s)&&oh(a,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(a),"react-datepicker__year-text--range-start":n.isRangeStart(a),"react-datepicker__year-text--range-end":n.isRangeEnd(a),"react-datepicker__year-text--in-range":n.isInRange(a),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(a),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(a),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(a),"react-datepicker__year-text--today":n.isCurrentYear(a)})},n.getYearTabIndex=function(a){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var o=Ue(n.props.preSelection),i=oh(a,n.props);return a===o&&!i?"0":"-1"},n.getYearContent=function(a){return n.props.renderYearContent?n.props.renderYearContent(a):a},n}return t.prototype.render=function(){var r=this,n=[],a=this.props,o=a.date,i=a.yearItemNumber,s=a.onYearMouseEnter,l=a.onYearMouseLeave;if(o===void 0)return null;for(var c=Oo(o,i),u=c.startPeriod,d=c.endPeriod,f=function(y){n.push(U.createElement("div",{ref:p.YEAR_REFS[y-u],onClick:function(v){r.onYearClick(v,y)},onKeyDown:function(v){bj(v)&&(v.preventDefault(),v.key=pe.Enter),r.onYearKeyDown(v,y)},tabIndex:Number(p.getYearTabIndex(y)),className:p.getYearClassNames(y),onMouseEnter:p.props.usePointerEvent?void 0:function(v){return s(v,y)},onPointerEnter:p.props.usePointerEvent?function(v){return s(v,y)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(v){return l(v,y)},onPointerLeave:p.props.usePointerEvent?function(v){return l(v,y)}:void 0,key:y,"aria-current":p.isCurrentYear(y)?"date":void 0},p.getYearContent(y)))},p=this,g=u;g<=d;g++)f(g);return U.createElement("div",{className:"react-datepicker__year"},U.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},t}(m.Component);function JK(e,t,r,n){for(var a=[],o=0;o<2*t+1;o++){var i=e+t-o,s=!0;r&&(s=Ue(r)<=i),n&&s&&(s=Ue(n)>=i),s&&a.push(i)}return a}var eq=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(s,l){var c;switch(l.key){case"Enter":l.preventDefault(),n.onChange(s);break;case"Escape":l.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var u=s+(l.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[u]&&((c=n.yearOptionButtonsRef[u])===null||c===void 0||c.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var s=n.props.year,l=n.state.yearsList.map(function(d){return U.createElement("div",{ref:function(f){n.yearOptionButtonsRef[d]=f,d===s&&(f==null||f.focus())},role:"button",tabIndex:0,className:s===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:n.onChange.bind(n,d),onKeyDown:n.handleOptionKeyDown.bind(n,d),"aria-selected":s===d?"true":void 0},s===d?U.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=n.props.minDate?Ue(n.props.minDate):null,u=n.props.maxDate?Ue(n.props.maxDate):null;return(!u||!n.state.yearsList.find(function(d){return d===u}))&&l.unshift(U.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!n.state.yearsList.find(function(d){return d===c}))&&l.push(U.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},n.onChange=function(s){n.props.onChange(s)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(s){var l=n.state.yearsList.map(function(c){return c+s});n.setState({yearsList:l})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var a=r.yearDropdownItemNumber,o=r.scrollableYearDropdown,i=a||(o?10:5);return n.state={yearsList:JK(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=m.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,a=n?n.find(function(o){return o.ariaSelected}):null;r.scrollTop=a&&a instanceof HTMLElement?a.offsetTop+(a.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=le({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return U.createElement(gv,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(m.Component),tq=function(e){Pr(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?Ue(r.props.minDate):1900,a=r.props.maxDate?Ue(r.props.maxDate):2100,o=[],i=n;i<=a;i++)o.push(U.createElement("option",{key:i,value:i},i));return o},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return U.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return U.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},U.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),U.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return U.createElement(eq,He({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,a=[r.renderReadView(!n)];return n&&a.unshift(r.renderDropdown()),a},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,a){var o;(o=r.onSelect)===null||o===void 0||o.call(r,n,a),r.setOpen()},r.onSelect=function(n,a){var o,i;(i=(o=r.props).onSelect)===null||i===void 0||i.call(o,n,a)},r.setOpen=function(){var n,a;(a=(n=r.props).setOpen)===null||a===void 0||a.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return U.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t}(m.Component),rq=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],wj="react-datepicker-ignore-onclickoutside",nq=function(e){var t=(e.className||"").split(/\s+/);return rq.some(function(r){return t.indexOf(r)>=0})},aq=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(a){n.props.onClickOutside(a)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(a){var o,i;nq(a.target)&&((i=(o=n.props).onDropdownFocus)===null||i===void 0||i.call(o,a))},n.getDateInView=function(){var a=n.props,o=a.preSelection,i=a.selected,s=a.openToDate,l=vj(n.props),c=yj(n.props),u=tt(),d=s||i||o;return d||(l&&Qa(u,l)?l:c&&Vi(u,c)?c:u)},n.increaseMonth=function(){n.setState(function(a){var o=a.date;return{date:_a(o,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(a){var o=a.date;return{date:Ms(o,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(a,o,i){n.props.onSelect(a,o,i),n.props.setPreSelection&&n.props.setPreSelection(a)},n.handleDayMouseEnter=function(a){n.setState({selectingDate:a}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(a)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(a,o){n.setState({selectingDate:Fa(tt(),o)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(a,o)},n.handleYearMouseLeave=function(a,o){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(a,o)},n.handleYearChange=function(a){var o,i,s,l;(i=(o=n.props).onYearChange)===null||i===void 0||i.call(o,a),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(a),(l=(s=n.props).setOpen)===null||l===void 0||l.call(s,!0)),n.props.setPreSelection&&n.props.setPreSelection(a)},n.getEnabledPreSelectionDateForMonth=function(a){if(!Wn(a,n.props))return a;for(var o=Ao(a),i=PK(a),s=$9(i,o),l=null,c=0;c<=s;c++){var u=Ea(o,c);if(!Wn(u,n.props)){l=u;break}}return l},n.handleMonthChange=function(a){var o,i,s,l=(o=n.getEnabledPreSelectionDateForMonth(a))!==null&&o!==void 0?o:a;n.handleCustomMonthChange(l),n.props.adjustDateOnChange&&(n.props.onSelect(l),(s=(i=n.props).setOpen)===null||s===void 0||s.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(l)},n.handleCustomMonthChange=function(a){var o,i;(i=(o=n.props).onMonthChange)===null||i===void 0||i.call(o,a),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(a){n.handleYearChange(a),n.handleMonthChange(a)},n.changeYear=function(a){n.setState(function(o){var i=o.date;return{date:Fa(i,Number(a))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(a){n.setState(function(o){var i=o.date;return{date:gn(i,Number(a))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(a){n.setState(function(o){var i=o.date;return{date:Fa(gn(i,Qr(a)),Ue(a))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(a){if(a===void 0&&(a=n.state.date),!xn(a))return[];var o=n.props.disabled,i=Bi(a,n.props.locale,n.props.calendarStartDay),s=[];return n.props.showWeekNumbers&&s.push(U.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(o?"react-datepicker__day-name--disabled":""),role:"columnheader"},U.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),U.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),s.concat([0,1,2,3,4,5,6].map(function(l){var c=Ea(i,l),u=n.formatWeekday(c,n.props.locale),d=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return U.createElement("div",{key:l,role:"columnheader",className:le("react-datepicker__day-name",d,o?"react-datepicker__day-name--disabled":"")},U.createElement("span",{className:"react-datepicker__sr-only"},Pt(c,"EEEE",n.props.locale)),U.createElement("span",{"aria-hidden":"true"},u))}))},n.formatWeekday=function(a,o){return n.props.formatWeekDay?OK(a,n.props.formatWeekDay,o):n.props.useWeekdaysShort?_K(a,o):DK(a,o)},n.decreaseYear=function(){n.setState(function(a){var o,i=a.date;return{date:pc(i,n.props.showYearPicker?(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var a,o,i;if(!n.props.renderCustomHeader){var s=(a=n.props.monthsShown)!==null&&a!==void 0?a:t.defaultProps.monthsShown,l=n.props.showPreviousMonths?s-1:0,c=(o=n.props.monthSelectedIn)!==null&&o!==void 0?o:l,u=Ms(n.state.date,c),d;switch(!0){case n.props.disabled:d=!0;break;case n.props.showMonthYearPicker:d=kP(n.state.date,n.props);break;case n.props.showYearPicker:d=AK(n.state.date,n.props);break;case n.props.showQuarterYearPicker:d=TK(n.state.date,n.props);break;default:d=wP(u,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&d||n.props.showTimeSelectOnly)){var f=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),d&&n.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),g=void 0);var y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,v=n.props,x=v.previousMonthButtonLabel,w=x===void 0?t.defaultProps.previousMonthButtonLabel:x,b=v.previousYearButtonLabel,S=b===void 0?t.defaultProps.previousYearButtonLabel:b,k=n.props,P=k.previousMonthAriaLabel,E=P===void 0?typeof w=="string"?w:"Previous Month":P,O=k.previousYearAriaLabel,D=O===void 0?typeof S=="string"?S:"Previous Year":O;return U.createElement("button",{type:"button",className:p.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":y?D:E},U.createElement("span",{className:f.join(" ")},y?S:w))}}},n.increaseYear=function(){n.setState(function(a){var o,i=a.date;return{date:To(i,n.props.showYearPicker?(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var a;if(!n.props.renderCustomHeader){var o;switch(!0){case n.props.disabled:o=!0;break;case n.props.showMonthYearPicker:o=CP(n.state.date,n.props);break;case n.props.showYearPicker:o=RK(n.state.date,n.props);break;case n.props.showQuarterYearPicker:o=jK(n.state.date,n.props);break;default:o=SP(n.state.date,n.props);break}if(!(!((a=n.props.forceShowMonthNavigation)!==null&&a!==void 0?a:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&o||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(l=n.increaseYear),o&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,u=n.props,d=u.nextMonthButtonLabel,f=d===void 0?t.defaultProps.nextMonthButtonLabel:d,p=u.nextYearButtonLabel,g=p===void 0?t.defaultProps.nextYearButtonLabel:p,y=n.props,v=y.nextMonthAriaLabel,x=v===void 0?typeof f=="string"?f:"Next Month":v,w=y.nextYearAriaLabel,b=w===void 0?typeof g=="string"?g:"Next Year":w;return U.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:n.props.handleOnKeyDown,"aria-label":c?b:x},U.createElement("span",{className:s.join(" ")},c?g:f))}}},n.renderCurrentMonth=function(a){a===void 0&&(a=n.state.date);var o=["react-datepicker__current-month"];return n.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),U.createElement("h2",{className:o.join(" ")},xn(a)?Pt(a,n.props.dateFormat,n.props.locale):"")},n.renderYearDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showYearDropdown||a))return U.createElement(tq,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:Ue(n.state.date)}))},n.renderMonthDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showMonthDropdown||a))return U.createElement(KK,He({},t.defaultProps,n.props,{month:Qr(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showMonthYearDropdown||a))return U.createElement(XK,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(a){n.props.onSelect(gP(),a),n.props.setPreSelection&&n.props.setPreSelection(gP())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return U.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(a){return U.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(a))},n.renderDefaultHeader=function(a){var o=a.monthDate,i=a.i;return U.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(o),U.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(a){var o,i,s=a.monthDate,l=a.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var c=n.props,u=c.showYearPicker,d=c.yearItemNumber,f;if(u){var p=Oo(s,d),g=p.startPeriod,y=p.endPeriod;f={startYear:g,endYear:y}}var v=wP(n.state.date,n.props),x=SP(n.state.date,n.props),w=kP(n.state.date,n.props),b=CP(n.state.date,n.props);return U.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(o=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(o,He(He(He({},n.state),u&&{visibleYearsRange:f}),{customHeaderCount:l,monthDate:s,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:v,nextMonthButtonDisabled:x,prevYearButtonDisabled:w,nextYearButtonDisabled:b})))},n.renderYearHeader=function(a){var o=a.monthDate,i=n.props,s=i.showYearPicker,l=i.yearItemNumber,c=l===void 0?t.defaultProps.yearItemNumber:l,u=Oo(o,c),d=u.startPeriod,f=u.endPeriod;return U.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(d," - ").concat(f):Ue(o))},n.renderHeader=function(a){var o=a.monthDate,i=a.i,s=i===void 0?0:i,l={monthDate:o,i:s};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(l);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(l);default:return n.renderDefaultHeader(l)}},n.renderMonths=function(){var a,o;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],s=(a=n.props.monthsShown)!==null&&a!==void 0?a:t.defaultProps.monthsShown,l=n.props.showPreviousMonths?s-1:0,c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?To(n.state.date,l):Ms(n.state.date,l),u=(o=n.props.monthSelectedIn)!==null&&o!==void 0?o:l,d=0;d<s;++d){var f=d-u+l,p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?To(c,f):_a(c,f),g="month-".concat(d),y=d<s-1,v=d>0;i.push(U.createElement("div",{key:g,ref:function(x){n.monthContainer=x??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:p,i:d}),U.createElement(YK,He({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:p,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:d,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:y,monthShowsDuplicateDaysStart:v,dayNamesHeader:n.renderDayNamesHeader(p)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return U.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),U.createElement(ZK,He({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return U.createElement(QK,He({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var a=n.props.selected?new Date(n.props.selected):void 0,o=a&&xn(a)&&!!n.props.selected,i=o?"".concat(EP(a.getHours()),":").concat(EP(a.getMinutes())):"";if(n.props.showTimeInput)return U.createElement(zK,He({},t.defaultProps,n.props,{date:a,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var a;if(!xn(n.state.date))return U.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var o=Oo(n.state.date,(a=n.props.yearItemNumber)!==null&&a!==void 0?a:t.defaultProps.yearItemNumber),i=o.startPeriod,s=o.endPeriod,l;return n.props.showYearPicker?l="".concat(i," - ").concat(s):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?l=Ue(n.state.date):l="".concat(W1(Qr(n.state.date),n.props.locale)," ").concat(Ue(n.state.date)),U.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&l)},n.renderChildren=function(){if(n.props.children)return U.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=m.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:wj,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:uf}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){r.setState({monthContainer:r.monthContainer})}())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&xn(this.props.preSelection)&&(!Ve(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var a=!Fr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return a&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!Ve(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||yK;return U.createElement(gv,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},U.createElement("div",{style:{display:"contents"},ref:this.containerRef},U.createElement(r,{className:le("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t}(m.Component),oq=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,a=e.onClick,o="react-datepicker__calendar-icon";if(typeof t=="string")return U.createElement("i",{className:"".concat(o," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:a});if(U.isValidElement(t)){var i=t;return U.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(o," ").concat(n),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof a=="function"&&a(s)}})}return U.createElement("svg",{className:"".concat(o," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:a},U.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Sj=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return Pu.createPortal(this.props.children,this.el)},t}(m.Component),iq="[tabindex], a, button, input, select, textarea",sq=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},kj=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var a;return Array.prototype.slice.call((a=n.tabLoopRef.current)===null||a===void 0?void 0:a.querySelectorAll(iq),1,-1).filter(sq)},n.handleFocusStart=function(){var a=n.getTabChildren();a&&a.length>1&&a[a.length-1].focus()},n.handleFocusEnd=function(){var a=n.getTabChildren();a&&a.length>1&&a[0].focus()},n.tabLoopRef=m.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?U.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},U.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,U.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t}(m.Component);function lq(e){function t(r){var n,a=typeof r.hidePopper=="boolean"?r.hidePopper:!0,o=m.useRef(null),i=vK(He({open:!a,whileElementsMounted:GV,placement:r.popperPlacement,middleware:Za([aK({padding:15}),nK(10),oK({element:o})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),s=He(He({},r),{hidePopper:a,popperProps:He(He({},i),{arrowRef:o})});return U.createElement(e,He({},s))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var cq=function(e){var t=e.className,r=e.wrapperClassName,n=e.hidePopper,a=n===void 0?!0:n,o=e.popperComponent,i=e.targetComponent,s=e.enableTabLoop,l=e.popperOnKeyDown,c=e.portalId,u=e.portalHost,d=e.popperProps,f=e.showArrow,p=void 0;if(!a){var g=le("react-datepicker-popper",t);p=U.createElement(kj,{enableTabLoop:s},U.createElement("div",{ref:d.refs.setFloating,style:d.floatingStyles,className:g,"data-placement":d.placement,onKeyDown:l},o,f&&U.createElement(uK,{ref:d.arrowRef,context:d.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(p=m.createElement(e.popperContainer,{},p)),c&&!a&&(p=U.createElement(Sj,{portalId:c,portalHost:u},p));var y=le("react-datepicker-wrapper",r);return U.createElement(U.Fragment,null,U.createElement("div",{ref:d.refs.setReference,className:y},i),p)},uq=lq(cq);function dq(e,t){return e&&t?Qr(e)!==Qr(t)||Ue(e)!==Ue(t):e!==t}var Xy="Date input not valid.",fq=function(e){Pr(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:tt()},n.modifyHolidays=function(){var a;return(a=n.props.holidays)===null||a===void 0?void 0:a.reduce(function(o,i){var s=new Date(i.date);return xn(s)?Za(Za([],o,!0),[He(He({},i),{date:s})],!1):o},[])},n.calcInitialState=function(){var a,o=n.getPreSelection(),i=vj(n.props),s=yj(n.props),l=i&&Qa(o,Mu(i))?i:s&&Vi(o,vP(s))?s:o;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(a=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&a!==void 0?a:l,highlightDates:PP(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var a,o=n.props,i=o.locale,s=o.startDate,l=o.endDate,c=o.rangeSeparator,u=o.selected,d=o.selectedDates,f=o.selectsMultiple,p=o.selectsRange,g=o.value,y=(a=n.props.dateFormat)!==null&&a!==void 0?a:t.defaultProps.dateFormat,v=n.state.inputValue;return typeof g=="string"?g:typeof v=="string"?v:p?bK(s,l,{dateFormat:y,locale:i,rangeSeparator:c}):f?wK(d??[],{dateFormat:y,locale:i}):hn(u,{dateFormat:y,locale:i})},n.resetHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var a,o;(o=(a=n.input)===null||a===void 0?void 0:a.focus)===null||o===void 0||o.call(a,{preventScroll:!0})},n.setBlur=function(){var a,o;(o=(a=n.input)===null||a===void 0?void 0:a.blur)===null||o===void 0||o.call(a),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(a,o){o===void 0&&(o=!1),n.setState({open:a,preSelection:a&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:Qy},function(){a||n.setState(function(i){return{focused:o?i.focused:!1}},function(){!o&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return jo(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(a){var o,i,s=n.state.wasHidden,l=s?n.state.open:!0;s&&n.resetHiddenStatus(),n.state.preventFocus||((i=(o=n.props).onFocus)===null||i===void 0||i.call(o,a),l&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(He(He({},n.state),{inputValue:null}))},n.handleBlur=function(a){var o,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(o=n.props).onBlur)===null||i===void 0||i.call(o,a)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(a){var o,i;n.props.inline||n.setOpen(!1),(i=(o=n.props).onClickOutside)===null||i===void 0||i.call(o,a),n.props.withPortal&&a.preventDefault()},n.handleChange=function(){for(var a,o,i,s,l,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d=c[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,c),!d||typeof d.isDefaultPrevented!="function"||d.isDefaultPrevented()))){n.setState({inputValue:(d==null?void 0:d.target)instanceof HTMLInputElement?d.target.value:null,lastPreSelectChange:pq});var f=n.props,p=f.selectsRange,g=f.startDate,y=f.endDate,v=(a=n.props.dateFormat)!==null&&a!==void 0?a:t.defaultProps.dateFormat,x=(o=n.props.strictParsing)!==null&&o!==void 0?o:t.defaultProps.strictParsing,w=(d==null?void 0:d.target)instanceof HTMLInputElement?d.target.value:"";if(p){var b=n.props.rangeSeparator,S=b.trim(),k=w.split(v.includes(S)?b:S,2).map(function(M){return M.trim()}),P=k[0],E=k[1],O=fl(P??"",v,n.props.locale,x),D=O?fl(E??"",v,n.props.locale,x):null,N=(g==null?void 0:g.getTime())!==(O==null?void 0:O.getTime()),_=(y==null?void 0:y.getTime())!==(D==null?void 0:D.getTime());if(!N&&!_||O&&Wn(O,n.props)||D&&Wn(D,n.props))return;(s=(i=n.props).onChange)===null||s===void 0||s.call(i,[O,D],d)}else{var C=fl(w,v,n.props.locale,x,(l=n.props.selected)!==null&&l!==void 0?l:void 0);(C||!w)&&n.setSelected(C,d,!0)}}},n.handleSelect=function(a,o,i){var s;if(!n.props.readOnly){var l=n.props,c=l.selectsRange,u=l.startDate,d=l.endDate,f=l.locale,p=l.swapRange,g=(s=n.props.dateFormat)!==null&&s!==void 0?s:t.defaultProps.dateFormat,y=!c||u&&!d&&(p||!qy(a,u));if(n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&y&&n.sendFocusBackToInput(),n.props.onChangeRaw){var v=hn(a,{dateFormat:g,locale:f});n.props.onChangeRaw(o,{date:a,formattedDate:v})}n.setSelected(a,o,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(a):y&&n.setOpen(!1)}},n.setSelected=function(a,o,i,s){var l,c,u=a;if(n.props.showYearPicker){if(u!==null&&oh(Ue(u),n.props))return}else if(n.props.showMonthYearPicker){if(u!==null&&gj(u,n.props))return}else if(u!==null&&Wn(u,n.props))return;var d=n.props,f=d.onChange,p=d.selectsRange,g=d.startDate,y=d.endDate,v=d.selectsMultiple,x=d.selectedDates,w=d.minTime,b=d.swapRange;if(!Cs(n.props.selected,u)||n.props.allowSameDay||p||v)if(u!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(u=sp(u,{hour:Sa(n.props.selected),minute:ka(n.props.selected),second:zi(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&w&&(u=sp(u,{hour:w.getHours(),minute:w.getMinutes(),second:w.getSeconds()})),n.props.inline||n.setState({preSelection:u}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:s})),p){var S=!g&&!y,k=g&&!y,P=!g&&!!y,E=g&&y;S?f==null||f([u,null],o):k?u===null?f==null||f([null,null],o):qy(u,g)?b?f==null||f([u,g],o):f==null||f([u,null],o):f==null||f([g,u],o):P&&(u&&qy(u,y)?f==null||f([u,y],o):f==null||f([u,null],o)),E&&(f==null||f([u,null],o))}else if(v){if(u!==null)if(!(x!=null&&x.length))f==null||f([u],o);else{var O=x.some(function(N){return Ve(N,u)});if(O){var D=x.filter(function(N){return!Ve(N,u)});f==null||f(D,o)}else f==null||f(Za(Za([],x,!0),[u],!1),o)}}else f==null||f(u,o);i||((c=(l=n.props).onSelect)===null||c===void 0||c.call(l,u,o),n.setState({inputValue:null}))},n.setPreSelection=function(a){if(!n.props.readOnly){var o=jo(n.props.minDate),i=jo(n.props.maxDate),s=!0;if(a){var l=Mu(a);if(o&&i)s=ps(a,n.props.minDate,n.props.maxDate);else if(o){var c=Mu(n.props.minDate);s=Vi(a,c)||Cs(l,c)}else if(i){var u=vP(n.props.maxDate);s=Qa(a,u)||Cs(l,u)}}s&&n.setState({preSelection:a})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(a){var o,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var s=n.props.selected?n.props.selected:n.getPreSelection(),l=n.props.selected?a:sp(s,{hour:Sa(a),minute:ka(a)});n.setState({preSelection:l}),(i=(o=n.props).onChange)===null||i===void 0||i.call(o,l),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var a,o;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(o=(a=n.props).onInputClick)===null||o===void 0||o.call(a)},n.handleTimeOnlyArrowKey=function(a){var o,i,s,l,c=n.props.selected||n.state.preSelection||tt(),u=(o=n.props.timeIntervals)!==null&&o!==void 0?o:30,d=(i=n.props.dateFormat)!==null&&i!==void 0?i:t.defaultProps.dateFormat,f=Array.isArray(d)?d[0]:d,p=Mu(c),g=Sa(c)*60+ka(c),y=23*60+60-u,v;if(a===pe.ArrowUp){var x=Math.max(0,g-u);v=Od(p,x)}else{var x=Math.min(y,g+u);v=Od(p,x)}var w=Pt(v,f||t.defaultProps.dateFormat,n.props.locale);if(n.setState({preSelection:v,inputValue:w}),!(n.props.selectsRange||n.props.selectsMultiple)){var b=n.props.selected?n.props.selected:n.getPreSelection(),S=n.props.selected?v:sp(b,{hour:Sa(v),minute:ka(v)});(l=(s=n.props).onChange)===null||l===void 0||l.call(s,S),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){n.scrollToTimeOption(v)})}},n.handleTimeOnlyEnterKey=function(a){var o,i,s,l,c=a.target,u=c.value,d=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,f=n.props.timeFormat||"p",p=n.state.preSelection||n.props.selected||tt(),g=fl(u,d,n.props.locale,(i=n.props.strictParsing)!==null&&i!==void 0?i:!1,p),y=p;if(g&&xn(g))y=g;else{var v=((s=n.calendar)===null||s===void 0?void 0:s.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(v instanceof HTMLElement){var x=(l=v.textContent)===null||l===void 0?void 0:l.trim();if(x){var w=fl(x,f,n.props.locale,!1,p);w&&xn(w)&&(y=w)}}}n.handleTimeChange(y),n.setOpen(!1),n.sendFocusBackToInput()},n.scrollToTimeOption=function(a){var o,i;if(!((o=n.calendar)===null||o===void 0)&&o.containerRef.current){for(var s=n.calendar.containerRef.current,l=Array.from(s.querySelectorAll(".react-datepicker__time-list-item")),c=null,u=1/0,d=n.props.timeFormat||"p",f=0,p=l;f<p.length;f++){var g=p[f],y=(i=g.textContent)===null||i===void 0?void 0:i.trim();if(y){var v=fl(y,d,n.props.locale,!1,a);if(v&&xn(v)){if(xj(v,a)){c=g;break}var x=Math.abs(v.getTime()-a.getTime());x<u&&(u=x,c=g)}}}c&&(l.forEach(function(w){w.setAttribute("tabindex","-1")}),c.setAttribute("tabindex","0"),c.scrollIntoView({behavior:"smooth",block:"center"}))}},n.onInputKeyDown=function(a){var o,i,s,l,c,u;(i=(o=n.props).onKeyDown)===null||i===void 0||i.call(o,a);var d=a.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(d===pe.ArrowDown||d===pe.ArrowUp||d===pe.Enter)&&((s=n.onInputClick)===null||s===void 0||s.call(n));return}if(n.state.open&&n.props.showTimeSelectOnly){if(d===pe.ArrowDown||d===pe.ArrowUp){a.preventDefault(),n.handleTimeOnlyArrowKey(d);return}if(d===pe.Enter){a.preventDefault(),n.handleTimeOnlyEnterKey(a);return}}if(n.state.open){if(d===pe.ArrowDown||d===pe.ArrowUp){a.preventDefault();var f=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',p=((l=n.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(f);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var g=tt(n.state.preSelection);d===pe.Enter?(a.preventDefault(),a.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===Qy?(n.handleSelect(g,a),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):d===pe.Escape?(a.preventDefault(),a.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):d===pe.Tab&&n.setOpen(!1),n.inputOk()||(u=(c=n.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Xy})}},n.onPortalKeyDown=function(a){var o=a.key;o===pe.Escape&&(a.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(a){var o,i,s,l,c,u,d=n.props,f=d.minDate,p=d.maxDate,g=d.disabledKeyboardNavigation,y=d.showWeekPicker,v=d.shouldCloseOnSelect,x=d.locale,w=d.calendarStartDay,b=d.adjustDateOnChange,S=d.inline;if((i=(o=n.props).onKeyDown)===null||i===void 0||i.call(o,a),!g){var k=a.key,P=a.shiftKey,E=tt(n.state.preSelection),O=function(_,C){var M=C;switch(_){case pe.ArrowRight:M=y?am(C,1):Ea(C,1);break;case pe.ArrowLeft:M=y?nP(C):IY(C);break;case pe.ArrowUp:M=nP(C);break;case pe.ArrowDown:M=am(C,1);break;case pe.PageUp:M=P?pc(C,1):Ms(C,1);break;case pe.PageDown:M=P?To(C,1):_a(C,1);break;case pe.Home:M=Bi(C,x,w);break;case pe.End:M=CK(C);break}return M},D=function(_,C){for(var M=40,T=_,j=!1,A=0,L=O(_,C);!j;){if(A>=M){L=C;break}f&&L<f&&(T=pe.ArrowRight,L=Wn(f,n.props)?O(T,L):f),p&&L>p&&(T=pe.ArrowLeft,L=Wn(p,n.props)?O(T,L):p),Wn(L,n.props)?((T===pe.PageUp||T===pe.Home)&&(T=pe.ArrowRight),(T===pe.PageDown||T===pe.End)&&(T=pe.ArrowLeft),L=O(T,L)):j=!0,A++}return L};if(k===pe.Enter){a.preventDefault(),n.handleSelect(E,a),!v&&n.setPreSelection(E);return}else if(k===pe.Escape){a.preventDefault(),n.setOpen(!1),n.inputOk()||(l=(s=n.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Xy});return}var N=null;switch(k){case pe.ArrowLeft:case pe.ArrowRight:case pe.ArrowUp:case pe.ArrowDown:case pe.PageUp:case pe.PageDown:case pe.Home:case pe.End:N=D(k,E);break}if(!N){(u=(c=n.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Xy});return}a.preventDefault(),n.setState({lastPreSelectChange:Qy}),b&&n.setSelected(N),n.setPreSelection(N),S&&n.setState({shouldFocusDayInline:!0})}},n.onPopperKeyDown=function(a){var o=a.key;o===pe.Escape&&(a.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(a){a&&a.preventDefault&&a.preventDefault(),n.sendFocusBackToInput();var o=n.props,i=o.selectsRange,s=o.onChange;i?s==null||s([null,null],a):s==null||s(null,a),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(a){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(a.target===document||a.target===document.documentElement||a.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(a)&&n.setOpen(!1)},n.renderCalendar=function(){var a,o;return!n.props.inline&&!n.isCalendarOpen()?null:U.createElement(aq,He({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(a=n.props.dateFormatCalendar)!==null&&a!==void 0?a:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:$K(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(o=n.props.dropdownMode)!==null&&o!==void 0?o:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var a,o=n.props.locale,i=(a=n.props.dateFormat)!==null&&a!==void 0?a:t.defaultProps.dateFormat,s=n.props.showTimeInput||n.props.showTimeSelect,l=s?"PPPPp":"PPPP",c;return n.props.selectsRange?c="Selected start date: ".concat(hn(n.props.startDate,{dateFormat:l,locale:o}),". ").concat(n.props.endDate?"End date: "+hn(n.props.endDate,{dateFormat:l,locale:o}):""):n.props.showTimeSelectOnly?c="Selected time: ".concat(hn(n.props.selected,{dateFormat:i,locale:o})):n.props.showYearPicker?c="Selected year: ".concat(hn(n.props.selected,{dateFormat:"yyyy",locale:o})):n.props.showMonthYearPicker?c="Selected month: ".concat(hn(n.props.selected,{dateFormat:"MMMM yyyy",locale:o})):n.props.showQuarterYearPicker?c="Selected quarter: ".concat(hn(n.props.selected,{dateFormat:"yyyy, QQQ",locale:o})):c="Selected date: ".concat(hn(n.props.selected,{dateFormat:l,locale:o})),U.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},n.renderDateInput=function(){var a,o,i,s,l,c,u=le(n.props.className,(a={},a[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,a)),d=n.props.customInput||U.createElement("input",{type:"text"}),f=n.props.customInputRef||"ref",p={},g=(i=n.props["aria-describedby"])!==null&&i!==void 0?i:n.props.ariaDescribedBy,y=(s=n.props["aria-invalid"])!==null&&s!==void 0?s:n.props.ariaInvalid,v=(l=n.props["aria-labelledby"])!==null&&l!==void 0?l:n.props.ariaLabelledBy,x=(c=n.props["aria-required"])!==null&&c!==void 0?c:n.props.ariaRequired;return g!=null&&(p["aria-describedby"]=g),y!=null&&(p["aria-invalid"]=y),v!=null&&(p["aria-labelledby"]=v),x!=null&&(p["aria-required"]=x),m.cloneElement(d,He((o={},o[f]=function(w){n.input=w},o.value=n.getInputValue(),o.onBlur=n.handleBlur,o.onChange=n.handleChange,o.onClick=n.onInputClick,o.onFocus=n.handleFocus,o.onKeyDown=n.onInputKeyDown,o.id=n.props.id,o.name=n.props.name,o.form=n.props.form,o.autoFocus=n.props.autoFocus,o.placeholder=n.props.placeholderText,o.disabled=n.props.disabled,o.autoComplete=n.props.autoComplete,o.className=le(d.props.className,u),o.title=n.props.title,o.readOnly=n.props.readOnly,o.required=n.props.required,o.tabIndex=n.props.tabIndex,o),p))},n.renderClearButton=function(){var a=n.props,o=a.isClearable,i=a.disabled,s=a.selected,l=a.startDate,c=a.endDate,u=a.clearButtonTitle,d=a.clearButtonClassName,f=d===void 0?"":d,p=a.ariaLabelClose,g=p===void 0?"Close":p,y=a.selectedDates,v=a.readOnly;return o&&!v&&(s!=null||l!=null||c!=null||y!=null&&y.length)?U.createElement("button",{type:"button",className:le("react-datepicker__close-icon",f,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,onClick:n.onClearClick,title:u,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:wj,readOnly:!1,rangeSeparator:hj,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:uf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var a,o,i,s;r.inline&&dq(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:PP(this.props.highlightDates)}),!n.focused&&!Cs(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((o=(a=this.props).onCalendarOpen)===null||o===void 0||o.call(a)),n.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,a=r.icon,o=r.calendarIconClassname,i=r.calendarIconClassName,s=r.toggleCalendarOnIconClick,l=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),U.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&U.createElement(oq,He({icon:a,className:le(i,!i&&o,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?U.createElement(kj,{enableTabLoop:this.props.enableTabLoop},U.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=U.createElement(Sj,He({portalId:this.props.portalId},this.props),n)),U.createElement("div",null,this.renderInputContainer(),n)}return U.createElement(uq,He({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t}(m.Component),pq="input",Qy="navigate";const hq={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},mq=(e,t,r)=>{let n;const a=hq[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?n+" 후":n+" 전":n},gq={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},vq={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},yq={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},xq={date:Hl({formats:gq,defaultWidth:"full"}),time:Hl({formats:vq,defaultWidth:"full"}),dateTime:Hl({formats:yq,defaultWidth:"full"})},bq={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},wq=(e,t,r,n)=>bq[e],Sq={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},kq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Cq={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},Pq={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},Eq={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Oq={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Dq=(e,t)=>{const r=Number(e);switch(String(t==null?void 0:t.unit)){case"minute":case"second":return String(r);case"date":return r+"일";default:return r+"번째"}},_q={ordinalNumber:Dq,era:Va({values:Sq,defaultWidth:"wide"}),quarter:Va({values:kq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Va({values:Cq,defaultWidth:"wide"}),day:Va({values:Pq,defaultWidth:"wide"}),dayPeriod:Va({values:Eq,defaultWidth:"wide",formattingValues:Oq,defaultFormattingWidth:"wide"})},Nq=/^(\d+)(일|번째)?/i,Mq=/\d+/i,Tq={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},jq={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},Aq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},Rq={any:[/1/i,/2/i,/3/i,/4/i]},Iq={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},$q={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},Lq={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},Fq={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},zq={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},Bq={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},Wq={ordinalNumber:KT({matchPattern:Nq,parsePattern:Mq,valueCallback:e=>parseInt(e,10)}),era:Ka({matchPatterns:Tq,defaultMatchWidth:"wide",parsePatterns:jq,defaultParseWidth:"any"}),quarter:Ka({matchPatterns:Aq,defaultMatchWidth:"wide",parsePatterns:Rq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ka({matchPatterns:Iq,defaultMatchWidth:"wide",parsePatterns:$q,defaultParseWidth:"any"}),day:Ka({matchPatterns:Lq,defaultMatchWidth:"wide",parsePatterns:Fq,defaultParseWidth:"any"}),dayPeriod:Ka({matchPatterns:zq,defaultMatchWidth:"any",parsePatterns:Bq,defaultParseWidth:"any"})},Hq={code:"ko",formatDistance:mq,formatLong:xq,formatRelative:wq,localize:_q,match:Wq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uq(e){return qe("MuiPaper",e)}Ge("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Yq=e=>{const{square:t,elevation:r,variant:n,classes:a}=e,o={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return Ke(o,Uq,a)},Vq=de("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(Xe(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),ff=m.forwardRef(function(t,r){var p;const n=Ze({props:t,name:"MuiPaper"}),a=Ic(),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=n,d={...n,component:i,elevation:s,square:l,variant:c},f=Yq(d);return h.jsx(Vq,{as:i,ownerState:d,className:le(f.root,o),ref:r,...u,style:{...c==="elevation"&&{"--Paper-shadow":(a.vars||a).shadows[s],...a.vars&&{"--Paper-overlay":(p=a.vars.overlays)==null?void 0:p[s]},...!a.vars&&a.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Kh("#fff",Rx(s))}, ${Kh("#fff",Rx(s))})`}},...u.style}})});function Kq(e){return qe("MuiAlert",e)}const MP=Ge("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function qq(e){return qe("MuiIconButton",e)}const TP=Ge("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Gq=e=>{const{classes:t,disabled:r,color:n,edge:a,size:o,loading:i}=e,s={root:["root",i&&"loading",r&&"disabled",n!=="default"&&`color${ge(n)}`,a&&`edge${ge(a)}`,`size${ge(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ke(s,qq,t)},Xq=de(S1,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${ge(r.color)}`],r.edge&&t[`edge${ge(r.edge)}`],t[`size${ge(r.size)}`]]}})(Xe(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Xe(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${TP.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${TP.loading}`]:{color:"transparent"}}))),Qq=de("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),$n=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiIconButton"}),{edge:a=!1,children:o,className:i,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:d,loading:f=null,loadingIndicator:p,...g}=n,y=Rc(d),v=p??h.jsx(ST,{"aria-labelledby":y,color:"inherit",size:16}),x={...n,edge:a,color:s,disabled:l,disableFocusRipple:c,loading:f,loadingIndicator:v,size:u},w=Gq(x);return h.jsxs(Xq,{id:f?y:d,className:le(w.root,i),centerRipple:!0,focusRipple:!c,disabled:l||f,ref:r,...g,ownerState:x,children:[typeof f=="boolean"&&h.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:h.jsx(Qq,{className:w.loadingIndicator,ownerState:x,children:f&&v})}),o]})}),Zq=cn(h.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),Jq=cn(h.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),eG=cn(h.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),tG=cn(h.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),rG=cn(h.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),nG=e=>{const{variant:t,color:r,severity:n,classes:a}=e,o={root:["root",`color${ge(r||n)}`,`${t}${ge(r||n)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Ke(o,Kq,a)},aG=de(ff,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${ge(r.color||r.severity)}`]]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,r=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(nn(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${n}StandardBg`]:r(e.palette[n].light,.9),[`& .${MP.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(nn(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${MP.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(nn(["dark"])).map(([n])=>({props:{colorSeverity:n,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${n}FilledColor`],backgroundColor:e.vars.palette.Alert[`${n}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[n].dark:e.palette[n].main,color:e.palette.getContrastText(e.palette[n].main)}}}))]}})),oG=de("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),iG=de("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),sG=de("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),jP={success:h.jsx(Zq,{fontSize:"inherit"}),warning:h.jsx(Jq,{fontSize:"inherit"}),error:h.jsx(eG,{fontSize:"inherit"}),info:h.jsx(tG,{fontSize:"inherit"})},lG=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiAlert"}),{action:a,children:o,className:i,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=jP,onClose:p,role:g="alert",severity:y="success",slotProps:v={},slots:x={},variant:w="standard",...b}=n,S={...n,color:l,severity:y,variant:w,colorSeverity:l||y},k=nG(S),P={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...x},slotProps:{...u,...v}},[E,O]=Le("root",{ref:r,shouldForwardComponentProp:!0,className:le(k.root,i),elementType:aG,externalForwardedProps:{...P,...b},ownerState:S,additionalProps:{role:g,elevation:0}}),[D,N]=Le("icon",{className:k.icon,elementType:oG,externalForwardedProps:P,ownerState:S}),[_,C]=Le("message",{className:k.message,elementType:iG,externalForwardedProps:P,ownerState:S}),[M,T]=Le("action",{className:k.action,elementType:sG,externalForwardedProps:P,ownerState:S}),[j,A]=Le("closeButton",{elementType:$n,externalForwardedProps:P,ownerState:S}),[L,I]=Le("closeIcon",{elementType:rG,externalForwardedProps:P,ownerState:S});return h.jsxs(E,{...O,children:[d!==!1?h.jsx(D,{...N,children:d||f[y]||jP[y]}):null,h.jsx(_,{...C,children:o}),a!=null?h.jsx(M,{...T,children:a}):null,a==null&&p?h.jsx(M,{...T,children:h.jsx(j,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...A,children:h.jsx(L,{fontSize:"small",...I})})}):null]})});function pp(e){return parseInt(e,10)||0}const cG={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function uG(e){for(const t in e)return!1;return!0}function AP(e){return uG(e)||e.outerHeightStyle===0&&!e.overflowing}const dG=m.forwardRef(function(t,r){const{onChange:n,maxRows:a,minRows:o=1,style:i,value:s,...l}=t,{current:c}=m.useRef(s!=null),u=m.useRef(null),d=hr(r,u),f=m.useRef(null),p=m.useRef(null),g=m.useCallback(()=>{const b=u.current,S=p.current;if(!b||!S)return;const P=Vo(b).getComputedStyle(b);if(P.width==="0px")return{outerHeightStyle:0,overflowing:!1};S.style.width=P.width,S.value=b.value||t.placeholder||"x",S.value.slice(-1)===`
`&&(S.value+=" ");const E=P.boxSizing,O=pp(P.paddingBottom)+pp(P.paddingTop),D=pp(P.borderBottomWidth)+pp(P.borderTopWidth),N=S.scrollHeight;S.value="x";const _=S.scrollHeight;let C=N;o&&(C=Math.max(Number(o)*_,C)),a&&(C=Math.min(Number(a)*_,C)),C=Math.max(C,_);const M=C+(E==="border-box"?O+D:0),T=Math.abs(C-N)<=1;return{outerHeightStyle:M,overflowing:T}},[a,o,t.placeholder]),y=Kn(()=>{const b=u.current,S=g();if(!b||!S||AP(S))return!1;const k=S.outerHeightStyle;return f.current!=null&&f.current!==k}),v=m.useCallback(()=>{const b=u.current,S=g();if(!b||!S||AP(S))return;const k=S.outerHeightStyle;f.current!==k&&(f.current=k,b.style.height=`${k}px`),b.style.overflow=S.overflowing?"hidden":""},[g]),x=m.useRef(-1);Yo(()=>{const b=vT(v),S=u==null?void 0:u.current;if(!S)return;const k=Vo(S);k.addEventListener("resize",b);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(()=>{y()&&(P.unobserve(S),cancelAnimationFrame(x.current),v(),x.current=requestAnimationFrame(()=>{P.observe(S)}))}),P.observe(S)),()=>{b.clear(),cancelAnimationFrame(x.current),k.removeEventListener("resize",b),P&&P.disconnect()}},[g,v,y]),Yo(()=>{v()});const w=b=>{c||v();const S=b.target,k=S.value.length,P=S.value.endsWith(`
`),E=S.selectionStart===k;P&&E&&S.setSelectionRange(k,k),n&&n(b)};return h.jsxs(m.Fragment,{children:[h.jsx("textarea",{value:s,onChange:w,ref:d,rows:o,style:i,...l}),h.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...cG.shadow,...i,paddingTop:0,paddingBottom:0}})]})});function fG(e){return qe("MuiInputBase",e)}const yc=Ge("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var RP;const vv=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${ge(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},yv=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},pG=e=>{const{classes:t,color:r,disabled:n,error:a,endAdornment:o,focused:i,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:g}=e,y={root:["root",`color${ge(r)}`,n&&"disabled",a&&"error",l&&"fullWidth",i&&"focused",s&&"formControl",f&&f!=="medium"&&`size${ge(f)}`,u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",n&&"disabled",g==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return Ke(y,fG,t)},xv=de("div",{name:"MuiInputBase",slot:"Root",overridesResolver:vv})(Xe(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${yc.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:r})=>t.multiline&&r==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),bv=de("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yv})(Xe(({theme:e})=>{const t=e.palette.mode==="light",r={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${yc.formControl} &`]:{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${yc.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),IP=$W({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),U1=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:o,autoFocus:i,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:g,error:y,fullWidth:v=!1,id:x,inputComponent:w="input",inputProps:b={},inputRef:S,margin:k,maxRows:P,minRows:E,multiline:O=!1,name:D,onBlur:N,onChange:_,onClick:C,onFocus:M,onKeyDown:T,onKeyUp:j,placeholder:A,readOnly:L,renderSuffix:I,rows:$,size:z,slotProps:V={},slots:F={},startAdornment:ne,type:ee="text",value:X,...fe}=n,q=b.value!=null?b.value:X,{current:ke}=m.useRef(q!=null),B=m.useRef(),W=m.useCallback(xe=>{},[]),G=hr(B,S,b.ref,W),[R,ae]=m.useState(!1),J=ai(),he=el({props:n,muiFormControl:J,states:["color","disabled","error","hiddenLabel","size","required","filled"]});he.focused=J?J.focused:R,m.useEffect(()=>{!J&&f&&R&&(ae(!1),N&&N())},[J,f,R,N]);const Ce=J&&J.onFilled,re=J&&J.onEmpty,ie=m.useCallback(xe=>{rm(xe)?Ce&&Ce():re&&re()},[Ce,re]);Yo(()=>{ke&&ie({value:q})},[q,ie,ke]);const $e=xe=>{M&&M(xe),b.onFocus&&b.onFocus(xe),J&&J.onFocus?J.onFocus(xe):ae(!0)},Fe=xe=>{N&&N(xe),b.onBlur&&b.onBlur(xe),J&&J.onBlur?J.onBlur(xe):ae(!1)},Ne=(xe,...je)=>{if(!ke){const ze=xe.target||B.current;if(ze==null)throw new Error(Ho(1));ie({value:ze.value})}b.onChange&&b.onChange(xe,...je),_&&_(xe,...je)};m.useEffect(()=>{ie(B.current)},[]);const ve=xe=>{B.current&&xe.currentTarget===xe.target&&B.current.focus(),C&&C(xe)};let It=w,Qe=b;O&&It==="input"&&($?Qe={type:void 0,minRows:$,maxRows:$,...Qe}:Qe={type:void 0,maxRows:P,minRows:E,...Qe},It=dG);const lr=xe=>{ie(xe.animationName==="mui-auto-fill-cancel"?B.current:{value:"x"})};m.useEffect(()=>{J&&J.setAdornedStart(!!ne)},[J,ne]);const Gt={...n,color:he.color||"primary",disabled:he.disabled,endAdornment:g,error:he.error,focused:he.focused,formControl:J,fullWidth:v,hiddenLabel:he.hiddenLabel,multiline:O,size:he.size,startAdornment:ne,type:ee},oe=pG(Gt),ye=F.root||c.Root||xv,Ie=V.root||u.root||{},Be=F.input||c.Input||bv;return Qe={...Qe,...V.input??u.input},h.jsxs(m.Fragment,{children:[!p&&typeof IP=="function"&&(RP||(RP=h.jsx(IP,{}))),h.jsxs(ye,{...Ie,ref:r,onClick:ve,...fe,...!em(ye)&&{ownerState:{...Gt,...Ie.ownerState}},className:le(oe.root,Ie.className,s,L&&"MuiInputBase-readOnly"),children:[ne,h.jsx(sv.Provider,{value:null,children:h.jsx(Be,{"aria-invalid":he.error,"aria-describedby":a,autoComplete:o,autoFocus:i,defaultValue:d,disabled:he.disabled,id:x,onAnimationStart:lr,name:D,placeholder:A,readOnly:L,required:he.required,rows:$,value:q,onKeyDown:T,onKeyUp:j,type:ee,...Qe,...!em(Be)&&{as:It,ownerState:{...Gt,...Qe.ownerState}},ref:G,className:le(oe.input,Qe.className,L&&"MuiInputBase-readOnly"),onBlur:Fe,onChange:Ne,onFocus:$e})}),g,I?I({...he,startAdornment:ne}):null]})]})});function hG(e){return qe("MuiInput",e)}const uu={...yc,...Ge("MuiInput",["root","underline","input"])};function mG(e){return qe("MuiOutlinedInput",e)}const $a={...yc,...Ge("MuiOutlinedInput",["root","notchedOutline","input"])};function gG(e){return qe("MuiFilledInput",e)}const ss={...yc,...Ge("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},vG=cn(h.jsx("path",{d:"M7 10l5 5 5-5z"})),yG=cn(h.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function xG(e){return qe("MuiAvatar",e)}Ge("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const bG=e=>{const{classes:t,variant:r,colorDefault:n}=e;return Ke({root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]},xG,t)},wG=de("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})(Xe(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),SG=de("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),kG=de(yG,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function CG({crossOrigin:e,referrerPolicy:t,src:r,srcSet:n}){const[a,o]=m.useState(!1);return m.useEffect(()=>{if(!r&&!n)return;o(!1);let i=!0;const s=new Image;return s.onload=()=>{i&&o("loaded")},s.onerror=()=>{i&&o("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=r,n&&(s.srcset=n),()=>{i=!1}},[e,t,r,n]),a}const $P=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiAvatar"}),{alt:a,children:o,className:i,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:g="circular",...y}=n;let v=null;const x={...n,component:s,variant:g},w=CG({...u,...typeof c.img=="function"?c.img(x):c.img,src:f,srcSet:p}),b=f||p,S=b&&w!=="error";x.colorDefault=!S,delete x.ownerState;const k=bG(x),[P,E]=Le("root",{ref:r,className:le(k.root,i),elementType:wG,externalForwardedProps:{slots:l,slotProps:c,component:s,...y},ownerState:x}),[O,D]=Le("img",{className:k.img,elementType:SG,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:a,src:f,srcSet:p,sizes:d},ownerState:x}),[N,_]=Le("fallback",{className:k.fallback,elementType:kG,externalForwardedProps:{slots:l,slotProps:c},shouldForwardComponentProp:!0,ownerState:x});return S?v=h.jsx(O,{...D}):o||o===0?v=o:b&&a?v=a[0]:v=h.jsx(N,{..._}),h.jsx(P,{...E,children:v})});function PG(e){return qe("MuiBackdrop",e)}Ge("MuiBackdrop",["root","invisible"]);const EG=e=>{const{classes:t,invisible:r}=e;return Ke({root:["root",r&&"invisible"]},PG,t)},OG=de("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Cj=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiBackdrop"}),{children:a,className:o,component:i="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:g,...y}=n,v={...n,component:i,invisible:s},x=EG(v),w={transition:p,root:c.Root,...f},b={...u,...d},S={component:i,slots:w,slotProps:b},[k,P]=Le("root",{elementType:OG,externalForwardedProps:S,className:le(x.root,o),ownerState:v}),[E,O]=Le("transition",{elementType:Je,externalForwardedProps:S,ownerState:v});return h.jsx(E,{in:l,timeout:g,...y,...O,children:h.jsx(k,{"aria-hidden":!0,...P,classes:x,ref:r,children:a})})});function LP(e){return e.substring(2).toLowerCase()}function DG(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function _G(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:a,touchEvent:o="onTouchEnd"}=e,i=m.useRef(!1),s=m.useRef(null),l=m.useRef(!1),c=m.useRef(!1);m.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=hr(Js(t),s),d=Kn(g=>{const y=c.current;c.current=!1;const v=Rr(s.current);if(!l.current||!s.current||"clientX"in g&&DG(g,v))return;if(i.current){i.current=!1;return}let x;g.composedPath?x=g.composedPath().includes(s.current):x=!v.documentElement.contains(g.target)||s.current.contains(g.target),!x&&(r||!y)&&a(g)}),f=g=>y=>{c.current=!0;const v=t.props[g];v&&v(y)},p={ref:u};return o!==!1&&(p[o]=f(o)),m.useEffect(()=>{if(o!==!1){const g=LP(o),y=Rr(s.current),v=()=>{i.current=!0};return y.addEventListener(g,d),y.addEventListener("touchmove",v),()=>{y.removeEventListener(g,d),y.removeEventListener("touchmove",v)}}},[d,o]),n!==!1&&(p[n]=f(n)),m.useEffect(()=>{if(n!==!1){const g=LP(n),y=Rr(s.current);return y.addEventListener(g,d),()=>{y.removeEventListener(g,d)}}},[d,n]),m.cloneElement(t,p)}function Pj(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function NG(e){const t=Rr(e);return t.body===e?Vo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Zu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function FP(e){return parseInt(Vo(e).getComputedStyle(e).paddingRight,10)||0}function MG(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function zP(e,t,r,n,a){const o=[t,r,...n];[].forEach.call(e.children,i=>{const s=!o.includes(i),l=!MG(i);s&&l&&Zu(i,a)})}function Zy(e,t){let r=-1;return e.some((n,a)=>t(n)?(r=a,!0):!1),r}function TG(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(NG(n)){const i=Pj(Vo(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${FP(n)+i}px`;const s=Rr(n).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${FP(l)+i}px`})}let o;if(n.parentNode instanceof DocumentFragment)o=Rr(n).body;else{const i=n.parentElement,s=Vo(n);o=(i==null?void 0:i.nodeName)==="HTML"&&s.getComputedStyle(i).overflowY==="scroll"?i:n}r.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{r.forEach(({value:o,el:i,property:s})=>{o?i.style.setProperty(s,o):i.style.removeProperty(s)})}}function jG(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class AG{constructor(){this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&Zu(t.modalRef,!1);const a=jG(r);zP(r,t.mount,t.modalRef,a,!0);const o=Zy(this.containers,i=>i.container===r);return o!==-1?(this.containers[o].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:a}),n)}mount(t,r){const n=Zy(this.containers,o=>o.modals.includes(t)),a=this.containers[n];a.restore||(a.restore=TG(a,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const a=Zy(this.containers,i=>i.modals.includes(t)),o=this.containers[a];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(n,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Zu(t.modalRef,r),zP(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(a,1);else{const i=o.modals[o.modals.length-1];i.modalRef&&Zu(i.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ju(e){var r;let t=e.activeElement;for(;((r=t==null?void 0:t.shadowRoot)==null?void 0:r.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}const RG=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function IG(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function $G(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function LG(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||$G(e))}function FG(e){const t=[],r=[];return Array.from(e.querySelectorAll(RG)).forEach((n,a)=>{const o=IG(n);o===-1||!LG(n)||(o===0?t.push(n):r.push({documentOrder:a,tabIndex:o,node:n}))}),r.sort((n,a)=>n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex).map(n=>n.node).concat(t)}function zG(){return!0}function BG(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:a=!1,getTabbable:o=FG,isEnabled:i=zG,open:s}=e,l=m.useRef(!1),c=m.useRef(null),u=m.useRef(null),d=m.useRef(null),f=m.useRef(null),p=m.useRef(!1),g=m.useRef(null),y=hr(Js(t),g),v=m.useRef(null);m.useEffect(()=>{!s||!g.current||(p.current=!r)},[r,s]),m.useEffect(()=>{if(!s||!g.current)return;const b=Rr(g.current),S=ju(b);return g.current.contains(S)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),p.current&&g.current.focus()),()=>{a||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),m.useEffect(()=>{if(!s||!g.current)return;const b=Rr(g.current),S=ju(b),k=O=>{v.current=O,!(n||!i()||O.key!=="Tab")&&S===g.current&&O.shiftKey&&(l.current=!0,u.current&&u.current.focus())},P=()=>{var _,C;const O=g.current;if(O===null)return;const D=ju(b);if(!b.hasFocus()||!i()||l.current){l.current=!1;return}if(O.contains(D)||n&&D!==c.current&&D!==u.current)return;if(D!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let N=[];if((D===c.current||D===u.current)&&(N=o(g.current)),N.length>0){const M=!!((_=v.current)!=null&&_.shiftKey&&((C=v.current)==null?void 0:C.key)==="Tab"),T=N[0],j=N[N.length-1];typeof T!="string"&&typeof j!="string"&&(M?j.focus():T.focus())}else O.focus()};b.addEventListener("focusin",P),b.addEventListener("keydown",k,!0);const E=setInterval(()=>{const O=ju(b);O&&O.tagName==="BODY"&&P()},50);return()=>{clearInterval(E),b.removeEventListener("focusin",P),b.removeEventListener("keydown",k,!0)}},[r,n,a,i,s,o]);const x=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0,f.current=b.target;const S=t.props.onFocus;S&&S(b)},w=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0};return h.jsxs(m.Fragment,{children:[h.jsx("div",{tabIndex:s?0:-1,onFocus:w,ref:c,"data-testid":"sentinelStart"}),m.cloneElement(t,{ref:y,onFocus:x}),h.jsx("div",{tabIndex:s?0:-1,onFocus:w,ref:u,"data-testid":"sentinelEnd"})]})}function WG(e){return typeof e=="function"?e():e}function HG(e){return e?e.props.hasOwnProperty("in"):!1}const BP=()=>{},hp=new AG;function UG(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,closeAfterTransition:a=!1,onTransitionEnter:o,onTransitionExited:i,children:s,onClose:l,open:c,rootRef:u}=e,d=m.useRef({}),f=m.useRef(null),p=m.useRef(null),g=hr(p,u),[y,v]=m.useState(!c),x=HG(s);let w=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(w=!1);const b=()=>Rr(f.current),S=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),k=()=>{hp.mount(S(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},P=Kn(()=>{const j=WG(t)||b().body;hp.add(S(),j),p.current&&k()}),E=()=>hp.isTopModal(S()),O=Kn(j=>{f.current=j,j&&(c&&E()?k():p.current&&Zu(p.current,w))}),D=m.useCallback(()=>{hp.remove(S(),w)},[w]);m.useEffect(()=>()=>{D()},[D]),m.useEffect(()=>{c?P():(!x||!a)&&D()},[c,D,x,a,P]);const N=j=>A=>{var L;(L=j.onKeyDown)==null||L.call(j,A),!(A.key!=="Escape"||A.which===229||!E())&&(r||(A.stopPropagation(),l&&l(A,"escapeKeyDown")))},_=j=>A=>{var L;(L=j.onClick)==null||L.call(j,A),A.target===A.currentTarget&&l&&l(A,"backdropClick")};return{getRootProps:(j={})=>{const A=tm(e);delete A.onTransitionEnter,delete A.onTransitionExited;const L={...A,...j};return{role:"presentation",...L,onKeyDown:N(L),ref:g}},getBackdropProps:(j={})=>{const A=j;return{"aria-hidden":!0,...A,onClick:_(A),open:c}},getTransitionProps:()=>{const j=()=>{v(!1),o&&o()},A=()=>{v(!0),i&&i(),a&&D()};return{onEnter:n2(j,(s==null?void 0:s.props.onEnter)??BP),onExited:n2(A,(s==null?void 0:s.props.onExited)??BP)}},rootRef:g,portalRef:O,isTopModal:E,exited:y,hasTransition:x}}function YG(e){return qe("MuiModal",e)}Ge("MuiModal",["root","hidden","backdrop"]);const VG=e=>{const{open:t,exited:r,classes:n}=e;return Ke({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},YG,n)},KG=de("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(Xe(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),qG=de(Cj,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Ej=m.forwardRef(function(t,r){const n=Ze({name:"MuiModal",props:t}),{BackdropComponent:a=qG,BackdropProps:o,classes:i,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:g=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:w=!1,disableScrollLock:b=!1,hideBackdrop:S=!1,keepMounted:k=!1,onClose:P,onTransitionEnter:E,onTransitionExited:O,open:D,slotProps:N={},slots:_={},theme:C,...M}=n,T={...n,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:y,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:w,disableScrollLock:b,hideBackdrop:S,keepMounted:k},{getRootProps:j,getBackdropProps:A,getTransitionProps:L,portalRef:I,isTopModal:$,exited:z,hasTransition:V}=UG({...T,rootRef:r}),F={...T,exited:z},ne=VG(F),ee={};if(c.props.tabIndex===void 0&&(ee.tabIndex="-1"),V){const{onEnter:W,onExited:G}=L();ee.onEnter=W,ee.onExited=G}const X={slots:{root:f.Root,backdrop:f.Backdrop,..._},slotProps:{...p,...N}},[fe,q]=Le("root",{ref:r,elementType:KG,externalForwardedProps:{...X,...M,component:d},getSlotProps:j,ownerState:F,className:le(s,ne==null?void 0:ne.root,!F.open&&F.exited&&(ne==null?void 0:ne.hidden))}),[ke,B]=Le("backdrop",{ref:o==null?void 0:o.ref,elementType:a,externalForwardedProps:X,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:W=>A({...W,onClick:G=>{W!=null&&W.onClick&&W.onClick(G)}}),className:le(o==null?void 0:o.className,ne==null?void 0:ne.backdrop),ownerState:F});return!k&&!D&&(!V||z)?null:h.jsx(LT,{ref:I,container:u,disablePortal:x,children:h.jsxs(fe,{...q,children:[!S&&a?h.jsx(ke,{...B}):null,h.jsx(BG,{disableEnforceFocus:y,disableAutoFocus:g,disableRestoreFocus:w,isEnabled:$,open:D,children:m.cloneElement(c,ee)})]})})});function GG(e){return qe("MuiDialog",e)}const Jy=Ge("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Oj=m.createContext({}),XG=de(Cj,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),QG=e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:a,fullScreen:o}=e,i={root:["root"],container:["container",`scroll${ge(r)}`],paper:["paper",`paperScroll${ge(r)}`,`paperWidth${ge(String(n))}`,a&&"paperFullWidth",o&&"paperFullScreen"]};return Ke(i,GG,t)},ZG=de(Ej,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),JG=de("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${ge(r.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),eX=de(ff,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${ge(r.scroll)}`],t[`paperWidth${ge(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(Xe(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Jy.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Jy.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Jy.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),ih=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiDialog"}),a=Ic(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:y=!1,maxWidth:v="sm",onClick:x,onClose:w,open:b,PaperComponent:S=ff,PaperProps:k={},scroll:P="paper",slots:E={},slotProps:O={},TransitionComponent:D=Je,transitionDuration:N=o,TransitionProps:_,...C}=n,M={...n,disableEscapeKeyDown:p,fullScreen:g,fullWidth:y,maxWidth:v,scroll:P},T=QG(M),j=m.useRef(),A=ae=>{j.current=ae.target===ae.currentTarget},L=ae=>{x&&x(ae),j.current&&(j.current=null,w&&w(ae,"backdropClick"))},I=Rc(s),$=m.useMemo(()=>({titleId:I}),[I]),z={transition:D,...E},V={transition:_,paper:k,backdrop:u,...O},F={slots:z,slotProps:V},[ne,ee]=Le("root",{elementType:ZG,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:M,className:le(T.root,f),ref:r}),[X,fe]=Le("backdrop",{elementType:XG,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:M}),[q,ke]=Le("paper",{elementType:eX,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:M,className:le(T.paper,k.className)}),[B,W]=Le("container",{elementType:JG,externalForwardedProps:F,ownerState:M,className:T.container}),[G,R]=Le("transition",{elementType:Je,externalForwardedProps:F,ownerState:M,additionalProps:{appear:!0,in:b,timeout:N,role:"presentation"}});return h.jsx(ne,{closeAfterTransition:!0,slots:{backdrop:X},slotProps:{backdrop:{transitionDuration:N,as:c,...fe}},disableEscapeKeyDown:p,onClose:w,open:b,onClick:L,...ee,...C,children:h.jsx(G,{...R,children:h.jsx(B,{onMouseDown:A,...W,children:h.jsx(q,{as:S,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":I,"aria-modal":l,...ke,children:h.jsx(Oj.Provider,{value:$,children:d})})})})})});function tX(e){return qe("MuiDialogTitle",e)}Ge("MuiDialogTitle",["root"]);const rX=e=>{const{classes:t}=e;return Ke({root:["root"]},tX,t)},nX=de(uc,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),e0=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiDialogTitle"}),{className:a,id:o,...i}=n,s=n,l=rX(s),{titleId:c=o}=m.useContext(Oj);return h.jsx(nX,{component:"h2",className:le(l.root,a),ownerState:s,ref:r,variant:"h6",id:o??c,...i})}),aX=e=>{const{classes:t,disableUnderline:r,startAdornment:n,endAdornment:a,size:o,hiddenLabel:i,multiline:s}=e,l={root:["root",!r&&"underline",n&&"adornedStart",a&&"adornedEnd",o==="small"&&`size${ge(o)}`,i&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Ke(l,gG,t);return{...t,...c}},oX=de(xv,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...vv(e,t),!r.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light",r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${ss.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${ss.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ss.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ss.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ss.disabled}, .${ss.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ss.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([i])=>{var s;return{props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[i])==null?void 0:s.main}`}}}}),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:s})=>i.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),iX=de(bv,{name:"MuiFilledInput",slot:"Input",overridesResolver:yv})(Xe(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Y1=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:o={},componentsProps:i,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...g}=n,y={...n,disableUnderline:a,fullWidth:s,inputComponent:c,multiline:u,type:p},v=aX(n),x={root:{ownerState:y},input:{ownerState:y}},w=d??i?Ar(x,d??i):x,b=f.root??o.Root??oX,S=f.input??o.Input??iX;return h.jsx(U1,{slots:{root:b,input:S},slotProps:w,fullWidth:s,inputComponent:c,multiline:u,ref:r,type:p,...g,classes:v})});Y1.muiName="Input";function sX(e){return qe("MuiFormHelperText",e)}const WP=Ge("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var HP;const lX=e=>{const{classes:t,contained:r,size:n,disabled:a,error:o,filled:i,focused:s,required:l}=e,c={root:["root",a&&"disabled",o&&"error",n&&`size${ge(n)}`,r&&"contained",s&&"focused",i&&"filled",l&&"required"]};return Ke(c,sX,t)},cX=de("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${ge(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${WP.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${WP.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),uX=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiFormHelperText"}),{children:a,className:o,component:i="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...g}=n,y=ai(),v=el({props:n,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),x={...n,component:i,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete x.ownerState;const w=lX(x);return h.jsx(cX,{as:i,className:le(w.root,o),ref:r,...g,ownerState:x,children:a===" "?HP||(HP=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):a})});function dX(e){return qe("MuiFormLabel",e)}const Ju=Ge("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),fX=e=>{const{classes:t,color:r,focused:n,disabled:a,error:o,filled:i,required:s}=e,l={root:["root",`color${ge(r)}`,a&&"disabled",o&&"error",i&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return Ke(l,dX,t)},pX=de("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color==="secondary"&&t.colorSecondary,r.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{[`&.${Ju.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Ju.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ju.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),hX=de("span",{name:"MuiFormLabel",slot:"Asterisk"})(Xe(({theme:e})=>({[`&.${Ju.error}`]:{color:(e.vars||e).palette.error.main}}))),mX=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiFormLabel"}),{children:a,className:o,color:i,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=n,g=ai(),y=el({props:n,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...n,color:y.color||"primary",component:s,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},x=fX(v);return h.jsxs(pX,{as:s,ownerState:v,className:le(x.root,o),ref:r,...p,children:[a,y.required&&h.jsxs(hX,{ownerState:v,"aria-hidden":!0,className:x.asterisk,children:["","*"]})]})}),gX=e=>{const{classes:t,disableUnderline:r}=e,a=Ke({root:["root",!r&&"underline"],input:["input"]},hG,t);return{...t,...a}},vX=de(xv,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...vv(e,t),!r.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:n})=>n.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:n})=>!n.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${uu.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${uu.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${uu.disabled}, .${uu.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${uu.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([n])=>({props:{color:n,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[n].main}`}}}))]}})),yX=de(bv,{name:"MuiInput",slot:"Input",overridesResolver:yv})({}),V1=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiInput"}),{disableUnderline:a=!1,components:o={},componentsProps:i,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=n,g=gX(n),v={root:{ownerState:{disableUnderline:a}}},x=u??i?Ar(u??i,v):v,w=d.root??o.Root??vX,b=d.input??o.Input??yX;return h.jsx(U1,{slots:{root:w,input:b},slotProps:x,fullWidth:s,inputComponent:l,multiline:c,ref:r,type:f,...p,classes:g})});V1.muiName="Input";function xX(e){return qe("MuiInputAdornment",e)}const UP=Ge("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var YP;const bX=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ge(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},wX=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:a,size:o,variant:i}=e,s={root:["root",r&&"disablePointerEvents",a&&`position${ge(a)}`,i,n&&"hiddenLabel",o&&`size${ge(o)}`]};return Ke(s,xX,t)},SX=de("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:bX})(Xe(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${UP.positionStart}&:not(.${UP.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),du=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiInputAdornment"}),{children:a,className:o,component:i="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=n,f=ai()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const g={...n,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},y=wX(g);return h.jsx(sv.Provider,{value:null,children:h.jsx(SX,{as:i,ownerState:g,className:le(y.root,o),ref:r,...d,children:typeof a=="string"&&!l?h.jsx(uc,{color:"textSecondary",children:a}):h.jsxs(m.Fragment,{children:[c==="start"?YP||(YP=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,a]})})})});function kX(e){return qe("MuiInputLabel",e)}Ge("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const CX=e=>{const{classes:t,formControl:r,size:n,shrink:a,disableAnimation:o,variant:i,required:s}=e,l={root:["root",r&&"formControl",!o&&"animated",a&&"shrink",n&&n!=="medium"&&`size${ge(n)}`,i],asterisk:[s&&"asterisk"]},c=Ke(l,kX,t);return{...t,...c}},PX=de(mX,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Ju.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(Xe(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="filled"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:r,size:n})=>t==="filled"&&r.shrink&&n==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="outlined"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),EX=m.forwardRef(function(t,r){const n=Ze({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,margin:o,shrink:i,variant:s,className:l,...c}=n,u=ai();let d=i;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=el({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p={...n,disableAnimation:a,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},g=CX(p);return h.jsx(PX,{"data-shrink":d,ref:r,className:le(g.root,l),...c,ownerState:p,classes:g})}),OX=m.createContext({});function DX(e){return qe("MuiList",e)}Ge("MuiList",["root","padding","dense","subheader"]);const _X=e=>{const{classes:t,disablePadding:r,dense:n,subheader:a}=e;return Ke({root:["root",!r&&"padding",n&&"dense",a&&"subheader"]},DX,t)},NX=de("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),MX=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiList"}),{children:a,className:o,component:i="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=n,d=m.useMemo(()=>({dense:s}),[s]),f={...n,component:i,dense:s,disablePadding:l},p=_X(f);return h.jsx(OX.Provider,{value:d,children:h.jsxs(NX,{as:i,className:le(p.root,o),ref:r,ownerState:f,...u,children:[c,a]})})});function t0(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function VP(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Dj(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join(""))}function fu(e,t,r,n,a,o){let i=!1,s=a(e,t,t?r:!1);for(;s;){if(s===e.firstChild){if(i)return!1;i=!0}const l=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!Dj(s,o)||l)s=a(e,s,r);else return s.focus(),!0}return!1}const TX=m.forwardRef(function(t,r){const{actions:n,autoFocus:a=!1,autoFocusItem:o=!1,children:i,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=m.useRef(null),g=m.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Yo(()=>{a&&p.current.focus()},[a]),m.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(b,{direction:S})=>{const k=!p.current.style.width;if(b.clientHeight<p.current.clientHeight&&k){const P=`${Pj(Vo(b))}px`;p.current.style[S==="rtl"?"paddingLeft":"paddingRight"]=P,p.current.style.width=`calc(100% + ${P})`}return p.current}}),[]);const y=b=>{const S=p.current,k=b.key;if(b.ctrlKey||b.metaKey||b.altKey){u&&u(b);return}const E=ju(Rr(S));if(k==="ArrowDown")b.preventDefault(),fu(S,E,c,l,t0);else if(k==="ArrowUp")b.preventDefault(),fu(S,E,c,l,VP);else if(k==="Home")b.preventDefault(),fu(S,null,c,l,t0);else if(k==="End")b.preventDefault(),fu(S,null,c,l,VP);else if(k.length===1){const O=g.current,D=k.toLowerCase(),N=performance.now();O.keys.length>0&&(N-O.lastTime>500?(O.keys=[],O.repeating=!0,O.previousKeyMatched=!0):O.repeating&&D!==O.keys[0]&&(O.repeating=!1)),O.lastTime=N,O.keys.push(D);const _=E&&!O.repeating&&Dj(E,O);O.previousKeyMatched&&(_||fu(S,E,!1,l,t0,O))?b.preventDefault():O.previousKeyMatched=!1}u&&u(b)},v=hr(p,r);let x=-1;m.Children.forEach(i,(b,S)=>{if(!m.isValidElement(b)){x===S&&(x+=1,x>=i.length&&(x=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||x===-1)&&(x=S),x===S&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(x+=1,x>=i.length&&(x=-1))});const w=m.Children.map(i,(b,S)=>{if(S===x){const k={};return o&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),m.cloneElement(b,k)}return b});return h.jsx(MX,{role:"menu",ref:v,className:s,onKeyDown:y,tabIndex:a?0:-1,...f,children:w})});function jX(e){return qe("MuiPopover",e)}Ge("MuiPopover",["root","paper"]);function KP(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function qP(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function GP(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function mp(e){return typeof e=="function"?e():e}const AX=e=>{const{classes:t}=e;return Ke({root:["root"],paper:["paper"]},jX,t)},RX=de(Ej,{name:"MuiPopover",slot:"Root"})({}),_j=de(ff,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),IX=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiPopover"}),{action:a,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:g,PaperProps:y={},slots:v={},slotProps:x={},transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:S="auto",TransitionProps:k={},disableScrollLock:P=!1,...E}=n,O=m.useRef(),D={...n,anchorOrigin:i,anchorReference:l,elevation:f,marginThreshold:p,transformOrigin:w,TransitionComponent:b,transitionDuration:S,TransitionProps:k},N=AX(D),_=m.useCallback(()=>{if(l==="anchorPosition")return s;const W=mp(o),R=(W&&W.nodeType===1?W:Rr(O.current).body).getBoundingClientRect();return{top:R.top+KP(R,i.vertical),left:R.left+qP(R,i.horizontal)}},[o,i.horizontal,i.vertical,s,l]),C=m.useCallback(W=>({vertical:KP(W,w.vertical),horizontal:qP(W,w.horizontal)}),[w.horizontal,w.vertical]),M=m.useCallback(W=>{const G={width:W.offsetWidth,height:W.offsetHeight},R=C(G);if(l==="none")return{top:null,left:null,transformOrigin:GP(R)};const ae=_();let J=ae.top-R.vertical,he=ae.left-R.horizontal;const Ce=J+G.height,re=he+G.width,ie=Vo(mp(o)),$e=ie.innerHeight-p,Fe=ie.innerWidth-p;if(p!==null&&J<p){const Ne=J-p;J-=Ne,R.vertical+=Ne}else if(p!==null&&Ce>$e){const Ne=Ce-$e;J-=Ne,R.vertical+=Ne}if(p!==null&&he<p){const Ne=he-p;he-=Ne,R.horizontal+=Ne}else if(re>Fe){const Ne=re-Fe;he-=Ne,R.horizontal+=Ne}return{top:`${Math.round(J)}px`,left:`${Math.round(he)}px`,transformOrigin:GP(R)}},[o,l,_,C,p]),[T,j]=m.useState(g),A=m.useCallback(()=>{const W=O.current;if(!W)return;const G=M(W);G.top!==null&&W.style.setProperty("top",G.top),G.left!==null&&(W.style.left=G.left),W.style.transformOrigin=G.transformOrigin,j(!0)},[M]);m.useEffect(()=>(P&&window.addEventListener("scroll",A),()=>window.removeEventListener("scroll",A)),[o,P,A]);const L=()=>{A()},I=()=>{j(!1)};m.useEffect(()=>{g&&A()}),m.useImperativeHandle(a,()=>g?{updatePosition:()=>{A()}}:null,[g,A]),m.useEffect(()=>{if(!g)return;const W=vT(()=>{A()}),G=Vo(mp(o));return G.addEventListener("resize",W),()=>{W.clear(),G.removeEventListener("resize",W)}},[o,g,A]);let $=S;const z={slots:{transition:b,...v},slotProps:{transition:k,paper:y,...x}},[V,F]=Le("transition",{elementType:Cd,externalForwardedProps:z,ownerState:D,getSlotProps:W=>({...W,onEntering:(G,R)=>{var ae;(ae=W.onEntering)==null||ae.call(W,G,R),L()},onExited:G=>{var R;(R=W.onExited)==null||R.call(W,G),I()}}),additionalProps:{appear:!0,in:g}});S==="auto"&&!V.muiSupportAuto&&($=void 0);const ne=d||(o?Rr(mp(o)).body:void 0),[ee,{slots:X,slotProps:fe,...q}]=Le("root",{ref:r,elementType:RX,externalForwardedProps:{...z,...E},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:yT(typeof x.backdrop=="function"?x.backdrop(D):x.backdrop,{invisible:!0})},container:ne,open:g},ownerState:D,className:le(N.root,u)}),[ke,B]=Le("paper",{ref:O,className:N.paper,elementType:_j,externalForwardedProps:z,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:T?void 0:{opacity:0}},ownerState:D});return h.jsx(ee,{...q,...!em(ee)&&{slots:X,slotProps:fe,disableScrollLock:P},children:h.jsx(V,{...F,timeout:$,children:h.jsx(ke,{...B,children:c})})})});function $X(e){return qe("MuiMenu",e)}Ge("MuiMenu",["root","paper","list"]);const LX={vertical:"top",horizontal:"right"},FX={vertical:"top",horizontal:"left"},zX=e=>{const{classes:t}=e;return Ke({root:["root"],paper:["paper"],list:["list"]},$X,t)},BX=de(IX,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),WX=de(_j,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),HX=de(TX,{name:"MuiMenu",slot:"List"})({outline:0}),Nj=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:o,className:i,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:g,...y}={},variant:v="selectedMenu",slots:x={},slotProps:w={},...b}=n,S=g1(),k={...n,autoFocus:a,disableAutoFocusItem:s,MenuListProps:l,onEntering:g,PaperProps:d,transitionDuration:p,TransitionProps:y,variant:v},P=zX(k),E=a&&!s&&u,O=m.useRef(null),D=($,z)=>{O.current&&O.current.adjustStyleForScrollbar($,{direction:S?"rtl":"ltr"}),g&&g($,z)},N=$=>{$.key==="Tab"&&($.preventDefault(),c&&c($,"tabKeyDown"))};let _=-1;m.Children.map(o,($,z)=>{m.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||_===-1)&&(_=z))});const C={slots:x,slotProps:{list:l,transition:y,paper:d,...w}},M=$T({elementType:x.root,externalSlotProps:w.root,ownerState:k,className:[P.root,i]}),[T,j]=Le("paper",{className:P.paper,elementType:WX,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:k}),[A,L]=Le("list",{className:le(P.list,l.className),elementType:HX,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:$=>({...$,onKeyDown:z=>{var V;N(z),(V=$.onKeyDown)==null||V.call($,z)}}),ownerState:k}),I=typeof C.slotProps.transition=="function"?C.slotProps.transition(k):C.slotProps.transition;return h.jsx(BX,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?LX:FX,slots:{root:x.root,paper:T,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:M,paper:j,backdrop:typeof w.backdrop=="function"?w.backdrop(k):w.backdrop,transition:{...I,onEntering:(...$)=>{var z;D(...$),(z=I==null?void 0:I.onEntering)==null||z.call(I,...$)}}},open:u,ref:r,transitionDuration:p,ownerState:k,...b,classes:f,children:h.jsx(A,{actions:O,autoFocus:a&&(_===-1||s),autoFocusItem:E,variant:v,...L,children:o})})});function UX(e){return qe("MuiNativeSelect",e)}const K1=Ge("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),YX=e=>{const{classes:t,variant:r,disabled:n,multiple:a,open:o,error:i}=e,s={select:["select",r,n&&"disabled",a&&"multiple",i&&"error"],icon:["icon",`icon${ge(r)}`,o&&"iconOpen",n&&"disabled"]};return Ke(s,UX,t)},Mj=de("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${K1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),VX=de(Mj,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:jn,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${K1.multiple}`]:t.multiple}]}})({}),Tj=de("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${K1.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),KX=de(Tj,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${ge(r.variant)}`],r.open&&t.iconOpen]}})({}),qX=m.forwardRef(function(t,r){const{className:n,disabled:a,error:o,IconComponent:i,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:a,variant:l,error:o},d=YX(u);return h.jsxs(m.Fragment,{children:[h.jsx(VX,{ownerState:u,className:le(d.select,n),disabled:a,ref:s||r,...c}),t.multiple?null:h.jsx(KX,{as:i,ownerState:u,className:d.icon})]})});var XP;const GX=de("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:jn})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),XX=de("legend",{name:"MuiNotchedOutlined",shouldForwardProp:jn})(Xe(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function QX(e){const{children:t,classes:r,className:n,label:a,notched:o,...i}=e,s=a!=null&&a!=="",l={...e,notched:o,withLabel:s};return h.jsx(GX,{"aria-hidden":!0,className:n,ownerState:l,...i,children:h.jsx(XX,{ownerState:l,children:s?h.jsx("span",{children:a}):XP||(XP=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const ZX=e=>{const{classes:t}=e,n=Ke({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},mG,t);return{...t,...n}},JX=de(xv,{shouldForwardProp:e=>jn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:vv})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${$a.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${$a.focused} .${$a.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(nn()).map(([r])=>({props:{color:r},style:{[`&.${$a.focused} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${$a.error} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${$a.disabled} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:r})=>r.startAdornment,style:{paddingLeft:14}},{props:({ownerState:r})=>r.endAdornment,style:{paddingRight:14}},{props:({ownerState:r})=>r.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:r,size:n})=>r.multiline&&n==="small",style:{padding:"8.5px 14px"}}]}})),eQ=de(QX,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),tQ=de(bv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:yv})(Xe(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),q1=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiOutlinedInput"}),{components:a={},fullWidth:o=!1,inputComponent:i="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=n,g=ZX(n),y=ai(),v=el({props:n,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...n,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:y,fullWidth:o,hiddenLabel:v.hiddenLabel,multiline:l,size:v.size,type:f},w=u.root??a.Root??JX,b=u.input??a.Input??tQ,[S,k]=Le("notchedOutline",{elementType:eQ,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&v.required?h.jsxs(m.Fragment,{children:[s,"","*"]}):s}});return h.jsx(U1,{slots:{root:w,input:b},slotProps:d,renderSuffix:P=>h.jsx(S,{...k,notched:typeof c<"u"?c:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:o,inputComponent:i,multiline:l,ref:r,type:f,...p,classes:{...g,notchedOutline:null}})});q1.muiName="Input";function jj(e){return qe("MuiSelect",e)}const pu=Ge("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var QP;const rQ=de(Mj,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${pu.select}`]:t.select},{[`&.${pu.select}`]:t[r.variant]},{[`&.${pu.error}`]:t.error},{[`&.${pu.multiple}`]:t.multiple}]}})({[`&.${pu.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),nQ=de(Tj,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${ge(r.variant)}`],r.open&&t.iconOpen]}})({}),aQ=de("input",{shouldForwardProp:e=>gT(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ZP(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function oQ(e){return e==null||typeof e=="string"&&!e.trim()}const iQ=e=>{const{classes:t,variant:r,disabled:n,multiple:a,open:o,error:i}=e,s={select:["select",r,n&&"disabled",a&&"multiple",i&&"error"],icon:["icon",`icon${ge(r)}`,o&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return Ke(s,jj,t)},sQ=m.forwardRef(function(t,r){var pn,la,Or,go;const{"aria-describedby":n,"aria-label":a,autoFocus:o,autoWidth:i,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:g,inputRef:y,labelId:v,MenuProps:x={},multiple:w,name:b,onBlur:S,onChange:k,onClose:P,onFocus:E,onKeyDown:O,onMouseDown:D,onOpen:N,open:_,readOnly:C,renderValue:M,required:T,SelectDisplayProps:j={},tabIndex:A,type:L,value:I,variant:$="standard",...z}=t,[V,F]=qh({controlled:I,default:u,name:"Select"}),[ne,ee]=qh({controlled:_,default:c,name:"Select"}),X=m.useRef(null),fe=m.useRef(null),[q,ke]=m.useState(null),{current:B}=m.useRef(_!=null),[W,G]=m.useState(),R=hr(r,y),ae=m.useCallback(De=>{fe.current=De,De&&ke(De)},[]),J=q==null?void 0:q.parentNode;m.useImperativeHandle(R,()=>({focus:()=>{fe.current.focus()},node:X.current,value:V}),[V]),m.useEffect(()=>{c&&ne&&q&&!B&&(G(i?null:J.clientWidth),fe.current.focus())},[q,i]),m.useEffect(()=>{o&&fe.current.focus()},[o]),m.useEffect(()=>{if(!v)return;const De=Rr(fe.current).getElementById(v);if(De){const nt=()=>{getSelection().isCollapsed&&fe.current.focus()};return De.addEventListener("click",nt),()=>{De.removeEventListener("click",nt)}}},[v]);const he=(De,nt)=>{De?N&&N(nt):P&&P(nt),B||(G(i?null:J.clientWidth),ee(De))},Ce=De=>{D==null||D(De),De.button===0&&(De.preventDefault(),fe.current.focus(),he(!0,De))},re=De=>{he(!1,De)},ie=m.Children.toArray(s),$e=De=>{const nt=ie.find(Q=>Q.props.value===De.target.value);nt!==void 0&&(F(nt.props.value),k&&k(De,nt))},Fe=De=>nt=>{let Q;if(nt.currentTarget.hasAttribute("tabindex")){if(w){Q=Array.isArray(V)?V.slice():[];const ue=V.indexOf(De.props.value);ue===-1?Q.push(De.props.value):Q.splice(ue,1)}else Q=De.props.value;if(De.props.onClick&&De.props.onClick(nt),V!==Q&&(F(Q),k)){const ue=nt.nativeEvent||nt,Ae=new ue.constructor(ue.type,ue);Object.defineProperty(Ae,"target",{writable:!0,value:{value:Q,name:b}}),k(Ae,De)}w||he(!1,nt)}},Ne=De=>{C||([" ","ArrowUp","ArrowDown","Enter"].includes(De.key)&&(De.preventDefault(),he(!0,De)),O==null||O(De))},ve=q!==null&&ne,It=De=>{!ve&&S&&(Object.defineProperty(De,"target",{writable:!0,value:{value:V,name:b}}),S(De))};delete z["aria-invalid"];let Qe,lr;const Gt=[];let oe=!1;(rm({value:V})||f)&&(M?Qe=M(V):oe=!0);const ye=ie.map(De=>{if(!m.isValidElement(De))return null;let nt;if(w){if(!Array.isArray(V))throw new Error(Ho(2));nt=V.some(Q=>ZP(Q,De.props.value)),nt&&oe&&Gt.push(De.props.children)}else nt=ZP(V,De.props.value),nt&&oe&&(lr=De.props.children);return m.cloneElement(De,{"aria-selected":nt?"true":"false",onClick:Fe(De),onKeyUp:Q=>{Q.key===" "&&Q.preventDefault(),De.props.onKeyUp&&De.props.onKeyUp(Q)},role:"option",selected:nt,value:void 0,"data-value":De.props.value})});oe&&(w?Gt.length===0?Qe=null:Qe=Gt.reduce((De,nt,Q)=>(De.push(nt),Q<Gt.length-1&&De.push(", "),De),[]):Qe=lr);let Ie=W;!i&&B&&q&&(Ie=J.clientWidth);let Be;typeof A<"u"?Be=A:Be=d?null:0;const xe=j.id||(b?`mui-component-select-${b}`:void 0),je={...t,variant:$,value:V,open:ve,error:p},ze=iQ(je),lt={...x.PaperProps,...typeof((pn=x.slotProps)==null?void 0:pn.paper)=="function"?x.slotProps.paper(je):(la=x.slotProps)==null?void 0:la.paper},mo={...x.MenuListProps,...typeof((Or=x.slotProps)==null?void 0:Or.list)=="function"?x.slotProps.list(je):(go=x.slotProps)==null?void 0:go.list},fn=Rc();return h.jsxs(m.Fragment,{children:[h.jsx(rQ,{as:"div",ref:ae,tabIndex:Be,role:"combobox","aria-controls":ve?fn:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[v,xe].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":T?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:Ne,onMouseDown:d||C?null:Ce,onBlur:It,onFocus:E,...j,ownerState:je,className:le(j.className,ze.select,l),id:xe,children:oQ(Qe)?QP||(QP=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):Qe}),h.jsx(aQ,{"aria-invalid":p,value:Array.isArray(V)?V.join(","):V,name:b,ref:X,"aria-hidden":!0,onChange:$e,tabIndex:-1,disabled:d,className:ze.nativeInput,autoFocus:o,required:T,...z,ownerState:je}),h.jsx(nQ,{as:g,className:ze.icon,ownerState:je}),h.jsx(Nj,{id:`menu-${b||""}`,anchorEl:J,open:ve,onClose:re,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...x,slotProps:{...x.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":w?"true":void 0,disableListWrap:!0,id:fn,...mo},paper:{...lt,style:{minWidth:Ie,...lt!=null?lt.style:null}}},children:ye})]})}),lQ=e=>{const{classes:t}=e,n=Ke({root:["root"]},jj,t);return{...t,...n}},G1={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>jn(e)&&e!=="variant"},cQ=de(V1,G1)(""),uQ=de(q1,G1)(""),dQ=de(Y1,G1)(""),Aj=m.forwardRef(function(t,r){const n=Ze({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:o,classes:i={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=vG,id:d,input:f,inputProps:p,label:g,labelId:y,MenuProps:v,multiple:x=!1,native:w=!1,onClose:b,onOpen:S,open:k,renderValue:P,SelectDisplayProps:E,variant:O="outlined",...D}=n,N=w?qX:sQ,_=ai(),C=el({props:n,muiFormControl:_,states:["variant","error"]}),M=C.variant||O,T={...n,variant:M,classes:i},j=lQ(T),{root:A,...L}=j,I=f||{standard:h.jsx(cQ,{ownerState:T}),outlined:h.jsx(uQ,{label:g,ownerState:T}),filled:h.jsx(dQ,{ownerState:T})}[M],$=hr(r,Js(I));return h.jsx(m.Fragment,{children:m.cloneElement(I,{inputComponent:N,inputProps:{children:o,error:C.error,IconComponent:u,variant:M,type:void 0,multiple:x,...w?{id:d}:{autoWidth:a,defaultOpen:l,displayEmpty:c,labelId:y,MenuProps:v,onClose:b,onOpen:S,open:k,renderValue:P,SelectDisplayProps:{id:d,...E}},...p,classes:p?Ar(L,p.classes):L,...f?f.props.inputProps:{}},...(x&&w||c)&&M==="outlined"?{notched:!0}:{},ref:$,className:le(I.props.className,s,j.root),...!f&&{variant:M},...D})})});Aj.muiName="Select";function fQ(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:n,open:a,resumeHideDuration:o}=e,i=Ss();m.useEffect(()=>{if(!a)return;function x(w){w.defaultPrevented||w.key==="Escape"&&(n==null||n(w,"escapeKeyDown"))}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[a,n]);const s=Kn((x,w)=>{n==null||n(x,w)}),l=Kn(x=>{!n||x==null||i.start(x,()=>{s(null,"timeout")})});m.useEffect(()=>(a&&l(t),i.clear),[a,t,l,i]);const c=x=>{n==null||n(x,"clickaway")},u=i.clear,d=m.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),f=x=>w=>{const b=x.onBlur;b==null||b(w),d()},p=x=>w=>{const b=x.onFocus;b==null||b(w),u()},g=x=>w=>{const b=x.onMouseEnter;b==null||b(w),u()},y=x=>w=>{const b=x.onMouseLeave;b==null||b(w),d()};return m.useEffect(()=>{if(!r&&a)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[r,a,d,u]),{getRootProps:(x={})=>{const w={...tm(e),...tm(x)};return{role:"presentation",...x,...w,onBlur:f(w),onFocus:p(w),onMouseEnter:g(w),onMouseLeave:y(w)}},onClickAway:c}}function pQ(e){return qe("MuiSnackbarContent",e)}Ge("MuiSnackbarContent",["root","message","action"]);const hQ=e=>{const{classes:t}=e;return Ke({root:["root"],action:["action"],message:["message"]},pQ,t)},mQ=de(ff,{name:"MuiSnackbarContent",slot:"Root"})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Tx(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Tx(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),gQ=de("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),vQ=de("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),yQ=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiSnackbarContent"}),{action:a,className:o,message:i,role:s="alert",...l}=n,c=n,u=hQ(c);return h.jsxs(mQ,{role:s,elevation:6,className:le(u.root,o),ownerState:c,ref:r,...l,children:[h.jsx(gQ,{className:u.message,ownerState:c,children:i}),a?h.jsx(vQ,{className:u.action,ownerState:c,children:a}):null]})});function xQ(e){return qe("MuiSnackbar",e)}Ge("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const bQ=e=>{const{classes:t,anchorOrigin:r}=e,n={root:["root",`anchorOrigin${ge(r.vertical)}${ge(r.horizontal)}`]};return Ke(n,xQ,t)},wQ=de("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${ge(r.anchorOrigin.vertical)}${ge(r.anchorOrigin.horizontal)}`]]}})(Xe(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),SQ=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiSnackbar"}),a=Ic(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{action:i,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:g=!1,message:y,onBlur:v,onClose:x,onFocus:w,onMouseEnter:b,onMouseLeave:S,open:k,resumeHideDuration:P,slots:E={},slotProps:O={},TransitionComponent:D,transitionDuration:N=o,TransitionProps:{onEnter:_,onExited:C,...M}={},...T}=n,j={...n,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:g,TransitionComponent:D,transitionDuration:N},A=bQ(j),{getRootProps:L,onClickAway:I}=fQ(j),[$,z]=m.useState(!0),V=ae=>{z(!0),C&&C(ae)},F=(ae,J)=>{z(!1),_&&_(ae,J)},ne={slots:{transition:D,...E},slotProps:{content:p,clickAwayListener:f,transition:M,...O}},[ee,X]=Le("root",{ref:r,className:[A.root,d],elementType:wQ,getSlotProps:L,externalForwardedProps:{...ne,...T},ownerState:j}),[fe,{ownerState:q,...ke}]=Le("clickAwayListener",{elementType:_G,externalForwardedProps:ne,getSlotProps:ae=>({onClickAway:(...J)=>{var Ce;const he=J[0];(Ce=ae.onClickAway)==null||Ce.call(ae,...J),!(he!=null&&he.defaultMuiPrevented)&&I(...J)}}),ownerState:j}),[B,W]=Le("content",{elementType:yQ,shouldForwardComponentProp:!0,externalForwardedProps:ne,additionalProps:{message:y,action:i},ownerState:j}),[G,R]=Le("transition",{elementType:Cd,externalForwardedProps:ne,getSlotProps:ae=>({onEnter:(...J)=>{var he;(he=ae.onEnter)==null||he.call(ae,...J),F(...J)},onExited:(...J)=>{var he;(he=ae.onExited)==null||he.call(ae,...J),V(...J)}}),additionalProps:{appear:!0,in:k,timeout:N,direction:s==="top"?"down":"up"},ownerState:j});return!k&&$?null:h.jsx(fe,{...ke,...E.clickAwayListener&&{ownerState:q},children:h.jsx(ee,{...X,children:h.jsx(G,{...R,children:u||h.jsx(B,{...W})})})})});function kQ(e){return qe("MuiTextField",e)}Ge("MuiTextField",["root"]);const CQ={standard:V1,filled:Y1,outlined:q1},PQ=e=>{const{classes:t}=e;return Ke({root:["root"]},kQ,t)},EQ=de(x9,{name:"MuiTextField",slot:"Root"})({}),pl=m.forwardRef(function(t,r){const n=Ze({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:o=!1,children:i,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:g,id:y,InputLabelProps:v,inputProps:x,InputProps:w,inputRef:b,label:S,maxRows:k,minRows:P,multiline:E=!1,name:O,onBlur:D,onChange:N,onFocus:_,placeholder:C,required:M=!1,rows:T,select:j=!1,SelectProps:A,slots:L={},slotProps:I={},type:$,value:z,variant:V="outlined",...F}=n,ne={...n,autoFocus:o,color:l,disabled:u,error:d,fullWidth:p,multiline:E,required:M,select:j,variant:V},ee=PQ(ne),X=Rc(y),fe=g&&X?`${X}-helper-text`:void 0,q=S&&X?`${X}-label`:void 0,ke=CQ[V],B={slots:L,slotProps:{input:w,inputLabel:v,htmlInput:x,formHelperText:f,select:A,...I}},W={},G=B.slotProps.inputLabel;V==="outlined"&&(G&&typeof G.shrink<"u"&&(W.notched=G.shrink),W.label=S),j&&((!A||!A.native)&&(W.id=void 0),W["aria-describedby"]=void 0);const[R,ae]=Le("root",{elementType:EQ,shouldForwardComponentProp:!0,externalForwardedProps:{...B,...F},ownerState:ne,className:le(ee.root,s),ref:r,additionalProps:{disabled:u,error:d,fullWidth:p,required:M,color:l,variant:V}}),[J,he]=Le("input",{elementType:ke,externalForwardedProps:B,additionalProps:W,ownerState:ne}),[Ce,re]=Le("inputLabel",{elementType:EX,externalForwardedProps:B,ownerState:ne}),[ie,$e]=Le("htmlInput",{elementType:"input",externalForwardedProps:B,ownerState:ne}),[Fe,Ne]=Le("formHelperText",{elementType:uX,externalForwardedProps:B,ownerState:ne}),[ve,It]=Le("select",{elementType:Aj,externalForwardedProps:B,ownerState:ne}),Qe=h.jsx(J,{"aria-describedby":fe,autoComplete:a,autoFocus:o,defaultValue:c,fullWidth:p,multiline:E,name:O,rows:T,maxRows:k,minRows:P,type:$,value:z,id:X,inputRef:b,onBlur:D,onChange:N,onFocus:_,placeholder:C,inputProps:$e,slots:{input:L.htmlInput?ie:void 0},...he});return h.jsxs(R,{...ae,children:[S!=null&&S!==""&&h.jsx(Ce,{htmlFor:X,id:q,...re,children:S}),j?h.jsx(ve,{"aria-describedby":fe,id:X,labelId:q,value:z,input:Qe,...It,children:i}):Qe,g&&h.jsx(Fe,{id:fe,...Ne,children:g})]})});EK("ko",Hq);const JP=[{label:"초과",value:"greater"},{label:"미만",value:"less"}],eE=[{label:"MB",value:"MB"},{label:"KB",value:"KB"},{label:"Bytes",value:"B"}],tE=[{label:"전체 기간",value:""},{label:"1일",value:"1d"},{label:"1주",value:"1w"},{label:"1개월",value:"1m"},{label:"6개월",value:"6m"},{label:"1년",value:"1y"},{label:"직접 입력",value:"custom"}],rE=[{label:"전체보관함",value:"all"},{label:"받은편지함",value:"inbox"},{label:"보낸편지함",value:"sent"},{label:"중요편지함",value:"important"},{label:"임시보관함",value:"drafts"},{label:"스팸함",value:"spam"},{label:"휴지통",value:"trash"}],gp=(e,t)=>{var r;return((r=e.find(n=>n.value===t))==null?void 0:r.label)||""},OQ=U.forwardRef(({value:e,onClick:t,onChange:r,placeholder:n},a)=>h.jsxs("div",{className:"relative w-full cursor-pointer",children:[h.jsx("input",{ref:a,readOnly:!0,value:e,onClick:t,onChange:r,className:"w-full border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none transition-all cursor-pointer",placeholder:n}),h.jsx(VF,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"})]})),vp=({isOpen:e,options:t,value:r,onChange:n,onClose:a})=>{const[o,i]=m.useState(!1);return m.useEffect(()=>{if(e)i(!0);else{const s=setTimeout(()=>i(!1),200);return()=>clearTimeout(s)}},[e]),o?h.jsx("div",{className:`absolute top-full left-0 mt-1 bg-white border border-gray-200 rounded-xl shadow-lg z-[60] py-1 min-w-[max-content] ${e?"animate-fade-in-down":"animate-fade-out-up"}`,children:t.map(s=>h.jsxs("button",{onClick:l=>{l.stopPropagation(),n(s.value),a()},type:"button",className:`w-full text-left px-4 py-2.5 text-sm hover:bg-gray-50 flex items-center justify-between gap-3 whitespace-nowrap ${r===s.value?"bg-blue-50 text-blue-600 font-medium":"text-gray-700"}`,children:[h.jsx("span",{children:s.label}),r===s.value&&h.jsx(rc,{className:"h-4 w-4"})]},s.value))}):null},DQ=()=>{var ae,J,he,Ce;const e=ni(),{user:t,logout:r,searchEmails:n,clearSearch:a,isSearchMode:o,searchScope:i,searchHistory:s,removeSearchHistory:l,clearSearchHistory:c}=ln(),[u,d]=m.useState(!1),[f,p]=m.useState(!1),g=m.useRef(null),[y,v]=m.useState(null),x=!!y,[w,b]=m.useState(""),[S,k]=m.useState({from:"",to:"",subject:"",includes:"",excludes:"",sizeOperator:"greater",sizeValue:"",sizeUnit:"MB",dateWithin:"",dateReference:"",scope:"all",hasAttachment:!1}),[P,E]=m.useState(null),[O,D]=m.useState(!1),[N,_]=m.useState(-1),C=m.useRef(null),M=(re=w)=>{re.trim()&&(n(re.trim(),S.scope.toUpperCase()),d(!1),D(!1),_(-1))},T=()=>{const re=w.trim(),ie={};if(S.from&&(ie.from=S.from),S.to&&(ie.to=S.to),S.subject&&(ie.subject=S.subject),S.includes&&(ie.includes=S.includes),S.excludes&&(ie.excludes=S.excludes),S.hasAttachment&&(ie.hasAttachment=!0),S.sizeValue){const Fe=parseFloat(S.sizeValue)*(S.sizeUnit==="MB"?1048576:S.sizeUnit==="KB"?1024:1);S.sizeOperator==="greater"?ie.minSize=Math.floor(Fe):ie.maxSize=Math.floor(Fe)}if(S.dateWithin&&S.dateWithin!=="custom"){const Fe=new Date;let Ne=new Date;switch(S.dateWithin){case"1d":Ne.setDate(Fe.getDate()-1);break;case"1w":Ne.setDate(Fe.getDate()-7);break;case"1m":Ne.setMonth(Fe.getMonth()-1);break;case"6m":Ne.setMonth(Fe.getMonth()-6);break;case"1y":Ne.setFullYear(Fe.getFullYear()-1);break;default:Ne=null}Ne&&(ie.dateAfter=Ne.toISOString().split("T")[0])}else S.dateReference&&(ie.dateBefore=S.dateReference);const $e=Object.keys(ie).length>0;(re||$e)&&(n(re,S.scope.toUpperCase(),ie),d(!1))},j=re=>{if(O&&s.length>0){if(re.key==="ArrowDown"){re.preventDefault(),_(ie=>ie<s.length-1?ie+1:0);return}if(re.key==="ArrowUp"){re.preventDefault(),_(ie=>ie>0?ie-1:s.length-1);return}if(re.key==="Enter"&&N>=0){re.preventDefault();const ie=s[N];b(ie),M(ie);return}}re.key==="Enter"?M():re.key==="Escape"&&(b(""),D(!1),a())},A=(re,ie)=>{ie.preventDefault(),ie.stopPropagation(),b(re),M(re)},L=(re,ie)=>{ie.preventDefault(),ie.stopPropagation(),l(re)};m.useEffect(()=>{o||(b(""),_(-1))},[o]),m.useEffect(()=>{const re=ie=>{g.current&&!g.current.contains(ie.target)&&(d(!1),E(null),D(!1),_(-1))};return(u||O)&&document.addEventListener("mousedown",re),()=>document.removeEventListener("mousedown",re)},[u,O]);const[I,$]=m.useState(!1),[z,V]=m.useState(!1),F=()=>{V(!0),setTimeout(()=>{$(!1),V(!1)},200)},ne=()=>{I||z?z||F():$(!0)};m.useEffect(()=>{if(u)p(!0);else{const re=setTimeout(()=>p(!1),200);return()=>clearTimeout(re)}},[u]);const ee=re=>{const{name:ie,value:$e,type:Fe,checked:Ne}=re.target;k(ve=>({...ve,[ie]:Fe==="checkbox"?Ne:$e}))},X=()=>{k({from:"",to:"",subject:"",includes:"",excludes:"",sizeOperator:"greater",sizeValue:"",sizeUnit:"MB",dateWithin:"",dateReference:"",scope:"all",hasAttachment:!1}),E(null),b(""),a()},fe=re=>{k(ie=>({...ie,dateWithin:re,dateReference:re==="custom"?ie.dateReference:""}))},q=re=>{const ie=re?new Date(re.getTime()-re.getTimezoneOffset()*6e4).toISOString().split("T")[0]:"";k($e=>({...$e,dateReference:ie,dateWithin:ie?"custom":$e.dateWithin})),F()},ke=re=>v(re.currentTarget),B=()=>v(null),W=()=>{B(),r()},G="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none transition-all",R="text-sm font-medium text-gray-600 mb-1.5";return h.jsxs("div",{className:"py-4 px-6 bg-white border-b border-gray-100 flex items-center justify-between flex-shrink-0 relative z-30",children:[h.jsx("div",{className:"flex-1 max-w-2xl",children:h.jsxs("div",{className:"relative",ref:g,children:[h.jsx("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:h.jsx(Bh,{className:"h-5 w-5 text-gray-400"})}),h.jsx("input",{ref:C,type:"text",value:w,onChange:re=>b(re.target.value),onKeyDown:j,onFocus:()=>D(!0),className:`block w-full pl-12 pr-12 h-11 border rounded-xl leading-5 placeholder-gray-400 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-100 focus:border-blue-300 text-sm transition-all ${o?"border-blue-400 bg-blue-50":"border-gray-200 bg-gray-50 focus:bg-white"}`,placeholder:"메일 검색... (Enter로 검색)"}),h.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:h.jsx(pt,{title:u?"":"검색 옵션",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{className:`p-2 rounded-lg transition-all ${u?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,onClick:()=>d(!u),children:h.jsx(gz,{className:"h-5 w-5"})})})}),O&&s.length>0&&!u&&h.jsx("div",{className:"absolute top-full mt-2 left-0 right-0 bg-white rounded-xl shadow-lg border border-gray-200 overflow-hidden z-50 animate-fade-in-down",children:h.jsxs("div",{className:"py-2",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-gray-100",children:[h.jsxs("span",{className:"text-xs font-medium text-gray-500 flex items-center gap-1.5",children:[h.jsx(zh,{className:"h-3.5 w-3.5"}),"최근 검색"]}),h.jsx("button",{onClick:re=>{re.preventDefault(),re.stopPropagation(),c()},className:"text-xs text-gray-400 hover:text-red-500 transition-colors",children:"전체 삭제"})]}),s.map((re,ie)=>h.jsxs("div",{onClick:$e=>A(re,$e),className:`flex items-center justify-between px-4 py-2.5 cursor-pointer transition-all group ${N===ie?"bg-blue-50 text-blue-600":"hover:bg-gray-50 text-gray-700"}`,children:[h.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[h.jsx(Bh,{className:"h-4 w-4 text-gray-400 flex-shrink-0"}),h.jsx("span",{className:"truncate text-sm",children:re})]}),h.jsx("button",{onClick:$e=>L(ie,$e),className:"p-1 rounded-md text-gray-400 hover:text-red-500 hover:bg-red-50 opacity-0 group-hover:opacity-100 transition-all",children:h.jsx(qu,{className:"h-3.5 w-3.5"})})]},ie))]})}),f&&h.jsxs("div",{className:`absolute top-full mt-2 right-0 w-[580px] bg-white rounded-2xl shadow-2xl border border-gray-100 p-6 z-50 origin-top-right select-none ${u?"animate-fade-in-down":"animate-fade-out-up"}`,onClick:()=>P&&E(null),children:[h.jsx("h3",{className:"text-base font-bold text-gray-800 mb-5",children:"상세 검색"}),h.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:R,children:"보낸사람"}),h.jsx("input",{name:"from",value:S.from,onChange:ee,className:G,placeholder:"이메일 주소"})]}),h.jsxs("div",{children:[h.jsx("label",{className:R,children:"받는사람"}),h.jsx("input",{name:"to",value:S.to,onChange:ee,className:G,placeholder:"이메일 주소"})]})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:R,children:"제목"}),h.jsx("input",{name:"subject",value:S.subject,onChange:ee,className:G,placeholder:"제목 검색"})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[h.jsxs("div",{children:[h.jsx("label",{className:R,children:"포함하는 단어"}),h.jsx("input",{name:"includes",value:S.includes,onChange:ee,className:G,placeholder:"포함할 키워드"})]}),h.jsxs("div",{children:[h.jsx("label",{className:R,children:"제외할 단어"}),h.jsx("input",{name:"excludes",value:S.excludes,onChange:ee,className:G,placeholder:"제외할 키워드"})]})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:R,children:"크기"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"relative w-24",children:[h.jsxs("button",{type:"button",onClick:re=>{re.stopPropagation(),E(P==="sizeOperator"?null:"sizeOperator")},className:"w-full text-left border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white flex items-center justify-between focus:border-blue-400 transition-all",children:[h.jsx("span",{children:gp(JP,S.sizeOperator)}),h.jsx(Eu,{className:`h-4 w-4 text-gray-400 transition-transform ${P==="sizeOperator"?"rotate-180":""}`})]}),h.jsx(vp,{isOpen:P==="sizeOperator",options:JP,value:S.sizeOperator,onChange:re=>k(ie=>({...ie,sizeOperator:re})),onClose:()=>E(null)})]}),h.jsx("input",{name:"sizeValue",type:"number",value:S.sizeValue,onChange:ee,className:"flex-1 border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 text-center bg-white focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none transition-all",placeholder:"크기"}),h.jsxs("div",{className:"relative w-20",children:[h.jsxs("button",{type:"button",onClick:re=>{re.stopPropagation(),E(P==="sizeUnit"?null:"sizeUnit")},className:"w-full text-left border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white flex items-center justify-between focus:border-blue-400 transition-all",children:[h.jsx("span",{children:gp(eE,S.sizeUnit)}),h.jsx(Eu,{className:`h-4 w-4 text-gray-400 transition-transform ${P==="sizeUnit"?"rotate-180":""}`})]}),h.jsx(vp,{isOpen:P==="sizeUnit",options:eE,value:S.sizeUnit,onChange:re=>k(ie=>({...ie,sizeUnit:re})),onClose:()=>E(null)})]})]})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:R,children:"기간"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"relative flex-1",children:[h.jsxs("button",{type:"button",onClick:re=>{re.stopPropagation(),E(P==="dateWithin"?null:"dateWithin")},className:"w-full text-left border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white flex items-center justify-between focus:border-blue-400 transition-all",children:[h.jsx("span",{children:gp(tE,S.dateWithin)||"전체 기간"}),h.jsx(Eu,{className:`h-4 w-4 text-gray-400 transition-transform ${P==="dateWithin"?"rotate-180":""}`})]}),h.jsx(vp,{isOpen:P==="dateWithin",options:tE,value:S.dateWithin,onChange:fe,onClose:()=>E(null)})]}),h.jsx("div",{className:"flex-1 custom-datepicker-wrapper",children:h.jsx(fq,{selected:S.dateReference?new Date(S.dateReference):null,onChange:q,open:I||z,onClickOutside:F,onInputClick:ne,calendarClassName:z?"react-datepicker-closing":"",dateFormat:"yyyy/MM/dd",locale:"ko",placeholderText:"날짜 선택",maxDate:new Date,popperClassName:"z-[60]",customInput:h.jsx(OQ,{})})})]})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:R,children:"검색 범위"}),h.jsxs("div",{className:"relative",children:[h.jsxs("button",{type:"button",onClick:re=>{re.stopPropagation(),E(P==="scope"?null:"scope")},className:"w-full text-left border border-gray-200 rounded-lg px-3 py-2 text-sm text-gray-700 bg-white flex items-center justify-between focus:border-blue-400 transition-all",children:[h.jsx("span",{children:gp(rE,S.scope)}),h.jsx(Eu,{className:`h-4 w-4 text-gray-400 transition-transform ${P==="scope"?"rotate-180":""}`})]}),h.jsx(vp,{isOpen:P==="scope",options:rE,value:S.scope,onChange:re=>k(ie=>({...ie,scope:re})),onClose:()=>E(null)})]})]}),h.jsx("div",{className:"flex items-center mb-4",children:h.jsx(_9,{control:h.jsx(h9,{checked:S.hasAttachment,onChange:ee,name:"hasAttachment",size:"small",sx:{color:"#9ca3af","&.Mui-checked":{color:"#3b82f6"}}}),label:h.jsx("span",{className:"text-sm text-gray-600",children:"첨부파일 있음"})})}),h.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-gray-100",children:[h.jsx("button",{onClick:X,className:"px-4 py-2.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-xl font-medium text-sm transition-all",children:"초기화"}),h.jsx("button",{onClick:T,className:"px-6 py-2.5 bg-gradient-to-r from-blue-500 to-indigo-600 text-white font-semibold rounded-xl shadow-lg shadow-blue-500/30 hover:shadow-xl hover:shadow-blue-500/40 hover:-translate-y-0.5 transition-all text-sm",children:"적용"})]})]})]})}),h.jsxs("div",{className:"ml-6 flex items-center space-x-3",children:[t&&t.isAdmin&&h.jsx(pt,{title:"관리자 설정",children:h.jsx("button",{onClick:()=>e("/admin/dashboard"),className:"p-2.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-xl transition-all",children:h.jsx(IM,{className:"h-5 w-5"})})}),h.jsx("button",{onClick:ke,className:"flex items-center justify-center rounded-full hover:ring-4 hover:ring-blue-50 transition-all",children:h.jsx($P,{sx:{bgcolor:"#e0e7ff",color:"#6366f1",width:40,height:40,fontSize:"1rem",fontWeight:600},children:((J=(ae=t==null?void 0:t.name)==null?void 0:ae.charAt(0))==null?void 0:J.toUpperCase())||h.jsx(Wh,{size:20})})}),h.jsx(Nj,{anchorEl:y,open:x,onClose:B,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 4px 20px rgba(0,0,0,0.12))",mt:1.5,minWidth:280,borderRadius:"16px",border:"1px solid #f3f4f6"}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:h.jsxs("div",{className:"p-4",children:[h.jsxs("div",{className:"flex items-center gap-4 p-4 bg-gradient-to-br from-indigo-50 to-blue-50 rounded-xl mb-3",children:[h.jsx($P,{sx:{bgcolor:"linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)",background:"linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)",width:52,height:52,fontSize:"1.25rem",fontWeight:700,boxShadow:"0 4px 12px rgba(99, 102, 241, 0.3)"},children:((Ce=(he=t==null?void 0:t.name)==null?void 0:he.charAt(0))==null?void 0:Ce.toUpperCase())||"U"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("p",{className:"text-base font-bold text-gray-800 truncate",children:(t==null?void 0:t.name)||"사용자"}),(t==null?void 0:t.isAdmin)&&h.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 bg-indigo-100 text-indigo-600 text-xs font-semibold rounded-full",children:[h.jsx(xd,{size:10}),"관리자"]})]}),h.jsx("p",{className:"text-sm text-gray-500 truncate",children:t==null?void 0:t.email})]})]}),h.jsxs("button",{onClick:W,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-600 hover:text-red-500 hover:bg-red-50 rounded-xl transition-all",children:[h.jsx(jM,{size:18}),h.jsx("span",{className:"text-sm font-medium",children:"로그아웃"})]})]})})]})]})},_Q=({onComposeClick:e,activeBox:t})=>{const{selectedBox:r,counts:n,isSearchMode:a,searchTotal:o,searchQuery:i,clearSearch:s,setSelectedEmail:l}=ln(),c=ni(),u=a?"SEARCH":t||r,d=w=>{const b=parseFloat(w);return isNaN(b)?"0.00 MB":b>=1024?`${(b/1024).toFixed(2)} GB`:`${b.toFixed(2)} MB`},f=[{name:"INBOX",icon:wa,label:"받은편지함",color:"from-blue-500 to-blue-600"},{name:"SENT",icon:nc,label:"보낸편지함",color:"from-emerald-500 to-emerald-600"},{name:"IMPORTANT",icon:Cg,label:"중요편지함",color:"from-amber-500 to-amber-600"},{name:"DRAFTS",icon:MM,label:"임시보관함",color:"from-slate-400 to-slate-500"},{name:"SPAM",icon:kg,label:"스팸함",color:"from-orange-500 to-orange-600"},{name:"TRASH",icon:vz,label:"휴지통",color:"from-red-400 to-red-500"}],p=w=>{a&&s(),c(`/mail/${w.toLowerCase()}`)},g=w=>{w.stopPropagation(),s(),l(null),c("/mail/inbox")},y=(n==null?void 0:n.storageUsed)||0,v=(n==null?void 0:n.storageLimit)||51200,x=Math.min(y/v*100,100);return h.jsxs("div",{className:"flex flex-col h-full bg-white",children:[h.jsx("div",{className:"px-6 py-6",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"w-11 h-11 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-xl flex items-center justify-center shadow-lg shadow-blue-500/30",children:h.jsx(wa,{className:"text-white",size:22})}),h.jsxs("div",{children:[h.jsx("h1",{className:"text-slate-800 font-bold text-lg",children:"Mailbox"}),h.jsx("p",{className:"text-slate-400 text-xs",children:"메일 서비스"})]})]})}),h.jsx("div",{className:"px-4 mb-4",children:h.jsxs("button",{onClick:e,className:"w-full flex items-center justify-center gap-2 px-4 py-3.5 bg-gradient-to-r from-blue-500 to-indigo-600 text-white font-semibold rounded-xl shadow-lg shadow-blue-500/30 hover:shadow-xl hover:shadow-blue-500/40 hover:-translate-y-0.5 transition-all",children:[h.jsx(RM,{size:18}),h.jsx("span",{children:"메일 쓰기"})]})}),h.jsx("div",{className:"px-6 mb-2 mt-2",children:h.jsx("div",{className:"border-t border-gray-100 pt-4",children:h.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"메일함"})})}),h.jsx("nav",{className:"flex-1 px-4 overflow-y-auto",children:h.jsxs("div",{className:"space-y-1",children:[a&&h.jsxs("div",{className:"mb-3",children:[h.jsxs("div",{className:"w-full flex items-center justify-between px-4 py-3 rounded-xl transition-all bg-gradient-to-r from-purple-500 to-indigo-600 text-white shadow-lg",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Bh,{size:20,className:"text-white"}),h.jsxs("div",{className:"text-left",children:[h.jsx("span",{className:"text-sm font-medium block",children:"검색 결과"}),h.jsxs("span",{className:"text-xs text-white/70 truncate max-w-[120px] block",children:['"',i,'"']})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"px-2.5 py-0.5 rounded-full text-xs font-semibold bg-white/20 text-white",children:o}),h.jsx("button",{onClick:g,className:"p-1 hover:bg-white/20 rounded-lg transition-colors",title:"검색 닫기",children:h.jsx(qu,{size:14,className:"text-white"})})]})]}),h.jsx("div",{className:"border-b border-gray-100 my-3"})]}),f.map(w=>{const b=w.icon,S=!a&&u===w.name,k=n&&n[w.name]||0;return h.jsxs("button",{onClick:()=>p(w.name),className:`w-full flex items-center justify-between px-4 py-3 rounded-xl transition-all ${S?`bg-gradient-to-r ${w.color} text-white shadow-lg`:"text-slate-600 hover:bg-slate-50"}`,children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(b,{size:20,className:S?"text-white":"text-slate-400"}),h.jsx("span",{className:"text-sm font-medium",children:w.label})]}),h.jsx("span",{className:`px-2.5 py-0.5 rounded-full text-xs font-semibold ${S?"bg-white/20 text-white":"bg-slate-100 text-slate-500"}`,children:k})]},w.name)})]})}),h.jsx("div",{className:"px-4 pb-4 mt-auto",children:h.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-slate-100 rounded-2xl p-5 border border-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h3",{className:"text-sm font-bold text-slate-700",children:"저장공간"}),h.jsxs("span",{className:"text-xs font-medium text-blue-500",children:[x.toFixed(1),"%"]})]}),h.jsx("div",{className:"w-full bg-slate-200 rounded-full h-2 mb-3 overflow-hidden",children:h.jsx("div",{className:"bg-gradient-to-r from-blue-500 to-indigo-500 h-2 rounded-full transition-all",style:{width:`${x}%`}})}),h.jsxs("p",{className:"text-xs text-slate-500 font-medium",children:[d(y)," / ",d(v)]})]})})]})},va=e=>{if(!e||typeof e!="string")return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},Rj=23100,Ij=9173,nE=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r},$j=e=>{if(!e||typeof e!="number")return"";const t=(e^Rj)+Ij,r=btoa(t.toString()).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),n=nE(6),a=nE(6);return n+r+a},NQ=e=>{if(!e||typeof e!="string"||e.length<14)return null;try{let r=e.slice(6,-6).replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4;)r+="=";const n=atob(r),a=parseInt(n,10);if(isNaN(a))return null;const o=a-Ij^Rj;return o>0?o:null}catch(t){return console.error("ID 디코딩 오류:",t),null}},sh=({text:e,query:t,className:r=""})=>{if(!(t!=null&&t.trim())||!e)return h.jsx(h.Fragment,{children:e});const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`(${n})`,"gi"),o=e.split(a);return h.jsx(h.Fragment,{children:o.map((i,s)=>i.toLowerCase()===t.toLowerCase()?h.jsx("mark",{className:`bg-yellow-200 text-gray-900 px-0.5 rounded ${r}`,children:i},s):h.jsx(U.Fragment,{children:i},s))})},Lj=({isOpen:e,onClose:t,onConfirm:r,title:n,message:a,confirmText:o="확인",cancelText:i="취소",type:s="warning"})=>{if(!e)return null;const l={warning:{icon:_M,bgColor:"bg-amber-100",iconColor:"text-amber-600",buttonColor:"bg-amber-500 hover:bg-amber-600"},danger:{icon:Li,bgColor:"bg-red-100",iconColor:"text-red-600",buttonColor:"bg-red-500 hover:bg-red-600"},spam:{icon:kg,bgColor:"bg-orange-100",iconColor:"text-orange-600",buttonColor:"bg-orange-500 hover:bg-orange-600"},star:{icon:Cg,bgColor:"bg-amber-100",iconColor:"text-amber-500",buttonColor:"bg-amber-500 hover:bg-amber-600"},restore:{icon:pz,bgColor:"bg-emerald-100",iconColor:"text-emerald-600",buttonColor:"bg-emerald-500 hover:bg-emerald-600"}},c=l[s]||l.warning,u=c.icon;return h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),h.jsx("div",{className:"relative bg-white rounded-2xl shadow-2xl max-w-sm w-full mx-4 overflow-hidden animate-in zoom-in-95 duration-200",children:h.jsxs("div",{className:"p-6",children:[h.jsx("div",{className:`w-12 h-12 rounded-full ${c.bgColor} flex items-center justify-center mx-auto mb-4`,children:h.jsx(u,{className:`h-6 w-6 ${c.iconColor}`})}),h.jsx("h3",{className:"text-lg font-semibold text-gray-900 text-center mb-2",children:n}),h.jsx("p",{className:"text-sm text-gray-500 text-center mb-6",children:a}),h.jsxs("div",{className:"flex gap-3",children:[h.jsx("button",{onClick:t,className:"flex-1 px-4 py-2.5 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-xl font-medium transition-colors",children:i}),h.jsx("button",{onClick:async()=>{await r(),t()},className:`flex-1 px-4 py-2.5 ${c.buttonColor} text-white rounded-xl font-medium transition-colors`,children:o})]})]})})]})},MQ=()=>{const{emails:e,loading:t,selectedEmail:r,fetchEmails:n,selectedBox:a,markAsRead:o,markAllAsRead:i,markAsUnread:s,moveToTrash:l,deleteEmail:c,restoreEmail:u,page:d,totalPages:f,totalEmails:p,moveEmail:g,deleteAllEmails:y,isSearchMode:v,searchResults:x,searchTotal:w,searchQuery:b,searchPage:S,searchTotalPages:k,searchEmails:P,searchScope:E,searchFilters:O,clearSearch:D}=ln(),N=ni(),[_,C]=m.useState(new Set),M=v?x:e,T=v?w:p,[j,A]=m.useState(!1),[L,I]=m.useState(!1),$=m.useRef(null),z=m.useRef(null),[V,F]=m.useState({isOpen:!1,type:"",title:"",message:"",onConfirm:()=>{}});m.useEffect(()=>{C(new Set)},[a]),m.useEffect(()=>{!r&&!v&&C(new Set)},[r,v]),m.useEffect(()=>{const oe=ye=>{$.current&&!$.current.contains(ye.target)&&A(!1),z.current&&!z.current.contains(ye.target)&&I(!1)};return document.addEventListener("mousedown",oe),()=>document.removeEventListener("mousedown",oe)},[]);const ne=()=>{v?S<k&&P(b,E,O,S+1):d<f&&n(a,d+1)},ee=()=>{v?S>1&&P(b,E,O,S-1):d>1&&n(a,d-1)},X=20,fe=m.useMemo(()=>{if(v){const Be=S||1,xe=(Be-1)*X+1,je=Math.min(Be*X,T);return T>0?`검색 결과: ${T.toLocaleString()}개 중 ${xe}-${je}`:"검색 결과: 0개"}const oe=(d-1)*X+1,ye=Math.min(d*X,T);return T>0?`${T.toLocaleString()}개 중 ${oe}-${ye}`:"0개"},[T,d,S,v]),q=()=>{n(a,d)},ke=(oe,ye)=>{oe.stopPropagation();const Ie=new Set(_);Ie.has(ye)?Ie.delete(ye):Ie.add(ye),C(Ie)},B=()=>{_.size===M.length&&M.length>0?C(new Set):C(new Set(M.map(oe=>oe.id)))},W=oe=>{const ye=new Date(oe),Ie=new Date,Be=Ie-ye,xe=Math.floor(Be/1e3),je=Math.floor(xe/60),ze=Math.floor(je/60);if(xe<60)return`${xe}초 전`;if(je<60)return`${je}분 전`;if(ze<24)return`${ze}시간 전`;const lt=ye.getFullYear(),mo=Ie.getFullYear(),fn=ye.getMonth()+1,pn=ye.getDate();return lt===mo?`${fn}월 ${pn}일`:`${lt}년 ${fn}월 ${pn}일`},G=oe=>{if(!oe)return"(발신자 없음)";if(oe.fromName)return oe.fromName;const ye=oe.from;if(!ye)return"(발신자 없음)";const Ie=ye.match(/^(.*?)\s*<.*?>$/);return Ie?Ie[1].replace(/['"]/g,"").trim()||ye.split("@")[0]:ye.includes("@")?ye.split("@")[0]:ye},R=_.size,ae=M.length>0&&R===M.length,J=R>0&&R<M.length,he=oe=>oe.isRead||oe.flags&&oe.flags.includes("\\Seen"),Ce=M.filter(oe=>_.has(oe.id)),re=Ce.some(oe=>!he(oe)),ie=re?h.jsx(Px,{className:"h-5 w-5"}):h.jsx(wa,{className:"h-5 w-5"}),$e=async()=>{if(re)if(v){const oe={};Ce.forEach(ye=>{const Ie=ye.mailbox||"INBOX";oe[Ie]||(oe[Ie]=[]),oe[Ie].push(ye.id)});for(const[ye,Ie]of Object.entries(oe))await i(Ie,ye)}else{const oe=Array.from(_);await i(oe,a)}else for(const oe of Ce)await s(oe.id)},Fe=()=>{const oe=Ce.length,ye=v?Ce.some(Be=>(Be.mailbox||"INBOX")==="TRASH"):a==="TRASH",Ie=v?Ce.every(Be=>(Be.mailbox||"INBOX")==="TRASH"):a==="TRASH";F(Ie?{isOpen:!0,type:"danger",title:"영구 삭제",message:`${oe}개의 메일을 영구적으로 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.`,confirmText:"영구 삭제",onConfirm:async()=>{for(const Be of Ce){const xe=Be.mailbox||a;await c(Be.id,xe)}Re.success(`${oe}개의 메일이 영구 삭제되었습니다.`),C(new Set)}}:ye&&v?{isOpen:!0,type:"danger",title:"메일 삭제",message:`${oe}개의 메일 중 휴지통 메일은 영구 삭제되고, 나머지는 휴지통으로 이동됩니다. 계속하시겠습니까?`,confirmText:"삭제",onConfirm:async()=>{const Be=[];for(const xe of Ce){const je=xe.mailbox||"INBOX";if(je==="TRASH")await c(xe.id,"TRASH");else{const ze=await l(xe.id,je);ze!=null&&ze.trashId&&Be.push(ze.trashId)}}Be.length>0?Re(xe=>h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("span",{children:[oe,"개의 메일이 처리되었습니다."]}),h.jsx("button",{onClick:async()=>{Re.dismiss(xe.id);for(const je of Be)await u(je,"TRASH");Re.success("복구되었습니다.")},className:"text-blue-500 font-medium hover:text-blue-600",children:"실행취소"})]}),{duration:5e3}):Re.success(`${oe}개의 메일이 처리되었습니다.`),C(new Set)}}:{isOpen:!0,type:"danger",title:"메일 삭제",message:`${oe}개의 메일을 휴지통으로 이동하시겠습니까?`,confirmText:"삭제",onConfirm:async()=>{const Be=[];for(const xe of Ce){const je=v?xe.mailbox||"INBOX":a,ze=await l(xe.id,je);ze!=null&&ze.trashId&&Be.push(ze.trashId)}Be.length>0?Re(xe=>h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("span",{children:[oe,"개의 메일이 휴지통으로 이동되었습니다."]}),h.jsx("button",{onClick:async()=>{Re.dismiss(xe.id);for(const je of Be)await u(je,"TRASH");Re.success("복구되었습니다.")},className:"text-blue-500 font-medium hover:text-blue-600",children:"실행취소"})]}),{duration:5e3}):Re.success(`${oe}개의 메일이 휴지통으로 이동되었습니다.`),C(new Set)}})},Ne=oe=>{const ye=Ce.length,Ie={IMPORTANT:"중요편지함",SPAM:"스팸함",TRASH:"휴지통",INBOX:"받은편지함"};F({isOpen:!0,type:oe==="SPAM"?"spam":oe==="TRASH"?"danger":"warning",title:`${Ie[oe]}으로 이동`,message:`${ye}개의 메일을 ${Ie[oe]}으로 이동하시겠습니까?`,confirmText:"이동",onConfirm:async()=>{if(oe==="TRASH"){const xe=[];for(const je of Ce){const ze=v?je.mailbox||"INBOX":a,lt=await l(je.id,ze);lt!=null&&lt.trashId&&xe.push(lt.trashId)}xe.length>0?Re(je=>h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("span",{children:[ye,"개의 메일이 휴지통으로 이동되었습니다."]}),h.jsx("button",{onClick:async()=>{Re.dismiss(je.id);for(const ze of xe)await u(ze,"TRASH");Re.success("복구되었습니다.")},className:"text-blue-500 font-medium hover:text-blue-600",children:"실행취소"})]}),{duration:5e3}):Re.success(`${ye}개의 메일이 휴지통으로 이동되었습니다.`)}else{for(const xe of Ce){const je=v?xe.mailbox||"INBOX":a;await g(xe.id,je,oe)}Re.success(`${ye}개의 메일이 ${Ie[oe]}으로 이동되었습니다.`)}C(new Set)}}),I(!1)},ve=async()=>{const oe=Ce.length;for(const ye of Ce){const Ie=v?ye.mailbox||"TRASH":a;await u(ye.id,Ie)}C(new Set),Re.success(`${oe}개의 메일이 복구되었습니다.`)},It=()=>{const oe=a==="TRASH"?"휴지통 비우기":"전체 삭제",ye=a==="TRASH"?"휴지통을 비우시겠습니까? 모든 메일이 영구 삭제됩니다.":`${a==="INBOX"?"받은편지함":a}의 모든 메일을 휴지통으로 이동하시겠습니까?`;F({isOpen:!0,type:"danger",title:oe,message:ye,confirmText:a==="TRASH"?"비우기":"삭제",onConfirm:async()=>{await y(a),Re.success(a==="TRASH"?"휴지통이 비워졌습니다.":"모든 메일이 휴지통으로 이동되었습니다.")}}),A(!1)},Qe=oe=>{const ye=oe.mailbox||a;N(`/mail/${ye.toLowerCase()}/${$j(oe.id)}`)},lr=oe=>{let ye=oe.attachments;if(typeof ye=="string")try{ye=JSON.parse(ye)}catch{ye=[]}return Array.isArray(ye)&&ye.length>0},Gt=oe=>oe?oe.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&[a-z]+;/gi,"").replace(/data:[^;]+;base64,[A-Za-z0-9+/=]+/gi,"").replace(/[A-Za-z0-9+/=]{50,}/g,"").replace(/\s+/g," ").trim().substring(0,100):"";return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex flex-col h-full bg-gray-50",children:[h.jsx("div",{className:"flex-none h-14 px-4 bg-white border-b border-gray-100 flex items-center justify-between",children:R>0?h.jsxs("div",{className:"flex items-center w-full animate-fade-in",children:[h.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[h.jsx(pt,{title:"선택 취소",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:B,className:"hover:bg-gray-100 rounded transition-all",children:h.jsxs("div",{className:`w-5 h-5 rounded border flex items-center justify-center ${ae||J?"bg-blue-500 border-blue-500":"border-gray-400"}`,children:[J&&h.jsx(AM,{className:"h-3 w-3 text-white",strokeWidth:3}),ae&&h.jsx(rc,{className:"h-3 w-3 text-white",strokeWidth:3})]})})}),h.jsxs("span",{className:"text-sm ml-2 font-semibold text-blue-600 select-none whitespace-nowrap",children:[R,"개 선택됨"]})]}),h.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-xl p-1",children:[a!=="DRAFTS"&&h.jsx(pt,{title:re?"읽은 상태로 표시":"읽지 않은 상태로 표시",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:$e,className:"p-2 hover:bg-white rounded-lg transition-all text-gray-600 hover:text-blue-500",children:ie})}),a==="TRASH"&&h.jsx(pt,{title:"복구",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:ve,className:"p-2 hover:bg-white rounded-lg transition-all text-gray-600 hover:text-emerald-500",children:h.jsx(NM,{className:"h-5 w-5"})})}),a!=="TRASH"&&a!=="DRAFTS"&&h.jsxs("div",{className:"relative",ref:z,children:[h.jsx(pt,{title:"이동",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:()=>I(!L),className:"p-2 hover:bg-white rounded-lg transition-all text-gray-600 hover:text-violet-500",children:h.jsx(JF,{className:"h-5 w-5"})})}),L&&h.jsxs("div",{className:"absolute right-0 top-full mt-1 bg-white border border-gray-200 rounded-xl shadow-lg overflow-hidden z-50 min-w-[140px]",children:[(a==="IMPORTANT"||a==="SPAM")&&h.jsxs("button",{onClick:()=>Ne("INBOX"),className:"w-full px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-blue-50 hover:text-blue-600 flex items-center gap-2",children:[h.jsx(wa,{size:16}),"받은편지함"]}),a!=="IMPORTANT"&&a!=="SPAM"&&h.jsxs("button",{onClick:()=>Ne("IMPORTANT"),className:"w-full px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-amber-50 hover:text-amber-600 flex items-center gap-2",children:[h.jsx(Cg,{size:16}),"중요편지함"]}),a!=="SPAM"&&h.jsxs("button",{onClick:()=>Ne("SPAM"),className:"w-full px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-orange-50 hover:text-orange-600 flex items-center gap-2",children:[h.jsx(kg,{size:16}),"스팸함"]}),h.jsxs("button",{onClick:()=>Ne("TRASH"),className:"w-full px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-red-50 hover:text-red-600 flex items-center gap-2",children:[h.jsx(Li,{size:16}),"휴지통"]})]})]}),(a==="TRASH"||a==="DRAFTS")&&h.jsx(pt,{title:a==="TRASH"?"영구 삭제":"삭제",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:Fe,className:"p-2 hover:bg-white rounded-lg transition-all text-gray-600 hover:text-red-500",children:h.jsx(Li,{className:"h-5 w-5"})})})]})]}):h.jsxs("div",{className:"flex items-center w-full",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(pt,{title:"전체 선택",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:B,className:"hover:bg-gray-100 rounded transition-all",children:h.jsx("div",{className:"w-5 h-5 rounded border border-gray-400 flex items-center justify-center"})})}),h.jsx(pt,{title:"새로고침",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:q,className:"p-2 hover:bg-gray-100 rounded-lg transition-all text-gray-500 ml-1S",children:h.jsx(hz,{className:`h-5 w-5 ${t?"animate-spin":""}`})})}),h.jsxs("div",{className:"relative",ref:$,children:[h.jsx(pt,{title:"더보기",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:()=>A(!j),className:"p-2 hover:bg-gray-100 rounded-lg transition-all text-gray-500",children:h.jsx(cz,{className:"h-5 w-5"})})}),j&&h.jsx("div",{className:"absolute left-0 top-full mt-1 bg-white border border-gray-200 rounded-xl shadow-lg overflow-hidden z-50 min-w-[120px]",children:h.jsxs("button",{onClick:It,className:"w-full px-4 py-2.5 text-left text-sm text-red-600 hover:bg-red-50 flex items-center gap-2",children:[h.jsx(Li,{size:16}),"전체 삭제"]})})]})]}),h.jsx("div",{className:"flex-1"}),h.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[h.jsx("span",{className:"font-medium",children:fe}),h.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-lg p-0.5",children:[h.jsx("button",{onClick:ee,disabled:v?S<=1:d<=1,className:"p-1.5 hover:bg-white rounded-md transition-all disabled:opacity-40 disabled:hover:bg-transparent",children:h.jsx(qF,{className:"h-4 w-4"})}),h.jsx("button",{onClick:ne,disabled:v?S>=k:d>=f,className:"p-1.5 hover:bg-white rounded-md transition-all disabled:opacity-40 disabled:hover:bg-transparent",children:h.jsx(GF,{className:"h-4 w-4"})})]})]})]})}),h.jsx("div",{className:"flex-1 overflow-y-auto relative",children:M.length>0?h.jsx("ul",{className:"divide-y divide-gray-100",children:M.map(oe=>{const ye=he(oe),Ie=(r==null?void 0:r.id)===oe.id,Be=_.has(oe.id),je=(oe.mailbox||a)==="DRAFTS"?oe.to||"(받는 사람 없음)":G(oe);return h.jsxs("li",{onClick:()=>Qe(oe),className:`relative px-4 py-3.5 cursor-pointer transition-all duration-150 group min-h-[88px]
${ye?"bg-white":"bg-blue-50"}
hover:bg-gray-50
`,children:[Ie&&h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-500"}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{onClick:ze=>ke(ze,oe.id),className:`w-5 h-5 rounded border-2 flex items-center justify-center flex-shrink-0 transition-all
${Be?"bg-blue-500 border-blue-500 scale-110":"border-gray-300 group-hover:border-blue-400"}
`,children:Be&&h.jsx(rc,{className:"h-3 w-3 text-white",strokeWidth:3})}),h.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-white text-sm font-semibold flex-shrink-0 shadow-sm
${ye?"bg-gradient-to-br from-gray-400 to-gray-500":"bg-gradient-to-br from-blue-500 to-indigo-600"}
`,children:(je.split("<")[0].trim()||je).charAt(0).toUpperCase()}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-0.5",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[h.jsx("span",{className:`truncate text-sm ${ye?"text-gray-600 font-medium":"text-gray-900 font-semibold"}`,children:v&&b?h.jsx(sh,{text:va(je.split("<")[0].trim()||je),query:b}):va(je.split("<")[0].trim()||je)}),lr(oe)&&h.jsx(Vu,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"})]}),h.jsx("span",{className:`text-xs flex-shrink-0 ${ye?"text-gray-400":"text-blue-600 font-medium"}`,children:W(oe.date)})]}),h.jsx("div",{className:`text-sm truncate ${ye?"text-gray-600":"text-gray-800 font-medium"}`,children:v&&b?h.jsx(sh,{text:va(oe.subject)||"(제목 없음)",query:b}):va(oe.subject)||"(제목 없음)"}),h.jsx("div",{className:"text-xs text-gray-400 truncate mt-0.5 leading-relaxed",children:v&&b?h.jsx(sh,{text:va(Gt(oe.text)),query:b}):va(Gt(oe.text))})]})]})]},oe.id)})}):h.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[h.jsx(wa,{size:48,className:"mb-4 opacity-40"}),h.jsx("p",{className:"text-lg font-medium text-gray-500",children:"메일이 없습니다"}),h.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"새로운 메일이 도착하면 여기에 표시됩니다"})]})})]}),h.jsx(Lj,{isOpen:V.isOpen,onClose:()=>F({...V,isOpen:!1}),onConfirm:V.onConfirm,title:V.title,message:V.message,confirmText:V.confirmText,type:V.type})]})},TQ=({onContinueDraft:e,onReply:t,onForward:r})=>{const n=ni(),{selectedEmail:a,setSelectedEmail:o,toggleStar:i,moveToTrash:s,markAsUnread:l,markAsRead:c,restoreEmail:u,deleteEmail:d,selectedBox:f,moveToSpam:p,moveEmail:g,userNames:y,isSearchMode:v,searchQuery:x}=ln(),[w,b]=m.useState({isOpen:!1,type:"",title:"",message:"",onConfirm:()=>{}}),[S,k]=m.useState(!1),[P,E]=m.useState(null),[O,D]=m.useState(!1),[N,_]=m.useState("ko"),[C,M]=m.useState("");m.useEffect(()=>{E(null),D(!1),k(!1),M("")},[a==null?void 0:a.id]);const T=()=>{b({isOpen:!0,type:"danger",title:"메일 삭제",message:"이 메일을 휴지통으로 이동하시겠습니까?",confirmText:"삭제",onConfirm:async()=>{if(a){const W=await s(a.id,f);W!=null&&W.trashId?Re(G=>h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("span",{children:"휴지통으로 이동했습니다."}),h.jsx("button",{onClick:async()=>{Re.dismiss(G.id),await u(W.trashId,"TRASH"),Re.success("복구되었습니다.")},className:"text-blue-500 font-medium hover:text-blue-600",children:"실행취소"})]}),{duration:5e3}):Re.success("휴지통으로 이동했습니다.")}}})},j=()=>{b({isOpen:!0,type:"danger",title:"영구 삭제",message:"이 메일을 영구적으로 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",confirmText:"영구 삭제",onConfirm:()=>{a&&(d(a.id,f),Re.success("메일이 영구 삭제되었습니다."))}})},A=()=>{a&&(a.isRead?(l(a.id,f),Re.success("읽지 않음으로 표시했습니다.")):(c(a.id,f),Re.success("읽음으로 표시했습니다.")))},L=async()=>{a&&(await u(a.id,f),o(null),Re.success("메일이 복구되었습니다."))},I=W=>{if(W.stopPropagation(),!a)return;const G=f==="IMPORTANT";b({isOpen:!0,type:"star",title:G?"중요 표시 해제":"중요 표시",message:G?"중요 표시를 해제하고 받은편지함으로 이동하시겠습니까?":"이 메일을 중요편지함으로 이동하시겠습니까?",confirmText:G?"해제":"이동",onConfirm:async()=>{const R=await i(a.id);R&&(R.movedTo==="important"?Re.success("중요편지함으로 이동했습니다."):Re.success("중요 표시를 해제했습니다."),n(`/mail/${R.movedTo}/${$j(R.newEmailId)}`))}})},$=()=>{var R;if(!a)return;const W=window.open("","_blank");if(!W){Re.error("팝업이 차단되었습니다. 팝업을 허용해주세요.");return}const G=`
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${a.subject||"(제목 없음)"}</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; padding: 40px; max-width: 800px; margin: 0 auto; }
h1 { font-size: 24px; margin-bottom: 20px; color: #1a1a1a; }
.meta { color: #666; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.meta p { margin: 5px 0; }
.content { line-height: 1.6; color: #333; }
@media print { body { padding: 20px; } }
</style>
</head>
<body>
<h1>${a.subject||"(제목 없음)"}</h1>
<div class="meta">
<p><strong>보낸 사람:</strong> ${a.from}</p>
<p><strong>받는 사람:</strong> ${a.to}</p>
<p><strong>날짜:</strong> ${new Date(a.date).toLocaleString("ko-KR")}</p>
</div>
<div class="content">
${a.html||((R=a.text)==null?void 0:R.replace(/\n/g,"<br>"))||"내용 없음"}
</div>
</body>
</html>
`;W.document.write(G),W.document.close(),W.focus(),setTimeout(()=>{W.print(),W.close()},250)},z=async(W="ko")=>{if(S)return;const G=a.html||a.text;if(!G){Re.error("번역할 내용이 없습니다.");return}k(!0),_(W);try{const R=localStorage.getItem("email_token"),ae=await fetch("/api/emails/gemini-model",{headers:{Authorization:`Bearer ${R}`}});if(ae.ok){const J=await ae.json();M(J.modelName||"Gemini AI")}else M("Gemini AI")}catch{M("Gemini AI")}try{const R=localStorage.getItem("email_token"),ae=await fetch("/api/emails/translate",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${R}`},body:JSON.stringify({emailId:a.id,mailbox:f||"inbox",text:G,targetLang:W})});if(!ae.ok){const he=await ae.json();throw new Error(he.error||"번역 실패")}const J=await ae.json();E(J.translatedText),D(!0),M(J.modelName||"Gemini AI"),J.cached?Re.success("저장된 번역을 불러왔습니다."):Re.success("번역이 완료되었습니다.")}catch(R){Re.error(R.message||"번역에 실패했습니다."),E(null),D(!1)}finally{k(!1)}},V=()=>{P&&D(!O)};if(!a)return h.jsxs("div",{className:"flex flex-col h-full bg-white",children:[h.jsx("div",{className:"flex-none h-14 px-8 bg-white border-b border-gray-100 flex items-center justify-between",children:h.jsx("div",{className:"flex-1"})}),h.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-gray-50 text-gray-400",children:[h.jsx(wa,{size:64,className:"mb-6 opacity-40"}),h.jsx("p",{className:"text-xl font-semibold text-gray-600",children:"메일을 선택하세요"}),h.jsx("p",{className:"text-sm mt-2 text-gray-500",children:"목록에서 메일을 클릭하면 여기에 표시됩니다"})]})]});const F=W=>new Date(W).toLocaleString("ko-KR",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}),ne=W=>{if(!W)return{name:"알 수 없음",email:""};const G=W.match(/^(.*?)\s*<(.*?)>$/);let R="",ae="";if(G)R=G[1].replace(/['"]/g,"").trim(),ae=G[2];else if(W.includes("@"))ae=W;else return{name:va(W),email:""};return y&&y[ae]?{name:y[ae],email:ae}:R?{name:va(R),email:ae}:{name:ae,email:ae}},{name:ee,email:X}=ne(a.from),fe=W=>{var R;const G=(R=W.split(".").pop())==null?void 0:R.toLowerCase();return["jpg","jpeg","png","gif","webp","svg"].includes(G)?h.jsx(tz,{size:16,className:"text-pink-500"}):["pdf","doc","docx","txt","rtf"].includes(G)?h.jsx(ZF,{size:16,className:"text-blue-500"}):h.jsx(MM,{size:16,className:"text-gray-500"})},q=W=>{const G=/(https?:\/\/[^\s]+)/g;return W.split(G).map((ae,J)=>/^https?:\/\//.test(ae)?h.jsx("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 hover:underline break-all",onClick:he=>he.stopPropagation(),children:ae},J):ae)},ke=async W=>{try{const G=localStorage.getItem("email_token"),R=a.mailbox||"INBOX",ae=`/api/emails/${a.id}/attachments/${encodeURIComponent(W)}?mailbox=${R}`,J=await fetch(ae,{headers:{Authorization:`Bearer ${G}`}});if(!J.ok)throw new Error("다운로드 실패");const he=await J.blob(),Ce=window.URL.createObjectURL(he),re=document.createElement("a");re.href=Ce,re.download=W,document.body.appendChild(re),re.click(),document.body.removeChild(re),window.URL.revokeObjectURL(Ce)}catch(G){console.error("첨부파일 다운로드 오류:",G),Re.error("파일 다운로드에 실패했습니다.")}},B=f==="IMPORTANT";return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex flex-col h-full bg-white",children:[h.jsxs("div",{className:"flex-none h-14 px-8 bg-white border-b border-gray-100 flex items-center justify-between print:hidden",children:[h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"flex items-center gap-1 bg-gray-100 rounded-xl p-1",children:f==="TRASH"?h.jsxs(h.Fragment,{children:[h.jsx(pt,{title:"영구 삭제",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-red-500 hover:bg-white rounded-lg transition-all",children:h.jsx(Li,{size:18})})}),h.jsx(pt,{title:a.isRead?"읽지 않음으로 표시":"읽음으로 표시",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:A,className:"p-2.5 text-gray-500 hover:text-blue-500 hover:bg-white rounded-lg transition-all",children:a.isRead?h.jsx(wa,{size:18}):h.jsx(Px,{size:18})})}),h.jsx(pt,{title:"복구",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:L,className:"p-2.5 text-gray-500 hover:text-emerald-500 hover:bg-white rounded-lg transition-all",children:h.jsx(NM,{size:18})})})]}):h.jsxs(h.Fragment,{children:[h.jsx(pt,{title:"삭제",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:T,className:"p-2.5 text-gray-500 hover:text-red-500 hover:bg-white rounded-lg transition-all",children:h.jsx(Li,{size:18})})}),a.mailbox!=="DRAFTS"&&h.jsxs(h.Fragment,{children:[h.jsx(pt,{title:a.isRead?"읽지 않음으로 표시":"읽음으로 표시",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:A,className:"p-2.5 text-gray-500 hover:text-blue-500 hover:bg-white rounded-lg transition-all",children:a.isRead?h.jsx(wa,{size:18}):h.jsx(Px,{size:18})})}),f!=="SPAM"&&f!=="IMPORTANT"&&h.jsx(pt,{title:"스팸 신고",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:()=>{b({isOpen:!0,type:"spam",title:"스팸 신고",message:"이 메일을 스팸으로 신고하고 스팸함으로 이동하시겠습니까?",confirmText:"신고",onConfirm:async()=>{a&&(await p(a.id,f),Re.success("스팸함으로 이동했습니다."))}})},className:"p-2.5 text-gray-500 hover:text-orange-500 hover:bg-white rounded-lg transition-all",children:h.jsx(kg,{size:18})})}),f==="SPAM"&&h.jsx(pt,{title:"받은편지함으로 이동",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:()=>{b({isOpen:!0,type:"restore",title:"받은편지함으로 이동",message:"이 메일을 받은편지함으로 이동하시겠습니까?",confirmText:"이동",onConfirm:async()=>{a&&(await g(a.id,f,"INBOX"),o(null),Re.success("받은편지함으로 이동했습니다."))}})},className:"p-2.5 text-gray-500 hover:text-blue-500 hover:bg-white rounded-lg transition-all",children:h.jsx(wa,{size:18})})}),h.jsx(pt,{title:B?"중요 표시 해제":"중요 표시",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:I,className:`p-2.5 rounded-lg transition-all ${B?"text-amber-400 hover:bg-white":"text-gray-500 hover:text-amber-400 hover:bg-white"}`,children:h.jsx(Cg,{size:18,className:B?"fill-amber-400":""})})}),h.jsx(pt,{title:"인쇄",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:$,className:"p-2.5 text-gray-500 hover:text-gray-700 hover:bg-white rounded-lg transition-all",children:h.jsx(dz,{size:18})})}),h.jsx(pt,{title:O?"원본 보기":"한국어로 번역",arrow:!0,placement:"bottom",TransitionComponent:Je,children:h.jsx("button",{onClick:()=>O?V():z("ko"),disabled:S,className:`p-2.5 rounded-lg transition-all ${O?"text-amber-500 bg-white":"text-gray-500 hover:text-amber-500 hover:bg-white"} ${S?"animate-pulse":""}`,children:h.jsx(nz,{size:18})})})]})]})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto",id:"print-area",children:h.jsxs("div",{className:"px-8 py-6",children:[h.jsx("div",{className:"flex items-start justify-between mb-6",children:h.jsx("h2",{className:"text-xl font-bold text-gray-800 flex-1 leading-tight",children:v&&x?h.jsx(sh,{text:va(a.subject)||"(제목 없음)",query:x}):va(a.subject)||"(제목 없음)"})}),h.jsxs("div",{className:"flex items-center justify-between mb-6 p-4 bg-gray-50 rounded-xl",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white font-bold text-lg shadow-lg shadow-blue-500/30",children:a.mailbox==="DRAFTS"?a.to?a.to.charAt(0).toUpperCase():"?":ee.charAt(0).toUpperCase()}),h.jsx("div",{children:a.mailbox==="DRAFTS"?h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-xs text-gray-500 mb-0.5",children:"받는 사람"}),h.jsx("p",{className:"text-sm font-semibold text-gray-800",children:a.to||"(받는 사람 없음)"})]}):h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-sm font-semibold text-gray-800",children:ee}),h.jsx("p",{className:"text-xs text-gray-500",children:X||a.from})]})})]}),h.jsx("p",{className:"text-xs text-gray-400 font-medium",children:F(a.date)})]}),a.attachments&&Array.isArray(a.attachments)&&a.attachments.length>0&&h.jsxs("div",{className:"mb-6",children:[h.jsxs("h4",{className:"flex items-center text-sm font-semibold text-gray-700 mb-3",children:[h.jsx(Vu,{size:16,className:"mr-2"}),"첨부파일 (",a.attachments.length,")"]}),h.jsx("div",{className:"flex flex-wrap gap-2",children:a.attachments.map((W,G)=>h.jsxs("button",{onClick:()=>ke(W.filename),className:"flex items-center gap-2 bg-white border border-gray-200 rounded-xl px-4 py-2.5 hover:border-blue-300 hover:bg-blue-50 transition-all group",children:[fe(W.filename),h.jsx("span",{className:"text-sm text-gray-600 group-hover:text-blue-600 truncate max-w-[180px]",children:W.filename}),h.jsxs("span",{className:"text-xs text-gray-400",children:["(",(W.size/1024).toFixed(1)," KB)"]}),h.jsx(QF,{size:14,className:"text-gray-400 group-hover:text-blue-500"})]},G))})]}),(()=>{const W=()=>{const G=a.html||a.body,R=a.text,ae=R&&/<[a-z][\s\S]*>/i.test(R);return G?h.jsx("div",{className:"email-html-content mb-8 overflow-x-auto",dangerouslySetInnerHTML:{__html:G}}):ae?h.jsx("div",{className:"email-html-content mb-8 overflow-x-auto",dangerouslySetInnerHTML:{__html:R}}):h.jsx("div",{className:"mb-8 p-6 bg-gray-50 rounded-xl border border-gray-100",children:h.jsx("pre",{className:"whitespace-pre-wrap font-sans text-sm text-gray-700 leading-relaxed",children:q(va(R)||"내용 없음")})})};if(S)return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-blue-50 via-purple-50 to-rose-50 rounded-xl border border-gray-200 shadow-sm flex items-center gap-4",children:[h.jsxs("div",{className:"relative flex-shrink-0",children:[h.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center shadow-lg",style:{background:"linear-gradient(135deg, #4285f4 0%, #ea4335 33%, #fbbc05 66%, #34a853 100%)"},children:h.jsx(Ex,{className:"w-5 h-5 text-white"})}),h.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full animate-ping"})]}),h.jsxs("div",{className:"flex-1",children:[h.jsxs("div",{className:"text-gray-800 font-semibold flex items-center gap-2",children:["번역 중입니다...",h.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full text-white",style:{background:"linear-gradient(90deg, #4285f4, #ea4335)"},children:C||"Gemini AI"})]}),h.jsx("div",{className:"text-gray-500 text-sm",children:"AI가 이메일 내용을 분석하고 있습니다"})]}),h.jsx("div",{className:"w-6 h-6 border-3 border-blue-200 border-t-blue-500 rounded-full animate-spin flex-shrink-0"})]}),W()]});if(O&&P){const G=/<[a-z][\s\S]*>/i.test(P);return h.jsxs("div",{className:"relative",children:[h.jsxs("div",{className:"absolute -top-2 left-4 px-3 py-1 rounded-full text-xs font-semibold text-white shadow-md flex items-center gap-1.5",style:{background:"linear-gradient(90deg, #4285f4, #ea4335, #fbbc05, #34a853)"},children:[h.jsx(Ex,{className:"w-3 h-3"}),"번역됨"]}),G?h.jsx("div",{className:"email-html-content mb-8 overflow-x-auto rounded-xl p-4 mt-2",style:{border:"2px solid transparent",background:"linear-gradient(white, white) padding-box, linear-gradient(90deg, #4285f4, #ea4335, #fbbc05, #34a853) border-box"},dangerouslySetInnerHTML:{__html:P}}):h.jsx("div",{className:"mb-8 p-6 rounded-xl mt-2",style:{border:"2px solid transparent",background:"linear-gradient(#f0f9ff, #f0f9ff) padding-box, linear-gradient(90deg, #4285f4, #ea4335, #fbbc05, #34a853) border-box"},children:h.jsx("pre",{className:"whitespace-pre-wrap font-sans text-sm text-gray-700 leading-relaxed",children:P})})]})}return W()})(),h.jsx("div",{className:"flex items-center gap-3 pb-6",children:a.mailbox==="DRAFTS"?h.jsx(ha,{variant:"contained",startIcon:h.jsx(uz,{size:16}),onClick:()=>e&&e(a),sx:{borderRadius:"12px",textTransform:"none",background:"linear-gradient(to right, #3b82f6, #6366f1)",boxShadow:"0 4px 14px 0 rgba(59, 130, 246, 0.3)",px:4,py:1.2,"&:hover":{background:"linear-gradient(to right, #2563eb, #4f46e5)",boxShadow:"0 6px 20px 0 rgba(59, 130, 246, 0.4)"}},children:"이어서 작성"}):h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:()=>t&&t(a),className:"flex items-center gap-2 px-5 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium shadow-sm hover:shadow-md hover:border-blue-300 hover:text-blue-600 hover:bg-blue-50/50 transition-all duration-200 group",children:[h.jsx(fz,{size:16,className:"group-hover:scale-110 transition-transform"}),h.jsx("span",{children:"답장"})]}),h.jsxs("button",{onClick:()=>r&&r(a),className:"flex items-center gap-2 px-5 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium shadow-sm hover:shadow-md hover:border-indigo-300 hover:text-indigo-600 hover:bg-indigo-50/50 transition-all duration-200 group",children:[h.jsx(ez,{size:16,className:"group-hover:scale-110 transition-transform"}),h.jsx("span",{children:"전달"})]})]})})]})})]}),h.jsx(Lj,{isOpen:w.isOpen,onClose:()=>b({...w,isOpen:!1}),onConfirm:w.onConfirm,title:w.title,message:w.message,confirmText:w.confirmText,type:w.type})]})},jQ=({isOpen:e,onClose:t,draftData:r,mode:n="compose",replyData:a=null})=>{const{sendEmail:o,saveDraft:i,deleteDraft:s,handleDraftSendComplete:l}=ln(),[c,u]=m.useState([]),[d,f]=m.useState(""),[p,g]=m.useState(""),[y,v]=m.useState(""),[x,w]=m.useState(!1),[b,S]=m.useState(!1),[k,P]=m.useState(!1),[E,O]=m.useState([]),[D,N]=m.useState(!1),[_,C]=m.useState(!1),[M,T]=m.useState(""),[j,A]=m.useState(""),[L,I]=m.useState(!1),[$,z]=m.useState({bold:!1,italic:!1,underline:!1}),[V,F]=m.useState([]),[ne,ee]=m.useState(!1),[X,fe]=m.useState([]),[q,ke]=m.useState(-1),[B,W]=m.useState(null),G=m.useRef(null),R=m.useRef(null),ae=m.useRef(null),J=m.useRef(null),he=m.useRef(null),Ce=Q=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Q.trim()),re=async()=>{let Q=[...c];if(d.trim()&&Q.push(d.trim()),Q.length===0)return Re.error("받는 사람을 입력하세요");const ue=Q.filter(We=>!Ce(We));if(ue.length>0)return Re.error(`올바르지 않은 이메일이 있습니다: ${ue.join(", ")}`);const Ae=B;P(!0);try{await o(Q,p,y,E),Re.success("메일이 발송되었습니다."),Ae&&await l(Ae),De()}catch(We){Re.error("메일 발송 실패: "+We.message)}finally{P(!1)}},ie=Q=>{const ue=Q.target.value;if(f(ue),ue.trim()){const Ae=V.filter(We=>{var Pe;return We.email.toLowerCase().includes(ue.toLowerCase())||((Pe=We.name)==null?void 0:Pe.toLowerCase().includes(ue.toLowerCase()))});fe(Ae),ee(Ae.length>0),ke(-1)}else ee(!1),ke(-1)},$e=Q=>{c.includes(Q)||u([...c,Q]),f(""),ee(!1)},Fe=Q=>{if(ne&&X.length>0){if(Q.key==="ArrowDown"){if(Q.preventDefault(),q<X.length-1){const ue=q+1;ke(ue),setTimeout(()=>{var We;const Ae=(We=he.current)==null?void 0:We.children[ue];Ae==null||Ae.scrollIntoView({block:"nearest",behavior:"smooth"})},0)}return}else if(Q.key==="ArrowUp"){if(Q.preventDefault(),q>0){const ue=q-1;ke(ue),setTimeout(()=>{var We;const Ae=(We=he.current)==null?void 0:We.children[ue];Ae==null||Ae.scrollIntoView({block:"nearest",behavior:"smooth"})},0)}return}else if(Q.key==="Enter"&&q>=0){Q.preventDefault(),$e(X[q].email),ke(-1);return}}Q.key==="Enter"||Q.key===","?(Q.preventDefault(),Ne(),ee(!1),ke(-1)):Q.key==="Backspace"&&d===""&&c.length>0?u(c.slice(0,-1)):Q.key==="Tab"?(Q.preventDefault(),d.trim()&&Ne(),ee(!1),ke(-1),setTimeout(()=>{var ue;(ue=G.current)==null||ue.focus()},0)):Q.key==="Escape"&&(ee(!1),ke(-1))},Ne=()=>{const Q=d.trim();Q&&(Ce(Q)?(c.includes(Q)||u([...c,Q]),f("")):Re.error("올바른 이메일 형식이 아닙니다."))},ve=()=>{ee(!1)},It=Q=>{u(ue=>ue.filter((Ae,We)=>We!==Q))},Qe=Q=>Math.ceil(Q/3)*4,lr=()=>E.reduce((Q,ue)=>Q+Qe(ue.size),0),Gt=Q=>{const ue=Array.from(Q.target.files||[]),Ae=40*1024*1024;let We=lr();const Pe=[],st=[];if(ue.forEach(ct=>{const Mt=Qe(ct.size);We+Mt>Ae?st.push(ct.name):(Pe.push(ct),We+=Mt)}),st.length>0){const ct=Math.max(0,(Ae-lr())*.75);Re.error(`첨부파일 용량 초과: ${st.join(", ")} (남은 용량: ${(ct/1024/1024).toFixed(1)}MB)`)}Pe.length>0&&O(ct=>[...ct,...Pe]),R.current&&(R.current.value="")},oe=Q=>{var Ae;const ue=window.getSelection();if(ue.rangeCount>0){const We=ue.getRangeAt(0);We.deleteContents();const Pe=We.createContextualFragment(Q);We.insertNode(Pe),We.collapse(!1)}(Ae=J.current)==null||Ae.focus()},ye=()=>{var Q;(Q=R.current)==null||Q.click()},Ie=Q=>{O(ue=>ue.filter((Ae,We)=>We!==Q))},Be=Q=>{Q.preventDefault(),Q.stopPropagation(),N(!0)},xe=Q=>{Q.preventDefault(),Q.stopPropagation(),N(!1)},je=Q=>{Q.preventDefault(),Q.stopPropagation(),N(!1);const ue=Array.from(Q.dataTransfer.files||[]),Ae=40*1024*1024;let We=lr();const Pe=[],st=[];if(ue.forEach(ct=>{const Mt=Qe(ct.size);We+Mt>Ae?st.push(ct.name):(Pe.push(ct),We+=Mt)}),st.length>0){const ct=Math.max(0,(Ae-lr())*.75);Re.error(`첨부파일 용량 초과: ${st.join(", ")} (남은 용량: ${(ct/1024/1024).toFixed(1)}MB)`)}Pe.length>0&&O(ct=>[...ct,...Pe])},ze=Q=>{var ue;(ue=J.current)==null||ue.focus(),document.execCommand(Q,!1,null),lt()},lt=()=>{z({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline")})},mo=()=>{const ue=window.getSelection().toString();T(ue||""),C(!0)},fn=()=>{if(!j){Re.error("URL을 입력하세요");return}const ue=`<a href="${j}" target="_blank" style="color: #2563eb; text-decoration: underline;">${M||j}</a>`;oe(ue),C(!1),T(""),A("")},pn=()=>w(!x),la=()=>S(!b),Or=m.useRef({recipients:[],inputValue:"",subject:"",body:""});m.useEffect(()=>{e&&(async()=>{try{const ue=localStorage.getItem("email_token"),Ae=await fetch("/api/emails?mailbox=INBOX&page=1&limit=100",{headers:{Authorization:`Bearer ${ue}`}});if(Ae.ok){const We=await Ae.json(),Pe=new Set;We.emails.forEach(ct=>{const Mt=ct.from.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/);Mt&&Pe.add(Mt[1])});const st=Array.from(Pe).map(ct=>({email:ct,name:ct.split("@")[0]}));F(st)}}catch(ue){console.error("사용자 목록 조회 오류:",ue)}})()},[e]),m.useEffect(()=>{Or.current={recipients:c,inputValue:d,subject:p,body:y}},[c,d,p,y]),m.useEffect(()=>{e&&J.current&&!J.current.innerHTML&&(J.current.innerHTML=y)},[e,y]),m.useEffect(()=>{if(e){window.history.pushState({modal:"compose"},"",window.location.href);const Q=ue=>{var Ae;((Ae=ue.state)==null?void 0:Ae.modal)!=="compose"&&go()};return window.addEventListener("popstate",Q),()=>{window.removeEventListener("popstate",Q)}}},[e]),m.useEffect(()=>{if(e&&r){if(r.to){const ue=r.to.split(",").map(Ae=>Ae.trim()).filter(Ae=>Ae);u(ue)}const Q=r.subject==="(제목 없음)"?"":r.subject||"";g(Q),v(r.html||r.text||""),J.current&&(J.current.innerHTML=r.html||r.text||""),W(r.id||null)}else e&&!r&&W(null)},[e,r]),m.useEffect(()=>{if(e&&a&&(n==="reply"||n==="forward")){const Q=Mt=>{if(!Mt)return"";const hi=Mt.match(/<([^>]+)>/);return hi?hi[1]:Mt.split("<")[0].trim()};if(n==="reply"){const Mt=Q(a.from);Mt&&u([Mt])}const ue=a.subject||"";g(n==="reply"?ue.startsWith("Re:")?ue:`Re: ${ue}`:ue.startsWith("Fwd:")?ue:`Fwd: ${ue}`);const Ae=Mt=>Mt?new Date(Mt).toLocaleString("ko-KR",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",We=a.from||"",Pe=Ae(a.date),st=a.html||a.text||"",ct=`
<br/><br/>
<div style="border-left: 2px solid #ccc; padding-left: 12px; margin-left: 8px; color: #666;">
<p style="margin: 0 0 8px 0; font-size: 12px; color: #888;">
${Pe}, ${We} 님이 작성:
</p>
${st}
</div>
`;v(ct),J.current&&(J.current.innerHTML=ct),n==="forward"&&a.attachments&&a.attachments.length>0&&(async()=>{const hi=localStorage.getItem("email_token"),Kc=[];for(const mi of a.attachments)try{const H=a.mailbox||"INBOX",te=encodeURIComponent(mi.filename),Z=await fetch(`/api/emails/${a.id}/attachments/${te}?mailbox=${H}`,{headers:{Authorization:`Bearer ${hi}`}});if(Z.ok){const Ee=await Z.blob(),ce=new File([Ee],mi.filename,{type:mi.contentType||Ee.type});Kc.push(ce)}}catch(H){console.error(`첨부파일 가져오기 실패: ${mi.filename}`,H)}Kc.length>0&&O(mi=>[...mi,...Kc])})()}},[e,a,n]);const go=async()=>{const{recipients:Q,inputValue:ue,subject:Ae,body:We}=Or.current;if(Q.length>0||ue.trim()||Ae.trim()||We.trim())try{const st=[...Q];ue.trim()&&st.push(ue.trim()),B&&await s(B),await i(st,Ae,We),Re.success("임시 보관함에 저장되었습니다",{icon:"📝",duration:3e3})}catch(st){console.error("임시저장 오류:",st),Re.error("임시저장에 실패했습니다")}De()},De=()=>{u([]),f(""),g(""),v(""),O([]),S(!1),W(null),t()};if(!e)return null;const nt=x?"fixed bottom-0 right-10 w-72 h-[52px] rounded-t-lg shadow-2xl z-50 flex flex-col bg-gradient-to-r from-slate-700 to-slate-800 transition-all duration-300":b?"fixed bottom-10 right-10 w-[calc(100vw-5rem)] h-[calc(100vh-5rem)] rounded-xl shadow-2xl z-50 flex flex-col bg-white transition-all duration-300":"fixed bottom-10 right-10 w-[600px] h-[680px] rounded-xl shadow-2xl z-50 flex flex-col bg-white transition-all duration-300";return h.jsxs("div",{className:nt,children:[h.jsxs("div",{className:`flex-none px-5 py-3 flex items-center justify-between cursor-pointer select-none transition-all ${x?"bg-gradient-to-r from-slate-700 to-slate-800 hover:from-slate-600 hover:to-slate-700 rounded-t-lg":"bg-gradient-to-r from-blue-500 to-indigo-600 rounded-t-xl"}`,onClick:x?pn:void 0,children:[h.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[h.jsx(nc,{className:"h-5 w-5 text-white flex-shrink-0"}),h.jsx("span",{className:"font-semibold text-white truncate",children:x&&c.length>0?`${n==="reply"?"답장":n==="forward"?"전달":"새 메일"} - ${c[0]}${c.length>1?` 외 ${c.length-1}명`:""}`:n==="reply"?"답장":n==="forward"?"전달":"새 메일"})]}),h.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[h.jsx(pt,{title:"최소화",placement:"bottom",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:Q=>{Q.stopPropagation(),pn()},children:h.jsx(AM,{className:`h-4 w-4 ${x?"text-white":"text-white/80 hover:text-white"}`})})}),h.jsx(pt,{title:b&&!x?"복원":"최대화",placement:"bottom",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:Q=>{Q.stopPropagation(),x?pn():la()},children:b&&!x?h.jsx(lz,{className:`h-4 w-4 ${x?"text-white":"text-white/80 hover:text-white"}`}):h.jsx(sz,{className:`h-4 w-4 ${x?"text-white":"text-white/80 hover:text-white"}`})})}),h.jsx(pt,{title:"닫기",placement:"bottom",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:Q=>{Q.stopPropagation(),go()},children:h.jsx(qu,{className:`h-4 w-4 ${x?"text-white":"text-white/80 hover:text-white"}`})})})]})]}),h.jsxs("div",{className:`flex-1 flex flex-col transition-opacity duration-200 ${x?"opacity-0 pointer-events-none":"opacity-100"} relative`,children:[_&&h.jsx("div",{className:"absolute inset-0 z-50 bg-white/95 flex items-center justify-center p-8 backdrop-blur-sm",children:h.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-gray-100 p-6 max-w-md w-full",children:[h.jsx("h3",{className:"font-bold text-gray-800 text-lg mb-4",children:"링크 삽입"}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-1",children:"표시 텍스트"}),h.jsx("input",{type:"text",value:M,onChange:Q=>T(Q.target.value),placeholder:"링크 텍스트",className:"w-full px-3 py-2 border border-gray-200 rounded-lg outline-none focus:border-blue-500"})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-1",children:"URL"}),h.jsx("input",{type:"url",value:j,onChange:Q=>A(Q.target.value),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-200 rounded-lg outline-none focus:border-blue-500"})]})]}),h.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[h.jsx("button",{onClick:()=>{C(!1),T(""),A("")},className:"px-4 py-2 border border-gray-200 rounded-lg text-gray-600 hover:bg-gray-50 font-medium text-sm",children:"취소"}),h.jsx("button",{onClick:fn,className:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 font-medium text-sm",children:"삽입"})]})]})}),h.jsxs("div",{className:"flex-1 flex flex-col",children:[h.jsxs("div",{className:"relative flex items-center border-b border-gray-100 px-5 py-3",children:[h.jsx("label",{className:"w-16 flex-shrink-0 text-sm text-gray-600",children:"받는사람"}),h.jsxs("div",{className:"flex-1",children:[h.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[c.map((Q,ue)=>h.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-blue-100 text-blue-700 rounded text-sm",children:[h.jsx("span",{children:Q}),h.jsx("button",{onClick:()=>It(ue),className:"hover:bg-blue-200 rounded-full p-0.5",children:h.jsx(qu,{size:14})})]},ue)),h.jsx("input",{ref:ae,type:"text",className:"flex-1 min-w-[200px] py-1 outline-none text-gray-800 text-sm placeholder-gray-400",autoFocus:!x,value:d,onChange:ie,onKeyDown:Fe,onBlur:ve,onFocus:()=>{d.trim()&&X.length>0&&ee(!0)},placeholder:"이메일 주소 입력 (Tab으로 다음)"})]}),ne&&h.jsx("div",{ref:he,className:"absolute left-16 right-5 top-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg max-h-48 overflow-y-auto z-50",children:X.map((Q,ue)=>h.jsx("div",{onMouseDown:Ae=>{Ae.preventDefault(),$e(Q.email)},onMouseEnter:()=>ke(ue),className:`px-4 py-2 cursor-pointer flex items-center justify-between transition-colors ${q===ue?"bg-blue-100 text-blue-700":"hover:bg-blue-50"}`,children:h.jsxs("div",{children:[h.jsx("div",{className:`text-sm font-medium ${q===ue?"text-blue-700":"text-gray-800"}`,children:Q.email}),Q.name&&h.jsx("div",{className:`text-xs ${q===ue?"text-blue-500":"text-gray-500"}`,children:Q.name})]})},ue))})]})]}),h.jsxs("div",{className:"flex items-center px-5 py-3 border-b border-gray-100",children:[h.jsx("span",{className:"text-gray-400 text-sm font-medium flex-shrink-0",style:{width:"60px"},children:"제목"}),h.jsx("input",{ref:G,type:"text",className:"flex-1 py-1 outline-none text-gray-800 text-sm placeholder-gray-400 ml-1",value:p,onChange:Q=>g(Q.target.value),placeholder:"메일 제목을 입력하세요"})]}),h.jsx("div",{ref:J,contentEditable:!0,className:"flex-1 p-5 outline-none resize-none text-gray-800 text-sm leading-relaxed overflow-y-auto overflow-x-hidden",onInput:Q=>v(Q.currentTarget.innerHTML),onMouseUp:lt,onKeyUp:lt,onDragOver:Be,onDragLeave:xe,onDrop:je,suppressContentEditableWarning:!0,"data-placeholder":"내용을 입력하세요...",style:{minHeight:"200px",maxWidth:"100%",wordWrap:"break-word"}}),D&&h.jsx("div",{className:"absolute inset-0 bg-blue-50/90 border-2 border-dashed border-blue-400 flex items-center justify-center pointer-events-none",children:h.jsxs("div",{className:"text-center",children:[h.jsx(Vu,{size:48,className:"mx-auto mb-2 text-blue-500"}),h.jsx("p",{className:"text-blue-600 font-semibold",children:"파일을 여기에 놓으세요"})]})}),E.length>0&&h.jsx("div",{className:"px-5 py-3 border-t border-gray-100 bg-gray-50",children:h.jsx("div",{className:"flex flex-wrap gap-2",children:E.map((Q,ue)=>h.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-white border border-gray-200 rounded-lg text-sm",children:[h.jsx(Vu,{size:14,className:"text-gray-400"}),h.jsx("span",{className:"text-gray-700 max-w-[200px] truncate",children:Q.name}),h.jsxs("span",{className:"text-gray-400 text-xs",children:["(",(Q.size/1024).toFixed(1),"KB)"]}),h.jsx("button",{onClick:()=>Ie(ue),className:"text-gray-400 hover:text-red-500",children:h.jsx(qu,{size:14})})]},ue))})})]}),h.jsxs("div",{className:"px-5 py-4 flex items-center justify-between border-t border-gray-100 bg-gray-50",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("button",{onClick:re,disabled:k,className:"flex items-center gap-2 px-6 py-2.5 bg-gradient-to-r from-blue-500 to-indigo-600 text-white font-semibold rounded-xl shadow-lg shadow-blue-500/30 hover:shadow-xl hover:shadow-blue-500/40 hover:-translate-y-0.5 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[h.jsx(nc,{size:16}),h.jsx("span",{children:k?"발송 중...":"보내기"})]}),h.jsxs("div",{className:"flex items-center ml-2 border-l border-gray-200 pl-2",children:[h.jsx("input",{ref:R,type:"file",multiple:!0,onChange:Gt,className:"hidden"}),h.jsx(pt,{title:"서식",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:()=>I(!L),sx:{color:L?"#6366f1":"#9ca3af","&:hover":{color:"#6366f1",backgroundColor:"#eef2ff"}},children:h.jsx(GC,{size:18})})}),h.jsx(pt,{title:"링크",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:mo,sx:{color:"#9ca3af","&:hover":{color:"#6366f1",backgroundColor:"#eef2ff"}},children:h.jsx(oz,{size:18})})}),h.jsx(pt,{title:"첨부파일",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:ye,sx:{color:"#9ca3af","&:hover":{color:"#6366f1",backgroundColor:"#eef2ff"}},children:h.jsx(Vu,{size:18})})})]})]}),L&&h.jsxs("div",{className:"absolute bottom-20 left-5 bg-white border border-gray-200 rounded-lg shadow-lg p-2 flex items-center gap-1",children:[h.jsx(pt,{title:"굵게",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:()=>ze("bold"),sx:{color:$.bold?"#6366f1":"#6b7280",backgroundColor:$.bold?"#eef2ff":"transparent","&:hover":{backgroundColor:"#f3f4f6"}},children:h.jsx(GC,{size:16})})}),h.jsx(pt,{title:"기울임",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:()=>ze("italic"),sx:{color:$.italic?"#6366f1":"#6b7280",backgroundColor:$.italic?"#eef2ff":"transparent","&:hover":{backgroundColor:"#f3f4f6"}},children:h.jsx(rz,{size:16})})}),h.jsx(pt,{title:"밑줄",arrow:!0,placement:"top",TransitionComponent:Je,children:h.jsx($n,{size:"small",onClick:()=>ze("underline"),sx:{color:$.underline?"#6366f1":"#6b7280",backgroundColor:$.underline?"#eef2ff":"transparent","&:hover":{backgroundColor:"#f3f4f6"}},children:h.jsx(yz,{size:16})})})]})]})]})]})},aE=()=>{const{fetchMailboxes:e,fetchEmails:t,emails:r,selectEmail:n,setSelectedEmail:a,selectedEmail:o,selectedBox:i}=ln(),{mailbox:s,emailId:l}=a6(),c=ni(),[u,d]=m.useState(!1),[f,p]=m.useState(null),[g,y]=m.useState("compose"),[v,x]=m.useState(null),w=m.useRef(o);m.useEffect(()=>{var C;e();const D=sessionStorage.getItem("admin_denied_message");D&&(Re.error(D,{duration:4e3,icon:"🚫"}),sessionStorage.removeItem("admin_denied_message"));const N=(C=performance.getEntriesByType("navigation")[0])==null?void 0:C.type;l&&(N==="reload"||N==="navigate")&&c(`/mail/${s||"inbox"}`,{replace:!0})},[]),m.useEffect(()=>{s&&t(s)},[s]),m.useEffect(()=>{if(l){const D=NQ(l);if(D){const N=r.find(_=>_.id===D);N&&(!o||o.id!==N.id)&&n(N)}}else a(null)},[l,r,o]),m.useEffect(()=>{if(w.current&&!o&&l){const N=s||(i==null?void 0:i.toLowerCase())||"inbox";c(`/mail/${N}`,{replace:!0})}w.current=o},[o,l,s,i,c]);const b=()=>{p(null),y("compose"),x(null),d(!0)},S=()=>{d(!1);const D=f!==null;p(null),y("compose"),x(null),(D||(s==null?void 0:s.toUpperCase())==="DRAFTS")&&t("DRAFTS")},k=D=>{p(D),y("compose"),x(null),d(!0)},P=D=>{p(null),y("reply"),x(D),d(!0)},E=D=>{p(null),y("forward"),x(D),d(!0)},O=s?s.toUpperCase():"INBOX";return h.jsxs("div",{className:"flex h-screen bg-white overflow-hidden font-sans text-slate-800 min-w-[1400px] overflow-x-auto",children:[h.jsx("div",{className:"w-80 flex-shrink-0 flex flex-col bg-white",children:h.jsx(_Q,{onComposeClick:b,activeBox:O})}),h.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-white",children:[h.jsx(DQ,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[h.jsx("div",{className:"w-96 flex-shrink-0 flex flex-col bg-white",children:h.jsx(MQ,{})}),h.jsx("div",{className:"w-px bg-gray-200 flex-shrink-0 mt-14"}),h.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-white relative",children:h.jsx(TQ,{onContinueDraft:k,onReply:P,onForward:E})})]})]}),h.jsx(jQ,{isOpen:u,onClose:S,draftData:f,mode:g,replyData:v})]})},AQ=U.forwardRef(function(t,r){return h.jsx(Je,{ref:r,...t})}),RQ=({currentView:e,onViewChange:t,onBack:r})=>{const{logout:n}=ln(),[a,o]=m.useState(!1),i=[{id:"dashboard",label:"대시보드",icon:az},{id:"users",label:"사용자 관리",icon:Ku},{id:"settings",label:"시스템 설정",icon:IM}],s=()=>{o(!0)},l=()=>{o(!1),n()};return h.jsxs("div",{className:"flex flex-col h-full bg-gradient-to-b from-slate-900 to-slate-800",children:[h.jsx("div",{className:"px-6 py-6",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"w-11 h-11 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl flex items-center justify-center shadow-lg shadow-indigo-500/30",children:h.jsx(xd,{className:"text-white",size:22})}),h.jsxs("div",{children:[h.jsx("h1",{className:"text-white font-bold text-lg",children:"Admin"}),h.jsx("p",{className:"text-slate-400 text-xs",children:"관리자 패널"})]})]})}),h.jsx("div",{className:"px-4 mb-4",children:h.jsxs("button",{onClick:r,className:"w-full flex items-center gap-3 px-4 py-3 text-slate-300 hover:text-white hover:bg-white/5 rounded-xl transition-all group",children:[h.jsx(UF,{size:18,className:"group-hover:-translate-x-1 transition-transform"}),h.jsx("span",{className:"text-sm font-medium",children:"메일함으로 돌아가기"})]})}),h.jsx("div",{className:"mx-6 mb-4 border-t border-white/10"}),h.jsx("div",{className:"px-6 mb-2",children:h.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"메뉴"})}),h.jsx("nav",{className:"flex-1 px-4",children:h.jsx("div",{className:"space-y-1",children:i.map(c=>{const u=c.icon,d=e===c.id;return h.jsxs("button",{onClick:()=>t(c.id),className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-all ${d?"bg-gradient-to-r from-indigo-500 to-indigo-600 text-white shadow-lg shadow-indigo-500/30":"text-slate-400 hover:text-white hover:bg-white/5"}`,children:[h.jsx(u,{size:20,className:d?"text-white":""}),h.jsx("span",{className:"text-sm font-medium",children:c.label})]},c.id)})})}),h.jsx("div",{className:"px-4 py-6 border-t border-white/10",children:h.jsxs("button",{onClick:s,className:"w-full flex items-center gap-3 px-4 py-3 text-slate-400 hover:text-rose-400 hover:bg-rose-500/5 rounded-xl transition-all",children:[h.jsx(jM,{size:20}),h.jsx("span",{className:"text-sm font-medium",children:"로그아웃"})]})}),h.jsx(ih,{open:a,onClose:()=>o(!1),TransitionComponent:AQ,PaperProps:{sx:{borderRadius:"20px",padding:"8px"}},children:h.jsxs("div",{className:"p-6 text-center",children:[h.jsx("div",{className:"mx-auto bg-red-100 w-16 h-16 rounded-2xl flex items-center justify-center mb-4",children:h.jsx(WF,{className:"h-8 w-8 text-red-500"})}),h.jsx(uc,{variant:"h6",fontWeight:"bold",gutterBottom:!0,children:"로그아웃 하시겠습니까?"}),h.jsx(uc,{variant:"body2",color:"text.secondary",sx:{mb:3},children:"현재 세션이 종료되고 로그인 화면으로 이동합니다."}),h.jsxs("div",{className:"flex gap-3 justify-center",children:[h.jsx(ha,{onClick:()=>o(!1),variant:"outlined",sx:{color:"#6b7280",borderColor:"#d1d5db",borderRadius:"12px",px:4,textTransform:"none",fontWeight:600},children:"취소"}),h.jsx(ha,{onClick:l,variant:"contained",color:"error",sx:{borderRadius:"12px",px:4,boxShadow:"none",textTransform:"none",fontWeight:600},children:"로그아웃"})]})]})})]})};var IQ=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function X1(e){if(typeof e!="string")return!1;var t=IQ;return t.includes(e)}var $Q=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],LQ=new Set($Q);function Fj(e){return typeof e!="string"?!1:LQ.has(e)}function zj(e){return typeof e=="string"&&e.startsWith("data-")}function Na(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Fj(r)||zj(r))&&(t[r]=e[r]);return t}function wv(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Na(t)}return typeof e=="object"&&!Array.isArray(e)?Na(e):null}function ta(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Fj(r)||zj(r)||X1(r))&&(t[r]=e[r]);return t}function FQ(e){return e==null?null:m.isValidElement(e)?ta(e.props):typeof e=="object"&&!Array.isArray(e)?ta(e):null}var zQ=["children","width","height","viewBox","className","style","title","desc"];function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zx.apply(null,arguments)}function BQ(e,t){if(e==null)return{};var r,n,a=WQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function WQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Bj=m.forwardRef((e,t)=>{var{children:r,width:n,height:a,viewBox:o,className:i,style:s,title:l,desc:c}=e,u=BQ(e,zQ),d=o||{width:n,height:a,x:0,y:0},f=le("recharts-surface",i);return m.createElement("svg",Zx({},ta(u),{className:f,width:n,height:a,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),m.createElement("title",null,l),m.createElement("desc",null,c),r)}),HQ=["children","className"];function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jx.apply(null,arguments)}function UQ(e,t){if(e==null)return{};var r,n,a=YQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function YQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lo=m.forwardRef((e,t)=>{var{children:r,className:n}=e,a=UQ(e,HQ),o=le("recharts-layer",n);return m.createElement("g",Jx({className:o},ta(a),{ref:t}),r)}),VQ=m.createContext(null);function zt(e){return function(){return e}}const eb=Math.PI,tb=2*eb,hs=1e-6,KQ=tb-hs;function Wj(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function qQ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Wj;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class GQ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Wj:qQ(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,i){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+i}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let i=this._x1,s=this._y1,l=n-t,c=a-r,u=i-t,d=s-r,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>hs)if(!(Math.abs(d*l-c*u)>hs)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-i,g=a-s,y=l*l+c*c,v=p*p+g*g,x=Math.sqrt(y),w=Math.sqrt(f),b=o*Math.tan((eb-Math.acos((y+f-v)/(2*x*w)))/2),S=b/w,k=b/x;Math.abs(S-1)>hs&&this._append`L${t+S*u},${r+S*d}`,this._append`A${o},${o},0,0,${+(d*p>u*g)},${this._x1=t+k*l},${this._y1=r+k*c}`}}arc(t,r,n,a,o,i){if(t=+t,r=+r,n=+n,i=!!i,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),c=t+s,u=r+l,d=1^i,f=i?a-o:o-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>hs||Math.abs(this._y1-u)>hs)&&this._append`L${c},${u}`,n&&(f<0&&(f=f%tb+tb),f>KQ?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:f>hs&&this._append`A${n},${n},0,${+(f>=eb)},${d},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Hj(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 GQ(t)}function Q1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uj(e){this._context=e}Uj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sv(e){return new Uj(e)}function Yj(e){return e[0]}function Vj(e){return e[1]}function Kj(e,t){var r=zt(!0),n=null,a=Sv,o=null,i=Hj(s);e=typeof e=="function"?e:e===void 0?Yj:zt(e),t=typeof t=="function"?t:t===void 0?Vj:zt(t);function s(l){var c,u=(l=Q1(l)).length,d,f=!1,p;for(n==null&&(o=a(p=i())),c=0;c<=u;++c)!(c<u&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:zt(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:zt(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:zt(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(o=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=o=null:o=a(n=l),s):n},s}function yp(e,t,r){var n=null,a=zt(!0),o=null,i=Sv,s=null,l=Hj(c);e=typeof e=="function"?e:e===void 0?Yj:zt(+e),t=typeof t=="function"?t:zt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Vj:zt(+r);function c(d){var f,p,g,y=(d=Q1(d)).length,v,x=!1,w,b=new Array(y),S=new Array(y);for(o==null&&(s=i(w=l())),f=0;f<=y;++f){if(!(f<y&&a(v=d[f],f,d))===x)if(x=!x)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=p;--g)s.point(b[g],S[g]);s.lineEnd(),s.areaEnd()}x&&(b[f]=+e(v,f,d),S[f]=+t(v,f,d),s.point(n?+n(v,f,d):b[f],r?+r(v,f,d):S[f]))}if(w)return s=null,w+""||null}function u(){return Kj().defined(a).curve(i).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:zt(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:zt(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:zt(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:zt(+d),r=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:zt(+d),c):t},c.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:zt(+d),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:zt(!!d),c):a},c.curve=function(d){return arguments.length?(i=d,o!=null&&(s=i(o)),c):i},c.context=function(d){return arguments.length?(d==null?o=s=null:s=i(o=d),c):o},c}class qj{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 XQ(e){return new qj(e,!0)}function QQ(e){return new qj(e,!1)}function gm(){}function vm(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 Gj(e){this._context=e}Gj.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:vm(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:vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ZQ(e){return new Gj(e)}function Xj(e){this._context=e}Xj.prototype={areaStart:gm,areaEnd:gm,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:vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JQ(e){return new Xj(e)}function Qj(e){this._context=e}Qj.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:vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eZ(e){return new Qj(e)}function Zj(e){this._context=e}Zj.prototype={areaStart:gm,areaEnd:gm,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 tZ(e){return new Zj(e)}function oE(e){return e<0?-1:1}function iE(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),i=(r-e._y1)/(a||n<0&&-0),s=(o*a+i*n)/(n+a);return(oE(o)+oE(i))*Math.min(Math.abs(o),Math.abs(i),.5*Math.abs(s))||0}function sE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function r0(e,t,r){var n=e._x0,a=e._y0,o=e._x1,i=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,a+s*t,o-s,i-s*r,o,i)}function ym(e){this._context=e}ym.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:r0(this,this._t0,sE(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,r0(this,sE(this,r=iE(this,e,t)),r);break;default:r0(this,this._t0,r=iE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Jj(e){this._context=new eA(e)}(Jj.prototype=Object.create(ym.prototype)).point=function(e,t){ym.prototype.point.call(this,t,e)};function eA(e){this._context=e}eA.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,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function rZ(e){return new ym(e)}function nZ(e){return new Jj(e)}function tA(e){this._context=e}tA.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=lE(e),a=lE(t),o=0,i=1;i<r;++o,++i)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[i],t[i]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function lE(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),i=new Array(r);for(a[0]=0,o[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,i[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,i[t]-=n*i[t-1];for(a[r-1]=i[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(i[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function aZ(e){return new tA(e)}function kv(e,t){this._context=e,this._t=t}kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function oZ(e){return new kv(e,.5)}function iZ(e){return new kv(e,0)}function sZ(e){return new kv(e,1)}function xc(e,t){if((i=e.length)>1)for(var r=1,n,a,o=e[t[0]],i,s=o.length;r<i;++r)for(a=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function rb(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function lZ(e,t){return e[t]}function cZ(e){const t=[];return t.key=e,t}function uZ(){var e=zt([]),t=rb,r=xc,n=lZ;function a(o){var i=Array.from(e.apply(this,arguments),cZ),s,l=i.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(i[s][c]=[0,+n(d,i[s].key,c,o)]).data=d;for(s=0,u=Q1(t(i));s<l;++s)i[u[s]].index=s;return r(i,u),i}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:zt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:zt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?rb:typeof o=="function"?o:zt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??xc,a):r},a}function dZ(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,i;a<o;++a){for(i=r=0;r<n;++r)i+=e[r][a][1]||0;if(i)for(r=0;r<n;++r)e[r][a][1]/=i}xc(e,t)}}function fZ(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var i=0,s=0;i<a;++i)s+=e[i][r][1]||0;n[r][1]+=n[r][0]=-s/2}xc(e,t)}}function pZ(e,t){if(!(!((i=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,i;n<o;++n){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[n][1]||0,f=u[n-1][1]||0,p=(d-f)/2,g=0;g<s;++g){var y=e[t[g]],v=y[n][1]||0,x=y[n-1][1]||0;p+=v-x}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,xc(e,t)}}var Cv={},rA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(rA);var Z1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Z1);var Pv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Pv);var Ev={},nA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(nA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nA,r=Pv;function n(a){if(Array.isArray(a))return a.map(r.toKey);if(typeof a=="symbol")return[a];a=t.toString(a);const o=[],i=a.length;if(i===0)return o;let s=0,l="",c="",u=!1;for(a.charCodeAt(0)===46&&(o.push(""),s++);s<i;){const d=a[s];c?d==="\\"&&s+1<i?(s++,l+=a[s]):d===c?c="":l+=d:u?d==='"'||d==="'"?c=d:d==="]"?(u=!1,o.push(l),l=""):l+=d:d==="["?(u=!0,l&&(o.push(l),l="")):d==="."?l&&(o.push(l),l=""):l+=d,s++}return l&&o.push(l),o}e.toPath=n})(Ev);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rA,r=Z1,n=Pv,a=Ev;function o(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?r.isDeepKey(l)?o(s,a.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return i(s,l,c);if(Object.is(l==null?void 0:l.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function i(s,l,c){if(l.length===0)return c;let u=s;for(let d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=o})(Cv);var hZ=Cv.get;const Ov=ti(hZ);var Un=e=>e===0?0:e>0?1:-1,Ma=e=>typeof e=="number"&&e!=+e,Go=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,_e=e=>(typeof e=="number"||e instanceof Number)&&!Ma(e),co=e=>_e(e)||typeof e=="string",mZ=0,Nd=e=>{var t=++mZ;return"".concat(e||"").concat(t)},qi=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!_e(t)&&typeof t!="string")return n;var o;if(Go(t)){if(r==null)return n;var i=t.indexOf("%");o=r*parseFloat(t.slice(0,i))/100}else o=+t;return Ma(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},aA=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function Ha(e,t,r){return _e(e)&&_e(t)?e+r*(t-e):t}function oA(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Ov(n,t))===r)}var kr=e=>e===null||typeof e>"u",J1=e=>kr(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function gZ(e){return e!=null}function pf(){}var iA=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,eS=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{X1(a)&&(n[a]=o=>r[a](r,o))}),n},vZ=(e,t,r)=>n=>(e(t,r,n),null),yZ=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];X1(a)&&typeof o=="function"&&(n||(n={}),n[a]=vZ(o,t,r))}),n};function cE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cE(Object(r),!0).forEach(function(n){bZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bZ(e,t,r){return(t=wZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wZ(e){var t=SZ(e,"string");return typeof t=="symbol"?t:t+""}function SZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function An(e,t){var r=xZ({},e),n=t,a=Object.keys(t),o=a.reduce((i,s)=>(i[s]===void 0&&n[s]!==void 0&&(i[s]=n[s]),i),r);return o}var sA={},lA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const a=new Map;for(let o=0;o<r.length;o++){const i=r[o],s=n(i);a.has(s)||a.set(s,i)}return Array.from(a.values())}e.uniqBy=t})(lA);var tS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(tS);var cA={},Dv={},uA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(uA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uA;function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Dv);var dA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(dA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dv,r=dA;function n(a){return r.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=n})(cA);var fA={},pA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cv;function r(n){return function(a){return t.get(a,n)}}e.property=r})(pA);var hA={},rS={},mA={},nS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(nS);var aS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(aS);var oS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(oS);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nS,r=aS,n=oS;function a(u,d,f){return typeof f!="function"?a(u,d,()=>{}):o(u,d,function p(g,y,v,x,w,b){const S=f(g,y,v,x,w,b);return S!==void 0?!!S:o(g,y,p,b)},new Map)}function o(u,d,f,p){if(d===u)return!0;switch(typeof d){case"object":return i(u,d,f,p);case"function":return Object.keys(d).length>0?o(u,{...d},f,p):n.eq(u,d);default:return t.isObject(u)?typeof d=="string"?d==="":!0:n.eq(u,d)}}function i(u,d,f,p){if(d==null)return!0;if(Array.isArray(d))return l(u,d,f,p);if(d instanceof Map)return s(u,d,f,p);if(d instanceof Set)return c(u,d,f,p);const g=Object.keys(d);if(u==null)return g.length===0;if(g.length===0)return!0;if(p!=null&&p.has(d))return p.get(d)===u;p==null||p.set(d,u);try{for(let y=0;y<g.length;y++){const v=g[y];if(!r.isPrimitive(u)&&!(v in u)||d[v]===void 0&&u[v]!==void 0||d[v]===null&&u[v]!==null||!f(u[v],d[v],v,u,d,p))return!1}return!0}finally{p==null||p.delete(d)}}function s(u,d,f,p){if(d.size===0)return!0;if(!(u instanceof Map))return!1;for(const[g,y]of d.entries()){const v=u.get(g);if(f(v,y,g,u,d,p)===!1)return!1}return!0}function l(u,d,f,p){if(d.length===0)return!0;if(!Array.isArray(u))return!1;const g=new Set;for(let y=0;y<d.length;y++){const v=d[y];let x=!1;for(let w=0;w<u.length;w++){if(g.has(w))continue;const b=u[w];let S=!1;if(f(b,v,y,u,d,p)&&(S=!0),S){g.add(w),x=!0;break}}if(!x)return!1}return!0}function c(u,d,f,p){return d.size===0?!0:u instanceof Set?l([...u],[...d],f,p):!1}e.isMatchWith=a,e.isSetMatch=c})(mA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mA;function r(n,a){return t.isMatchWith(n,a,()=>{})}e.isMatch=r})(rS);var gA={},iS={},vA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(vA);var sS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(sS);var lS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",o="[object Arguments]",i="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",d="[object Function]",f="[object ArrayBuffer]",p="[object Object]",g="[object Error]",y="[object DataView]",v="[object Uint8Array]",x="[object Uint8ClampedArray]",w="[object Uint16Array]",b="[object Uint32Array]",S="[object BigUint64Array]",k="[object Int8Array]",P="[object Int16Array]",E="[object Int32Array]",O="[object BigInt64Array]",D="[object Float32Array]",N="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=O,e.bigUint64ArrayTag=S,e.booleanTag=a,e.dataViewTag=y,e.dateTag=s,e.errorTag=g,e.float32ArrayTag=D,e.float64ArrayTag=N,e.functionTag=d,e.int16ArrayTag=P,e.int32ArrayTag=E,e.int8ArrayTag=k,e.mapTag=l,e.numberTag=n,e.objectTag=p,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=i,e.uint16ArrayTag=w,e.uint32ArrayTag=b,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=x})(lS);var yA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(yA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vA,r=sS,n=lS,a=aS,o=yA;function i(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,p=new Map,g=void 0){const y=g==null?void 0:g(u,d,f,p);if(y!==void 0)return y;if(a.isPrimitive(u))return u;if(p.has(u))return p.get(u);if(Array.isArray(u)){const v=new Array(u.length);p.set(u,v);for(let x=0;x<u.length;x++)v[x]=s(u[x],x,f,p,g);return Object.hasOwn(u,"index")&&(v.index=u.index),Object.hasOwn(u,"input")&&(v.input=u.input),v}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const v=new RegExp(u.source,u.flags);return v.lastIndex=u.lastIndex,v}if(u instanceof Map){const v=new Map;p.set(u,v);for(const[x,w]of u)v.set(x,s(w,x,f,p,g));return v}if(u instanceof Set){const v=new Set;p.set(u,v);for(const x of u)v.add(s(x,void 0,f,p,g));return v}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(o.isTypedArray(u)){const v=new(Object.getPrototypeOf(u)).constructor(u.length);p.set(u,v);for(let x=0;x<u.length;x++)v[x]=s(u[x],x,f,p,g);return v}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const v=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return p.set(u,v),l(v,u,f,p,g),v}if(typeof File<"u"&&u instanceof File){const v=new File([u],u.name,{type:u.type});return p.set(u,v),l(v,u,f,p,g),v}if(typeof Blob<"u"&&u instanceof Blob){const v=new Blob([u],{type:u.type});return p.set(u,v),l(v,u,f,p,g),v}if(u instanceof Error){const v=new u.constructor;return p.set(u,v),v.message=u.message,v.name=u.name,v.stack=u.stack,v.cause=u.cause,l(v,u,f,p,g),v}if(u instanceof Boolean){const v=new Boolean(u.valueOf());return p.set(u,v),l(v,u,f,p,g),v}if(u instanceof Number){const v=new Number(u.valueOf());return p.set(u,v),l(v,u,f,p,g),v}if(u instanceof String){const v=new String(u.valueOf());return p.set(u,v),l(v,u,f,p,g),v}if(typeof u=="object"&&c(u)){const v=Object.create(Object.getPrototypeOf(u));return p.set(u,v),l(v,u,f,p,g),v}return u}function l(u,d,f=u,p,g){const y=[...Object.keys(d),...t.getSymbols(d)];for(let v=0;v<y.length;v++){const x=y[v],w=Object.getOwnPropertyDescriptor(u,x);(w==null||w.writable)&&(u[x]=s(d[x],x,f,p,g))}}function c(u){switch(r.getTag(u)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=i,e.cloneDeepWithImpl=s,e.copyProperties=l})(iS);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iS;function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(gA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rS,r=gA;function n(a){return a=r.cloneDeep(a),o=>t.isMatch(o,a)}e.matches=n})(hA);var xA={},bA={},wA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iS,r=lS;function n(a,o){return t.cloneDeepWith(a,(i,s,l,c)=>{const u=o==null?void 0:o(i,s,l,c);if(u!==void 0)return u;if(typeof a=="object")switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const d=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(d,a),d}case r.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}})}e.cloneDeepWith=n})(wA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wA;function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(bA);var SA={},cS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,a=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<a;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(cS);var kA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sS;function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(kA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z1,r=cS,n=kA,a=Ev;function o(i,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&(i==null?void 0:i[s])==null?l=a.toPath(s):l=[s],l.length===0)return!1;let c=i;for(let u=0;u<l.length;u++){const d=l[u];if((c==null||!Object.hasOwn(c,d))&&!((Array.isArray(c)||n.isArguments(c))&&r.isIndex(d)&&d<c.length))return!1;c=c[d]}return!0}e.has=o})(SA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rS,r=Pv,n=bA,a=Cv,o=SA;function i(s,l){switch(typeof s){case"object":{Object.is(s==null?void 0:s.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return l=n.cloneDeep(l),function(c){const u=a.get(c,s);return u===void 0?o.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=i})(xA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tS,r=pA,n=hA,a=xA;function o(i){if(i==null)return t.identity;switch(typeof i){case"function":return i;case"object":return Array.isArray(i)&&i.length===2?a.matchesProperty(i[0],i[1]):n.matches(i);case"string":case"symbol":case"number":return r.property(i)}}e.iteratee=o})(fA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lA,r=tS,n=cA,a=fA;function o(i,s=r.identity){return n.isArrayLikeObject(i)?t.uniqBy(Array.from(i),a.iteratee(s)):[]}e.uniqBy=o})(sA);var kZ=sA.uniqBy;const uE=ti(kZ);function CZ(e,t,r){return t===!0?uE(e,r):typeof t=="function"?uE(e,t):e}var CA={exports:{}},PA={},EA={exports:{}},OA={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var bc=m;function PZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var EZ=typeof Object.is=="function"?Object.is:PZ,OZ=bc.useState,DZ=bc.useEffect,_Z=bc.useLayoutEffect,NZ=bc.useDebugValue;function MZ(e,t){var r=t(),n=OZ({inst:{value:r,getSnapshot:t}}),a=n[0].inst,o=n[1];return _Z(function(){a.value=r,a.getSnapshot=t,n0(a)&&o({inst:a})},[e,r,t]),DZ(function(){return n0(a)&&o({inst:a}),e(function(){n0(a)&&o({inst:a})})},[e]),NZ(r),r}function n0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!EZ(e,r)}catch{return!0}}function TZ(e,t){return t()}var jZ=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?TZ:MZ;OA.useSyncExternalStore=bc.useSyncExternalStore!==void 0?bc.useSyncExternalStore:jZ;EA.exports=OA;var AZ=EA.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var _v=m,RZ=AZ;function IZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $Z=typeof Object.is=="function"?Object.is:IZ,LZ=RZ.useSyncExternalStore,FZ=_v.useRef,zZ=_v.useEffect,BZ=_v.useMemo,WZ=_v.useDebugValue;PA.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var o=FZ(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=BZ(function(){function l(p){if(!c){if(c=!0,u=p,p=n(p),a!==void 0&&i.hasValue){var g=i.value;if(a(g,p))return d=g}return d=p}if(g=d,$Z(u,p))return g;var y=n(p);return a!==void 0&&a(g,y)?(u=p,g):(u=p,d=y)}var c=!1,u,d,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,n,a]);var s=LZ(e,o[0],o[1]);return zZ(function(){i.hasValue=!0,i.value=s},[s]),WZ(s),s};CA.exports=PA;var HZ=CA.exports,uS=m.createContext(null),UZ=e=>e,gr=()=>{var e=m.useContext(uS);return e?e.store.dispatch:UZ},lh=()=>{},YZ=()=>lh,VZ=(e,t)=>e===t;function Me(e){var t=m.useContext(uS);return HZ.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:YZ,t?t.store.getState:lh,t?t.store.getState:lh,t?e:lh,VZ)}function KZ(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qZ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function GZ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var dE=e=>Array.isArray(e)?e:[e];function XZ(e){const t=Array.isArray(e[0])?e[0]:e;return GZ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function QZ(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var ZZ=class{constructor(e){this.value=e}deref(){return this.value}},JZ=typeof WeakRef<"u"?WeakRef:ZZ,eJ=0,fE=1;function xp(){return{s:eJ,v:void 0,o:null,p:null}}function DA(e,t={}){let r=xp();const{resultEqualityCheck:n}=t;let a,o=0;function i(){var d;let s=r;const{length:l}=arguments;for(let f=0,p=l;f<p;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=s.o;y===null&&(s.o=y=new WeakMap);const v=y.get(g);v===void 0?(s=xp(),y.set(g,s)):s=v}else{let y=s.p;y===null&&(s.p=y=new Map);const v=y.get(g);v===void 0?(s=xp(),y.set(g,s)):s=v}}const c=s;let u;if(s.s===fE)u=s.v;else if(u=e.apply(null,arguments),o++,n){const f=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;f!=null&&n(f,u)&&(u=f,o!==0&&o--),a=typeof u=="object"&&u!==null||typeof u=="function"?new JZ(u):u}return c.s=fE,c.v=u,u}return i.clearCache=()=>{r=xp(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function tJ(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,i=0,s,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),KZ(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=DA,argsMemoizeOptions:g=[]}=u,y=dE(f),v=dE(g),x=XZ(a),w=d(function(){return o++,c.apply(null,arguments)},...y),b=p(function(){i++;const k=QZ(x,arguments);return s=w.apply(null,k),s},...v);return Object.assign(b,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Y=tJ(DA),rJ=Object.assign((e,t=Y)=>{qZ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((i,s,l)=>(i[r[l]]=s,i),{}))},{withTypes:()=>rJ}),_A={},NA={},MA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,a,o)=>{if(n!==a){const i=t(n),s=t(a);if(i===s&&i===0){if(n<a)return o==="desc"?1:-1;if(n>a)return o==="desc"?-1:1}return o==="desc"?s-i:i-s}return 0};e.compareValues=r})(MA);var TA={},dS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(dS);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dS,r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(o,i){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(n.test(o)||!r.test(o))||i!=null&&Object.hasOwn(i,o)}e.isKey=a})(TA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MA,r=TA,n=Ev;function a(o,i,s,l){if(o==null)return[];s=l?void 0:s,Array.isArray(o)||(o=Object.values(o)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(p=>String(p));const c=(p,g)=>{let y=p;for(let v=0;v<g.length&&y!=null;++v)y=y[g[v]];return y},u=(p,g)=>g==null||p==null?g:typeof p=="object"&&"key"in p?Object.hasOwn(g,p.key)?g[p.key]:c(g,p.path):typeof p=="function"?p(g):Array.isArray(p)?c(g,p):typeof g=="object"?g[p]:g,d=i.map(p=>(Array.isArray(p)&&p.length===1&&(p=p[0]),p==null||typeof p=="function"||Array.isArray(p)||r.isKey(p)?p:{key:p,path:n.toPath(p)}));return o.map(p=>({original:p,criteria:d.map(g=>u(g,p))})).slice().sort((p,g)=>{for(let y=0;y<d.length;y++){const v=t.compareValues(p.criteria[y],g.criteria[y],s[y]);if(v!==0)return v}return 0}).map(p=>p.original)}e.orderBy=a})(NA);var jA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const a=[],o=Math.floor(n),i=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<o?i(u,l+1):a.push(u)}};return i(r,0),a}e.flatten=t})(jA);var fS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cS,r=Dv,n=nS,a=oS;function o(i,s,l){return n.isObject(l)&&(typeof s=="number"&&r.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?a.eq(l[s],i):!1}e.isIterateeCall=o})(fS);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NA,r=jA,n=fS;function a(o,...i){const s=i.length;return s>1&&n.isIterateeCall(o,i[0],i[1])?i=[]:s>2&&n.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(o,r.flatten(i),["asc"])}e.sortBy=a})(_A);var nJ=_A.sortBy;const Nv=ti(nJ);var AA=e=>e.legend.settings,aJ=e=>e.legend.size,oJ=e=>e.legend.payload;Y([oJ,AA],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Nv(n,r):n});var bp=1;function iJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.useCallback(a=>{if(a!=null){var o=a.getBoundingClientRect(),i={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(i.height-t.height)>bp||Math.abs(i.left-t.left)>bp||Math.abs(i.top-t.top)>bp||Math.abs(i.width-t.width)>bp)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function yr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var sJ=typeof Symbol=="function"&&Symbol.observable||"@@observable",pE=sJ,a0=()=>Math.random().toString(36).substring(7).split("").join("."),lJ={INIT:`@@redux/INIT${a0()}`,REPLACE:`@@redux/REPLACE${a0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${a0()}`},xm=lJ;function pS(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function RA(e,t,r){if(typeof e!="function")throw new Error(yr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(yr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(yr(1));return r(RA)(e,t)}let n=e,a=t,o=new Map,i=o,s=0,l=!1;function c(){i===o&&(i=new Map,o.forEach((v,x)=>{i.set(x,v)}))}function u(){if(l)throw new Error(yr(3));return a}function d(v){if(typeof v!="function")throw new Error(yr(4));if(l)throw new Error(yr(5));let x=!0;c();const w=s++;return i.set(w,v),function(){if(x){if(l)throw new Error(yr(6));x=!1,c(),i.delete(w),o=null}}}function f(v){if(!pS(v))throw new Error(yr(7));if(typeof v.type>"u")throw new Error(yr(8));if(typeof v.type!="string")throw new Error(yr(17));if(l)throw new Error(yr(9));try{l=!0,a=n(a,v)}finally{l=!1}return(o=i).forEach(w=>{w()}),v}function p(v){if(typeof v!="function")throw new Error(yr(10));n=v,f({type:xm.REPLACE})}function g(){const v=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(yr(11));function w(){const S=x;S.next&&S.next(u())}return w(),{unsubscribe:v(w)}},[pE](){return this}}}return f({type:xm.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[pE]:g}}function cJ(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:xm.INIT})>"u")throw new Error(yr(12));if(typeof r(void 0,{type:xm.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yr(13))})}function IA(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const i=t[o];typeof e[i]=="function"&&(r[i]=e[i])}const n=Object.keys(r);let a;try{cJ(r)}catch(o){a=o}return function(i={},s){if(a)throw a;let l=!1;const c={};for(let u=0;u<n.length;u++){const d=n[u],f=r[d],p=i[d],g=f(p,s);if(typeof g>"u")throw s&&s.type,new Error(yr(14));c[d]=g,l=l||g!==p}return l=l||n.length!==Object.keys(i).length,l?c:i}}function bm(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function uJ(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(yr(15))};const i={getState:a.getState,dispatch:(l,...c)=>o(l,...c)},s=e.map(l=>l(i));return o=bm(...s)(a.dispatch),{...a,dispatch:o}}}function $A(e){return pS(e)&&"type"in e&&typeof e.type=="string"}var LA=Symbol.for("immer-nothing"),hE=Symbol.for("immer-draftable"),Ur=Symbol.for("immer-state");function ya(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Sn=Object,wc=Sn.getPrototypeOf,wm="constructor",Mv="prototype",nb="configurable",Sm="enumerable",ch="writable",Md="value",Xo=e=>!!e&&!!e[Ur];function Ta(e){var t;return e?FA(e)||Tv(e)||!!e[hE]||!!((t=e[wm])!=null&&t[hE])||jv(e)||Av(e):!1}var dJ=Sn[Mv][wm].toString(),mE=new WeakMap;function FA(e){if(!e||!hS(e))return!1;const t=wc(e);if(t===null||t===Sn[Mv])return!0;const r=Sn.hasOwnProperty.call(t,wm)&&t[wm];if(r===Object)return!0;if(!xl(r))return!1;let n=mE.get(r);return n===void 0&&(n=Function.toString.call(r),mE.set(r,n)),n===dJ}function hf(e,t,r=!0){mf(e)===0?(r?Reflect.ownKeys(e):Sn.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function mf(e){const t=e[Ur];return t?t.type_:Tv(e)?1:jv(e)?2:Av(e)?3:0}var gE=(e,t,r=mf(e))=>r===2?e.has(t):Sn[Mv].hasOwnProperty.call(e,t),ab=(e,t,r=mf(e))=>r===2?e.get(t):e[t],km=(e,t,r,n=mf(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function fJ(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Tv=Array.isArray,jv=e=>e instanceof Map,Av=e=>e instanceof Set,hS=e=>typeof e=="object",xl=e=>typeof e=="function",o0=e=>typeof e=="boolean",So=e=>e.copy_||e.base_,mS=e=>e.modified_?e.copy_:e.base_;function ob(e,t){if(jv(e))return new Map(e);if(Av(e))return new Set(e);if(Tv(e))return Array[Mv].slice.call(e);const r=FA(e);if(t===!0||t==="class_only"&&!r){const n=Sn.getOwnPropertyDescriptors(e);delete n[Ur];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const i=a[o],s=n[i];s[ch]===!1&&(s[ch]=!0,s[nb]=!0),(s.get||s.set)&&(n[i]={[nb]:!0,[ch]:!0,[Sm]:s[Sm],[Md]:e[i]})}return Sn.create(wc(e),n)}else{const n=wc(e);if(n!==null&&r)return{...e};const a=Sn.create(n);return Sn.assign(a,e)}}function gS(e,t=!1){return Rv(e)||Xo(e)||!Ta(e)||(mf(e)>1&&Sn.defineProperties(e,{set:wp,add:wp,clear:wp,delete:wp}),Sn.freeze(e),t&&hf(e,(r,n)=>{gS(n,!0)},!1)),e}function pJ(){ya(2)}var wp={[Md]:pJ};function Rv(e){return e===null||!hS(e)?!0:Sn.isFrozen(e)}var Cm="MapSet",ib="Patches",zA={};function Sc(e){const t=zA[e];return t||ya(0,e),t}var hJ=e=>!!zA[e],Td,BA=()=>Td,mJ=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:hJ(Cm)?Sc(Cm):void 0});function vE(e,t){t&&(e.patchPlugin_=Sc(ib),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sb(e){lb(e),e.drafts_.forEach(gJ),e.drafts_=null}function lb(e){e===Td&&(Td=e.parent_)}var yE=e=>Td=mJ(Td,e);function gJ(e){const t=e[Ur];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ur].modified_&&(sb(t),ya(4)),Ta(e)&&(e=bE(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[Ur].base_,e,t)}else e=bE(t,r);return vJ(t,e,!0),sb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==LA?e:void 0}function bE(e,t){if(Rv(t))return t;const r=t[Ur];if(!r)return vS(t,e.handledSet_,e);if(!Iv(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);UA(r,e)}return r.copy_}function vJ(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gS(t,r)}function WA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Iv=(e,t)=>e.scope_===t,yJ=[];function HA(e,t,r,n){const a=So(e),o=e.type_;if(n!==void 0&&ab(a,n,o)===t){km(a,n,r,o);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;hf(a,(l,c)=>{if(Xo(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const i=e.draftLocations_.get(t)??yJ;for(const s of i)km(a,s,r,o)}function xJ(e,t,r){e.callbacks_.push(function(a){var s;const o=t;if(!o||!Iv(o,a))return;(s=a.mapSetPlugin_)==null||s.fixSetContents(o);const i=mS(o);HA(e,o.draft_??o,i,r),UA(o,a)})}function UA(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}WA(e)}}function bJ(e,t,r){const{scope_:n}=e;if(Xo(r)){const a=r[Ur];Iv(a,n)&&a.callbacks_.push(function(){uh(e);const i=mS(a);HA(e,r,i,t)})}else Ta(r)&&e.callbacks_.push(function(){const o=So(e);ab(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&vS(ab(e.copy_,t,e.type_),n.handledSet_,n)})}function vS(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Xo(e)||t.has(e)||!Ta(e)||Rv(e)||(t.add(e),hf(e,(n,a)=>{if(Xo(a)){const o=a[Ur];if(Iv(o,r)){const i=mS(o);km(e,n,i,e.type_),WA(o)}}else Ta(a)&&vS(a,t,r)})),e}function wJ(e,t){const r=Tv(e),n={type_:r?1:0,scope_:t?t.scope_:BA(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=yS;r&&(a=[n],o=jd);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return n.draft_=s,n.revoke_=i,[s,n]}var yS={get(e,t){if(t===Ur)return e;const r=So(e);if(!gE(r,t,e.type_))return SJ(e,r,t);const n=r[t];if(e.finalized_||!Ta(n))return n;if(n===i0(e.base_,t)){uh(e);const a=e.type_===1?+t:t,o=ub(e.scope_,n,e,a);return e.copy_[a]=o}return n},has(e,t){return t in So(e)},ownKeys(e){return Reflect.ownKeys(So(e))},set(e,t,r){const n=YA(So(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=i0(So(e),t),o=a==null?void 0:a[Ur];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(fJ(r,a)&&(r!==void 0||gE(e.base_,t,e.type_)))return!0;uh(e),cb(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),bJ(e,t,r)),!0},deleteProperty(e,t){return uh(e),i0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),cb(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=So(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ch]:!0,[nb]:e.type_!==1||t!=="length",[Sm]:n[Sm],[Md]:r[t]}},defineProperty(){ya(11)},getPrototypeOf(e){return wc(e.base_)},setPrototypeOf(){ya(12)}},jd={};hf(yS,(e,t)=>{jd[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}});jd.deleteProperty=function(e,t){return jd.set.call(this,e,t,void 0)};jd.set=function(e,t,r){return yS.set.call(this,e[0],t,r,e[0])};function i0(e,t){const r=e[Ur];return(r?So(r):e)[t]}function SJ(e,t,r){var a;const n=YA(t,r);return n?Md in n?n[Md]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function YA(e,t){if(!(t in e))return;let r=wc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=wc(r)}}function cb(e){e.modified_||(e.modified_=!0,e.parent_&&cb(e.parent_))}function uh(e){e.copy_||(e.assigned_=new Map,e.copy_=ob(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kJ=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(xl(r)&&!xl(n)){const i=n;n=r;const s=this;return function(c=i,...u){return s.produce(c,d=>n.call(this,d,...u))}}xl(n)||ya(6),a!==void 0&&!xl(a)&&ya(7);let o;if(Ta(r)){const i=yE(this),s=ub(i,r,void 0);let l=!0;try{o=n(s),l=!1}finally{l?sb(i):lb(i)}return vE(i,a),xE(o,i)}else if(!r||!hS(r)){if(o=n(r),o===void 0&&(o=r),o===LA&&(o=void 0),this.autoFreeze_&&gS(o,!0),a){const i=[],s=[];Sc(ib).generateReplacementPatches_(r,o,{patches_:i,inversePatches_:s}),a(i,s)}return o}else ya(1,r)},this.produceWithPatches=(r,n)=>{if(xl(r))return(s,...l)=>this.produceWithPatches(s,c=>r(c,...l));let a,o;return[this.produce(r,n,(s,l)=>{a=s,o=l}),a,o]},o0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),o0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),o0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ta(t)||ya(8),Xo(t)&&(t=Oa(t));const r=yE(this),n=ub(r,t,void 0);return n[Ur].isManual_=!0,lb(r),n}finishDraft(t,r){const n=t&&t[Ur];(!n||!n.isManual_)&&ya(9);const{scope_:a}=n;return vE(a,r),xE(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=Sc(ib).applyPatches_;return Xo(t)?a(t,r):this.produce(t,o=>a(o,r))}};function ub(e,t,r,n){const[a,o]=jv(t)?Sc(Cm).proxyMap_(t,r):Av(t)?Sc(Cm).proxySet_(t,r):wJ(t,r);return((r==null?void 0:r.scope_)??BA()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?xJ(r,o,n):o.callbacks_.push(function(l){var u;(u=l.mapSetPlugin_)==null||u.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),a}function Oa(e){return Xo(e)||ya(10,e),VA(e)}function VA(e){if(!Ta(e)||Rv(e))return e;const t=e[Ur];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ob(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ob(e,!0);return hf(r,(a,o)=>{km(r,a,VA(o))},n),t&&(t.finalized_=!1),r}var CJ=new kJ,KA=CJ.produce;function qA(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var PJ=qA(),EJ=qA,OJ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?bm:bm.apply(null,arguments)};function ra(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(En(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>$A(n)&&n.type===e,r}var GA=class Au extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Au.prototype)}static get[Symbol.species](){return Au}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Au(...t[0].concat(this)):new Au(...t.concat(this))}};function wE(e){return Ta(e)?KA(e,()=>{}):e}function Sp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function DJ(e){return typeof e=="boolean"}var _J=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let i=new GA;return r&&(DJ(r)?i.push(PJ):i.push(EJ(r.extraArgument))),i},XA="RTK_autoBatch",Ot=()=>e=>({payload:e,meta:{[XA]:!0}}),SE=e=>t=>{setTimeout(t,e)},QA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,i=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:SE(10):e.type==="callback"?e.queueNotification:SE(e.timeout),c=()=>{i=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>a&&u(),f=n.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){var d;try{return a=!((d=u==null?void 0:u.meta)!=null&&d[XA]),o=!a,o&&(i||(i=!0,l(c))),n.dispatch(u)}finally{a=!0}}})},NJ=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new GA(e);return n&&a.push(QA(typeof n=="object"?n:void 0)),a};function MJ(e){const t=_J(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:i=void 0}=e||{};let s;if(typeof r=="function")s=r;else if(pS(r))s=IA(r);else throw new Error(En(1));let l;typeof n=="function"?l=n(t):l=t();let c=bm;a&&(c=OJ({trace:!1,...typeof a=="object"&&a}));const u=uJ(...l),d=NJ(u);let f=typeof i=="function"?i(d):d();const p=c(...f);return RA(s,o,p)}function ZA(e){const t={},r=[];let n;const a={addCase(o,i){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(En(28));if(s in t)throw new Error(En(29));return t[s]=i,a},addAsyncThunk(o,i){return i.pending&&(t[o.pending.type]=i.pending),i.rejected&&(t[o.rejected.type]=i.rejected),i.fulfilled&&(t[o.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:o.settled,reducer:i.settled}),a},addMatcher(o,i){return r.push({matcher:o,reducer:i}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function TJ(e){return typeof e=="function"}function jJ(e,t){let[r,n,a]=ZA(t),o;if(TJ(e))o=()=>wE(e());else{const s=wE(e);o=()=>s}function i(s=o(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[a]),c.reduce((u,d)=>{if(d)if(Xo(u)){const p=d(u,l);return p===void 0?u:p}else{if(Ta(u))return KA(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return i.getInitialState=o,i}var AJ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",RJ=(e=21)=>{let t="",r=e;for(;r--;)t+=AJ[Math.random()*64|0];return t},IJ=Symbol.for("rtk-slice-createasyncthunk");function $J(e,t){return`${e}/${t}`}function LJ({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[IJ];return function(a){const{name:o,reducerPath:i=o}=a;if(!o)throw new Error(En(11));const s=(typeof a.reducers=="function"?a.reducers(zJ()):a.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(S,k){const P=typeof S=="string"?S:S.type;if(!P)throw new Error(En(12));if(P in c.sliceCaseReducersByType)throw new Error(En(13));return c.sliceCaseReducersByType[P]=k,u},addMatcher(S,k){return c.sliceMatchers.push({matcher:S,reducer:k}),u},exposeAction(S,k){return c.actionCreators[S]=k,u},exposeCaseReducer(S,k){return c.sliceCaseReducersByName[S]=k,u}};l.forEach(S=>{const k=s[S],P={reducerName:S,type:$J(o,S),createNotation:typeof a.reducers=="function"};WJ(k)?UJ(P,k,u,t):BJ(P,k,u)});function d(){const[S={},k=[],P=void 0]=typeof a.extraReducers=="function"?ZA(a.extraReducers):[a.extraReducers],E={...S,...c.sliceCaseReducersByType};return jJ(a.initialState,O=>{for(let D in E)O.addCase(D,E[D]);for(let D of c.sliceMatchers)O.addMatcher(D.matcher,D.reducer);for(let D of k)O.addMatcher(D.matcher,D.reducer);P&&O.addDefaultCase(P)})}const f=S=>S,p=new Map,g=new WeakMap;let y;function v(S,k){return y||(y=d()),y(S,k)}function x(){return y||(y=d()),y.getInitialState()}function w(S,k=!1){function P(O){let D=O[S];return typeof D>"u"&&k&&(D=Sp(g,P,x)),D}function E(O=f){const D=Sp(p,k,()=>new WeakMap);return Sp(D,O,()=>{const N={};for(const[_,C]of Object.entries(a.selectors??{}))N[_]=FJ(C,O,()=>Sp(g,O,x),k);return N})}return{reducerPath:S,getSelectors:E,get selectors(){return E(P)},selectSlice:P}}const b={name:o,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...w(i),injectInto(S,{reducerPath:k,...P}={}){const E=k??i;return S.inject({reducerPath:E,reducer:v},P),{...b,...w(E,!0)}}};return b}}function FJ(e,t,r,n){function a(o,...i){let s=t(o);return typeof s>"u"&&n&&(s=r()),e(s,...i)}return a.unwrapped=e,a}var un=LJ();function zJ(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function BJ({type:e,reducerName:t,createNotation:r},n,a){let o,i;if("reducer"in n){if(r&&!HJ(n))throw new Error(En(17));o=n.reducer,i=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?ra(e,i):ra(e))}function WJ(e){return e._reducerDefinitionType==="asyncThunk"}function HJ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function UJ({type:e,reducerName:t},r,n,a){if(!a)throw new Error(En(18));const{payloadCreator:o,fulfilled:i,pending:s,rejected:l,settled:c,options:u}=r,d=a(e,o,u);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),s&&n.addCase(d.pending,s),l&&n.addCase(d.rejected,l),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:i||kp,pending:s||kp,rejected:l||kp,settled:c||kp})}function kp(){}var YJ="task",JA="listener",eR="completed",xS="cancelled",VJ=`task-${xS}`,KJ=`task-${eR}`,db=`${JA}-${xS}`,qJ=`${JA}-${eR}`,$v=class{constructor(e){me(this,"name","TaskAbortError");me(this,"message");this.code=e,this.message=`${YJ} ${xS} (reason: ${e})`}},bS=(e,t)=>{if(typeof e!="function")throw new TypeError(En(32))},Pm=()=>{},tR=(e,t=Pm)=>(e.catch(t),e),rR=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),js=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},As=e=>{if(e.aborted){const{reason:t}=e;throw new $v(t)}};function nR(e,t){let r=Pm;return new Promise((n,a)=>{const o=()=>a(new $v(e.reason));if(e.aborted){o();return}r=rR(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=Pm})}var GJ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof $v?"cancelled":"rejected",error:r}}finally{t==null||t()}},Em=e=>t=>tR(nR(e,t).then(r=>(As(e),r))),aR=e=>{const t=Em(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Vl}=Object,kE={},Lv="listenerMiddleware",XJ=(e,t)=>{const r=n=>rR(e,()=>js(n,e.reason));return(n,a)=>{bS(n);const o=new AbortController;r(o);const i=GJ(async()=>{As(e),As(o.signal);const s=await n({pause:Em(o.signal),delay:aR(o.signal),signal:o.signal});return As(o.signal),s},()=>js(o,KJ));return a!=null&&a.autoJoin&&t.push(i.catch(Pm)),{result:Em(e)(i),cancel(){js(o,VJ)}}}},QJ=(e,t)=>{const r=async(n,a)=>{As(t);let o=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});o=()=>{u(),c()}})];a!=null&&s.push(new Promise(l=>setTimeout(l,a,null)));try{const l=await nR(t,Promise.race(s));return As(t),l}finally{o()}};return(n,a)=>tR(r(n,a))},oR=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=ra(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(En(21));return bS(o),{predicate:a,type:t,effect:o}},iR=Vl(e=>{const{type:t,predicate:r,effect:n}=oR(e);return{id:RJ(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(En(22))}}},{withTypes:()=>iR}),CE=(e,t)=>{const{type:r,effect:n,predicate:a}=oR(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},fb=e=>{e.pending.forEach(t=>{js(t,db)})},ZJ=(e,t)=>()=>{for(const r of t.keys())fb(r);e.clear()},PE=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},sR=Vl(ra(`${Lv}/add`),{withTypes:()=>sR}),JJ=ra(`${Lv}/removeAll`),lR=Vl(ra(`${Lv}/remove`),{withTypes:()=>lR}),eee=(...e)=>{console.error(`${Lv}/error`,...e)},gf=(e={})=>{const t=new Map,r=new Map,n=p=>{const g=r.get(p)??0;r.set(p,g+1)},a=p=>{const g=r.get(p)??1;g===1?r.delete(p):r.set(p,g-1)},{extra:o,onError:i=eee}=e;bS(i);const s=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),g=>{p.unsubscribe(),g!=null&&g.cancelActive&&fb(p)}),l=p=>{const g=CE(t,p)??iR(p);return s(g)};Vl(l,{withTypes:()=>l});const c=p=>{const g=CE(t,p);return g&&(g.unsubscribe(),p.cancelActive&&fb(g)),!!g};Vl(c,{withTypes:()=>c});const u=async(p,g,y,v)=>{const x=new AbortController,w=QJ(l,x.signal),b=[];try{p.pending.add(x),n(p),await Promise.resolve(p.effect(g,Vl({},y,{getOriginalState:v,condition:(S,k)=>w(S,k).then(Boolean),take:w,delay:aR(x.signal),pause:Em(x.signal),extra:o,signal:x.signal,fork:XJ(x.signal,b),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((S,k,P)=>{S!==x&&(js(S,db),P.delete(S))})},cancel:()=>{js(x,db),p.pending.delete(x)},throwIfCancelled:()=>{As(x.signal)}})))}catch(S){S instanceof $v||PE(i,S,{raisedBy:"effect"})}finally{await Promise.all(b),js(x,qJ),a(p),p.pending.delete(x)}},d=ZJ(t,r);return{middleware:p=>g=>y=>{if(!$A(y))return g(y);if(sR.match(y))return l(y.payload);if(JJ.match(y)){d();return}if(lR.match(y))return c(y.payload);let v=p.getState();const x=()=>{if(v===kE)throw new Error(En(23));return v};let w;try{if(w=g(y),t.size>0){const b=p.getState(),S=Array.from(t.values());for(const k of S){let P=!1;try{P=k.predicate(y,b,v)}catch(E){P=!1,PE(i,E,{raisedBy:"predicate"})}P&&u(k,y,p,x)}}}finally{v=kE}return w},startListening:l,stopListening:c,clearListeners:d}};function En(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tee={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},cR=un({name:"chartLayout",initialState:tee,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:ree,setLayout:nee,setChartSize:aee,setScale:oee}=cR.actions,iee=cR.reducer;function uR(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function EE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EE(Object(r),!0).forEach(function(n){see(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function see(e,t,r){return(t=lee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lee(e){var t=cee(e,"string");return typeof t=="symbol"?t:t+""}function cee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ir(e,t,r){return kr(e)||kr(t)?r:co(t)?Ov(e,t,r):typeof t=="function"?t(e):r}var uee=(e,t,r)=>{if(t&&r){var{width:n,height:a}=r,{align:o,verticalAlign:i,layout:s}=t;if((s==="vertical"||s==="horizontal"&&i==="middle")&&o!=="center"&&_e(e[o]))return Tl(Tl({},e),{},{[o]:e[o]+(n||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&i!=="middle"&&_e(e[i]))return Tl(Tl({},e),{},{[i]:e[i]+(a||0)})}return e},ii=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",dR=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var a,o,i=e.map(s=>(s.coordinate===t&&(a=!0),s.coordinate===r&&(o=!0),s.coordinate));return a||i.push(t),o||i.push(r),i},fR=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:a,range:o,scale:i,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!i)return null;var g=s==="scaleBand"&&i.bandwidth?i.bandwidth()/2:2,y=a==="category"&&i.bandwidth?i.bandwidth()/g:0;if(y=p==="angleAxis"&&o&&o.length>=2?Un(o[0]-o[1])*2*y:y,d||f){var v=(d||f||[]).map((x,w)=>{var b=n?n.indexOf(x):x;return{coordinate:i(b)+y,value:x,offset:y,index:w}});return v.filter(x=>!Ma(x.coordinate))}return l&&c?c.map((x,w)=>({coordinate:i(x)+y,value:x,index:w,offset:y})):i.ticks&&u!=null?i.ticks(u).map((x,w)=>({coordinate:i(x)+y,value:x,offset:y,index:w})):i.domain().map((x,w)=>({coordinate:i(x)+y,value:n?n[x]:x,index:w,offset:y}))},OE=1e-4,dee=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),a=Math.min(n[0],n[1])-OE,o=Math.max(n[0],n[1])+OE,i=e(t[0]),s=e(t[r-1]);(i<a||i>o||s<a||s>o)&&e.domain([t[0],t[r-1]])}},fee=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var a=0,o=0,i=0;i<t;++i){var s=Ma(e[i][r][1])?e[i][r][0]:e[i][r][1];s>=0?(e[i][r][0]=a,e[i][r][1]=a+s,a=e[i][r][1]):(e[i][r][0]=o,e[i][r][1]=o+s,o=e[i][r][1])}},pee=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var a=0,o=0;o<t;++o){var i=Ma(e[o][r][1])?e[o][r][0]:e[o][r][1];i>=0?(e[o][r][0]=a,e[o][r][1]=a+i,a=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},hee={sign:fee,expand:dZ,none:xc,silhouette:fZ,wiggle:pZ,positive:pee},mee=(e,t,r)=>{var n=hee[r],a=uZ().keys(t).value((o,i)=>Number(Ir(o,i,0))).order(rb).offset(n);return a(e)};function gee(e){return e==null?void 0:String(e)}function DE(e){var{axis:t,ticks:r,bandSize:n,entry:a,index:o,dataKey:i}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!kr(a[t.dataKey])){var s=oA(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=Ir(a,kr(i)?t.dataKey:i);return kr(l)?null:t.scale(l)}var vee=e=>{var t=e.flat(2).filter(_e);return[Math.min(...t),Math.max(...t)]},yee=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],xee=(e,t,r)=>{if(e!=null)return yee(Object.keys(e).reduce((n,a)=>{var o=e[a],{stackedData:i}=o,s=i.reduce((l,c)=>{var u=uR(c,t,r),d=vee(u);return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},_E=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Om=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=Nv(t,u=>u.coordinate),o=1/0,i=1,s=a.length;i<s;i++){var l=a[i],c=a[i-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0};function ME(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:a,name:o}=e;return Tl(Tl({},t),{},{dataKey:r,payload:n,value:a,name:o})}function pR(e,t){if(e)return String(e);if(typeof t=="string")return t}var bee=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},wee=(e,t)=>t==="centric"?e.angle:e.radius,si=e=>e.layout.width,li=e=>e.layout.height,See=e=>e.layout.scale,hR=e=>e.layout.margin,Fv=Y(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),zv=Y(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),kee="data-recharts-item-index",Cee="data-recharts-item-data-key",vf=60;function TE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(r),!0).forEach(function(n){Pee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pee(e,t,r){return(t=Eee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eee(e){var t=Oee(e,"string");return typeof t=="symbol"?t:t+""}function Oee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dee=e=>e.brush.height;function _ee(e){var t=zv(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:vf;return r+a}return r},0)}function Nee(e){var t=zv(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:vf;return r+a}return r},0)}function Mee(e){var t=Fv(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Tee(e){var t=Fv(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Er=Y([si,li,hR,Dee,_ee,Nee,Mee,Tee,AA,aJ],(e,t,r,n,a,o,i,s,l,c)=>{var u={left:(r.left||0)+a,right:(r.right||0)+o},d={top:(r.top||0)+i,bottom:(r.bottom||0)+s},f=Cp(Cp({},d),u),p=f.bottom;f.bottom+=n,f=uee(f,l,c);var g=e-f.left-f.right,y=t-f.top-f.bottom;return Cp(Cp({brushBottom:p},f),{},{width:Math.max(g,0),height:Math.max(y,0)})}),jee=Y(Er,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),mR=Y(si,li,(e,t)=>({x:0,y:0,width:e,height:t})),Aee=m.createContext(null),dn=()=>m.useContext(Aee)!=null,Bv=e=>e.brush,Wv=Y([Bv,Er,hR],(e,t,r)=>({height:e.height,x:_e(e.x)?e.x:t.left,y:_e(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:_e(e.width)?e.width:t.width})),gR={},vR={},yR={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:a,edges:o}={}){let i,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(r.apply(i,s),i=void 0,s=null)},d=()=>{c&&u(),y()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},n)},g=()=>{f!==null&&(clearTimeout(f),f=null)},y=()=>{g(),i=void 0,s=null},v=()=>{u()},x=function(...w){if(a!=null&&a.aborted)return;i=this,s=w;const b=f==null;p(),l&&b&&u()};return x.schedule=p,x.cancel=y,x.flush=v,a==null||a.addEventListener("abort",y,{once:!0}),x}e.debounce=t})(yR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yR;function r(n,a=0,o={}){typeof o!="object"&&(o={});const{leading:i=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);i&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...y){u=n.apply(this,y),d=null},a,{edges:c}),p=function(...y){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=n.apply(this,y),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,y),u)},g=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=g,p}e.debounce=r})(vR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vR;function r(n,a=0,o={}){const{leading:i=!0,trailing:s=!0}=o;return t.debounce(n,a,{leading:i,maxWait:a,trailing:s})}e.throttle=r})(gR);var Ree=gR.throttle;const Iee=ti(Ree);var Dm=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(r.replace(/%s/g,()=>a[i++]))}},xR=(e,t,r)=>{var{width:n="100%",height:a="100%",aspect:o,maxHeight:i}=r,s=Go(n)?e:Number(n),l=Go(a)?t:Number(a);return o&&o>0&&(s?l=s/o:l&&(s=l*o),i&&l!=null&&l>i&&(l=i)),{calculatedWidth:s,calculatedHeight:l}},$ee={width:0,height:0,overflow:"visible"},Lee={width:0,overflowX:"visible"},Fee={height:0,overflowY:"visible"},zee={},Bee=e=>{var{width:t,height:r}=e,n=Go(t),a=Go(r);return n&&a?$ee:n?Lee:a?Fee:zee};function Wee(e){var{width:t,height:r,aspect:n}=e,a=t,o=r;return a===void 0&&o===void 0?(a="100%",o="100%"):a===void 0?a=n&&n>0?void 0:"100%":o===void 0&&(o=n&&n>0?void 0:"100%"),{width:a,height:o}}function Ht(e){return Number.isFinite(e)}function uo(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}function jE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(r),!0).forEach(function(n){Hee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hee(e,t,r){return(t=Uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uee(e){var t=Yee(e,"string");return typeof t=="symbol"?t:t+""}function Yee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bR=m.createContext({width:-1,height:-1});function Vee(e){return uo(e.width)&&uo(e.height)}function wR(e){var{children:t,width:r,height:n}=e,a=m.useMemo(()=>({width:r,height:n}),[r,n]);return Vee(a)?m.createElement(bR.Provider,{value:a},t):null}var wS=()=>m.useContext(bR),Kee=m.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:a,height:o,minWidth:i=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:g={}}=e,y=m.useRef(null),v=m.useRef();v.current=p,m.useImperativeHandle(t,()=>y.current);var[x,w]=m.useState({containerWidth:n.width,containerHeight:n.height}),b=m.useCallback((O,D)=>{w(N=>{var _=Math.round(O),C=Math.round(D);return N.containerWidth===_&&N.containerHeight===C?N:{containerWidth:_,containerHeight:C}})},[]);m.useEffect(()=>{if(y.current==null||typeof ResizeObserver>"u")return pf;var O=C=>{var M,{width:T,height:j}=C[0].contentRect;b(T,j),(M=v.current)===null||M===void 0||M.call(v,T,j)};u>0&&(O=Iee(O,u,{trailing:!0,leading:!1}));var D=new ResizeObserver(O),{width:N,height:_}=y.current.getBoundingClientRect();return b(N,_),D.observe(y.current),()=>{D.disconnect()}},[b,u]);var{containerWidth:S,containerHeight:k}=x;Dm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:P,calculatedHeight:E}=xR(S,k,{width:a,height:o,aspect:r,maxHeight:l});return Dm(P!=null&&P>0||E!=null&&E>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.`,P,E,a,o,i,s,r),m.createElement("div",{id:d?"".concat(d):void 0,className:le("recharts-responsive-container",f),style:AE(AE({},g),{},{width:a,height:o,minWidth:i,minHeight:s,maxHeight:l}),ref:y},m.createElement("div",{style:Bee({width:a,height:o})},m.createElement(wR,{width:P,height:E},c)))}),qee=m.forwardRef((e,t)=>{var r=wS();if(uo(r.width)&&uo(r.height))return e.children;var{width:n,height:a}=Wee({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:i}=xR(void 0,void 0,{width:n,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return _e(o)&&_e(i)?m.createElement(wR,{width:o,height:i},e.children):m.createElement(Kee,pb({},e,{width:n,height:a,ref:t}))});function SR(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Hv=()=>{var e,t=dn(),r=Me(jee),n=Me(Wv),a=(e=Me(Bv))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},Gee={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},kR=()=>{var e;return(e=Me(Er))!==null&&e!==void 0?e:Gee},CR=()=>Me(si),PR=()=>Me(li),wt=e=>e.layout.layoutType,yf=()=>Me(wt),Xee=()=>{var e=yf();if(e==="horizontal"||e==="vertical")return e},Qee=()=>{var e=yf();return e!==void 0},Uv=e=>{var t=gr(),r=dn(),{width:n,height:a}=e,o=wS(),i=n,s=a;return o&&(i=o.width>0?o.width:n,s=o.height>0?o.height:a),m.useEffect(()=>{!r&&uo(i)&&uo(s)&&t(aee({width:i,height:s}))},[t,r,i,s]),null},ER=Symbol.for("immer-nothing"),RE=Symbol.for("immer-draftable"),_n=Symbol.for("immer-state");function xa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ad=Object.getPrototypeOf;function kc(e){return!!e&&!!e[_n]}function Vs(e){var t;return e?OR(e)||Array.isArray(e)||!!e[RE]||!!((t=e.constructor)!=null&&t[RE])||xf(e)||Vv(e):!1}var Zee=Object.prototype.constructor.toString(),IE=new WeakMap;function OR(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=IE.get(r);return n===void 0&&(n=Function.toString.call(r),IE.set(r,n)),n===Zee}function _m(e,t,r=!0){Yv(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Yv(e){const t=e[_n];return t?t.type_:Array.isArray(e)?1:xf(e)?2:Vv(e)?3:0}function hb(e,t){return Yv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function DR(e,t,r){const n=Yv(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jee(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function xf(e){return e instanceof Map}function Vv(e){return e instanceof Set}function ms(e){return e.copy_||e.base_}function mb(e,t){if(xf(e))return new Map(e);if(Vv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=OR(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[_n];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const i=a[o],s=n[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Ad(e),n)}else{const n=Ad(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function SS(e,t=!1){return Kv(e)||kc(e)||!Vs(e)||(Yv(e)>1&&Object.defineProperties(e,{set:Pp,add:Pp,clear:Pp,delete:Pp}),Object.freeze(e),t&&Object.values(e).forEach(r=>SS(r,!0))),e}function ete(){xa(2)}var Pp={value:ete};function Kv(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var tte={};function Ks(e){const t=tte[e];return t||xa(0,e),t}var Rd;function _R(){return Rd}function rte(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $E(e,t){t&&(Ks("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gb(e){vb(e),e.drafts_.forEach(nte),e.drafts_=null}function vb(e){e===Rd&&(Rd=e.parent_)}function LE(e){return Rd=rte(Rd,e)}function nte(e){const t=e[_n];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function FE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[_n].modified_&&(gb(t),xa(4)),Vs(e)&&(e=Nm(t,e),t.parent_||Mm(t,e)),t.patches_&&Ks("Patches").generateReplacementPatches_(r[_n].base_,e,t.patches_,t.inversePatches_)):e=Nm(t,r,[]),gb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ER?e:void 0}function Nm(e,t,r){if(Kv(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[_n];if(!a)return _m(t,(o,i)=>zE(e,a,t,o,i,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Mm(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let i=o,s=!1;a.type_===3&&(i=new Set(o),o.clear(),s=!0),_m(i,(l,c)=>zE(e,a,o,l,c,r,s),n),Mm(e,o,!1),r&&e.patches_&&Ks("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function zE(e,t,r,n,a,o,i){if(a==null||typeof a!="object"&&!i)return;const s=Kv(a);if(!(s&&!i)){if(kc(a)){const l=o&&t&&t.type_!==3&&!hb(t.assigned_,n)?o.concat(n):void 0,c=Nm(e,a,l);if(DR(r,n,c),kc(c))e.canAutoFreeze_=!1;else return}else i&&r.add(a);if(Vs(a)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&s)return;Nm(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(xf(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Mm(e,a)}}}function Mm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&SS(t,r)}function ate(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_R(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=kS;r&&(a=[n],o=Id);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return n.draft_=s,n.revoke_=i,s}var kS={get(e,t){if(t===_n)return e;const r=ms(e);if(!hb(r,t))return ote(e,r,t);const n=r[t];return e.finalized_||!Vs(n)?n:n===s0(e.base_,t)?(l0(e),e.copy_[t]=xb(n,e)):n},has(e,t){return t in ms(e)},ownKeys(e){return Reflect.ownKeys(ms(e))},set(e,t,r){const n=NR(ms(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=s0(ms(e),t),o=a==null?void 0:a[_n];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jee(r,a)&&(r!==void 0||hb(e.base_,t)))return!0;l0(e),yb(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return s0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,l0(e),yb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ms(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){xa(11)},getPrototypeOf(e){return Ad(e.base_)},setPrototypeOf(){xa(12)}},Id={};_m(kS,(e,t)=>{Id[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Id.deleteProperty=function(e,t){return Id.set.call(this,e,t,void 0)};Id.set=function(e,t,r){return kS.set.call(this,e[0],t,r,e[0])};function s0(e,t){const r=e[_n];return(r?ms(r):e)[t]}function ote(e,t,r){var a;const n=NR(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function NR(e,t){if(!(t in e))return;let r=Ad(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ad(r)}}function yb(e){e.modified_||(e.modified_=!0,e.parent_&&yb(e.parent_))}function l0(e){e.copy_||(e.copy_=mb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ite=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const i=this;return function(l=o,...c){return i.produce(l,u=>r.call(this,u,...c))}}typeof r!="function"&&xa(6),n!==void 0&&typeof n!="function"&&xa(7);let a;if(Vs(t)){const o=LE(this),i=xb(t,void 0);let s=!0;try{a=r(i),s=!1}finally{s?gb(o):vb(o)}return $E(o,n),FE(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===ER&&(a=void 0),this.autoFreeze_&&SS(a,!0),n){const o=[],i=[];Ks("Patches").generateReplacementPatches_(t,a,o,i),n(o,i)}return a}else xa(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,l=>t(l,...s));let n,a;return[this.produce(t,r,(i,s)=>{n=i,a=s}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Vs(e)||xa(8),kc(e)&&(e=ste(e));const t=LE(this),r=xb(e,void 0);return r[_n].isManual_=!0,vb(t),r}finishDraft(e,t){const r=e&&e[_n];(!r||!r.isManual_)&&xa(9);const{scope_:n}=r;return $E(n,t),FE(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=Ks("Patches").applyPatches_;return kc(e)?n(e,t):this.produce(e,a=>n(a,t))}};function xb(e,t){const r=xf(e)?Ks("MapSet").proxyMap_(e,t):Vv(e)?Ks("MapSet").proxySet_(e,t):ate(e,t);return(t?t.scope_:_R()).drafts_.push(r),r}function ste(e){return kc(e)||xa(10,e),MR(e)}function MR(e){if(!Vs(e)||Kv(e))return e;const t=e[_n];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=mb(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=mb(e,!0);return _m(r,(a,o)=>{DR(r,a,MR(o))},n),t&&(t.finalized_=!1),r}var lte=new ite;lte.produce;var cte={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},TR=un({name:"legend",initialState:cte,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Ot()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,a=Oa(e).payload.indexOf(r);a>-1&&(e.payload[a]=n)},prepare:Ot()},removeLegendPayload:{reducer(e,t){var r=Oa(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Ot()}}}),{setLegendSize:Fpe,setLegendSettings:zpe,addLegendPayload:ute,replaceLegendPayload:dte,removeLegendPayload:fte}=TR.actions,pte=TR.reducer;function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bb.apply(null,arguments)}function BE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function c0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BE(Object(r),!0).forEach(function(n){hte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hte(e,t,r){return(t=mte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mte(e){var t=gte(e,"string");return typeof t=="symbol"?t:t+""}function gte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vte(e){return Array.isArray(e)&&co(e[0])&&co(e[1])?e.join(" ~ "):e}var yte=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:a={},payload:o,formatter:i,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,p=()=>{if(o&&o.length){var k={padding:0,margin:0},P=(s?Nv(o,s):o).map((E,O)=>{if(E.type==="none")return null;var D=E.formatter||i||vte,{value:N,name:_}=E,C=N,M=_;if(D){var T=D(N,_,E,O,o);if(Array.isArray(T))[C,M]=T;else if(T!=null)C=T;else return null}var j=c0({display:"block",paddingTop:4,paddingBottom:4,color:E.color||"#000"},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(O),style:j},co(M)?m.createElement("span",{className:"recharts-tooltip-item-name"},M):null,co(M)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},C),m.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return m.createElement("ul",{className:"recharts-tooltip-item-list",style:k},P)}return null},g=c0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),y=c0({margin:0},a),v=!kr(u),x=v?u:"",w=le("recharts-default-tooltip",l),b=le("recharts-tooltip-label",c);v&&d&&o!==void 0&&o!==null&&(x=d(u,o));var S=f?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",bb({className:w,style:g},S),m.createElement("p",{className:b,style:y},m.isValidElement(x)?x:"".concat(x)),p())},hu="recharts-tooltip-wrapper",xte={visibility:"hidden"};function bte(e){var{coordinate:t,translateX:r,translateY:n}=e;return le(hu,{["".concat(hu,"-right")]:_e(r)&&t&&_e(t.x)&&r>=t.x,["".concat(hu,"-left")]:_e(r)&&t&&_e(t.x)&&r<t.x,["".concat(hu,"-bottom")]:_e(n)&&t&&_e(t.y)&&n>=t.y,["".concat(hu,"-top")]:_e(n)&&t&&_e(t.y)&&n<t.y})}function WE(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:a,position:o,reverseDirection:i,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&_e(o[n]))return o[n];var u=r[n]-s-(a>0?a:0),d=r[n]+a;if(t[n])return i[n]?u:d;var f=l[n];if(f==null)return 0;if(i[n]){var p=u,g=f;return p<g?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var y=d+s,v=f+c;return y>v?Math.max(u,f):Math.max(d,f)}function wte(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Ste(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:a,reverseDirection:o,tooltipBox:i,useTranslate3d:s,viewBox:l}=e,c,u,d;return i.height>0&&i.width>0&&r?(u=WE({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.width,viewBox:l,viewBoxDimension:l.width}),d=WE({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.height,viewBox:l,viewBoxDimension:l.height}),c=wte({translateX:u,translateY:d,useTranslate3d:s})):c=xte,{cssProperties:c,cssClasses:bte({translateX:u,translateY:d,coordinate:r})}}function HE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ep(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HE(Object(r),!0).forEach(function(n){wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wb(e,t,r){return(t=kte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kte(e){var t=Cte(e,"string");return typeof t=="symbol"?t:t+""}function Cte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Pte extends m.PureComponent{constructor(){super(...arguments),wb(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),wb(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,a,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(a=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&a!==void 0?a:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:a,children:o,coordinate:i,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:g,lastBoundingBox:y,innerRef:v,hasPortalFromProps:x}=this.props,{cssClasses:w,cssProperties:b}=Ste({allowEscapeViewBox:r,coordinate:i,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:y.height,width:y.width},useTranslate3d:f,viewBox:p}),S=x?{}:Ep(Ep({transition:l&&t?"transform ".concat(n,"ms ").concat(a):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),k=Ep(Ep({},S),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},g);return m.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:w,style:k,ref:v},o)}}var jR=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sb.apply(null,arguments)}function UE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function YE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UE(Object(r),!0).forEach(function(n){Ete(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ete(e,t,r){return(t=Ote(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ote(e){var t=Dte(e,"string");return typeof t=="symbol"?t:t+""}function Dte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VE={curveBasisClosed:JQ,curveBasisOpen:eZ,curveBasis:ZQ,curveBumpX:XQ,curveBumpY:QQ,curveLinearClosed:tZ,curveLinear:Sv,curveMonotoneX:rZ,curveMonotoneY:nZ,curveNatural:aZ,curveStep:oZ,curveStepAfter:sZ,curveStepBefore:iZ},Tm=e=>Ht(e.x)&&Ht(e.y),KE=e=>e.base!=null&&Tm(e.base)&&Tm(e),mu=e=>e.x,gu=e=>e.y,_te=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(J1(e));return(r==="curveMonotone"||r==="curveBump")&&t?VE["".concat(r).concat(t==="vertical"?"Y":"X")]:VE[r]||Sv},Nte=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:a,connectNulls:o=!1}=e,i=_te(t,a),s=o?r.filter(Tm):r,l;if(Array.isArray(n)){var c=r.map((p,g)=>YE(YE({},p),{},{base:n[g]}));a==="vertical"?l=yp().y(gu).x1(mu).x0(p=>p.base.x):l=yp().x(mu).y1(gu).y0(p=>p.base.y);var u=l.defined(KE).curve(i),d=o?c.filter(KE):c;return u(d)}a==="vertical"&&_e(n)?l=yp().y(gu).x1(mu).x0(n):_e(n)?l=yp().x(mu).y1(gu).y0(n):l=Kj().x(mu).y(gu);var f=l.defined(Tm).curve(i);return f(s)},dh=e=>{var{className:t,points:r,path:n,pathRef:a}=e;if((!r||!r.length)&&!n)return null;var o=r&&r.length?Nte(e):n;return m.createElement("path",Sb({},Na(e),eS(e),{className:le("recharts-curve",t),d:o===null?void 0:o,ref:a}))},Mte=["x","y","top","left","width","height","className"];function kb(){return kb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kb.apply(null,arguments)}function qE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(r),!0).forEach(function(n){jte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jte(e,t,r){return(t=Ate(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ate(e){var t=Rte(e,"string");return typeof t=="symbol"?t:t+""}function Rte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ite(e,t){if(e==null)return{};var r,n,a=$te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function $te(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Lte=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),Fte=e=>{var{x:t=0,y:r=0,top:n=0,left:a=0,width:o=0,height:i=0,className:s}=e,l=Ite(e,Mte),c=Tte({x:t,y:r,top:n,left:a,width:o,height:i},l);return!_e(t)||!_e(r)||!_e(o)||!_e(i)||!_e(n)||!_e(a)?null:m.createElement("path",kb({},ta(c),{className:le("recharts-cross",s),d:Lte(t,r,o,i,n,a)}))};function zte(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function GE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function XE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GE(Object(r),!0).forEach(function(n){Bte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bte(e,t,r){return(t=Wte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wte(e){var t=Hte(e,"string");return typeof t=="symbol"?t:t+""}function Hte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ute=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Yte=(e,t,r)=>e.map(n=>"".concat(Ute(n)," ").concat(t,"ms ").concat(r)).join(","),Vte=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(a=>n.includes(a))),$d=(e,t)=>Object.keys(t).reduce((r,n)=>XE(XE({},r),{},{[n]:e(n,t[n])}),{});function QE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QE(Object(r),!0).forEach(function(n){Kte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kte(e,t,r){return(t=qte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qte(e){var t=Gte(e,"string");return typeof t=="symbol"?t:t+""}function Gte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jm=(e,t,r)=>e+(t-e)*r,Cb=e=>{var{from:t,to:r}=e;return t!==r},AR=(e,t,r)=>{var n=$d((a,o)=>{if(Cb(o)){var[i,s]=e(o.from,o.to,o.velocity);return tr(tr({},o),{},{from:i,velocity:s})}return o},t);return r<1?$d((a,o)=>Cb(o)?tr(tr({},o),{},{velocity:jm(o.velocity,n[a].velocity,r),from:jm(o.from,n[a].from,r)}):o,t):AR(e,n,r-1)};function Xte(e,t,r,n,a,o){var i,s=n.reduce((f,p)=>tr(tr({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>$d((f,p)=>p.from,s),c=()=>!Object.values(s).filter(Cb).length,u=null,d=f=>{i||(i=f);var p=f-i,g=p/r.dt;s=AR(r,s,g),a(tr(tr(tr({},e),t),l())),i=f,c()||(u=o.setTimeout(d))};return()=>(u=o.setTimeout(d),()=>{var f;(f=u)===null||f===void 0||f()})}function Qte(e,t,r,n,a,o,i){var s=null,l=a.reduce((d,f)=>tr(tr({},d),{},{[f]:[e[f],t[f]]}),{}),c,u=d=>{c||(c=d);var f=(d-c)/n,p=$d((y,v)=>jm(...v,r(f)),l);if(o(tr(tr(tr({},e),t),p)),f<1)s=i.setTimeout(u);else{var g=$d((y,v)=>jm(...v,r(1)),l);o(tr(tr(tr({},e),t),g))}};return()=>(s=i.setTimeout(u),()=>{var d;(d=s)===null||d===void 0||d()})}const Zte=(e,t,r,n,a,o)=>{var i=Vte(e,t);return r==null?()=>(a(tr(tr({},e),t)),()=>{}):r.isStepper===!0?Xte(e,t,r,i,a,o):Qte(e,t,r,n,i,a,o)};var Am=1e-4,RR=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],IR=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),ZE=(e,t)=>r=>{var n=RR(e,t);return IR(n,r)},Jte=(e,t)=>r=>{var n=RR(e,t),a=[...n.map((o,i)=>o*i).slice(1),0];return IR(a,r)},ere=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a,o=r[0].split("(");if(o[0]==="cubic-bezier"&&((a=o[1])===null||a===void 0?void 0:a.split(")")[0].split(",").length)===4){var i=o[1].split(")")[0].split(",").map(s=>parseFloat(s));return[i[0],i[1],i[2],i[3]]}}}return r.length===4?r:[0,0,1,1]},tre=(e,t,r,n)=>{var a=ZE(e,r),o=ZE(t,n),i=Jte(e,r),s=c=>c>1?1:c<0?0:c,l=c=>{for(var u=c>1?1:c,d=u,f=0;f<8;++f){var p=a(d)-u,g=i(d);if(Math.abs(p-u)<Am||g<Am)return o(d);d=s(d-p/g)}return o(d)};return l.isStepper=!1,l},JE=function(){return tre(...ere(...arguments))},rre=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:a=17}=t,o=(i,s,l)=>{var c=-(i-s)*r,u=l*n,d=l+(c-u)*a/1e3,f=l*a/1e3+i;return Math.abs(f-s)<Am&&Math.abs(d)<Am?[s,0]:[f,d]};return o.isStepper=!0,o.dt=a,o},nre=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return JE(e);case"spring":return rre();default:if(e.split("(")[0]==="cubic-bezier")return JE(e)}return typeof e=="function"?e:null};function are(e){var t,r=()=>null,n=!1,a=null,o=i=>{if(!n){if(Array.isArray(i)){if(!i.length)return;var s=i,[l,...c]=s;if(typeof l=="number"){a=e.setTimeout(o.bind(null,c),l);return}o(l),a=e.setTimeout(o.bind(null,c));return}typeof i=="string"&&(t=i,r(t)),typeof i=="object"&&(t=i,r(t)),typeof i=="function"&&i()}};return{stop:()=>{n=!0},start:i=>{n=!1,a&&(a(),a=null),o(i)},subscribe:i=>(r=i,()=>{r=()=>null}),getTimeoutController:()=>e}}class ore{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=i=>{i-n>=r?t(i):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(o))};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function ire(){return are(new ore)}var sre=m.createContext(ire);function lre(e,t){var r=m.useContext(sre);return m.useMemo(()=>t??r(e),[e,t,r])}var cre=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Lc={devToolsEnabled:!1,isSsr:cre()},ure={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},eO={t:0},u0={t:1};function $R(e){var t=An(e,ure),{isActive:r,canBegin:n,duration:a,easing:o,begin:i,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=r==="auto"?!Lc.isSsr:r,d=lre(t.animationId,t.animationManager),[f,p]=m.useState(u?eO:u0),g=m.useRef(null);return m.useEffect(()=>{u||p(u0)},[u]),m.useEffect(()=>{if(!u||!n)return pf;var y=Zte(eO,u0,nre(o),a,p,d.getTimeoutController()),v=()=>{g.current=y()};return d.start([l,i,v,a,s]),()=>{d.stop(),g.current&&g.current(),s()}},[u,n,a,o,i,l,s,d]),c(f.t)}function LR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(Nd(t)),n=m.useRef(e);return n.current!==e&&(r.current=Nd(t),n.current=e),r.current}var dre=["radius"],fre=["radius"];function tO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(r),!0).forEach(function(n){pre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pre(e,t,r){return(t=hre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hre(e){var t=mre(e,"string");return typeof t=="symbol"?t:t+""}function mre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rm.apply(null,arguments)}function nO(e,t){if(e==null)return{};var r,n,a=gre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function gre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var aO=(e,t,r,n,a)=>{var o=Math.min(Math.abs(r)/2,Math.abs(n)/2),i=n>=0?1:-1,s=r>=0?1:-1,l=n>=0&&r>=0||n<0&&r<0?1:0,c;if(o>0&&a instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=a[d]>o?o:a[d];c="M".concat(e,",").concat(t+i*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(t)),c+="L ".concat(e+r-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
`).concat(e+r,",").concat(t+i*u[1])),c+="L ".concat(e+r,",").concat(t+n-i*u[2]),u[2]>0&&(c+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,`,
`).concat(e+r-s*u[2],",").concat(t+n)),c+="L ".concat(e+s*u[3],",").concat(t+n),u[3]>0&&(c+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,`,
`).concat(e,",").concat(t+n-i*u[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var p=Math.min(o,a);c="M ".concat(e,",").concat(t+i*p,`
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e+s*p,",").concat(t,`
L `).concat(e+r-s*p,",").concat(t,`
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e+r,",").concat(t+i*p,`
L `).concat(e+r,",").concat(t+n-i*p,`
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e+r-s*p,",").concat(t+n,`
L `).concat(e+s*p,",").concat(t+n,`
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e,",").concat(t+n-i*p," Z")}else c="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return c},oO={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vre=e=>{var t=An(e,oO),r=m.useRef(null),[n,a]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var L=r.current.getTotalLength();L&&a(L)}catch{}},[]);var{x:o,y:i,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:p,isAnimationActive:g,isUpdateAnimationActive:y}=t,v=m.useRef(s),x=m.useRef(l),w=m.useRef(o),b=m.useRef(i),S=m.useMemo(()=>({x:o,y:i,width:s,height:l,radius:c}),[o,i,s,l,c]),k=LR(S,"rectangle-");if(o!==+o||i!==+i||s!==+s||l!==+l||s===0||l===0)return null;var P=le("recharts-rectangle",u);if(!y){var E=ta(t),{radius:O}=E,D=nO(E,dre);return m.createElement("path",Rm({},D,{radius:typeof c=="number"?c:void 0,className:P,d:aO(o,i,s,l,c)}))}var N=v.current,_=x.current,C=w.current,M=b.current,T="0px ".concat(n===-1?1:n,"px"),j="".concat(n,"px 0px"),A=Yte(["strokeDasharray"],f,typeof d=="string"?d:oO.animationEasing);return m.createElement($R,{animationId:k,key:k,canBegin:n>0,duration:f,easing:d,isActive:y,begin:p},L=>{var I=Ha(N,s,L),$=Ha(_,l,L),z=Ha(C,o,L),V=Ha(M,i,L);r.current&&(v.current=I,x.current=$,w.current=z,b.current=V);var F;g?L>0?F={transition:A,strokeDasharray:j}:F={strokeDasharray:T}:F={strokeDasharray:j};var ne=ta(t),{radius:ee}=ne,X=nO(ne,fre);return m.createElement("path",Rm({},X,{radius:typeof c=="number"?c:void 0,className:P,d:aO(z,V,I,$,c),ref:r,style:rO(rO({},F),t.style)}))})};function iO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iO(Object(r),!0).forEach(function(n){yre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yre(e,t,r){return(t=xre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xre(e){var t=bre(e,"string");return typeof t=="symbol"?t:t+""}function bre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Im=Math.PI/180,wre=e=>e*180/Math.PI,wr=(e,t,r,n)=>({x:e+Math.cos(-Im*n)*r,y:t+Math.sin(-Im*n)*r}),Sre=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},kre=(e,t)=>{var{x:r,y:n}=e,{x:a,y:o}=t;return Math.sqrt((r-a)**2+(n-o)**2)},Cre=(e,t)=>{var{x:r,y:n}=e,{cx:a,cy:o}=t,i=kre({x:r,y:n},{x:a,y:o});if(i<=0)return{radius:i,angle:0};var s=(r-a)/i,l=Math.acos(s);return n>o&&(l=2*Math.PI-l),{radius:i,angle:wre(l),angleInRadian:l}},Pre=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},Ere=(e,t)=>{var{startAngle:r,endAngle:n}=t,a=Math.floor(r/360),o=Math.floor(n/360),i=Math.min(a,o);return e+i*360},Ore=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:a,angle:o}=Cre({x:r,y:n},t),{innerRadius:i,outerRadius:s}=t;if(a<i||a>s||a===0)return null;var{startAngle:l,endAngle:c}=Pre(t),u=o,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?sO(sO({},t),{},{radius:a,angle:Ere(u,t)}):null};function FR(e){var{cx:t,cy:r,radius:n,startAngle:a,endAngle:o}=e,i=wr(t,r,n,a),s=wr(t,r,n,o);return{points:[i,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pb.apply(null,arguments)}var Dre=(e,t)=>{var r=Un(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Op=e=>{var{cx:t,cy:r,radius:n,angle:a,sign:o,isExternal:i,cornerRadius:s,cornerIsExternal:l}=e,c=s*(i?1:-1)+n,u=Math.asin(s/c)/Im,d=l?a:a+o*u,f=wr(t,r,c,d),p=wr(t,r,n,d),g=l?a-o*u:a,y=wr(t,r,c*Math.cos(u*Im),g);return{center:f,circleTangency:p,lineTangency:y,theta:u}},zR=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:o,endAngle:i}=e,s=Dre(o,i),l=o+s,c=wr(t,r,a,o),u=wr(t,r,a,l),d="M ".concat(c.x,",").concat(c.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(s)>180),",").concat(+(o>l),`,
`).concat(u.x,",").concat(u.y,`
`);if(n>0){var f=wr(t,r,n,o),p=wr(t,r,n,l);d+="L ".concat(p.x,",").concat(p.y,`
A `).concat(n,",").concat(n,`,0,
`).concat(+(Math.abs(s)>180),",").concat(+(o<=l),`,
`).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(r," Z");return d},_re=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:a,cornerRadius:o,forceCornerRadius:i,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Un(c-l),{circleTangency:d,lineTangency:f,theta:p}=Op({cx:t,cy:r,radius:a,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:g,lineTangency:y,theta:v}=Op({cx:t,cy:r,radius:a,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),x=s?Math.abs(l-c):Math.abs(l-c)-p-v;if(x<0)return i?"M ".concat(f.x,",").concat(f.y,`
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
`):zR({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:l,endAngle:c});var w="M ".concat(f.x,",").concat(f.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,`
A`).concat(a,",").concat(a,",0,").concat(+(x>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,`
`);if(n>0){var{circleTangency:b,lineTangency:S,theta:k}=Op({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:P,lineTangency:E,theta:O}=Op({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),D=s?Math.abs(l-c):Math.abs(l-c)-k-O;if(D<0&&o===0)return"".concat(w,"L").concat(t,",").concat(r,"Z");w+="L".concat(E.x,",").concat(E.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(P.x,",").concat(P.y,`
A`).concat(n,",").concat(n,",0,").concat(+(D>180),",").concat(+(u>0),",").concat(b.x,",").concat(b.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else w+="L".concat(t,",").concat(r,"Z");return w},Nre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Mre=e=>{var t=An(e,Nre),{cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<a||c===u)return null;var f=le("recharts-sector",d),p=o-a,g=qi(i,p,0,!0),y;return g>0&&Math.abs(c-u)<360?y=_re({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(g,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):y=zR({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:c,endAngle:u}),m.createElement("path",Pb({},ta(t),{className:f,d:y}))};function Tre(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(iA(t)){if(e==="centric"){var{cx:n,cy:a,innerRadius:o,outerRadius:i,angle:s}=t,l=wr(n,a,o,s),c=wr(n,a,i,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return FR(t)}}var BR={},WR={},HR={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dS;function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(HR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HR;function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(WR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fS,r=WR;function n(a,o,i){i&&typeof i!="number"&&t.isIterateeCall(a,o,i)&&(o=i=void 0),a=r.toFinite(a),o===void 0?(o=a,a=0):o=r.toFinite(o),i=i===void 0?a<o?1:-1:r.toFinite(i);const s=Math.max(Math.ceil((o-a)/(i||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=a,a+=i;return l}e.range=n})(BR);var jre=BR.range;const UR=ti(jre);function Wi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Are(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function CS(e){let t,r,n;e.length!==2?(t=Wi,r=(s,l)=>Wi(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wi||e===Are?e:Rre,r=e,n=e);function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function i(s,l,c=0,u=s.length){const d=a(s,l,c,u-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:a,center:i,right:o}}function Rre(){return 0}function YR(e){return e===null?NaN:+e}function*Ire(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const $re=CS(Wi),bf=$re.right;CS(YR).center;class lO extends Map{constructor(t,r=zre){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(cO(this,t))}has(t){return super.has(cO(this,t))}set(t,r){return super.set(Lre(this,t),r)}delete(t){return super.delete(Fre(this,t))}}function cO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Lre({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Fre({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function zre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Bre(e=Wi){if(e===Wi)return VR;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 VR(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Wre=Math.sqrt(50),Hre=Math.sqrt(10),Ure=Math.sqrt(2);function $m(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),i=o>=Wre?10:o>=Hre?5:o>=Ure?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/i,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?$m(e,t,r*2):[s,l,c]}function Eb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,i]=n?$m(t,e,r):$m(e,t,r);if(!(o>=a))return[];const s=o-a+1,l=new Array(s);if(n)if(i<0)for(let c=0;c<s;++c)l[c]=(o-c)/-i;else for(let c=0;c<s;++c)l[c]=(o-c)*i;else if(i<0)for(let c=0;c<s;++c)l[c]=(a+c)/-i;else for(let c=0;c<s;++c)l[c]=(a+c)*i;return l}function Ob(e,t,r){return t=+t,e=+e,r=+r,$m(e,t,r)[2]}function Db(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Ob(t,e,r):Ob(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function uO(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function dO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function KR(e,t,r=0,n=1/0,a){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(a=a===void 0?VR:Bre(a);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(r,Math.floor(t-c*d/l+f)),g=Math.min(n,Math.floor(t+(l-c)*d/l+f));KR(e,t,p,g,a)}const o=e[t];let i=r,s=n;for(vu(e,r,t),a(e[n],o)>0&&vu(e,r,n);i<s;){for(vu(e,i,s),++i,--s;a(e[i],o)<0;)++i;for(;a(e[s],o)>0;)--s}a(e[r],o)===0?vu(e,r,s):(++s,vu(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function vu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Yre(e,t,r){if(e=Float64Array.from(Ire(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return dO(e);if(t>=1)return uO(e);var n,a=(n-1)*t,o=Math.floor(a),i=uO(KR(e,o).subarray(0,o+1)),s=dO(e.subarray(o+1));return i+(s-i)*(a-o)}}function Vre(e,t,r=YR){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,a=(n-1)*t,o=Math.floor(a),i=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return i+(s-i)*(a-o)}}function Kre(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function sa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ci(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const _b=Symbol("implicit");function PS(){var e=new lO,t=[],r=[],n=_b;function a(o){let i=e.get(o);if(i===void 0){if(n!==_b)return n;e.set(o,i=t.push(o)-1)}return r[i%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new lO;for(const i of o)e.has(i)||e.set(i,t.push(i)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return PS(t,r).unknown(n)},sa.apply(a,arguments),a}function ES(){var e=PS().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,i,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=a<n,g=p?a:n,y=p?n:a;o=(y-g)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),g+=(y-g-o*(f-l))*u,i=o*(1-l),s&&(g=Math.round(g),i=Math.round(i));var v=Kre(f).map(function(x){return g+o*x});return r(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,a]=f,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(f){return[n,a]=f,n=+n,a=+a,s=!0,d()},e.bandwidth=function(){return i},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return ES(t(),[n,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},sa.apply(d(),arguments)}function qR(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return qR(t())},e}function qre(){return qR(ES.apply(null,arguments).paddingInner(1))}function OS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function GR(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function wf(){}var Ld=.7,Lm=1/Ld,Kl="\\s*([+-]?\\d+)\\s*",Fd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gre=/^#([0-9a-f]{3,8})$/,Xre=new RegExp(`^rgb\\(${Kl},${Kl},${Kl}\\)$`),Qre=new RegExp(`^rgb\\(${oo},${oo},${oo}\\)$`),Zre=new RegExp(`^rgba\\(${Kl},${Kl},${Kl},${Fd}\\)$`),Jre=new RegExp(`^rgba\\(${oo},${oo},${oo},${Fd}\\)$`),ene=new RegExp(`^hsl\\(${Fd},${oo},${oo}\\)$`),tne=new RegExp(`^hsla\\(${Fd},${oo},${oo},${Fd}\\)$`),fO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};OS(wf,zd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pO,formatHex:pO,formatHex8:rne,formatHsl:nne,formatRgb:hO,toString:hO});function pO(){return this.rgb().formatHex()}function rne(){return this.rgb().formatHex8()}function nne(){return XR(this).formatHsl()}function hO(){return this.rgb().formatRgb()}function zd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Gre.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?mO(t):r===3?new Jr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Dp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Dp(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=Xre.exec(e))?new Jr(t[1],t[2],t[3],1):(t=Qre.exec(e))?new Jr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Zre.exec(e))?Dp(t[1],t[2],t[3],t[4]):(t=Jre.exec(e))?Dp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ene.exec(e))?yO(t[1],t[2]/100,t[3]/100,1):(t=tne.exec(e))?yO(t[1],t[2]/100,t[3]/100,t[4]):fO.hasOwnProperty(e)?mO(fO[e]):e==="transparent"?new Jr(NaN,NaN,NaN,0):null}function mO(e){return new Jr(e>>16&255,e>>8&255,e&255,1)}function Dp(e,t,r,n){return n<=0&&(e=t=r=NaN),new Jr(e,t,r,n)}function ane(e){return e instanceof wf||(e=zd(e)),e?(e=e.rgb(),new Jr(e.r,e.g,e.b,e.opacity)):new Jr}function Nb(e,t,r,n){return arguments.length===1?ane(e):new Jr(e,t,r,n??1)}function Jr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}OS(Jr,Nb,GR(wf,{brighter(e){return e=e==null?Lm:Math.pow(Lm,e),new Jr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ld:Math.pow(Ld,e),new Jr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jr(Rs(this.r),Rs(this.g),Rs(this.b),Fm(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:gO,formatHex:gO,formatHex8:one,formatRgb:vO,toString:vO}));function gO(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}`}function one(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}${Ps((isNaN(this.opacity)?1:this.opacity)*255)}`}function vO(){const e=Fm(this.opacity);return`${e===1?"rgb(":"rgba("}${Rs(this.r)}, ${Rs(this.g)}, ${Rs(this.b)}${e===1?")":`, ${e})`}`}function Fm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ps(e){return e=Rs(e),(e<16?"0":"")+e.toString(16)}function yO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ba(e,t,r,n)}function XR(e){if(e instanceof ba)return new ba(e.h,e.s,e.l,e.opacity);if(e instanceof wf||(e=zd(e)),!e)return new ba;if(e instanceof ba)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),i=NaN,s=o-a,l=(o+a)/2;return s?(t===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-t)/s+2:i=(t-r)/s+4,s/=l<.5?o+a:2-o-a,i*=60):s=l>0&&l<1?0:i,new ba(i,s,l,e.opacity)}function ine(e,t,r,n){return arguments.length===1?XR(e):new ba(e,t,r,n??1)}function ba(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}OS(ba,ine,GR(wf,{brighter(e){return e=e==null?Lm:Math.pow(Lm,e),new ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ld:Math.pow(Ld,e),new ba(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,a=2*r-n;return new Jr(d0(e>=240?e-240:e+120,a,n),d0(e,a,n),d0(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new ba(xO(this.h),_p(this.s),_p(this.l),Fm(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=Fm(this.opacity);return`${e===1?"hsl(":"hsla("}${xO(this.h)}, ${_p(this.s)*100}%, ${_p(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xO(e){return e=(e||0)%360,e<0?e+360:e}function _p(e){return Math.max(0,Math.min(1,e||0))}function d0(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 DS=e=>()=>e;function sne(e,t){return function(r){return e+r*t}}function lne(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 cne(e){return(e=+e)==1?QR:function(t,r){return r-t?lne(t,r,e):DS(isNaN(t)?r:t)}}function QR(e,t){var r=t-e;return r?sne(e,r):DS(isNaN(e)?t:e)}const bO=function e(t){var r=cne(t);function n(a,o){var i=r((a=Nb(a)).r,(o=Nb(o)).r),s=r(a.g,o.g),l=r(a.b,o.b),c=QR(a.opacity,o.opacity);return function(u){return a.r=i(u),a.g=s(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function une(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function dne(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fne(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=Fc(e[i],t[i]);for(;i<r;++i)o[i]=t[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function pne(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function zm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function hne(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Fc(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Mb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,f0=new RegExp(Mb.source,"g");function mne(e){return function(){return e}}function gne(e){return function(t){return e(t)+""}}function vne(e,t){var r=Mb.lastIndex=f0.lastIndex=0,n,a,o,i=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Mb.exec(e))&&(a=f0.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,l.push({i,x:zm(n,a)})),r=f0.lastIndex;return r<t.length&&(o=t.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?l[0]?gne(l[0].x):mne(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Fc(e,t){var r=typeof t,n;return t==null||r==="boolean"?DS(t):(r==="number"?zm:r==="string"?(n=zd(t))?(t=n,bO):vne:t instanceof zd?bO:t instanceof Date?pne:dne(t)?une:Array.isArray(t)?fne:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?hne:zm)(e,t)}function _S(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function yne(e,t){t===void 0&&(t=e,e=Fc);for(var r=0,n=t.length-1,a=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(a,a=t[++r]);return function(i){var s=Math.max(0,Math.min(n-1,Math.floor(i*=n)));return o[s](i-s)}}function xne(e){return function(){return e}}function Bm(e){return+e}var wO=[0,1];function Br(e){return e}function Tb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:xne(isNaN(t)?NaN:.5)}function bne(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function wne(e,t,r){var n=e[0],a=e[1],o=t[0],i=t[1];return a<n?(n=Tb(a,n),o=r(i,o)):(n=Tb(n,a),o=r(o,i)),function(s){return o(n(s))}}function Sne(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),i=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<n;)a[i]=Tb(e[i],e[i+1]),o[i]=r(t[i],t[i+1]);return function(s){var l=bf(e,s,1,n)-1;return o[l](a[l](s))}}function Sf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function qv(){var e=wO,t=wO,r=Fc,n,a,o,i=Br,s,l,c;function u(){var f=Math.min(e.length,t.length);return i!==Br&&(i=bne(e[0],e[f-1])),s=f>2?Sne:wne,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(n),t,r)))(n(i(f)))}return d.invert=function(f){return i(a((c||(c=s(t,e.map(n),zm)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Bm),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=_S,u()},d.clamp=function(f){return arguments.length?(i=f?!0:Br,u()):i!==Br},d.interpolate=function(f){return arguments.length?(r=f,u()):r},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return n=f,a=p,u()}}function NS(){return qv()(Br,Br)}function kne(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wm(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Cc(e){return e=Wm(Math.abs(e)),e?e[1]:NaN}function Cne(e,t){return function(r,n){for(var a=r.length,o=[],i=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[i=(i+1)%e.length];return o.reverse().join(t)}}function Pne(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Ene=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bd(e){if(!(t=Ene.exec(e)))throw new Error("invalid format: "+e);var t;return new MS({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]})}Bd.prototype=MS.prototype;function MS(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+""}MS.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 One(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var ZR;function Dne(e,t){var r=Wm(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(ZR=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,i=n.length;return o===i?n:o>i?n+new Array(o-i+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Wm(e,Math.max(0,t+o-1))[0]}function SO(e,t){var r=Wm(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const kO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:kne,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)=>SO(e*100,t),r:SO,s:Dne,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function CO(e){return e}var PO=Array.prototype.map,EO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _ne(e){var t=e.grouping===void 0||e.thousands===void 0?CO:Cne(PO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?CO:Pne(PO.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Bd(d);var f=d.fill,p=d.align,g=d.sign,y=d.symbol,v=d.zero,x=d.width,w=d.comma,b=d.precision,S=d.trim,k=d.type;k==="n"?(w=!0,k="g"):kO[k]||(b===void 0&&(b=12),S=!0,k="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var P=y==="$"?r:y==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",E=y==="$"?n:/[%p]/.test(k)?i:"",O=kO[k],D=/[defgprs%]/.test(k);b=b===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function N(_){var C=P,M=E,T,j,A;if(k==="c")M=O(_)+M,_="";else{_=+_;var L=_<0||1/_<0;if(_=isNaN(_)?l:O(Math.abs(_),b),S&&(_=One(_)),L&&+_==0&&g!=="+"&&(L=!1),C=(L?g==="("?g:s:g==="-"||g==="("?"":g)+C,M=(k==="s"?EO[8+ZR/3]:"")+M+(L&&g==="("?")":""),D){for(T=-1,j=_.length;++T<j;)if(A=_.charCodeAt(T),48>A||A>57){M=(A===46?a+_.slice(T+1):_.slice(T))+M,_=_.slice(0,T);break}}}w&&!v&&(_=t(_,1/0));var I=C.length+_.length+M.length,$=I<x?new Array(x-I+1).join(f):"";switch(w&&v&&(_=t($+_,$.length?x-M.length:1/0),$=""),p){case"<":_=C+_+M+$;break;case"=":_=C+$+_+M;break;case"^":_=$.slice(0,I=$.length>>1)+C+_+M+$.slice(I);break;default:_=$+C+_+M;break}return o(_)}return N.toString=function(){return d+""},N}function u(d,f){var p=c((d=Bd(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Cc(f)/3)))*3,y=Math.pow(10,-g),v=EO[8+g/3];return function(x){return p(y*x)+v}}return{format:c,formatPrefix:u}}var Np,TS,JR;Nne({thousands:",",grouping:[3],currency:["$",""]});function Nne(e){return Np=_ne(e),TS=Np.format,JR=Np.formatPrefix,Np}function Mne(e){return Math.max(0,-Cc(Math.abs(e)))}function Tne(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cc(t)/3)))*3-Cc(Math.abs(e)))}function jne(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Cc(t)-Cc(e))+1}function eI(e,t,r,n){var a=Db(e,t,r),o;switch(n=Bd(n??",f"),n.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=Tne(a,i))&&(n.precision=o),JR(n,i)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=jne(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Mne(a))&&(n.precision=o-(n.type==="%")*2);break}}return TS(n)}function ts(e){var t=e.domain;return e.ticks=function(r){var n=t();return Eb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return eI(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,i=n[a],s=n[o],l,c,u=10;for(s<i&&(c=i,i=s,s=c,c=a,a=o,o=c);u-- >0;){if(c=Ob(i,s,r),c===l)return n[a]=i,n[o]=s,t(n);if(c>0)i=Math.floor(i/c)*c,s=Math.ceil(s/c)*c;else if(c<0)i=Math.ceil(i*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function tI(){var e=NS();return e.copy=function(){return Sf(e,tI())},sa.apply(e,arguments),ts(e)}function rI(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,Bm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rI(e).unknown(t)},e=arguments.length?Array.from(e,Bm):[0,1],ts(r)}function nI(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],i;return o<a&&(i=r,r=n,n=i,i=a,a=o,o=i),e[r]=t.floor(a),e[n]=t.ceil(o),e}function OO(e){return Math.log(e)}function DO(e){return Math.exp(e)}function Ane(e){return-Math.log(-e)}function Rne(e){return-Math.exp(-e)}function Ine(e){return isFinite(e)?+("1e"+e):e<0?0:e}function $ne(e){return e===10?Ine:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Lne(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 _O(e){return(t,r)=>-e(-t,r)}function jS(e){const t=e(OO,DO),r=t.domain;let n=10,a,o;function i(){return a=Lne(n),o=$ne(n),r()[0]<0?(a=_O(a),o=_O(o),e(Ane,Rne)):e(OO,DO),t}return t.base=function(s){return arguments.length?(n=+s,i()):n},t.domain=function(s){return arguments.length?(r(s),i()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=a(c),p=a(u),g,y;const v=s==null?10:+s;let x=[];if(!(n%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(g=1;g<n;++g)if(y=f<0?g/o(-f):g*o(f),!(y<c)){if(y>u)break;x.push(y)}}else for(;f<=p;++f)for(g=n-1;g>=1;--g)if(y=f>0?g/o(-f):g*o(f),!(y<c)){if(y>u)break;x.push(y)}x.length*2<v&&(x=Eb(c,u,v))}else x=Eb(f,p,Math.min(p-f,v)).map(o);return d?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Bd(l)).precision==null&&(l.trim=!0),l=TS(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/o(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(nI(r(),{floor:s=>o(Math.floor(a(s))),ceil:s=>o(Math.ceil(a(s)))})),t}function aI(){const e=jS(qv()).domain([1,10]);return e.copy=()=>Sf(e,aI()).base(e.base()),sa.apply(e,arguments),e}function NO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function MO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function AS(e){var t=1,r=e(NO(t),MO(t));return r.constant=function(n){return arguments.length?e(NO(t=+n),MO(t)):t},ts(r)}function oI(){var e=AS(qv());return e.copy=function(){return Sf(e,oI()).constant(e.constant())},sa.apply(e,arguments)}function TO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Fne(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zne(e){return e<0?-e*e:e*e}function RS(e){var t=e(Br,Br),r=1;function n(){return r===1?e(Br,Br):r===.5?e(Fne,zne):e(TO(r),TO(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ts(t)}function IS(){var e=RS(qv());return e.copy=function(){return Sf(e,IS()).exponent(e.exponent())},sa.apply(e,arguments),e}function Bne(){return IS.apply(null,arguments).exponent(.5)}function jO(e){return Math.sign(e)*e*e}function Wne(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iI(){var e=NS(),t=[0,1],r=!1,n;function a(o){var i=Wne(e(o));return isNaN(i)?n:r?Math.round(i):i}return a.invert=function(o){return e.invert(jO(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Bm)).map(jO)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return iI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sa.apply(a,arguments),ts(a)}function sI(){var e=[],t=[],r=[],n;function a(){var i=0,s=Math.max(1,t.length);for(r=new Array(s-1);++i<s;)r[i-1]=Vre(e,i/s);return o}function o(i){return i==null||isNaN(i=+i)?n:t[bf(r,i)]}return o.invertExtent=function(i){var s=t.indexOf(i);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let s of i)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Wi),a()},o.range=function(i){return arguments.length?(t=Array.from(i),a()):t.slice()},o.unknown=function(i){return arguments.length?(n=i,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return sI().domain(e).range(t).unknown(n)},sa.apply(o,arguments)}function lI(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function i(l){return l!=null&&l<=l?a[bf(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return i}return i.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},i.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},i.invertExtent=function(l){var c=a.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},i.unknown=function(l){return arguments.length&&(o=l),i},i.thresholds=function(){return n.slice()},i.copy=function(){return lI().domain([e,t]).range(a).unknown(o)},sa.apply(ts(i),arguments)}function cI(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[bf(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var i=t.indexOf(o);return[e[i-1],e[i]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return cI().domain(e).range(t).unknown(r)},sa.apply(a,arguments)}const p0=new Date,h0=new Date;function ar(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const i=a(o),s=a.ceil(o);return o-i<s-o?i:s},a.offset=(o,i)=>(t(o=new Date(+o),i==null?1:Math.floor(i)),o),a.range=(o,i,s)=>{const l=[];if(o=a.ceil(o),s=s==null?1:Math.floor(s),!(o<i)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<i);return l},a.filter=o=>ar(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!o(i););else for(;--s>=0;)for(;t(i,1),!o(i););}),r&&(a.count=(o,i)=>(p0.setTime(+o),h0.setTime(+i),e(p0),e(h0),Math.floor(r(p0,h0))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?i=>n(i)%o===0:i=>a.count(0,i)%o===0):a)),a}const Hm=ar(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ar(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Hm);Hm.range;const Do=1e3,Yn=Do*60,_o=Yn*60,Qo=_o*24,$S=Qo*7,AO=Qo*30,m0=Qo*365,Es=ar(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Do)},(e,t)=>(t-e)/Do,e=>e.getUTCSeconds());Es.range;const LS=ar(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Do)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getMinutes());LS.range;const FS=ar(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getUTCMinutes());FS.range;const zS=ar(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Do-e.getMinutes()*Yn)},(e,t)=>{e.setTime(+e+t*_o)},(e,t)=>(t-e)/_o,e=>e.getHours());zS.range;const BS=ar(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_o)},(e,t)=>(t-e)/_o,e=>e.getUTCHours());BS.range;const kf=ar(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yn)/Qo,e=>e.getDate()-1);kf.range;const Gv=ar(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qo,e=>e.getUTCDate()-1);Gv.range;const uI=ar(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qo,e=>Math.floor(e/Qo));uI.range;function rl(e){return ar(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())*Yn)/$S)}const Xv=rl(0),Um=rl(1),Hne=rl(2),Une=rl(3),Pc=rl(4),Yne=rl(5),Vne=rl(6);Xv.range;Um.range;Hne.range;Une.range;Pc.range;Yne.range;Vne.range;function nl(e){return ar(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)/$S)}const Qv=nl(0),Ym=nl(1),Kne=nl(2),qne=nl(3),Ec=nl(4),Gne=nl(5),Xne=nl(6);Qv.range;Ym.range;Kne.range;qne.range;Ec.range;Gne.range;Xne.range;const WS=ar(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());WS.range;const HS=ar(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());HS.range;const Zo=ar(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());Zo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ar(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)});Zo.range;const Jo=ar(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());Jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ar(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)});Jo.range;function dI(e,t,r,n,a,o){const i=[[Es,1,Do],[Es,5,5*Do],[Es,15,15*Do],[Es,30,30*Do],[o,1,Yn],[o,5,5*Yn],[o,15,15*Yn],[o,30,30*Yn],[a,1,_o],[a,3,3*_o],[a,6,6*_o],[a,12,12*_o],[n,1,Qo],[n,2,2*Qo],[r,1,$S],[t,1,AO],[t,3,3*AO],[e,1,m0]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),g=p?p.range(c,+u+1):[];return f?g.reverse():g}function l(c,u,d){const f=Math.abs(u-c)/d,p=CS(([,,v])=>v).right(i,f);if(p===i.length)return e.every(Db(c/m0,u/m0,d));if(p===0)return Hm.every(Math.max(Db(c,u,d),1));const[g,y]=i[f/i[p-1][2]<i[p][2]/f?p-1:p];return g.every(y)}return[s,l]}const[Qne,Zne]=dI(Jo,HS,Qv,uI,BS,FS),[Jne,eae]=dI(Zo,WS,Xv,kf,zS,LS);function g0(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function v0(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function yu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function tae(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,c=xu(a),u=bu(a),d=xu(o),f=bu(o),p=xu(i),g=bu(i),y=xu(s),v=bu(s),x=xu(l),w=bu(l),b={a:L,A:I,b:$,B:z,c:null,d:zO,e:zO,f:Cae,g:Aae,G:Iae,H:wae,I:Sae,j:kae,L:fI,m:Pae,M:Eae,p:V,q:F,Q:HO,s:UO,S:Oae,u:Dae,U:_ae,V:Nae,w:Mae,W:Tae,x:null,X:null,y:jae,Y:Rae,Z:$ae,"%":WO},S={a:ne,A:ee,b:X,B:fe,c:null,d:BO,e:BO,f:Bae,g:Qae,G:Jae,H:Lae,I:Fae,j:zae,L:hI,m:Wae,M:Hae,p:q,q:ke,Q:HO,s:UO,S:Uae,u:Yae,U:Vae,V:Kae,w:qae,W:Gae,x:null,X:null,y:Xae,Y:Zae,Z:eoe,"%":WO},k={a:N,A:_,b:C,B:M,c:T,d:LO,e:LO,f:vae,g:$O,G:IO,H:FO,I:FO,j:pae,L:gae,m:fae,M:hae,p:D,q:dae,Q:xae,s:bae,S:mae,u:iae,U:sae,V:lae,w:oae,W:cae,x:j,X:A,y:$O,Y:IO,Z:uae,"%":yae};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(B,W){return function(G){var R=[],ae=-1,J=0,he=B.length,Ce,re,ie;for(G instanceof Date||(G=new Date(+G));++ae<he;)B.charCodeAt(ae)===37&&(R.push(B.slice(J,ae)),(re=RO[Ce=B.charAt(++ae)])!=null?Ce=B.charAt(++ae):re=Ce==="e"?" ":"0",(ie=W[Ce])&&(Ce=ie(G,re)),R.push(Ce),J=ae+1);return R.push(B.slice(J,ae)),R.join("")}}function E(B,W){return function(G){var R=yu(1900,void 0,1),ae=O(R,B,G+="",0),J,he;if(ae!=G.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(W&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(J=v0(yu(R.y,0,1)),he=J.getUTCDay(),J=he>4||he===0?Ym.ceil(J):Ym(J),J=Gv.offset(J,(R.V-1)*7),R.y=J.getUTCFullYear(),R.m=J.getUTCMonth(),R.d=J.getUTCDate()+(R.w+6)%7):(J=g0(yu(R.y,0,1)),he=J.getDay(),J=he>4||he===0?Um.ceil(J):Um(J),J=kf.offset(J,(R.V-1)*7),R.y=J.getFullYear(),R.m=J.getMonth(),R.d=J.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),he="Z"in R?v0(yu(R.y,0,1)).getUTCDay():g0(yu(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(he+5)%7:R.w+R.U*7-(he+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,v0(R)):g0(R)}}function O(B,W,G,R){for(var ae=0,J=W.length,he=G.length,Ce,re;ae<J;){if(R>=he)return-1;if(Ce=W.charCodeAt(ae++),Ce===37){if(Ce=W.charAt(ae++),re=k[Ce in RO?W.charAt(ae++):Ce],!re||(R=re(B,G,R))<0)return-1}else if(Ce!=G.charCodeAt(R++))return-1}return R}function D(B,W,G){var R=c.exec(W.slice(G));return R?(B.p=u.get(R[0].toLowerCase()),G+R[0].length):-1}function N(B,W,G){var R=p.exec(W.slice(G));return R?(B.w=g.get(R[0].toLowerCase()),G+R[0].length):-1}function _(B,W,G){var R=d.exec(W.slice(G));return R?(B.w=f.get(R[0].toLowerCase()),G+R[0].length):-1}function C(B,W,G){var R=x.exec(W.slice(G));return R?(B.m=w.get(R[0].toLowerCase()),G+R[0].length):-1}function M(B,W,G){var R=y.exec(W.slice(G));return R?(B.m=v.get(R[0].toLowerCase()),G+R[0].length):-1}function T(B,W,G){return O(B,t,W,G)}function j(B,W,G){return O(B,r,W,G)}function A(B,W,G){return O(B,n,W,G)}function L(B){return i[B.getDay()]}function I(B){return o[B.getDay()]}function $(B){return l[B.getMonth()]}function z(B){return s[B.getMonth()]}function V(B){return a[+(B.getHours()>=12)]}function F(B){return 1+~~(B.getMonth()/3)}function ne(B){return i[B.getUTCDay()]}function ee(B){return o[B.getUTCDay()]}function X(B){return l[B.getUTCMonth()]}function fe(B){return s[B.getUTCMonth()]}function q(B){return a[+(B.getUTCHours()>=12)]}function ke(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var W=P(B+="",b);return W.toString=function(){return B},W},parse:function(B){var W=E(B+="",!1);return W.toString=function(){return B},W},utcFormat:function(B){var W=P(B+="",S);return W.toString=function(){return B},W},utcParse:function(B){var W=E(B+="",!0);return W.toString=function(){return B},W}}}var RO={"-":"",_:" ",0:"0"},vr=/^\s*\d+/,rae=/^%/,nae=/[\\^$*+?|[\]().{}]/g;function rt(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function aae(e){return e.replace(nae,"\\$&")}function xu(e){return new RegExp("^(?:"+e.map(aae).join("|")+")","i")}function bu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function oae(e,t,r){var n=vr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function iae(e,t,r){var n=vr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function sae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function lae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function cae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function IO(e,t,r){var n=vr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function $O(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function uae(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 dae(e,t,r){var n=vr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function fae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function LO(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function pae(e,t,r){var n=vr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function FO(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function hae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function mae(e,t,r){var n=vr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function gae(e,t,r){var n=vr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function vae(e,t,r){var n=vr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function yae(e,t,r){var n=rae.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function xae(e,t,r){var n=vr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function bae(e,t,r){var n=vr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function zO(e,t){return rt(e.getDate(),t,2)}function wae(e,t){return rt(e.getHours(),t,2)}function Sae(e,t){return rt(e.getHours()%12||12,t,2)}function kae(e,t){return rt(1+kf.count(Zo(e),e),t,3)}function fI(e,t){return rt(e.getMilliseconds(),t,3)}function Cae(e,t){return fI(e,t)+"000"}function Pae(e,t){return rt(e.getMonth()+1,t,2)}function Eae(e,t){return rt(e.getMinutes(),t,2)}function Oae(e,t){return rt(e.getSeconds(),t,2)}function Dae(e){var t=e.getDay();return t===0?7:t}function _ae(e,t){return rt(Xv.count(Zo(e)-1,e),t,2)}function pI(e){var t=e.getDay();return t>=4||t===0?Pc(e):Pc.ceil(e)}function Nae(e,t){return e=pI(e),rt(Pc.count(Zo(e),e)+(Zo(e).getDay()===4),t,2)}function Mae(e){return e.getDay()}function Tae(e,t){return rt(Um.count(Zo(e)-1,e),t,2)}function jae(e,t){return rt(e.getFullYear()%100,t,2)}function Aae(e,t){return e=pI(e),rt(e.getFullYear()%100,t,2)}function Rae(e,t){return rt(e.getFullYear()%1e4,t,4)}function Iae(e,t){var r=e.getDay();return e=r>=4||r===0?Pc(e):Pc.ceil(e),rt(e.getFullYear()%1e4,t,4)}function $ae(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rt(t/60|0,"0",2)+rt(t%60,"0",2)}function BO(e,t){return rt(e.getUTCDate(),t,2)}function Lae(e,t){return rt(e.getUTCHours(),t,2)}function Fae(e,t){return rt(e.getUTCHours()%12||12,t,2)}function zae(e,t){return rt(1+Gv.count(Jo(e),e),t,3)}function hI(e,t){return rt(e.getUTCMilliseconds(),t,3)}function Bae(e,t){return hI(e,t)+"000"}function Wae(e,t){return rt(e.getUTCMonth()+1,t,2)}function Hae(e,t){return rt(e.getUTCMinutes(),t,2)}function Uae(e,t){return rt(e.getUTCSeconds(),t,2)}function Yae(e){var t=e.getUTCDay();return t===0?7:t}function Vae(e,t){return rt(Qv.count(Jo(e)-1,e),t,2)}function mI(e){var t=e.getUTCDay();return t>=4||t===0?Ec(e):Ec.ceil(e)}function Kae(e,t){return e=mI(e),rt(Ec.count(Jo(e),e)+(Jo(e).getUTCDay()===4),t,2)}function qae(e){return e.getUTCDay()}function Gae(e,t){return rt(Ym.count(Jo(e)-1,e),t,2)}function Xae(e,t){return rt(e.getUTCFullYear()%100,t,2)}function Qae(e,t){return e=mI(e),rt(e.getUTCFullYear()%100,t,2)}function Zae(e,t){return rt(e.getUTCFullYear()%1e4,t,4)}function Jae(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ec(e):Ec.ceil(e),rt(e.getUTCFullYear()%1e4,t,4)}function eoe(){return"+0000"}function WO(){return"%"}function HO(e){return+e}function UO(e){return Math.floor(+e/1e3)}var hl,gI,vI;toe({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 toe(e){return hl=tae(e),gI=hl.format,hl.parse,vI=hl.utcFormat,hl.utcParse,hl}function roe(e){return new Date(e)}function noe(e){return e instanceof Date?+e:+new Date(+e)}function US(e,t,r,n,a,o,i,s,l,c){var u=NS(),d=u.invert,f=u.domain,p=c(".%L"),g=c(":%S"),y=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),w=c("%b %d"),b=c("%B"),S=c("%Y");function k(P){return(l(P)<P?p:s(P)<P?g:i(P)<P?y:o(P)<P?v:n(P)<P?a(P)<P?x:w:r(P)<P?b:S)(P)}return u.invert=function(P){return new Date(d(P))},u.domain=function(P){return arguments.length?f(Array.from(P,noe)):f().map(roe)},u.ticks=function(P){var E=f();return e(E[0],E[E.length-1],P??10)},u.tickFormat=function(P,E){return E==null?k:c(E)},u.nice=function(P){var E=f();return(!P||typeof P.range!="function")&&(P=t(E[0],E[E.length-1],P??10)),P?f(nI(E,P)):u},u.copy=function(){return Sf(u,US(e,t,r,n,a,o,i,s,l,c))},u}function aoe(){return sa.apply(US(Jne,eae,Zo,WS,Xv,kf,zS,LS,Es,gI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ooe(){return sa.apply(US(Qne,Zne,Jo,HS,Qv,Gv,BS,FS,Es,vI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Zv(){var e=0,t=1,r,n,a,o,i=Br,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:i(a===0?.5:(d=(o(d)-r)*a,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(i=d,c):i};function u(d){return function(f){var p,g;return arguments.length?([p,g]=f,i=d(p,g),c):[i(0),i(1)]}}return c.range=u(Fc),c.rangeRound=u(_S),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function rs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function yI(){var e=ts(Zv()(Br));return e.copy=function(){return rs(e,yI())},ci.apply(e,arguments)}function xI(){var e=jS(Zv()).domain([1,10]);return e.copy=function(){return rs(e,xI()).base(e.base())},ci.apply(e,arguments)}function bI(){var e=AS(Zv());return e.copy=function(){return rs(e,bI()).constant(e.constant())},ci.apply(e,arguments)}function YS(){var e=RS(Zv());return e.copy=function(){return rs(e,YS()).exponent(e.exponent())},ci.apply(e,arguments)}function ioe(){return YS.apply(null,arguments).exponent(.5)}function wI(){var e=[],t=Br;function r(n){if(n!=null&&!isNaN(n=+n))return t((bf(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Wi),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>Yre(e,o/n))},r.copy=function(){return wI(t).domain(e)},ci.apply(r,arguments)}function Jv(){var e=0,t=.5,r=1,n=1,a,o,i,s,l,c=Br,u,d=!1,f;function p(y){return isNaN(y=+y)?f:(y=.5+((y=+u(y))-o)*(n*y<n*o?s:l),c(d?Math.max(0,Math.min(1,y)):y))}p.domain=function(y){return arguments.length?([e,t,r]=y,a=u(e=+e),o=u(t=+t),i=u(r=+r),s=a===o?0:.5/(o-a),l=o===i?0:.5/(i-o),n=o<a?-1:1,p):[e,t,r]},p.clamp=function(y){return arguments.length?(d=!!y,p):d},p.interpolator=function(y){return arguments.length?(c=y,p):c};function g(y){return function(v){var x,w,b;return arguments.length?([x,w,b]=v,c=yne(y,[x,w,b]),p):[c(0),c(.5),c(1)]}}return p.range=g(Fc),p.rangeRound=g(_S),p.unknown=function(y){return arguments.length?(f=y,p):f},function(y){return u=y,a=y(e),o=y(t),i=y(r),s=a===o?0:.5/(o-a),l=o===i?0:.5/(i-o),n=o<a?-1:1,p}}function SI(){var e=ts(Jv()(Br));return e.copy=function(){return rs(e,SI())},ci.apply(e,arguments)}function kI(){var e=jS(Jv()).domain([.1,1,10]);return e.copy=function(){return rs(e,kI()).base(e.base())},ci.apply(e,arguments)}function CI(){var e=AS(Jv());return e.copy=function(){return rs(e,CI()).constant(e.constant())},ci.apply(e,arguments)}function VS(){var e=RS(Jv());return e.copy=function(){return rs(e,VS()).exponent(e.exponent())},ci.apply(e,arguments)}function soe(){return VS.apply(null,arguments).exponent(.5)}const Ru=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ES,scaleDiverging:SI,scaleDivergingLog:kI,scaleDivergingPow:VS,scaleDivergingSqrt:soe,scaleDivergingSymlog:CI,scaleIdentity:rI,scaleImplicit:_b,scaleLinear:tI,scaleLog:aI,scaleOrdinal:PS,scalePoint:qre,scalePow:IS,scaleQuantile:sI,scaleQuantize:lI,scaleRadial:iI,scaleSequential:yI,scaleSequentialLog:xI,scaleSequentialPow:YS,scaleSequentialQuantile:wI,scaleSequentialSqrt:ioe,scaleSequentialSymlog:bI,scaleSqrt:Bne,scaleSymlog:oI,scaleThreshold:cI,scaleTime:aoe,scaleUtc:ooe,tickFormat:eI},Symbol.toStringTag,{value:"Module"}));var ns=e=>e.chartData,loe=Y([ns],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),KS=(e,t,r,n)=>n?loe(e):ns(e);function Gi(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ht(t)&&Ht(r))return!0}return!1}function YO(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function PI(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,a,o;if(Ht(r))a=r;else if(typeof r=="function")return;if(Ht(n))o=n;else if(typeof n=="function")return;var i=[a,o];if(Gi(i))return i}}function coe(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Gi(n))return YO(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[a,o]=e,i,s;if(a==="auto")t!=null&&(i=Math.min(...t));else if(_e(a))i=a;else if(typeof a=="function")try{t!=null&&(i=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&_E.test(a)){var l=_E.exec(a);if(l==null||t==null)i=void 0;else{var c=+l[1];i=t[0]-c}}else i=t==null?void 0:t[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(_e(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t==null?void 0:t[1]))}catch{}else if(typeof o=="string"&&NE.test(o)){var u=NE.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t==null?void 0:t[1];var f=[i,s];if(Gi(f))return t==null?f:YO(f,t,r)}}}var zc=1e9,uoe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},GS,_t=!0,na="[DecimalError] ",Is=na+"Invalid argument: ",qS=na+"Exponent out of range: ",Bc=Math.floor,gs=Math.pow,doe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,bn,dr=1e7,kt=7,EI=9007199254740991,Vm=Bc(EI/kt),we={};we.absoluteValue=we.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};we.comparedTo=we.cmp=function(e){var t,r,n,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*kt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};we.dividedBy=we.div=function(e){return Ro(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return yt(Ro(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return Jt(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(bn))throw Error(na+"NaN");if(r.s<1)throw Error(na+(r.s?"NaN":"-Infinity"));return r.eq(bn)?new n(0):(_t=!1,t=Ro(Wd(r,o),Wd(e,o),o),_t=!0,yt(t,a))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_I(t,e):OI(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(na+"NaN");return r.s?(_t=!1,t=Ro(r,e,0,1).times(e),_t=!0,r.minus(t)):yt(new n(r),a)};we.naturalExponential=we.exp=function(){return DI(this)};we.naturalLogarithm=we.ln=function(){return Wd(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OI(t,e):_I(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Is+e);if(t=Jt(a)+1,n=a.d.length-1,r=n*kt+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};we.squareRoot=we.sqrt=function(){var e,t,r,n,a,o,i,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(na+"NaN")}for(e=Jt(s),_t=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Ja(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Bc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=i=r+3;;)if(o=n,n=o.plus(Ro(s,o,i+2)).times(.5),Ja(o.d).slice(0,i)===(t=Ja(n.d)).slice(0,i)){if(t=t.slice(i-3,i+1),a==i&&t=="4999"){if(yt(o,r+1,0),o.times(o).eq(s)){n=o;break}}else if(t!="9999")break;i+=4}return _t=!0,yt(n,r)};we.times=we.mul=function(e){var t,r,n,a,o,i,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,r=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,i=l,l=c,c=i),o=[],i=l+c,n=i;n--;)o.push(0);for(n=c;--n>=0;){for(t=0,a=l+n;a>n;)s=o[a]+p[n]*f[a-n-1]+t,o[a--]=s%dr|0,t=s/dr|0;o[a]=(o[a]+t)%dr|0}for(;!o[--i];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,_t?yt(e,d.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(fo(e,0,zc),t===void 0?t=n.rounding:fo(t,0,8),yt(r,e+Jt(r)+1,t))};we.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=qs(n,!0):(fo(e,0,zc),t===void 0?t=a.rounding:fo(t,0,8),n=yt(new a(n),e+1,t),r=qs(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?qs(a):(fo(e,0,zc),t===void 0?t=o.rounding:fo(t,0,8),n=yt(new o(a),e+Jt(a)+1,t),r=qs(n.abs(),!1,e+Jt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return yt(new t(e),Jt(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,a,o,i,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(bn);if(s=new l(s),!s.s){if(e.s<1)throw Error(na+"Infinity");return s}if(s.eq(bn))return s;if(n=l.precision,e.eq(bn))return yt(s,n);if(t=e.e,r=e.d.length-1,i=t>=r,o=s.s,i){if((r=u<0?-u:u)<=EI){for(a=new l(bn),t=Math.ceil(n/kt+4),_t=!1;r%2&&(a=a.times(s),KO(a.d,t)),r=Bc(r/2),r!==0;)s=s.times(s),KO(s.d,t);return _t=!0,e.s<0?new l(bn).div(a):yt(a,n)}}else if(o<0)throw Error(na+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,_t=!1,a=e.times(Wd(s,n+c)),_t=!0,a=DI(a),a.s=o,a};we.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=Jt(a),n=qs(a,r<=o.toExpNeg||r>=o.toExpPos)):(fo(e,1,zc),t===void 0?t=o.rounding:fo(t,0,8),a=yt(new o(a),e,t),r=Jt(a),n=qs(a,e<=r||r<=o.toExpNeg,e)),n};we.toSignificantDigits=we.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(fo(e,1,zc),t===void 0?t=n.rounding:fo(t,0,8)),yt(new n(r),e,t)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Jt(e),r=e.constructor;return qs(e,t<=r.toExpNeg||t>=r.toExpPos)};function OI(e,t){var r,n,a,o,i,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),_t?yt(t,d):t;if(l=e.d,c=t.d,i=e.e,a=t.e,l=l.slice(),o=i-a,o){for(o<0?(n=l,o=-o,s=c.length):(n=c,a=i,s=l.length),i=Math.ceil(d/kt),s=i>s?i+1:s+1,o>s&&(o=s,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,n=c,c=l,l=n),r=0;o;)r=(l[--o]=l[o]+c[o]+r)/dr|0,l[o]%=dr;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,_t?yt(t,d):t}function fo(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Is+e)}function Ja(e){var t,r,n,a=e.length-1,o="",i=e[0];if(a>0){for(o+=i,t=1;t<a;t++)n=e[t]+"",r=kt-n.length,r&&(o+=wi(r)),o+=n;i=e[t],n=i+"",r=kt-n.length,r&&(o+=wi(r))}else if(i===0)return"0";for(;i%10===0;)i/=10;return o+i}var Ro=function(){function e(n,a){var o,i=0,s=n.length;for(n=n.slice();s--;)o=n[s]*a+i,n[s]=o%dr|0,i=o/dr|0;return i&&n.unshift(i),n}function t(n,a,o,i){var s,l;if(o!=i)l=o>i?1:-1;else for(s=l=0;s<o;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,o){for(var i=0;o--;)n[o]-=i,i=n[o]<a[o]?1:0,n[o]=i*dr+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,i){var s,l,c,u,d,f,p,g,y,v,x,w,b,S,k,P,E,O,D=n.constructor,N=n.s==a.s?1:-1,_=n.d,C=a.d;if(!n.s)return new D(n);if(!a.s)throw Error(na+"Division by zero");for(l=n.e-a.e,E=C.length,k=_.length,p=new D(N),g=p.d=[],c=0;C[c]==(_[c]||0);)++c;if(C[c]>(_[c]||0)&&--l,o==null?w=o=D.precision:i?w=o+(Jt(n)-Jt(a))+1:w=o,w<0)return new D(0);if(w=w/kt+2|0,c=0,E==1)for(u=0,C=C[0],w++;(c<k||u)&&w--;c++)b=u*dr+(_[c]||0),g[c]=b/C|0,u=b%C|0;else{for(u=dr/(C[0]+1)|0,u>1&&(C=e(C,u),_=e(_,u),E=C.length,k=_.length),S=E,y=_.slice(0,E),v=y.length;v<E;)y[v++]=0;O=C.slice(),O.unshift(0),P=C[0],C[1]>=dr/2&&++P;do u=0,s=t(C,y,E,v),s<0?(x=y[0],E!=v&&(x=x*dr+(y[1]||0)),u=x/P|0,u>1?(u>=dr&&(u=dr-1),d=e(C,u),f=d.length,v=y.length,s=t(d,y,f,v),s==1&&(u--,r(d,E<f?O:C,f))):(u==0&&(s=u=1),d=C.slice()),f=d.length,f<v&&d.unshift(0),r(y,d,v),s==-1&&(v=y.length,s=t(C,y,E,v),s<1&&(u++,r(y,E<v?O:C,v))),v=y.length):s===0&&(u++,y=[0]),g[c++]=u,s&&y[0]?y[v++]=_[S]||0:(y=[_[S]],v=1);while((S++<k||y[0]!==void 0)&&w--)}return g[0]||g.shift(),p.e=l,yt(p,i?o+Jt(p)+1:o)}}();function DI(e,t){var r,n,a,o,i,s,l=0,c=0,u=e.constructor,d=u.precision;if(Jt(e)>16)throw Error(qS+Jt(e));if(!e.s)return new u(bn);for(_t=!1,s=d,i=new u(.03125);e.abs().gte(.1);)e=e.times(i),c+=5;for(n=Math.log(gs(2,c))/Math.LN10*2+5|0,s+=n,r=a=o=new u(bn),u.precision=s;;){if(a=yt(a.times(e),s),r=r.times(++l),i=o.plus(Ro(a,r,s)),Ja(i.d).slice(0,s)===Ja(o.d).slice(0,s)){for(;c--;)o=yt(o.times(o),s);return u.precision=d,t==null?(_t=!0,yt(o,d)):o}o=i}}function Jt(e){for(var t=e.e*kt,r=e.d[0];r>=10;r/=10)t++;return t}function y0(e,t,r){if(t>e.LN10.sd())throw _t=!0,r&&(e.precision=r),Error(na+"LN10 precision limit exceeded");return yt(new e(e.LN10),t)}function wi(e){for(var t="";e--;)t+="0";return t}function Wd(e,t){var r,n,a,o,i,s,l,c,u,d=1,f=10,p=e,g=p.d,y=p.constructor,v=y.precision;if(p.s<1)throw Error(na+(p.s?"NaN":"-Infinity"));if(p.eq(bn))return new y(0);if(t==null?(_t=!1,c=v):c=t,p.eq(10))return t==null&&(_t=!0),y0(y,c);if(c+=f,y.precision=c,r=Ja(g),n=r.charAt(0),o=Jt(p),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Ja(p.d),n=r.charAt(0),d++;o=Jt(p),n>1?(p=new y("0."+r),o++):p=new y(n+"."+r.slice(1))}else return l=y0(y,c+2,v).times(o+""),p=Wd(new y(n+"."+r.slice(1)),c-f).plus(l),y.precision=v,t==null?(_t=!0,yt(p,v)):p;for(s=i=p=Ro(p.minus(bn),p.plus(bn),c),u=yt(p.times(p),c),a=3;;){if(i=yt(i.times(u),c),l=s.plus(Ro(i,new y(a),c)),Ja(l.d).slice(0,c)===Ja(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(y0(y,c+2,v).times(o+""))),s=Ro(s,new y(d),c),y.precision=v,t==null?(_t=!0,yt(s,v)):s;s=l,a+=2}}function VO(e,t){var r,n,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Bc(r/kt),e.d=[],n=(r+1)%kt,r<0&&(n+=kt),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=kt;n<a;)e.d.push(+t.slice(n,n+=kt));t=t.slice(n),n=kt-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),_t&&(e.e>Vm||e.e<-Vm))throw Error(qS+r)}else e.s=0,e.e=0,e.d=[0];return e}function yt(e,t,r){var n,a,o,i,s,l,c,u,d=e.d;for(i=1,o=d[0];o>=10;o/=10)i++;if(n=t-i,n<0)n+=kt,a=t,c=d[u=0];else{if(u=Math.ceil((n+1)/kt),o=d.length,u>=o)return e;for(c=o=d[u],i=1;o>=10;o/=10)i++;n%=kt,a=n-kt+i}if(r!==void 0&&(o=gs(10,i-a-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?c/gs(10,i-a):0:d[u-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(o=Jt(e),d.length=1,t=t-o-1,d[0]=gs(10,(kt-t%kt)%kt),e.e=Bc(-t/kt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=u,o=1,u--):(d.length=u+1,o=gs(10,kt-n),d[u]=a>0?(c/gs(10,i-a)%gs(10,a)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==dr&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=dr)break;d[u--]=0,o=1}for(n=d.length;d[--n]===0;)d.pop();if(_t&&(e.e>Vm||e.e<-Vm))throw Error(qS+Jt(e));return e}function _I(e,t){var r,n,a,o,i,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),_t?yt(t,p):t;if(l=e.d,d=t.d,n=t.e,c=e.e,l=l.slice(),i=c-n,i){for(u=i<0,u?(r=l,i=-i,s=d.length):(r=d,n=c,s=l.length),a=Math.max(Math.ceil(p/kt),s)+2,i>a&&(i=a,r.length=1),r.reverse(),a=i;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=d.length,u=a<s,u&&(s=a),a=0;a<s;a++)if(l[a]!=d[a]){u=l[a]<d[a];break}i=0}for(u&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,a=d.length-s;a>0;--a)l[s++]=0;for(a=d.length;a>i;){if(l[--a]<d[a]){for(o=a;o&&l[--o]===0;)l[o]=dr-1;--l[o],l[a]+=dr}l[a]-=d[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,_t?yt(t,p):t):new f(0)}function qs(e,t,r){var n,a=Jt(e),o=Ja(e.d),i=o.length;return t?(r&&(n=r-i)>0?o=o.charAt(0)+"."+o.slice(1)+wi(n):i>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+wi(-a-1)+o,r&&(n=r-i)>0&&(o+=wi(n))):a>=i?(o+=wi(a+1-i),r&&(n=r-a-1)>0&&(o=o+"."+wi(n))):((n=a+1)<i&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-i)>0&&(a+1===i&&(o+="."),o+=wi(n))),e.s<0?"-"+o:o}function KO(e,t){if(e.length>t)return e.length=t,!0}function NI(e){var t,r,n;function a(o){var i=this;if(!(i instanceof a))return new a(o);if(i.constructor=a,o instanceof a){i.s=o.s,i.e=o.e,i.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Is+o);if(o>0)i.s=1;else if(o<0)o=-o,i.s=-1;else{i.s=0,i.e=0,i.d=[0];return}if(o===~~o&&o<1e7){i.e=0,i.d=[o];return}return VO(i,o.toString())}else if(typeof o!="string")throw Error(Is+o);if(o.charCodeAt(0)===45?(o=o.slice(1),i.s=-1):i.s=1,doe.test(o))VO(i,o);else throw Error(Is+o)}if(a.prototype=we,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=NI,a.config=a.set=foe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function foe(e){if(!e||typeof e!="object")throw Error(na+"Object expected");var t,r,n,a=["precision",1,zc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Bc(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Is+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Is+r+": "+n);return this}var GS=NI(uoe);bn=new GS(1);const ht=GS;var poe=e=>e,MI={},TI=e=>e===MI,qO=e=>function t(){return arguments.length===0||arguments.length===1&&TI(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},jI=(e,t)=>e===1?t:qO(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];var o=n.filter(i=>i!==MI).length;return o>=e?t(...n):jI(e-o,qO(function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var c=n.map(u=>TI(u)?s.shift():u);return t(...c,...s)}))}),hoe=e=>jI(e.length,e),jb=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},moe=hoe((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),goe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return poe;var a=r.reverse(),o=a[0],i=a.slice(1);return function(){return i.reduce((s,l)=>l(s),o(...arguments))}},Ab=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join("");function AI(e){var t;return e===0?t=1:t=Math.floor(new ht(e).abs().log(10).toNumber())+1,t}function RI(e,t,r){for(var n=new ht(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}var II=e=>{var[t,r]=e,[n,a]=[t,r];return t>r&&([n,a]=[r,t]),[n,a]},$I=(e,t,r)=>{if(e.lte(0))return new ht(0);var n=AI(e.toNumber()),a=new ht(10).pow(n),o=e.div(a),i=n!==1?.05:.1,s=new ht(Math.ceil(o.div(i).toNumber())).add(r).mul(i),l=s.mul(a);return t?new ht(l.toNumber()):new ht(Math.ceil(l.toNumber()))},voe=(e,t,r)=>{var n=new ht(1),a=new ht(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new ht(10).pow(AI(e)-1),a=new ht(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new ht(Math.floor(e)))}else e===0?a=new ht(Math.floor((t-1)/2)):r||(a=new ht(Math.floor(e)));var i=Math.floor((t-1)/2),s=goe(moe(l=>a.add(new ht(l-i).mul(n)).toNumber()),jb);return s(0,t)},LI=function(t,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new ht(0),tickMin:new ht(0),tickMax:new ht(0)};var i=$I(new ht(r).sub(t).div(n-1),a,o),s;t<=0&&r>=0?s=new ht(0):(s=new ht(t).add(r).div(2),s=s.sub(new ht(s).mod(i)));var l=Math.ceil(s.sub(t).div(i).toNumber()),c=Math.ceil(new ht(r).sub(s).div(i).toNumber()),u=l+c+1;return u>n?LI(t,r,n,a,o+1):(u<n&&(c=r>0?c+(n-u):c,l=r>0?l:l+(n-u)),{step:i,tickMin:s.sub(new ht(l).mul(i)),tickMax:s.add(new ht(c).mul(i))})},yoe=function(t){var[r,n]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),[s,l]=II([r,n]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...jb(0,a-1).map(()=>1/0)]:[...jb(0,a-1).map(()=>-1/0),l];return r>n?Ab(c):c}if(s===l)return voe(s,a,o);var{step:u,tickMin:d,tickMax:f}=LI(s,l,i,o,0),p=RI(d,f.add(new ht(.1).mul(u)),u);return r>n?Ab(p):p},xoe=function(t,r){var[n,a]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[i,s]=II([n,a]);if(i===-1/0||s===1/0)return[n,a];if(i===s)return[i];var l=Math.max(r,2),c=$I(new ht(s).sub(i).div(l-1),o,0),u=[...RI(new ht(i),new ht(s),c),s];return o===!1&&(u=u.map(d=>Math.round(d))),n>a?Ab(u):u},boe=e=>e.rootProps.barCategoryGap,ey=e=>e.rootProps.stackOffset,FI=e=>e.rootProps.reverseStackOrder,XS=e=>e.options.chartName,QS=e=>e.rootProps.syncId,zI=e=>e.rootProps.syncMethod,ZS=e=>e.options.eventEmitter,woe=e=>e.rootProps.baseValue,Wr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ko={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},vn={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},ty=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Soe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ko.angleAxisId,includeHidden:!1,name:void 0,reversed:ko.reversed,scale:ko.scale,tick:ko.tick,tickCount:void 0,ticks:void 0,type:ko.type,unit:void 0},koe={allowDataOverflow:vn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vn.scale,tick:vn.tick,tickCount:vn.tickCount,ticks:void 0,type:vn.type,unit:void 0},Coe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:ko.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ko.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ko.scale,tick:ko.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Poe={allowDataOverflow:vn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vn.scale,tick:vn.tick,tickCount:vn.tickCount,ticks:void 0,type:"category",unit:void 0},JS=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Coe:Soe,ek=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Poe:koe,ry=e=>e.polarOptions,tk=Y([si,li,Er],Sre),BI=Y([ry,tk],(e,t)=>{if(e!=null)return qi(e.innerRadius,t,0)}),WI=Y([ry,tk],(e,t)=>{if(e!=null)return qi(e.outerRadius,t,t*.8)}),Eoe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},HI=Y([ry],Eoe);Y([JS,HI],ty);var UI=Y([tk,BI,WI],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Y([ek,UI],ty);var YI=Y([wt,ry,BI,WI,si,li],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:i,cy:s,startAngle:l,endAngle:c}=t;return{cx:qi(i,a,a/2),cy:qi(s,o,o/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),or=(e,t)=>t,ny=(e,t,r)=>r;function rk(e){return e==null?void 0:e.id}function VI(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:a,dataKey:o}=r,i=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:n;if(!(c==null||c.length===0)){var u=rk(s);c.forEach((d,f)=>{var p=o==null||a?f:String(Ir(d,o,null)),g=Ir(d,s.dataKey,0),y;i.has(p)?y=i.get(p):y={},Object.assign(y,{[u]:g}),i.set(p,y)})}}),Array.from(i.values())}function nk(e){return e.stackId!=null&&e.dataKey!=null}var ay=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function oy(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Ooe(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var ir=e=>{var t=wt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Wc=e=>e.tooltip.settings.axisId;function GO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Km(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(r),!0).forEach(function(n){Doe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Doe(e,t,r){return(t=_oe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _oe(e){var t=Noe(e,"string");return typeof t=="symbol"?t:t+""}function Noe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rb=[0,"auto"],cr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},KI=(e,t)=>e.cartesianAxis.xAxis[t],ui=(e,t)=>{var r=KI(e,t);return r??cr},ur={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Rb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:vf},qI=(e,t)=>e.cartesianAxis.yAxis[t],di=(e,t)=>{var r=qI(e,t);return r??ur},Moe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ak=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??Moe},Kr=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return di(e,r);case"zAxis":return ak(e,r);case"angleAxis":return JS(e,r);case"radiusAxis":return ek(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Toe=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return di(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Cf=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return di(e,r);case"angleAxis":return JS(e,r);case"radiusAxis":return ek(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},GI=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function XI(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var QI=e=>e.graphicalItems.cartesianItems,joe=Y([or,ny],XI),ZI=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Pf=Y([QI,Kr,joe],ZI,{memoizeOptions:{resultEqualityCheck:oy}}),JI=Y([Pf],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(nk)),e$=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Aoe=Y([Pf],e$),t$=e=>e.map(t=>t.data).filter(Boolean).flat(1),Roe=Y([Pf],t$,{memoizeOptions:{resultEqualityCheck:oy}}),r$=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:a}=t;return e.length>0?e:r.slice(n,a+1)},ok=Y([Roe,KS],r$),n$=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ir(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Ir(a,n)}))):e.map(n=>({value:n})),iy=Y([ok,Kr,Pf],n$);function a$(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function fh(e){if(co(e)||e instanceof Date){var t=Number(e);if(Ht(t))return t}}function XO(e){if(Array.isArray(e)){var t=[fh(e[0]),fh(e[1])];return Gi(t)?t:void 0}var r=fh(e);if(r!=null)return[r,r]}function ei(e){return e.map(fh).filter(gZ)}function Ioe(e,t,r){return!r||typeof t!="number"||Ma(t)?[]:r.length?ei(r.flatMap(n=>{var a=Ir(e,n.dataKey),o,i;if(Array.isArray(a)?[o,i]=a:o=i=a,!(!Ht(o)||!Ht(i)))return[t-o,t+i]})):[]}var sr=e=>{var t=ir(e),r=Wc(e);return Cf(e,t,r)},Ef=Y([sr],e=>e==null?void 0:e.dataKey),$oe=Y([JI,KS,sr],VI),o$=(e,t,r,n)=>{var a={},o=t.reduce((i,s)=>(s.stackId==null||(i[s.stackId]==null&&(i[s.stackId]=[]),i[s.stackId].push(s)),i),a);return Object.fromEntries(Object.entries(o).map(i=>{var[s,l]=i,c=n?[...l].reverse():l,u=c.map(rk);return[s,{stackedData:mee(e,u,r),graphicalItems:c}]}))},Ib=Y([$oe,JI,ey,FI],o$),i$=(e,t,r,n)=>{var{dataStartIndex:a,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var i=xee(e,a,o);if(!(i!=null&&i[0]===0&&i[1]===0))return i}},Loe=Y([Kr],e=>e.allowDataOverflow),ik=e=>{var t;if(e==null||!("domain"in e))return Rb;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=ei(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Rb},s$=Y([Kr],ik),l$=Y([s$,Loe],PI),Foe=Y([Ib,ns,or,l$],i$,{memoizeOptions:{resultEqualityCheck:ay}}),sk=e=>e.errorBars,zoe=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>a$(r,n)),qm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r.filter(Boolean);if(a.length!==0){var o=a.flat(),i=Math.min(...o),s=Math.max(...o);return[i,s]}},c$=(e,t,r,n,a)=>{var o,i;if(r.length>0&&e.forEach(s=>{r.forEach(l=>{var c,u,d=(c=n[l.id])===null||c===void 0?void 0:c.filter(x=>a$(a,x)),f=Ir(s,(u=t.dataKey)!==null&&u!==void 0?u:l.dataKey),p=Ioe(s,f,d);if(p.length>=2){var g=Math.min(...p),y=Math.max(...p);(o==null||g<o)&&(o=g),(i==null||y>i)&&(i=y)}var v=XO(f);v!=null&&(o=o==null?v[0]:Math.min(o,v[0]),i=i==null?v[1]:Math.max(i,v[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(s=>{var l=XO(Ir(s,t.dataKey));l!=null&&(o=o==null?l[0]:Math.min(o,l[0]),i=i==null?l[1]:Math.max(i,l[1]))}),Ht(o)&&Ht(i))return[o,i]},Boe=Y([ok,Kr,Aoe,sk,or],c$,{memoizeOptions:{resultEqualityCheck:ay}});function Woe(e){var{value:t}=e;if(co(t)||t instanceof Date)return t}var Hoe=(e,t,r)=>{var n=e.map(Woe).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&aA(n))?UR(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},u$=e=>e.referenceElements.dots,Hc=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),Uoe=Y([u$,or,ny],Hc),d$=e=>e.referenceElements.areas,Yoe=Y([d$,or,ny],Hc),f$=e=>e.referenceElements.lines,Voe=Y([f$,or,ny],Hc),p$=(e,t)=>{var r=ei(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Koe=Y(Uoe,or,p$),h$=(e,t)=>{var r=ei(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},qoe=Y([Yoe,or],h$);function Goe(e){var t;if(e.x!=null)return ei([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ei(r)}function Xoe(e){var t;if(e.y!=null)return ei([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ei(r)}var m$=(e,t)=>{var r=e.flatMap(n=>t==="xAxis"?Goe(n):Xoe(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Qoe=Y([Voe,or],m$),Zoe=Y(Koe,Qoe,qoe,(e,t,r)=>qm(e,r,t)),g$=(e,t,r,n,a,o,i,s)=>{if(r!=null)return r;var l=i==="vertical"&&s==="xAxis"||i==="horizontal"&&s==="yAxis",c=l?qm(n,o,a):qm(o,a);return coe(t,c,e.allowDataOverflow)},Joe=Y([Kr,s$,l$,Foe,Boe,Zoe,wt,or],g$,{memoizeOptions:{resultEqualityCheck:ay}}),eie=[0,1],v$=(e,t,r,n,a,o,i)=>{if(!((e==null||r==null||r.length===0)&&i===void 0)){var{dataKey:s,type:l}=e,c=ii(t,o);if(c&&s==null){var u;return UR(0,(u=r==null?void 0:r.length)!==null&&u!==void 0?u:0)}return l==="category"?Hoe(n,e,c):a==="expand"?eie:i}},lk=Y([Kr,wt,ok,iy,ey,or,Joe],v$),y$=(e,t,r,n,a)=>{if(e!=null){var{scale:o,type:i}=e;if(o==="auto")return t==="radial"&&a==="radiusAxis"?"band":t==="radial"&&a==="angleAxis"?"linear":i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":i==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(J1(o));return s in Ru?s:"point"}}},Of=Y([Kr,wt,GI,XS,or],y$);function tie(e){if(e!=null){if(e in Ru)return Ru[e]();var t="scale".concat(J1(e));if(t in Ru)return Ru[t]()}}function ck(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var a=tie(t);if(a!=null){var o=a.domain(r).range(n);return dee(o),o}}}var x$=(e,t,r)=>{var n=ik(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Gi(e))return yoe(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Gi(e))return xoe(e,t.tickCount,t.allowDecimals)}},uk=Y([lk,Cf,Of],x$),b$=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Gi(t)&&Array.isArray(r)&&r.length>0){var a=t[0],o=r[0],i=t[1],s=r[r.length-1];return[Math.min(a,o),Math.max(i,s)]}return t},rie=Y([Kr,lk,uk,or],b$),nie=Y(iy,Kr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ei(e.map(s=>s.value))).sort((s,l)=>s-l);if(n.length<2)return 1/0;var a=n[n.length-1]-n[0];if(a===0)return 1/0;for(var o=0;o<n.length-1;o++){var i=n[o+1]-n[o];r=Math.min(r,i)}return r/a}}),w$=Y(nie,wt,boe,Er,(e,t,r,n)=>n,(e,t,r,n,a)=>{if(!Ht(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var i=qi(r,e*o),s=e*o/2;return s-i-(s-i)/o*i}return 0}),aie=(e,t)=>{var r=ui(e,t);return r==null||typeof r.padding!="string"?0:w$(e,"xAxis",t,r.padding)},oie=(e,t)=>{var r=di(e,t);return r==null||typeof r.padding!="string"?0:w$(e,"yAxis",t,r.padding)},iie=Y(ui,aie,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),sie=Y(di,oie,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),lie=Y([Er,iie,Wv,Bv,(e,t,r)=>r],(e,t,r,n,a)=>{var{padding:o}=n;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),cie=Y([Er,wt,sie,Wv,Bv,(e,t,r)=>r],(e,t,r,n,a,o)=>{var{padding:i}=a;return o?[n.height-i.bottom,i.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Df=(e,t,r,n)=>{var a;switch(t){case"xAxis":return lie(e,r,n);case"yAxis":return cie(e,r,n);case"zAxis":return(a=ak(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return HI(e);case"radiusAxis":return UI(e,r);default:return}},S$=Y([Kr,Df],ty),Uc=Y([Kr,Of,rie,S$],ck);Y([Pf,sk,or],zoe);function k$(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var sy=(e,t)=>t,ly=(e,t,r)=>r,uie=Y(Fv,sy,ly,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(k$)),die=Y(zv,sy,ly,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(k$)),C$=(e,t)=>({width:e.width,height:t.height}),fie=(e,t)=>{var r=typeof t.width=="number"?t.width:vf;return{width:r,height:e.height}},pie=Y(Er,ui,C$),hie=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},mie=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},gie=Y(li,Er,uie,sy,ly,(e,t,r,n,a)=>{var o={},i;return r.forEach(s=>{var l=C$(t,s);i==null&&(i=hie(t,n,e));var c=n==="top"&&!a||n==="bottom"&&a;o[s.id]=i-Number(c)*l.height,i+=(c?-1:1)*l.height}),o}),vie=Y(si,Er,die,sy,ly,(e,t,r,n,a)=>{var o={},i;return r.forEach(s=>{var l=fie(t,s);i==null&&(i=mie(t,n,e));var c=n==="left"&&!a||n==="right"&&a;o[s.id]=i-Number(c)*l.width,i+=(c?-1:1)*l.width}),o}),yie=(e,t)=>{var r=ui(e,t);if(r!=null)return gie(e,r.orientation,r.mirror)},xie=Y([Er,ui,yie,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),bie=(e,t)=>{var r=di(e,t);if(r!=null)return vie(e,r.orientation,r.mirror)},wie=Y([Er,di,bie,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),Sie=Y(Er,di,(e,t)=>{var r=typeof t.width=="number"?t.width:vf;return{width:r,height:e.height}}),P$=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:a,type:o,dataKey:i}=r,s=ii(e,n),l=t.map(c=>c.value);if(i&&s&&o==="category"&&a&&aA(l))return l}},dk=Y([wt,iy,Kr,or],P$),E$=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:a,scale:o}=r,i=ii(e,n);if(i&&(a==="number"||o!=="auto"))return t.map(s=>s.value)}},fk=Y([wt,iy,Cf,or],E$),QO=Y([wt,Toe,Of,Uc,dk,fk,Df,uk,or],(e,t,r,n,a,o,i,s,l)=>{if(t!=null){var c=ii(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:a,isCategorical:c,niceTicks:s,range:i,realScaleType:r,scale:n}}}),kie=(e,t,r,n,a,o,i,s,l)=>{if(!(t==null||n==null)){var c=ii(e,l),{type:u,ticks:d,tickCount:f}=t,p=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,g=u==="category"&&n.bandwidth?n.bandwidth()/p:0;g=l==="angleAxis"&&o!=null&&o.length>=2?Un(o[0]-o[1])*2*g:g;var y=d||a;if(y){var v=y.map((x,w)=>{var b=i?i.indexOf(x):x;return{index:w,coordinate:n(b)+g,value:x,offset:g}});return v.filter(x=>Ht(x.coordinate))}return c&&s?s.map((x,w)=>({coordinate:n(x)+g,value:x,index:w,offset:g})).filter(x=>Ht(x.coordinate)):n.ticks?n.ticks(f).map(x=>({coordinate:n(x)+g,value:x,offset:g})):n.domain().map((x,w)=>({coordinate:n(x)+g,value:i?i[x]:x,index:w,offset:g}))}},O$=Y([wt,Cf,Of,Uc,uk,Df,dk,fk,or],kie),Cie=(e,t,r,n,a,o,i)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=ii(e,i),{tickCount:l}=t,c=0;return c=i==="angleAxis"&&(n==null?void 0:n.length)>=2?Un(n[0]-n[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:r(u)+c,value:u,index:d,offset:c})):r.ticks?r.ticks(l).map(u=>({coordinate:r(u)+c,value:u,offset:c})):r.domain().map((u,d)=>({coordinate:r(u)+c,value:a?a[u]:u,index:d,offset:c}))}},D$=Y([wt,Cf,Uc,Df,dk,fk,or],Cie),_$=Y(Kr,Uc,(e,t)=>{if(!(e==null||t==null))return Km(Km({},e),{},{scale:t})}),Pie=Y([Kr,Of,lk,S$],ck);Y((e,t,r)=>ak(e,r),Pie,(e,t)=>{if(!(e==null||t==null))return Km(Km({},e),{},{scale:t})});var Eie=Y([wt,Fv,zv],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),N$=e=>e.options.defaultTooltipEventType,M$=e=>e.options.validateTooltipEventTypes;function T$(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function pk(e,t){var r=N$(e),n=M$(e);return T$(t,r,n)}function Oie(e){return Me(t=>pk(t,e))}var j$=(e,t)=>{var r,n=Number(t);if(!(Ma(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},Die=e=>e.tooltip.settings,Ei={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},_ie={itemInteraction:{click:Ei,hover:Ei},axisInteraction:{click:Ei,hover:Ei},keyboardInteraction:Ei,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},A$=un({name:"tooltip",initialState:_ie,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Ot()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,a=Oa(e).tooltipItemPayloads.indexOf(r);a>-1&&(e.tooltipItemPayloads[a]=n)},prepare:Ot()},removeTooltipEntrySettings:{reducer(e,t){var r=Oa(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:Nie,replaceTooltipEntrySettings:Mie,removeTooltipEntrySettings:Tie,setTooltipSettingsState:jie,setActiveMouseOverItemIndex:Aie,mouseLeaveItem:Bpe,mouseLeaveChart:R$,setActiveClickItemIndex:Wpe,setMouseOverAxisIndex:I$,setMouseClickAxisIndex:Rie,setSyncInteraction:$b,setKeyboardInteraction:Lb}=A$.actions,Iie=A$.reducer;function ZO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZO(Object(r),!0).forEach(function(n){$ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $ie(e,t,r){return(t=Lie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lie(e){var t=Fie(e,"string");return typeof t=="symbol"?t:t+""}function Fie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zie(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Bie(e){return e.index!=null}var $$=(e,t,r,n)=>{if(t==null)return Ei;var a=zie(e,t,r);if(a==null)return Ei;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(Bie(a)){if(o)return Mp(Mp({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Mp(Mp({},Ei),{},{coordinate:a.coordinate})};function Wie(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function Hie(e,t){var r=Wie(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),i=Math.max(n,a);return r>=o&&r<=i}function Uie(e,t,r){if(r==null||t==null)return!0;var n=Ir(e,t);return n==null||!Gi(r)?!0:Hie(n,r)}var hk=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!Ht(o))return a;var i=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(i,Math.min(o,s)),c=t[l];return c==null||Uie(c,r,n)?String(l):null},L$=(e,t,r,n,a,o,i,s)=>{if(!(o==null||s==null)){var l=i[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=a==null?void 0:a[Number(o)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},F$=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;return r==="hover"?a=e.itemInteraction.hover.dataKey:a=e.itemInteraction.click.dataKey,a==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var i;return((i=o.settings)===null||i===void 0?void 0:i.dataKey)===a})},_f=e=>e.options.tooltipPayloadSearcher,Yc=e=>e.tooltip;function JO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JO(Object(r),!0).forEach(function(n){Yie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yie(e,t,r){return(t=Vie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vie(e){var t=Kie(e,"string");return typeof t=="symbol"?t:t+""}function Kie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qie(e,t){return e??t}var z$=(e,t,r,n,a,o,i)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,d=[];return e.reduce((f,p)=>{var g,{dataDefinedOnItem:y,settings:v}=p,x=qie(y,s),w=Array.isArray(x)?uR(x,c,u):x,b=(g=v==null?void 0:v.dataKey)!==null&&g!==void 0?g:n,S=v==null?void 0:v.nameKey,k;if(n&&Array.isArray(w)&&!Array.isArray(w[0])&&i==="axis"?k=oA(w,n,a):k=o(w,t,l,S),Array.isArray(k))k.forEach(E=>{var O=eD(eD({},v),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});f.push(ME({tooltipEntrySettings:O,dataKey:E.dataKey,payload:E.payload,value:Ir(E.payload,E.dataKey),name:E.name}))});else{var P;f.push(ME({tooltipEntrySettings:v,dataKey:b,payload:k,value:Ir(k,b),name:(P=Ir(k,S))!==null&&P!==void 0?P:v==null?void 0:v.name}))}return f},d)}},mk=Y([sr,wt,GI,XS,ir],y$),Gie=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Xie=Y([ir,Wc],XI),Nf=Y([Gie,sr,Xie],ZI,{memoizeOptions:{resultEqualityCheck:oy}}),Qie=Y([Nf],e=>e.filter(nk)),Zie=Y([Nf],t$,{memoizeOptions:{resultEqualityCheck:oy}}),Vc=Y([Zie,ns],r$),Jie=Y([Qie,ns,sr],VI),gk=Y([Vc,sr,Nf],n$),B$=Y([sr],ik),ese=Y([sr],e=>e.allowDataOverflow),W$=Y([B$,ese],PI),tse=Y([Nf],e=>e.filter(nk)),rse=Y([Jie,tse,ey,FI],o$),nse=Y([rse,ns,ir,W$],i$),ase=Y([Nf],e$),ose=Y([Vc,sr,ase,sk,ir],c$,{memoizeOptions:{resultEqualityCheck:ay}}),ise=Y([u$,ir,Wc],Hc),sse=Y([ise,ir],p$),lse=Y([d$,ir,Wc],Hc),cse=Y([lse,ir],h$),use=Y([f$,ir,Wc],Hc),dse=Y([use,ir],m$),fse=Y([sse,dse,cse],qm),pse=Y([sr,B$,W$,nse,ose,fse,wt,ir],g$),Mf=Y([sr,wt,Vc,gk,ey,ir,pse],v$),hse=Y([Mf,sr,mk],x$),mse=Y([sr,Mf,hse,ir],b$),H$=e=>{var t=ir(e),r=Wc(e),n=!1;return Df(e,t,r,n)},U$=Y([sr,H$],ty),Y$=Y([sr,mk,mse,U$],ck),gse=Y([wt,gk,sr,ir],P$),vse=Y([wt,gk,sr,ir],E$),yse=(e,t,r,n,a,o,i,s)=>{if(t){var{type:l}=t,c=ii(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,d=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return d=s==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Un(a[0]-a[1])*2*d:d,c&&i?i.map((f,p)=>({coordinate:n(f)+d,value:f,index:p,offset:d})):n.domain().map((f,p)=>({coordinate:n(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},fi=Y([wt,sr,mk,Y$,H$,gse,vse,ir],yse),vk=Y([N$,M$,Die],(e,t,r)=>T$(r.shared,e,t)),V$=e=>e.tooltip.settings.trigger,yk=e=>e.tooltip.settings.defaultIndex,Tf=Y([Yc,vk,V$,yk],$$),Hd=Y([Tf,Vc,Ef,Mf],hk),K$=Y([fi,Hd],j$),xse=Y([Tf],e=>{if(e)return e.dataKey});Y([Tf],e=>{if(e)return e.graphicalItemId});var q$=Y([Yc,vk,V$,yk],F$),bse=Y([si,li,wt,Er,fi,yk,q$,_f],L$),wse=Y([Tf,bse],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Sse=Y([Tf],e=>e.active),kse=Y([q$,Hd,ns,Ef,K$,_f,vk],z$),Cse=Y([kse],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function tD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(r),!0).forEach(function(n){Pse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pse(e,t,r){return(t=Ese(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ese(e){var t=Ose(e,"string");return typeof t=="symbol"?t:t+""}function Ose(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dse=()=>Me(sr),_se=()=>{var e=Dse(),t=Me(fi),r=Me(Y$);return Om(!e||!r?void 0:rD(rD({},e),{},{scale:r}),t)};function nD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nD(Object(r),!0).forEach(function(n){Nse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nse(e,t,r){return(t=Mse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mse(e){var t=Tse(e,"string");return typeof t=="symbol"?t:t+""}function Tse(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jse=(e,t,r,n)=>{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:a.coordinate}}return{x:0,y:0}},Ase=(e,t,r,n)=>{var a=t.find(c=>c&&c.index===r);if(a){if(e==="centric"){var o=a.coordinate,{radius:i}=n;return ml(ml(ml({},n),wr(n.cx,n.cy,i,o)),{},{angle:o,radius:i})}var s=a.coordinate,{angle:l}=n;return ml(ml(ml({},n),wr(n.cx,n.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Rse(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var G$=(e,t,r,n,a)=>{var o,i=-1,s=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?r[l-1].coordinate:r[s-1].coordinate,u=r[l].coordinate,d=l>=s-1?r[0].coordinate:r[l+1].coordinate,f=void 0;if(Un(u-c)!==Un(d-u)){var p=[];if(Un(d-u)===Un(a[1]-a[0])){f=d;var g=u+a[1]-a[0];p[0]=Math.min(g,(g+c)/2),p[1]=Math.max(g,(g+c)/2)}else{f=c;var y=d+a[1]-a[0];p[0]=Math.min(u,(y+u)/2),p[1]=Math.max(u,(y+u)/2)}var v=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>v[0]&&e<=v[1]||e>=p[0]&&e<=p[1]){({index:i}=r[l]);break}}else{var x=Math.min(c,d),w=Math.max(c,d);if(e>(x+u)/2&&e<=(w+u)/2){({index:i}=r[l]);break}}}else if(t){for(var b=0;b<s;b++)if(b===0&&e<=(t[b].coordinate+t[b+1].coordinate)/2||b>0&&b<s-1&&e>(t[b].coordinate+t[b-1].coordinate)/2&&e<=(t[b].coordinate+t[b+1].coordinate)/2||b===s-1&&e>(t[b].coordinate+t[b-1].coordinate)/2){({index:i}=t[b]);break}}return i},X$=()=>Me(XS),xk=(e,t)=>t,Q$=(e,t,r)=>r,bk=(e,t,r,n)=>n,Ise=Y(fi,e=>Nv(e,t=>t.coordinate)),wk=Y([Yc,xk,Q$,bk],$$),Sk=Y([wk,Vc,Ef,Mf],hk),$se=(e,t,r)=>{if(t!=null){var n=Yc(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},Z$=Y([Yc,xk,Q$,bk],F$),Gm=Y([si,li,wt,Er,fi,bk,Z$,_f],L$),Lse=Y([wk,Gm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),J$=Y([fi,Sk],j$),Fse=Y([Z$,Sk,ns,Ef,J$,_f,xk],z$),zse=Y([wk,Sk],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Bse=(e,t,r,n,a,o,i)=>{if(!(!e||!r||!n||!a)&&Rse(e,i)){var s=bee(e,t),l=G$(s,o,a,r,n),c=jse(t,a,l,e);return{activeIndex:String(l),activeCoordinate:c}}},Wse=(e,t,r,n,a,o,i)=>{if(!(!e||!n||!a||!o||!r)){var s=Ore(e,r);if(s){var l=wee(s,t),c=G$(l,i,o,n,a),u=Ase(t,o,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},Hse=(e,t,r,n,a,o,i,s)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?Bse(e,t,n,a,o,i,s):Wse(e,t,r,n,a,o,i)},Use=Y(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElementId:n.elementId}}),Yse=Y(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Wr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:Ooe}});function aD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aD(Object(r),!0).forEach(function(n){Vse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vse(e,t,r){return(t=Kse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kse(e){var t=qse(e,"string");return typeof t=="symbol"?t:t+""}function qse(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gse={},Xse={zIndexMap:Object.values(Wr).reduce((e,t)=>oD(oD({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),Gse)},Qse=new Set(Object.values(Wr));function Zse(e){return Qse.has(e)}var e5=un({name:"zIndex",initialState:Xse,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:Ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!Zse(r)&&delete e.zIndexMap[r])},prepare:Ot()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r,elementId:n,isPanorama:a}=t.payload;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElementId=n:e.zIndexMap[r].elementId=n:e.zIndexMap[r]={consumers:0,elementId:a?void 0:n,panoramaElementId:a?n:void 0}},prepare:Ot()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElementId=void 0:e.zIndexMap[r].elementId=void 0)},prepare:Ot()}}}),{registerZIndexPortal:Jse,unregisterZIndexPortal:ele,registerZIndexPortalId:tle,unregisterZIndexPortalId:rle}=e5.actions,nle=e5.reducer;function pi(e){var{zIndex:t,children:r}=e,n=Qee(),a=n&&t!==void 0&&t!==0,o=dn(),i=gr();m.useLayoutEffect(()=>a?(i(Jse({zIndex:t})),()=>{i(ele({zIndex:t}))}):pf,[i,t,a]);var s=Me(c=>Use(c,t,o));if(!a)return r;if(!s)return null;var l=document.getElementById(s);return l?Nc.createPortal(r,l):null}function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fb.apply(null,arguments)}function iD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iD(Object(r),!0).forEach(function(n){ale(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ale(e,t,r){return(t=ole(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ole(e){var t=ile(e,"string");return typeof t=="symbol"?t:t+""}function ile(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sle(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return m.isValidElement(t)?m.cloneElement(t,n):m.createElement(r,n)}function lle(e){var t,{coordinate:r,payload:n,index:a,offset:o,tooltipAxisBandSize:i,layout:s,cursor:l,tooltipEventType:c,chartName:u}=e,d=r,f=n,p=a;if(!l||!d||u!=="ScatterChart"&&c!=="axis")return null;var g,y,v;if(u==="ScatterChart")g=d,y=Fte,v=Wr.cursorLine;else if(u==="BarChart")g=zte(s,d,o,i),y=vre,v=Wr.cursorRectangle;else if(s==="radial"&&iA(d)){var{cx:x,cy:w,radius:b,startAngle:S,endAngle:k}=FR(d);g={cx:x,cy:w,startAngle:S,endAngle:k,innerRadius:b,outerRadius:b},y=Mre,v=Wr.cursorLine}else g={points:Tre(s,d,o)},y=dh,v=Wr.cursorLine;var P=typeof l=="object"&&"className"in l?l.className:void 0,E=Tp(Tp(Tp(Tp({stroke:"#ccc",pointerEvents:"none"},o),g),wv(l)),{},{payload:f,payloadIndex:p,className:le("recharts-tooltip-cursor",P)});return m.createElement(pi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:v},m.createElement(sle,{cursor:l,cursorComp:y,cursorProps:E}))}function cle(e){var t=_se(),r=kR(),n=yf(),a=X$();return t==null||r==null||n==null||a==null?null:m.createElement(lle,Fb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var t5=m.createContext(null),ule=()=>m.useContext(t5),r5={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new a(u,d||l,f),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function i(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,g=new Array(p);f<p;f++)g[f]=d[f].fn;return g},s.prototype.listenerCount=function(c){var u=r?r+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,g){var y=r?r+c:c;if(!this._events[y])return!1;var v=this._events[y],x=arguments.length,w,b;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,d),!0;case 4:return v.fn.call(v.context,u,d,f),!0;case 5:return v.fn.call(v.context,u,d,f,p),!0;case 6:return v.fn.call(v.context,u,d,f,p,g),!0}for(b=1,w=new Array(x-1);b<x;b++)w[b-1]=arguments[b];v.fn.apply(v.context,w)}else{var S=v.length,k;for(b=0;b<S;b++)switch(v[b].once&&this.removeListener(c,v[b].fn,void 0,!0),x){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,u);break;case 3:v[b].fn.call(v[b].context,u,d);break;case 4:v[b].fn.call(v[b].context,u,d,f);break;default:if(!w)for(k=1,w=new Array(x-1);k<x;k++)w[k-1]=arguments[k];v[b].fn.apply(v[b].context,w)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=r?r+c:c;if(!this._events[p])return this;if(!u)return i(this,p),this;var g=this._events[p];if(g.fn)g.fn===u&&(!f||g.once)&&(!d||g.context===d)&&i(this,p);else{for(var y=0,v=[],x=g.length;y<x;y++)(g[y].fn!==u||f&&!g[y].once||d&&g[y].context!==d)&&v.push(g[y]);v.length?this._events[p]=v.length===1?v[0]:v:i(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&i(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(r5);var dle=r5.exports;const fle=ti(dle);var Ud=new fle,zb="recharts.syncEvent.tooltip",sD="recharts.syncEvent.brush";function ple(e,t){if(t){var r=Number.parseInt(t,10);if(!Ma(r))return e==null?void 0:e[r]}}var hle={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},n5=un({name:"options",initialState:hle,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),mle=n5.reducer,{createEventEmitter:gle}=n5.actions;function vle(e){return e.tooltip.syncInteraction}var yle={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},a5=un({name:"chartData",initialState:yle,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:lD,setDataStartEndIndexes:xle,setComputedData:Hpe}=a5.actions,ble=a5.reducer,wle=["x","y"];function cD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cD(Object(r),!0).forEach(function(n){Sle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sle(e,t,r){return(t=kle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kle(e){var t=Cle(e,"string");return typeof t=="symbol"?t:t+""}function Cle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ple(e,t){if(e==null)return{};var r,n,a=Ele(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Ele(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ole(){var e=Me(QS),t=Me(ZS),r=gr(),n=Me(zI),a=Me(fi),o=yf(),i=Hv(),s=Me(l=>l.rootProps.className);m.useEffect(()=>{if(e==null)return pf;var l=(c,u,d)=>{if(t!==d&&e===c){if(n==="index"){var f;if(i&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate&&u.payload.sourceViewBox){var p=u.payload.coordinate,{x:g,y}=p,v=Ple(p,wle),{x,y:w,width:b,height:S}=u.payload.sourceViewBox,k=gl(gl({},v),{},{x:i.x+(b?(g-x)/b:0)*i.width,y:i.y+(S?(y-w)/S:0)*i.height});r(gl(gl({},u),{},{payload:gl(gl({},u.payload),{},{coordinate:k})}))}else r(u);return}if(a!=null){var P;if(typeof n=="function"){var E={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},O=n(a,E);P=a[O]}else n==="value"&&(P=a.find(A=>String(A.value)===u.payload.label));var{coordinate:D}=u.payload;if(P==null||u.payload.active===!1||D==null||i==null){r($b({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:N,y:_}=D,C=Math.min(N,i.x+i.width),M=Math.min(_,i.y+i.height),T={x:o==="horizontal"?P.coordinate:C,y:o==="horizontal"?M:P.coordinate},j=$b({active:u.payload.active,coordinate:T,dataKey:u.payload.dataKey,index:String(P.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r(j)}}};return Ud.on(zb,l),()=>{Ud.off(zb,l)}},[s,r,t,e,n,a,o,i])}function Dle(){var e=Me(QS),t=Me(ZS),r=gr();m.useEffect(()=>{if(e==null)return pf;var n=(a,o,i)=>{t!==i&&e===a&&r(xle(o))};return Ud.on(sD,n),()=>{Ud.off(sD,n)}},[r,t,e])}function _le(){var e=gr();m.useEffect(()=>{e(gle())},[e]),Ole(),Dle()}function Nle(e,t,r,n,a,o){var i=Me(p=>$se(p,e,t)),s=Me(ZS),l=Me(QS),c=Me(zI),u=Me(vle),d=u==null?void 0:u.active,f=Hv();m.useEffect(()=>{if(!d&&l!=null&&s!=null){var p=$b({active:o,coordinate:r,dataKey:i,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:f,graphicalItemId:void 0});Ud.emit(zb,l,p,s)}},[d,r,i,a,n,s,l,c,o,f])}function uD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uD(Object(r),!0).forEach(function(n){Mle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mle(e,t,r){return(t=Tle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tle(e){var t=jle(e,"string");return typeof t=="symbol"?t:t+""}function jle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ale(e){return e.dataKey}function Rle(e,t){return m.isValidElement(e)?m.cloneElement(e,t):typeof e=="function"?m.createElement(e,t):m.createElement(yte,t)}var fD=[],Ile={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function $le(e){var t,r,n=An(e,Ile),{active:a,allowEscapeViewBox:o,animationDuration:i,animationEasing:s,content:l,filterNull:c,isAnimationActive:u,offset:d,payloadUniqBy:f,position:p,reverseDirection:g,useTranslate3d:y,wrapperStyle:v,cursor:x,shared:w,trigger:b,defaultIndex:S,portal:k,axisId:P}=n,E=gr(),O=typeof S=="number"?String(S):S;m.useEffect(()=>{E(jie({shared:w,trigger:b,axisId:P,active:a,defaultIndex:O}))},[E,w,b,P,a,O]);var D=Hv(),N=jR(),_=Oie(w),{activeIndex:C,isActive:M}=(t=Me(q=>zse(q,_,b,O)))!==null&&t!==void 0?t:{},T=Me(q=>Fse(q,_,b,O)),j=Me(q=>J$(q,_,b,O)),A=Me(q=>Lse(q,_,b,O)),L=T,I=ule(),$=(r=a??M)!==null&&r!==void 0?r:!1,[z,V]=iJ([L,$]),F=_==="axis"?j:void 0;Nle(_,b,A,F,C,$);var ne=k??I;if(ne==null||D==null||_==null)return null;var ee=L??fD;$||(ee=fD),c&&ee.length&&(ee=CZ(ee.filter(q=>q.value!=null&&(q.hide!==!0||n.includeHidden)),f,Ale));var X=ee.length>0,fe=m.createElement(Pte,{allowEscapeViewBox:o,animationDuration:i,animationEasing:s,isAnimationActive:u,active:$,coordinate:A,hasPayload:X,offset:d,position:p,reverseDirection:g,useTranslate3d:y,viewBox:D,wrapperStyle:v,lastBoundingBox:z,innerRef:V,hasPortalFromProps:!!k},Rle(l,dD(dD({},n),{},{payload:ee,label:F,active:$,activeIndex:C,coordinate:A,accessibilityLayer:N})));return m.createElement(m.Fragment,null,Nc.createPortal(fe,ne),$&&m.createElement(cle,{cursor:x,tooltipEventType:_,coordinate:A,payload:ee,index:C}))}function Lle(e,t,r){return(t=Fle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fle(e){var t=zle(e,"string");return typeof t=="symbol"?t:t+""}function zle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ble{constructor(t){Lle(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function pD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wle(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pD(Object(r),!0).forEach(function(n){Hle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hle(e,t,r){return(t=Ule(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ule(e){var t=Yle(e,"string");return typeof t=="symbol"?t:t+""}function Yle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vle={cacheSize:2e3,enableCache:!0},o5=Wle({},Vle),hD=new Ble(o5.cacheSize),Kle={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},mD="recharts_measurement_span";function qle(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",i=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(i,"|").concat(s)}var gD=(e,t)=>{try{var r=document.getElementById(mD);r||(r=document.createElement("span"),r.setAttribute("id",mD),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,Kle,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},ed=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Lc.isSsr)return{width:0,height:0};if(!o5.enableCache)return gD(t,r);var n=qle(t,r),a=hD.get(n);if(a)return a;var o=gD(t,r);return hD.set(n,o),o},vD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,yD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Gle=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Xle=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,i5={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Qle=Object.keys(i5),jl="NaN";function Zle(e,t){return e*i5[t]}class Gr{static parse(t){var r,[,n,a]=(r=Xle.exec(t))!==null&&r!==void 0?r:[];return new Gr(parseFloat(n),a??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Ma(t)&&(this.unit=""),r!==""&&!Gle.test(r)&&(this.num=NaN,this.unit=""),Qle.includes(r)&&(this.num=Zle(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Gr(NaN,""):new Gr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Gr(NaN,""):new Gr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gr(NaN,""):new Gr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gr(NaN,""):new Gr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ma(this.num)}}function s5(e){if(e.includes(jl))return jl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,a,o]=(r=vD.exec(t))!==null&&r!==void 0?r:[],i=Gr.parse(n??""),s=Gr.parse(o??""),l=a==="*"?i.multiply(s):i.divide(s);if(l.isNaN())return jl;t=t.replace(vD,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=yD.exec(t))!==null&&c!==void 0?c:[],p=Gr.parse(u??""),g=Gr.parse(f??""),y=d==="+"?p.add(g):p.subtract(g);if(y.isNaN())return jl;t=t.replace(yD,y.toString())}return t}var xD=/\(([^()]*)\)/;function Jle(e){for(var t=e,r;(r=xD.exec(t))!=null;){var[,n]=r;t=t.replace(xD,s5(n))}return t}function ece(e){var t=e.replace(/\s+/g,"");return t=Jle(t),t=s5(t),t}function tce(e){try{return ece(e)}catch{return jl}}function x0(e){var t=tce(e.slice(5,-1));return t===jl?"":t}var rce=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],nce=["dx","dy","angle","className","breakAll"];function Bb(){return Bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bb.apply(null,arguments)}function bD(e,t){if(e==null)return{};var r,n,a=ace(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function ace(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var l5=/[ \f\n\r\t\v\u2028\u2029]+/,c5=e=>{var{children:t,breakAll:r,style:n}=e;try{var a=[];kr(t)||(r?a=t.toString().split(""):a=t.toString().split(l5));var o=a.map(s=>({word:s,width:ed(s,n).width})),i=r?0:ed(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:i}}catch{return null}};function oce(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var u5=(e,t,r,n)=>e.reduce((a,o)=>{var{word:i,width:s}=o,l=a[a.length-1];if(l&&s!=null&&(t==null||n||l.width+s+r<Number(t)))l.words.push(i),l.width+=s+r;else{var c={words:[i],width:s};a.push(c)}return a},[]),d5=e=>e.reduce((t,r)=>t.width>r.width?t:r),ice="…",wD=(e,t,r,n,a,o,i,s)=>{var l=e.slice(0,t),c=c5({breakAll:r,style:n,children:l+ice});if(!c)return[!1,[]];var u=u5(c.wordsWithComputedWidth,o,i,s),d=u.length>a||d5(u).width>Number(o);return[d,u]},sce=(e,t,r,n,a)=>{var{maxLines:o,children:i,style:s,breakAll:l}=e,c=_e(o),u=String(i),d=u5(t,n,r,a);if(!c||a)return d;var f=d.length>o||d5(d).width>Number(n);if(!f)return d;for(var p=0,g=u.length-1,y=0,v;p<=g&&y<=u.length-1;){var x=Math.floor((p+g)/2),w=x-1,[b,S]=wD(u,w,l,s,o,n,r,a),[k]=wD(u,x,l,s,o,n,r,a);if(!b&&!k&&(p=x+1),b&&k&&(g=x-1),!b&&k){v=S;break}y++}return v||d},SD=e=>{var t=kr(e)?[]:e.toString().split(l5);return[{words:t,width:void 0}]},lce=e=>{var{width:t,scaleToFit:r,children:n,style:a,breakAll:o,maxLines:i}=e;if((t||r)&&!Lc.isSsr){var s,l,c=c5({breakAll:o,children:n,style:a});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return SD(n);return sce({breakAll:o,children:n,maxLines:i,style:a},s,l,t,!!r)}return SD(n)},f5="#808080",cce={angle:0,breakAll:!1,capHeight:"0.71em",fill:f5,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},kk=m.forwardRef((e,t)=>{var r=An(e,cce),{x:n,y:a,lineHeight:o,capHeight:i,fill:s,scaleToFit:l,textAnchor:c,verticalAnchor:u}=r,d=bD(r,rce),f=m.useMemo(()=>lce({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:l,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,l,d.style,d.width]),{dx:p,dy:g,angle:y,className:v,breakAll:x}=d,w=bD(d,nce);if(!co(n)||!co(a)||f.length===0)return null;var b=Number(n)+(_e(p)?p:0),S=Number(a)+(_e(g)?g:0);if(!Ht(b)||!Ht(S))return null;var k;switch(u){case"start":k=x0("calc(".concat(i,")"));break;case"middle":k=x0("calc(".concat((f.length-1)/2," * -").concat(o," + (").concat(i," / 2))"));break;default:k=x0("calc(".concat(f.length-1," * -").concat(o,")"));break}var P=[];if(l){var E=f[0].width,{width:O}=d;P.push("scale(".concat(_e(O)&&_e(E)?O/E:1,")"))}return y&&P.push("rotate(".concat(y,", ").concat(b,", ").concat(S,")")),P.length&&(w.transform=P.join(" ")),m.createElement("text",Bb({},ta(w),{ref:t,x:b,y:S,className:le("recharts-text",v),textAnchor:c,fill:s.includes("url")?f5:s}),f.map((D,N)=>{var _=D.words.join(x?"":" ");return m.createElement("tspan",{x:b,dy:N===0?k:o,key:"".concat(_,"-").concat(N)},_)}))});kk.displayName="Text";var uce=["labelRef"];function dce(e,t){if(e==null)return{};var r,n,a=fce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fce(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kD(Object(r),!0).forEach(function(n){pce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pce(e,t,r){return(t=hce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hce(e){var t=mce(e,"string");return typeof t=="symbol"?t:t+""}function mce(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Co.apply(null,arguments)}var p5=m.createContext(null),gce=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:i,children:s}=e,l=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:i}),[t,r,n,a,o,i]);return m.createElement(p5.Provider,{value:l},s)},h5=()=>{var e=m.useContext(p5),t=Hv();return e||SR(t)},vce=m.createContext(null),yce=()=>{var e=m.useContext(vce),t=Me(YI);return e||t},xce=e=>{var{value:t,formatter:r}=e,n=kr(e.children)?t:e.children;return typeof r=="function"?r(n):n},Ck=e=>e!=null&&typeof e=="function",bce=(e,t)=>{var r=Un(t-e),n=Math.min(Math.abs(t-e),360);return r*n},wce=(e,t,r,n,a)=>{var{offset:o,className:i}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=a,g=(c+u)/2,y=bce(d,f),v=y>=0?1:-1,x,w;switch(t){case"insideStart":x=d+v*o,w=p;break;case"insideEnd":x=f-v*o,w=!p;break;case"end":x=f+v*o,w=p;break;default:throw new Error("Unsupported position ".concat(t))}w=y<=0?w:!w;var b=wr(s,l,g,x),S=wr(s,l,g,x+(w?1:-1)*359),k="M".concat(b.x,",").concat(b.y,`
A`).concat(g,",").concat(g,",0,1,").concat(w?0:1,`,
`).concat(S.x,",").concat(S.y),P=kr(e.id)?Nd("recharts-radial-line-"):e.id;return m.createElement("text",Co({},n,{dominantBaseline:"central",className:le("recharts-radial-bar-label",i)}),m.createElement("defs",null,m.createElement("path",{id:P,d:k})),m.createElement("textPath",{xlinkHref:"#".concat(P)},r))},Sce=(e,t,r)=>{var{cx:n,cy:a,innerRadius:o,outerRadius:i,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(r==="outside"){var{x:u,y:d}=wr(n,a,i+t,c);return{x:u,y:d,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=(o+i)/2,{x:p,y:g}=wr(n,a,f,c);return{x:p,y:g,textAnchor:"middle",verticalAnchor:"middle"}},Wb=e=>"cx"in e&&_e(e.cx),kce=(e,t)=>{var{parentViewBox:r,offset:n,position:a}=e,o;r!=null&&!Wb(r)&&(o=r);var{x:i,y:s,upperWidth:l,lowerWidth:c,height:u}=t,d=i,f=i+(l-c)/2,p=(d+f)/2,g=(l+c)/2,y=d+l/2,v=u>=0?1:-1,x=v*n,w=v>0?"end":"start",b=v>0?"start":"end",S=l>=0?1:-1,k=S*n,P=S>0?"end":"start",E=S>0?"start":"end";if(a==="top"){var O={x:d+l/2,y:s-x,textAnchor:"middle",verticalAnchor:w};return Ut(Ut({},O),o?{height:Math.max(s-o.y,0),width:l}:{})}if(a==="bottom"){var D={x:f+c/2,y:s+u+x,textAnchor:"middle",verticalAnchor:b};return Ut(Ut({},D),o?{height:Math.max(o.y+o.height-(s+u),0),width:c}:{})}if(a==="left"){var N={x:p-k,y:s+u/2,textAnchor:P,verticalAnchor:"middle"};return Ut(Ut({},N),o?{width:Math.max(N.x-o.x,0),height:u}:{})}if(a==="right"){var _={x:p+g+k,y:s+u/2,textAnchor:E,verticalAnchor:"middle"};return Ut(Ut({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:u}:{})}var C=o?{width:g,height:u}:{};return a==="insideLeft"?Ut({x:p+k,y:s+u/2,textAnchor:E,verticalAnchor:"middle"},C):a==="insideRight"?Ut({x:p+g-k,y:s+u/2,textAnchor:P,verticalAnchor:"middle"},C):a==="insideTop"?Ut({x:d+l/2,y:s+x,textAnchor:"middle",verticalAnchor:b},C):a==="insideBottom"?Ut({x:f+c/2,y:s+u-x,textAnchor:"middle",verticalAnchor:w},C):a==="insideTopLeft"?Ut({x:d+k,y:s+x,textAnchor:E,verticalAnchor:b},C):a==="insideTopRight"?Ut({x:d+l-k,y:s+x,textAnchor:P,verticalAnchor:b},C):a==="insideBottomLeft"?Ut({x:f+k,y:s+u-x,textAnchor:E,verticalAnchor:w},C):a==="insideBottomRight"?Ut({x:f+c-k,y:s+u-x,textAnchor:P,verticalAnchor:w},C):a&&typeof a=="object"&&(_e(a.x)||Go(a.x))&&(_e(a.y)||Go(a.y))?Ut({x:i+qi(a.x,g),y:s+qi(a.y,u),textAnchor:"end",verticalAnchor:"end"},C):Ut({x:y,y:s+u/2,textAnchor:"middle",verticalAnchor:"middle"},C)},Cce={angle:0,offset:5,zIndex:Wr.label,position:"middle",textBreakAll:!1};function Si(e){var t=An(e,Cce),{viewBox:r,position:n,value:a,children:o,content:i,className:s="",textBreakAll:l,labelRef:c}=t,u=yce(),d=h5(),f=n==="center"?d:u??d,p,g,y;if(r==null?p=f:Wb(r)?p=r:p=SR(r),!p||kr(a)&&kr(o)&&!m.isValidElement(i)&&typeof i!="function")return null;var v=Ut(Ut({},t),{},{viewBox:p});if(m.isValidElement(i)){var{labelRef:x}=v,w=dce(v,uce);return m.cloneElement(i,w)}if(typeof i=="function"){if(g=m.createElement(i,v),m.isValidElement(g))return g}else g=xce(t);var b=ta(t);if(Wb(p)){if(n==="insideStart"||n==="insideEnd"||n==="end")return wce(t,n,g,b,p);y=Sce(p,t.offset,t.position)}else y=kce(t,p);return m.createElement(pi,{zIndex:t.zIndex},m.createElement(kk,Co({ref:c,className:le("recharts-label",s)},b,y,{textAnchor:oce(b.textAnchor)?b.textAnchor:y.textAnchor,breakAll:l}),g))}Si.displayName="Label";var Pce=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(Si,Co({key:"label-implicit"},n)):co(e)?m.createElement(Si,Co({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===Si?m.cloneElement(e,Ut({key:"label-implicit"},n)):m.createElement(Si,Co({key:"label-implicit",content:e},n)):Ck(e)?m.createElement(Si,Co({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(Si,Co({},e,{key:"label-implicit"},n)):null};function Ece(e){var{label:t,labelRef:r}=e,n=h5();return Pce(t,n,r)||null}var m5={},g5={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(g5);var v5={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(v5);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g5,r=v5,n=Dv;function a(o){if(n.isArrayLike(o))return t.last(r.toArray(o))}e.last=a})(m5);var Oce=m5.last;const Dce=ti(Oce);var _ce=["valueAccessor"],Nce=["dataKey","clockWise","id","textBreakAll","zIndex"];function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xm.apply(null,arguments)}function CD(e,t){if(e==null)return{};var r,n,a=Mce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Mce(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Tce=e=>Array.isArray(e.value)?Dce(e.value):e.value,y5=m.createContext(void 0),jce=y5.Provider,x5=m.createContext(void 0);x5.Provider;function Ace(){return m.useContext(y5)}function Rce(){return m.useContext(x5)}function ph(e){var{valueAccessor:t=Tce}=e,r=CD(e,_ce),{dataKey:n,clockWise:a,id:o,textBreakAll:i,zIndex:s}=r,l=CD(r,Nce),c=Ace(),u=Rce(),d=c||u;return!d||!d.length?null:m.createElement(pi,{zIndex:s??Wr.label},m.createElement(lo,{className:"recharts-label-list"},d.map((f,p)=>{var g,y=kr(n)?t(f,p):Ir(f&&f.payload,n),v=kr(o)?{}:{id:"".concat(o,"-").concat(p)};return m.createElement(Si,Xm({key:"label-".concat(p)},ta(f),l,v,{fill:(g=r.fill)!==null&&g!==void 0?g:f.fill,parentViewBox:f.parentViewBox,value:y,textBreakAll:i,viewBox:f.viewBox,index:p,zIndex:0}))})))}ph.displayName="LabelList";function Ice(e){var{label:t}=e;return t?t===!0?m.createElement(ph,{key:"labelList-implicit"}):m.isValidElement(t)||Ck(t)?m.createElement(ph,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(ph,Xm({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hb.apply(null,arguments)}var b5=e=>{var{cx:t,cy:r,r:n,className:a}=e,o=le("recharts-dot",a);return _e(t)&&_e(r)&&_e(n)?m.createElement("circle",Hb({},Na(e),eS(e),{className:o,cx:t,cy:r,r:n})):null},$ce={radiusAxis:{},angleAxis:{}},w5=un({name:"polarAxis",initialState:$ce,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Upe,removeRadiusAxis:Ype,addAngleAxis:Vpe,removeAngleAxis:Kpe}=w5.actions,Lce=w5.reducer,S5=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function Fce(e){var{tooltipEntrySettings:t}=e,r=gr(),n=dn(),a=m.useRef(null);return m.useLayoutEffect(()=>{n||(a.current===null?r(Nie(t)):a.current!==t&&r(Mie({prev:a.current,next:t})),a.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{a.current&&(r(Tie(a.current)),a.current=null)},[r]),null}function zce(e){var{legendPayload:t}=e,r=gr(),n=dn(),a=m.useRef(null);return m.useLayoutEffect(()=>{n||(a.current===null?r(ute(t)):a.current!==t&&r(dte({prev:a.current,next:t})),a.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{a.current&&(r(fte(a.current)),a.current=null)},[r]),null}var b0,Bce=()=>{var[e]=m.useState(()=>Nd("uid-"));return e},Wce=(b0=ql.useId)!==null&&b0!==void 0?b0:Bce;function k5(e,t){var r=Wce();return t||(e?"".concat(e,"-").concat(r):r)}var Hce=m.createContext(void 0),Uce=e=>{var{id:t,type:r,children:n}=e,a=k5("recharts-".concat(r),t);return m.createElement(Hce.Provider,{value:a},n(a))},Yce={cartesianItems:[],polarItems:[]},C5=un({name:"graphicalItems",initialState:Yce,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Ot()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,a=Oa(e).cartesianItems.indexOf(r);a>-1&&(e.cartesianItems[a]=n)},prepare:Ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=Oa(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Ot()},removePolarGraphicalItem:{reducer(e,t){var r=Oa(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Ot()}}}),{addCartesianGraphicalItem:Vce,replaceCartesianGraphicalItem:Kce,removeCartesianGraphicalItem:qce,addPolarGraphicalItem:qpe,removePolarGraphicalItem:Gpe}=C5.actions,Gce=C5.reducer,Xce=e=>{var t=gr(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(Vce(e)):r.current!==e&&t(Kce({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(qce(r.current)),r.current=null)},[t]),null},Qce=m.memo(Xce),Zce=["points"];function PD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function w0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PD(Object(r),!0).forEach(function(n){Jce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jce(e,t,r){return(t=eue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eue(e){var t=tue(e,"string");return typeof t=="symbol"?t:t+""}function tue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qm(){return Qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qm.apply(null,arguments)}function rue(e,t){if(e==null)return{};var r,n,a=nue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function nue(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function aue(e){var{option:t,dotProps:r,className:n}=e;if(m.isValidElement(t))return m.cloneElement(t,r);if(typeof t=="function")return t(r);var a=le(n,typeof t!="boolean"?t.className:""),o=r??{},{points:i}=o,s=rue(o,Zce);return m.createElement(b5,Qm({},s,{className:a}))}function oue(e,t){return e==null?!1:t?!0:e.length===1}function iue(e){var{points:t,dot:r,className:n,dotClassName:a,dataKey:o,baseProps:i,needClip:s,clipPathId:l,zIndex:c=Wr.scatter}=e;if(!oue(t,r))return null;var u=S5(r),d=FQ(r),f=t.map((g,y)=>{var v,x,w=w0(w0(w0({r:3},i),d),{},{index:y,cx:(v=g.x)!==null&&v!==void 0?v:void 0,cy:(x=g.y)!==null&&x!==void 0?x:void 0,dataKey:o,value:g.value,payload:g.payload,points:t});return m.createElement(aue,{key:"dot-".concat(y),option:r,dotProps:w,className:a})}),p={};return s&&l!=null&&(p.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(l,")")),m.createElement(pi,{zIndex:c},m.createElement(lo,Qm({className:n},p),f))}function ED(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(r),!0).forEach(function(n){sue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ED(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sue(e,t,r){return(t=lue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lue(e){var t=cue(e,"string");return typeof t=="symbol"?t:t+""}function cue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uue={xAxis:{},yAxis:{},zAxis:{}},P5=un({name:"cartesianAxis",initialState:uue,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Ot()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:Ot()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Ot()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Ot()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:Ot()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Ot()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Ot()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:Ot()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Ot()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,a=e.yAxis[r];if(a){var o=a.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==a.width&&Math.abs(n-o[0])<=1)return;var i=[...o,n].slice(-3);e.yAxis[r]=OD(OD({},e.yAxis[r]),{},{width:n,widthHistory:i})}}}}),{addXAxis:due,replaceXAxis:fue,removeXAxis:pue,addYAxis:hue,replaceYAxis:mue,removeYAxis:gue,addZAxis:Xpe,replaceZAxis:Qpe,removeZAxis:Zpe,updateYAxisWidth:vue}=P5.actions,yue=P5.reducer,xue=Y([Er],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),bue=Y([xue,si,li],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Pk=()=>Me(bue),wue=()=>Me(Cse);function DD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function S0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DD(Object(r),!0).forEach(function(n){Sue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sue(e,t,r){return(t=kue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kue(e){var t=Cue(e,"string");return typeof t=="symbol"?t:t+""}function Cue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pue=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:a,dataKey:o,clipPath:i}=e;if(a===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},l=S0(S0(S0({},s),wv(a)),eS(a)),c;return m.isValidElement(a)?c=m.cloneElement(a,l):typeof a=="function"?c=a(l):c=m.createElement(b5,l),m.createElement(lo,{className:"recharts-active-dot",clipPath:i},c)};function _D(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:a,clipPath:o,zIndex:i=Wr.activeDot}=e,s=Me(Hd),l=wue();if(t==null||l==null)return null;var c=t.find(u=>l.includes(u.payload));return kr(c)?null:m.createElement(pi,{zIndex:i},m.createElement(Pue,{point:c,childIndex:Number(s),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var Eue={},E5=un({name:"errorBars",initialState:Eue,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:a}=t.payload;e[r]&&(e[r]=e[r].map(o=>o.dataKey===n.dataKey&&o.direction===n.direction?a:o))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(a=>a.dataKey!==n.dataKey||a.direction!==n.direction))}}}),{addErrorBar:Jpe,replaceErrorBar:ehe,removeErrorBar:the}=E5.actions,Oue=E5.reducer;function O5(e,t){var r,n,a=Me(c=>ui(c,e)),o=Me(c=>di(c,t)),i=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:cr.allowDataOverflow,s=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:ur.allowDataOverflow,l=i||s;return{needClip:l,needClipX:i,needClipY:s}}function Due(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,a=Pk(),{needClipX:o,needClipY:i,needClip:s}=O5(t,r);if(!s||!a)return null;var{x:l,y:c,width:u,height:d}=a;return m.createElement("clipPath",{id:"clipPath-".concat(n)},m.createElement("rect",{x:o?l:l-u/2,y:i?c:c-d/2,width:o?u:u*2,height:i?d:d*2}))}var _ue={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jf=m;function Nue(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mue=typeof Object.is=="function"?Object.is:Nue,Tue=jf.useSyncExternalStore,jue=jf.useRef,Aue=jf.useEffect,Rue=jf.useMemo,Iue=jf.useDebugValue;_ue.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var o=jue(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=Rue(function(){function l(p){if(!c){if(c=!0,u=p,p=n(p),a!==void 0&&i.hasValue){var g=i.value;if(a(g,p))return d=g}return d=p}if(g=d,Mue(u,p))return g;var y=n(p);return a!==void 0&&a(g,y)?(u=p,g):(u=p,d=y)}var c=!1,u,d,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,n,a]);var s=Tue(e,o[0],o[1]);return Aue(function(){i.hasValue=!0,i.value=s},[s]),Iue(s),s};function $ue(e){e()}function Lue(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$ue(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var ND={notify(){},get:()=>[]};function Fue(e,t){let r,n=ND,a=0,o=!1;function i(y){u();const v=n.subscribe(y);let x=!1;return()=>{x||(x=!0,v(),d())}}function s(){n.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return o}function u(){a++,r||(r=e.subscribe(l),n=Lue())}function d(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=ND)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const g={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>n};return g}var zue=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bue=zue(),Wue=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Hue=Wue(),Uue=()=>Bue||Hue?m.useLayoutEffect:m.useEffect,Yue=Uue();function MD(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Vue(e,t){if(MD(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(t,r[a])||!MD(e[r[a]],t[r[a]]))return!1;return!0}var k0=Symbol.for("react-redux-context"),C0=typeof globalThis<"u"?globalThis:{};function Kue(){if(!m.createContext)return{};const e=C0[k0]??(C0[k0]=new Map);let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var que=Kue();function Gue(e){const{children:t,context:r,serverState:n,store:a}=e,o=m.useMemo(()=>{const l=Fue(a);return{store:a,subscription:l,getServerState:n?()=>n:void 0}},[a,n]),i=m.useMemo(()=>a.getState(),[a]);Yue(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==a.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,i]);const s=r||que;return m.createElement(s.Provider,{value:o},t)}var Xue=Gue,Que=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle"]);function Zue(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ek(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Que.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Vue(e[n],t[n]))return!1}else if(!Zue(e[n],t[n]))return!1;return!0}var Jue=e=>{var{chartData:t}=e,r=gr(),n=dn();return m.useEffect(()=>n?()=>{}:(r(lD(t)),()=>{r(lD(void 0))}),[t,r,n]),null},TD={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},D5=un({name:"brush",initialState:TD,reducers:{setBrushSettings(e,t){return t.payload==null?TD:t.payload}}}),{setBrushSettings:rhe}=D5.actions,ede=D5.reducer;function tde(e,t,r){return(t=rde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rde(e){var t=nde(e,"string");return typeof t=="symbol"?t:t+""}function nde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ok{static create(t){return new Ok(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(r){var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],a=r[r.length-1];return n<=a?t>=n&&t<=a:t>=a&&t<=n}}tde(Ok,"EPS",1e-4);function ade(e){return(e%180+180)%180}var ode=function(t){var{width:r,height:n}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=ade(a),i=o*Math.PI/180,s=Math.atan(n/r),l=i>s&&i<Math.PI-s?n/Math.sin(i):r/Math.cos(i);return Math.abs(l)},ide={dots:[],areas:[],lines:[]},_5=un({name:"referenceElements",initialState:ide,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Oa(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Oa(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Oa(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:nhe,removeDot:ahe,addArea:ohe,removeArea:ihe,addLine:she,removeLine:lhe}=_5.actions,sde=_5.reducer,lde=m.createContext(void 0),cde=e=>{var{children:t}=e,[r]=m.useState("".concat(Nd("recharts"),"-clip")),n=Pk();if(n==null)return null;var{x:a,y:o,width:i,height:s}=n;return m.createElement(lde.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:a,y:o,height:s,width:i}))),t)};function N5(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t)r.push(e[n]);return r}function ude(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return ode(n,r)}function dde(e,t,r){var n=r==="width",{x:a,y:o,width:i,height:s}=e;return t===1?{start:n?a:o,end:n?a+i:o+s}:{start:n?a+i:o+s,end:n?a:o}}function Zm(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function fde(e,t){return N5(e,t+1)}function pde(e,t,r,n,a){for(var o=(n||[]).slice(),{start:i,end:s}=t,l=0,c=1,u=i,d=function(){var g=n==null?void 0:n[l];if(g===void 0)return{v:N5(n,c)};var y=l,v,x=()=>(v===void 0&&(v=r(g,y)),v),w=g.coordinate,b=l===0||Zm(e,w,x,u,s);b||(l=0,u=i,c+=1),b&&(u=w+e*(x()/2+a),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function jD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(r),!0).forEach(function(n){hde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hde(e,t,r){return(t=mde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mde(e){var t=gde(e,"string");return typeof t=="symbol"?t:t+""}function gde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vde(e,t,r,n,a){for(var o=(n||[]).slice(),i=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],g,y=()=>(g===void 0&&(g=r(p,f)),g);if(f===i-1){var v=e*(p.coordinate+e*y()/2-l);o[f]=p=Mr(Mr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else o[f]=p=Mr(Mr({},p),{},{tickCoord:p.coordinate});if(p.tickCoord!=null){var x=Zm(e,p.tickCoord,y,s,l);x&&(l=p.tickCoord-e*(y()/2+a),o[f]=Mr(Mr({},p),{},{isShow:!0}))}},u=i-1;u>=0;u--)c(u);return o}function yde(e,t,r,n,a,o){var i=(n||[]).slice(),s=i.length,{start:l,end:c}=t;if(o){var u=n[s-1],d=r(u,s-1),f=e*(u.coordinate+e*d/2-c);if(i[s-1]=u=Mr(Mr({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null){var p=Zm(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+a),i[s-1]=Mr(Mr({},u),{},{isShow:!0}))}}for(var g=o?s-1:s,y=function(w){var b=i[w],S,k=()=>(S===void 0&&(S=r(b,w)),S);if(w===0){var P=e*(b.coordinate-e*k()/2-l);i[w]=b=Mr(Mr({},b),{},{tickCoord:P<0?b.coordinate-P*e:b.coordinate})}else i[w]=b=Mr(Mr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var E=Zm(e,b.tickCoord,k,l,c);E&&(l=b.tickCoord+e*(k()/2+a),i[w]=Mr(Mr({},b),{},{isShow:!0}))}},v=0;v<g;v++)y(v);return i}function Dk(e,t,r){var{tick:n,ticks:a,viewBox:o,minTickGap:i,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!a||!a.length||!n)return[];if(_e(l)||Lc.isSsr){var f;return(f=fde(a,_e(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],g=s==="top"||s==="bottom"?"width":"height",y=u&&g==="width"?ed(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=(b,S)=>{var k=typeof c=="function"?c(b.value,S):b.value;return g==="width"?ude(ed(k,{fontSize:t,letterSpacing:r}),y,d):ed(k,{fontSize:t,letterSpacing:r})[g]},x=a.length>=2?Un(a[1].coordinate-a[0].coordinate):1,w=dde(o,x,g);return l==="equidistantPreserveStart"?pde(x,w,v,a,i):(l==="preserveStart"||l==="preserveStartEnd"?p=yde(x,w,v,a,i,l==="preserveStartEnd"):p=vde(x,w,v,a,i),p.filter(b=>b.isShow))}var xde=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:a=0,tickMargin:o=0}=e,i=0;if(t){Array.from(t).forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>i&&(i=d.width)}});var s=r?r.getBoundingClientRect().width:0,l=a+o,c=i+l+s+(r?n:0);return Math.round(c)}return 0},bde=["axisLine","width","height","className","hide","ticks","axisType"];function wde(e,t){if(e==null)return{};var r,n,a=Sde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Sde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gs.apply(null,arguments)}function AD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AD(Object(r),!0).forEach(function(n){kde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kde(e,t,r){return(t=Cde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cde(e){var t=Pde(e,"string");return typeof t=="symbol"?t:t+""}function Pde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Io={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Wr.axis};function Ede(e){var{x:t,y:r,width:n,height:a,orientation:o,mirror:i,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Xt(Xt(Xt({},l),Na(s)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!i||o==="bottom"&&i);c=Xt(Xt({},c),{},{x1:t,y1:r+u*a,x2:t+n,y2:r+u*a})}else{var d=+(o==="left"&&!i||o==="right"&&i);c=Xt(Xt({},c),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+a})}return m.createElement("line",Gs({},c,{className:le("recharts-cartesian-axis-line",Ov(s,"className"))}))}function Ode(e,t,r,n,a,o,i,s,l){var c,u,d,f,p,g,y=s?-1:1,v=e.tickSize||i,x=_e(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=r+ +!s*a,d=f-y*v,g=d-y*l,p=x;break;case"left":d=f=e.coordinate,u=t+ +!s*n,c=u-y*v,p=c-y*l,g=x;break;case"right":d=f=e.coordinate,u=t+ +s*n,c=u+y*v,p=c+y*l,g=x;break;default:c=u=e.coordinate,f=r+ +s*a,d=f+y*v,g=d+y*l,p=x;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:g}}}function Dde(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function _de(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Nde(e){var{option:t,tickProps:r,value:n}=e,a,o=le(r.className,"recharts-cartesian-axis-tick-value");if(m.isValidElement(t))a=m.cloneElement(t,Xt(Xt({},r),{},{className:o}));else if(typeof t=="function")a=t(Xt(Xt({},r),{},{className:o}));else{var i="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(i=le(i,t==null?void 0:t.className)),a=m.createElement(kk,Gs({},r,{className:i}),n)}return a}var Mde=m.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:a,stroke:o,tickFormatter:i,unit:s,padding:l,tickTextProps:c,orientation:u,mirror:d,x:f,y:p,width:g,height:y,tickSize:v,tickMargin:x,fontSize:w,letterSpacing:b,getTicksConfig:S,events:k,axisType:P}=e,E=Dk(Xt(Xt({},S),{},{ticks:r}),w,b),O=Dde(u,d),D=_de(u,d),N=Na(S),_=wv(n),C={};typeof a=="object"&&(C=a);var M=Xt(Xt({},N),{},{fill:"none"},C),T=E.map(L=>Xt({entry:L},Ode(L,f,p,g,y,u,v,d,x))),j=T.map(L=>{var{entry:I,line:$}=L;return m.createElement(lo,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(I.value,"-").concat(I.coordinate,"-").concat(I.tickCoord)},a&&m.createElement("line",Gs({},M,$,{className:le("recharts-cartesian-axis-tick-line",Ov(a,"className"))})))}),A=T.map((L,I)=>{var{entry:$,tick:z}=L,V=Xt(Xt(Xt(Xt({textAnchor:O,verticalAnchor:D},N),{},{stroke:"none",fill:o},_),z),{},{index:I,payload:$,visibleTicksCount:E.length,tickFormatter:i,padding:l},c);return m.createElement(lo,Gs({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat($.value,"-").concat($.coordinate,"-").concat($.tickCoord)},yZ(k,$,I)),n&&m.createElement(Nde,{option:n,tickProps:V,value:"".concat(typeof i=="function"?i($.value,I):$.value).concat(s||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(P,"-ticks")},A.length>0&&m.createElement(pi,{zIndex:Wr.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(P,"-tick-labels"),ref:t},A)),j.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(P,"-tick-lines")},j))}),Tde=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:a,className:o,hide:i,ticks:s,axisType:l}=e,c=wde(e,bde),[u,d]=m.useState(""),[f,p]=m.useState(""),g=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var v;return xde({ticks:g.current,label:(v=e.labelRef)===null||v===void 0?void 0:v.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=m.useCallback(v=>{if(v){var x=v.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=x;var w=x[0];if(w){var b=window.getComputedStyle(w),S=b.fontSize,k=b.letterSpacing;(S!==u||k!==f)&&(d(S),p(k))}}},[u,f]);return i||n!=null&&n<=0||a!=null&&a<=0?null:m.createElement(pi,{zIndex:e.zIndex},m.createElement(lo,{className:le("recharts-cartesian-axis",o)},m.createElement(Ede,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Na(e)}),m.createElement(Mde,{ref:y,axisType:l,events:c,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:f,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),m.createElement(gce,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(Ece,{label:e.label,labelRef:e.labelRef}),e.children)))}),_k=m.forwardRef((e,t)=>{var r=An(e,Io);return m.createElement(Tde,Gs({},r,{ref:t}))});_k.displayName="CartesianAxis";var jde=["x1","y1","x2","y2","key"],Ade=["offset"],Rde=["xAxisId","yAxisId"],Ide=["xAxisId","yAxisId"];function RD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RD(Object(r),!0).forEach(function(n){$de(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $de(e,t,r){return(t=Lde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lde(e){var t=Fde(e,"string");return typeof t=="symbol"?t:t+""}function Fde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Os.apply(null,arguments)}function Jm(e,t){if(e==null)return{};var r,n,a=zde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function zde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Bde=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:a,width:o,height:i,ry:s}=e;return m.createElement("rect",{x:n,y:a,ry:s,width:o,height:i,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function M5(e){var{option:t,lineItemProps:r}=e,n;if(m.isValidElement(t))n=m.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,{x1:o,y1:i,x2:s,y2:l,key:c}=r,u=Jm(r,jde),d=(a=Na(u))!==null&&a!==void 0?a:{},{offset:f}=d,p=Jm(d,Ade);n=m.createElement("line",Os({},p,{x1:o,y1:i,x2:s,y2:l,fill:"none",key:c}))}return n}function Wde(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:a}=e;if(!n||!a||!a.length)return null;var{xAxisId:o,yAxisId:i}=e,s=Jm(e,Rde),l=a.map((c,u)=>{var d=jr(jr({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return m.createElement(M5,{key:"line-".concat(u),option:n,lineItemProps:d})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Hde(e){var{y:t,height:r,vertical:n=!0,verticalPoints:a}=e;if(!n||!a||!a.length)return null;var{xAxisId:o,yAxisId:i}=e,s=Jm(e,Ide),l=a.map((c,u)=>{var d=jr(jr({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return m.createElement(M5,{option:n,lineItemProps:d,key:"line-".concat(u)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Ude(e){var{horizontalFill:t,fillOpacity:r,x:n,y:a,width:o,height:i,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length||s==null)return null;var c=s.map(d=>Math.round(d+a-a)).sort((d,f)=>d-f);a!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],g=p?a+i-d:c[f+1]-d;if(g<=0)return null;var y=f%t.length;return m.createElement("rect",{key:"react-".concat(f),y:d,x:n,height:g,width:o,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function Yde(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:a,y:o,width:i,height:s,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var c=l.map(d=>Math.round(d+a-a)).sort((d,f)=>d-f);a!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],g=p?a+i-d:c[f+1]-d;if(g<=0)return null;var y=f%r.length;return m.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:g,height:s,stroke:"none",fill:r[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var Vde=(e,t)=>{var{xAxis:r,width:n,height:a,offset:o}=e;return dR(Dk(jr(jr(jr({},Io),r),{},{ticks:fR(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},Kde=(e,t)=>{var{yAxis:r,width:n,height:a,offset:o}=e;return dR(Dk(jr(jr(jr({},Io),r),{},{ticks:fR(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},qde={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Wr.grid};function T5(e){var t=CR(),r=PR(),n=kR(),a=jr(jr({},An(e,qde)),{},{x:_e(e.x)?e.x:n.left,y:_e(e.y)?e.y:n.top,width:_e(e.width)?e.width:n.width,height:_e(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:i,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=a,g=dn(),y=Me(D=>QO(D,"xAxis",o,g)),v=Me(D=>QO(D,"yAxis",i,g));if(!uo(c)||!uo(u)||!_e(s)||!_e(l))return null;var x=a.verticalCoordinatesGenerator||Vde,w=a.horizontalCoordinatesGenerator||Kde,{horizontalPoints:b,verticalPoints:S}=a;if((!b||!b.length)&&typeof w=="function"){var k=f&&f.length,P=w({yAxis:v?jr(jr({},v),{},{ticks:k?f:v.ticks}):void 0,width:t??c,height:r??u,offset:n},k?!0:d);Dm(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(b=P)}if((!S||!S.length)&&typeof x=="function"){var E=p&&p.length,O=x({xAxis:y?jr(jr({},y),{},{ticks:E?p:y.ticks}):void 0,width:t??c,height:r??u,offset:n},E?!0:d);Dm(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(S=O)}return m.createElement(pi,{zIndex:a.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(Bde,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),m.createElement(Ude,Os({},a,{horizontalPoints:b})),m.createElement(Yde,Os({},a,{verticalPoints:S})),m.createElement(Wde,Os({},a,{offset:n,horizontalPoints:b,xAxis:y,yAxis:v})),m.createElement(Hde,Os({},a,{offset:n,verticalPoints:S,xAxis:y,yAxis:v}))))}T5.displayName="CartesianGrid";function Gde(e){var t=wv(e),r=3,n=2;if(t!=null){var{r:a,strokeWidth:o}=t,i=Number(a),s=Number(o);return(Number.isNaN(i)||i<0)&&(i=r),(Number.isNaN(s)||s<0)&&(s=n),{r:i,strokeWidth:s}}return{r,strokeWidth:n}}var j5=(e,t,r,n)=>_$(e,"xAxis",t,n),A5=(e,t,r,n)=>D$(e,"xAxis",t,n),R5=(e,t,r,n)=>_$(e,"yAxis",r,n),I5=(e,t,r,n)=>D$(e,"yAxis",r,n),Xde=Y([wt,j5,R5,A5,I5],(e,t,r,n,a)=>ii(e,"xAxis")?Om(t,n,!1):Om(r,a,!1)),Qde=(e,t,r,n,a)=>a,$5=Y([QI,Qde],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),Zde=(e,t,r,n,a)=>{var o,i=$5(e,t,r,n,a);if(i!=null){var s=wt(e),l=ii(s,"xAxis"),c;if(l?c=Ib(e,"yAxis",r,n):c=Ib(e,"xAxis",t,n),c!=null){var{stackId:u}=i,d=rk(i);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f==null?void 0:f.find(p=>p.key===d)}}}},Jde=Y([wt,j5,R5,A5,I5,Zde,KS,Xde,$5,woe],(e,t,r,n,a,o,i,s,l,c)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=i;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||s==null)){var{data:p}=l,g;if(p&&p.length>0?g=p:g=u==null?void 0:u.slice(d,f+1),g!=null)return yfe({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:d,areaSettings:l,stackedData:o,displayedData:g,chartBaseValue:c,bandSize:s})}}),efe=["id"],tfe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$s.apply(null,arguments)}function L5(e,t){if(e==null)return{};var r,n,a=rfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function rfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ID(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ID(Object(r),!0).forEach(function(n){nfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ID(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nfe(e,t,r){return(t=afe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function afe(e){var t=ofe(e,"string");return typeof t=="symbol"?t:t+""}function ofe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e,t){return e&&e!=="none"?e:t}var ife=e=>{var{dataKey:t,name:r,stroke:n,fill:a,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:eg(n,a),value:pR(r,t),payload:e}]},sfe=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:a,fill:o,name:i,hide:s,unit:l,tooltipType:c}=e,u={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:pR(i,t),hide:s,type:c,color:eg(n,o),unit:l}};return m.createElement(Fce,{tooltipEntrySettings:u})});function lfe(e){var{clipPathId:t,points:r,props:n}=e,{needClip:a,dot:o,dataKey:i}=n,s=Na(n);return m.createElement(iue,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:i,baseProps:s,needClip:a,clipPathId:t})}function cfe(e){var{showLabels:t,children:r,points:n}=e,a=n.map(o=>{var i,s,l={x:(i=o.x)!==null&&i!==void 0?i:0,y:(s=o.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Al(Al({},l),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:l,fill:void 0})});return m.createElement(jce,{value:t?a:void 0},r)}function $D(e){var{points:t,baseLine:r,needClip:n,clipPathId:a,props:o}=e,{layout:i,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=L5(o,efe),p=Na(f),g=ta(f);return m.createElement(m.Fragment,null,(t==null?void 0:t.length)>1&&m.createElement(lo,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},m.createElement(dh,$s({},g,{id:d,points:t,connectNulls:c,type:s,baseLine:r,layout:i,stroke:"none",className:"recharts-area-area"})),l!=="none"&&m.createElement(dh,$s({},p,{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&m.createElement(dh,$s({},p,{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:r}))),m.createElement(lfe,{points:t,props:f,clipPathId:a}))}function ufe(e){var{alpha:t,baseLine:r,points:n,strokeWidth:a}=e,o=n[0].y,i=n[n.length-1].y;if(!Ht(o)||!Ht(i))return null;var s=t*Math.abs(o-i),l=Math.max(...n.map(c=>c.x||0));return _e(r)?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(...r.map(c=>c.x||0),l)),_e(l)?m.createElement("rect",{x:0,y:o<i?o:o-s,width:l+(a?parseInt("".concat(a),10):1),height:Math.floor(s)}):null}function dfe(e){var{alpha:t,baseLine:r,points:n,strokeWidth:a}=e,o=n[0].x,i=n[n.length-1].x;if(!Ht(o)||!Ht(i))return null;var s=t*Math.abs(o-i),l=Math.max(...n.map(c=>c.y||0));return _e(r)?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(...r.map(c=>c.y||0),l)),_e(l)?m.createElement("rect",{x:o<i?o:o-s,y:0,width:s,height:Math.floor(l+(a?parseInt("".concat(a),10):1))}):null}function ffe(e){var{alpha:t,layout:r,points:n,baseLine:a,strokeWidth:o}=e;return r==="vertical"?m.createElement(ufe,{alpha:t,points:n,baseLine:a,strokeWidth:o}):m.createElement(dfe,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function pfe(e){var{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o}=e,{points:i,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=n,g=m.useMemo(()=>({points:i,baseLine:s}),[i,s]),y=LR(g,"recharts-area-"),v=Xee(),[x,w]=m.useState(!1),b=!x,S=m.useCallback(()=>{typeof p=="function"&&p(),w(!1)},[p]),k=m.useCallback(()=>{typeof f=="function"&&f(),w(!0)},[f]);if(v==null)return null;var P=a.current,E=o.current;return m.createElement(cfe,{showLabels:b,points:i},n.children,m.createElement($R,{animationId:y,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:k,key:y},O=>{if(P){var D=P.length/i.length,N=O===1?i:i.map((C,M)=>{var T=Math.floor(M*D);if(P[T]){var j=P[T];return Al(Al({},C),{},{x:Ha(j.x,C.x,O),y:Ha(j.y,C.y,O)})}return C}),_;return _e(s)?_=Ha(E,s,O):kr(s)||Ma(s)?_=Ha(E,0,O):_=s.map((C,M)=>{var T=Math.floor(M*D);if(Array.isArray(E)&&E[T]){var j=E[T];return Al(Al({},C),{},{x:Ha(j.x,C.x,O),y:Ha(j.y,C.y,O)})}return C}),O>0&&(a.current=N,o.current=_),m.createElement($D,{points:N,baseLine:_,needClip:t,clipPathId:r,props:n})}return O>0&&(a.current=i,o.current=s),m.createElement(lo,null,l&&m.createElement("defs",null,m.createElement("clipPath",{id:"animationClipPath-".concat(r)},m.createElement(ffe,{alpha:O,points:i,baseLine:s,layout:v,strokeWidth:n.strokeWidth}))),m.createElement(lo,{clipPath:"url(#animationClipPath-".concat(r,")")},m.createElement($D,{points:i,baseLine:s,needClip:t,clipPathId:r,props:n})))}),m.createElement(Ice,{label:n.label}))}function hfe(e){var{needClip:t,clipPathId:r,props:n}=e,a=m.useRef(null),o=m.useRef();return m.createElement(pfe,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class mfe extends m.PureComponent{render(){var{hide:t,dot:r,points:n,className:a,top:o,left:i,needClip:s,xAxisId:l,yAxisId:c,width:u,height:d,id:f,baseLine:p,zIndex:g}=this.props;if(t)return null;var y=le("recharts-area",a),v=f,{r:x,strokeWidth:w}=Gde(r),b=S5(r),S=x*2+w,k=s?"url(#clipPath-".concat(b?"":"dots-").concat(v,")"):void 0;return m.createElement(pi,{zIndex:g},m.createElement(lo,{className:y},s&&m.createElement("defs",null,m.createElement(Due,{clipPathId:v,xAxisId:l,yAxisId:c}),!b&&m.createElement("clipPath",{id:"clipPath-dots-".concat(v)},m.createElement("rect",{x:i-S/2,y:o-S/2,width:u+S,height:d+S}))),m.createElement(hfe,{needClip:s,clipPathId:v,props:this.props})),m.createElement(_D,{points:n,mainColor:eg(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:k}),this.props.isRange&&Array.isArray(p)&&m.createElement(_D,{points:p,mainColor:eg(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:k}))}}var F5={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Wr.area};function gfe(e){var t,r=An(e,F5),{activeDot:n,animationBegin:a,animationDuration:o,animationEasing:i,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:g,xAxisId:y,yAxisId:v}=r,x=L5(r,tfe),w=yf(),b=X$(),{needClip:S}=O5(y,v),k=dn(),{points:P,isRange:E,baseLine:O}=(t=Me(T=>Jde(T,y,v,k,e.id)))!==null&&t!==void 0?t:{},D=Pk();if(w!=="horizontal"&&w!=="vertical"||D==null||b!=="AreaChart"&&b!=="ComposedChart")return null;var{height:N,width:_,x:C,y:M}=D;return!P||!P.length?null:m.createElement(mfe,$s({},x,{activeDot:n,animationBegin:a,animationDuration:o,animationEasing:i,baseLine:O,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:N,hide:d,layout:w,isAnimationActive:f==="auto"?!Lc.isSsr:f,isRange:E,legendType:p,needClip:S,points:P,stroke:g,width:_,left:C,top:M,xAxisId:y,yAxisId:v}))}var vfe=(e,t,r,n,a)=>{var o=r??t;if(_e(o))return o;var i=e==="horizontal"?a:n,s=i.scale.domain();if(i.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function yfe(e){var{areaSettings:{connectNulls:t,baseValue:r,dataKey:n},stackedData:a,layout:o,chartBaseValue:i,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,g=a&&a.length,y=vfe(o,i,r,s,l),v=o==="horizontal",x=!1,w=c.map((S,k)=>{var P;g?P=a[u+k]:(P=Ir(S,n),Array.isArray(P)?x=!0:P=[y,P]);var E=P[1]==null||g&&!t&&Ir(S,n)==null;return v?{x:DE({axis:s,ticks:d,bandSize:p,entry:S,index:k}),y:E?null:l.scale(P[1]),value:P,payload:S}:{x:E?null:s.scale(P[1]),y:DE({axis:l,ticks:f,bandSize:p,entry:S,index:k}),value:P,payload:S}}),b;return g||x?b=w.map(S=>{var k=Array.isArray(S.value)?S.value[0]:null;return v?{x:S.x,y:k!=null&&S.y!=null?l.scale(k):null,payload:S.payload}:{x:k!=null?s.scale(k):null,y:S.y,payload:S.payload}}):b=v?l.scale(y):s.scale(y),{points:w,baseLine:b,isRange:x}}function xfe(e){var t=An(e,F5),r=dn();return m.createElement(Uce,{id:t.id,type:"area"},n=>m.createElement(m.Fragment,null,m.createElement(zce,{legendPayload:ife(t)}),m.createElement(sfe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),m.createElement(Qce,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:gee(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),m.createElement(gfe,$s({},t,{id:n}))))}var Ub=m.memo(xfe,Ek);Ub.displayName="Area";var bfe=["domain","range"],wfe=["domain","range"];function LD(e,t){if(e==null)return{};var r,n,a=Sfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Sfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FD(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function z5(e,t){if(e===t)return!0;var{domain:r,range:n}=e,a=LD(e,bfe),{domain:o,range:i}=t,s=LD(t,wfe);return!FD(r,o)||!FD(n,i)?!1:Ek(a,s)}var kfe=["dangerouslySetInnerHTML","ticks"],Cfe=["id"];function Yb(){return Yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yb.apply(null,arguments)}function zD(e,t){if(e==null)return{};var r,n,a=Pfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Pfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Efe(e){var t=gr(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(due(e)):r.current!==e&&t(fue({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(pue(r.current)),r.current=null)},[t]),null}var Ofe=e=>{var{xAxisId:t,className:r}=e,n=Me(mR),a=dn(),o="xAxis",i=Me(v=>Uc(v,o,t,a)),s=Me(v=>O$(v,o,t,a)),l=Me(v=>pie(v,t)),c=Me(v=>xie(v,t)),u=Me(v=>KI(v,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=zD(e,kfe),{id:g}=u,y=zD(u,Cfe);return m.createElement(_k,Yb({},p,y,{scale:i,x:c.x,y:c.y,width:l.width,height:l.height,className:le("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:s,axisType:o}))},Dfe={allowDataOverflow:cr.allowDataOverflow,allowDecimals:cr.allowDecimals,allowDuplicatedCategory:cr.allowDuplicatedCategory,angle:cr.angle,axisLine:Io.axisLine,height:cr.height,hide:!1,includeHidden:cr.includeHidden,interval:cr.interval,minTickGap:cr.minTickGap,mirror:cr.mirror,orientation:cr.orientation,padding:cr.padding,reversed:cr.reversed,scale:cr.scale,tick:cr.tick,tickCount:cr.tickCount,tickLine:Io.tickLine,tickSize:Io.tickSize,type:cr.type,xAxisId:0},_fe=e=>{var t=An(e,Dfe);return m.createElement(m.Fragment,null,m.createElement(Efe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),m.createElement(Ofe,t))},B5=m.memo(_fe,z5);B5.displayName="XAxis";var Nfe=["dangerouslySetInnerHTML","ticks"],Mfe=["id"];function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vb.apply(null,arguments)}function BD(e,t){if(e==null)return{};var r,n,a=Tfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Tfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jfe(e){var t=gr(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(hue(e)):r.current!==e&&t(mue({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(gue(r.current)),r.current=null)},[t]),null}var Afe=e=>{var{yAxisId:t,className:r,width:n,label:a}=e,o=m.useRef(null),i=m.useRef(null),s=Me(mR),l=dn(),c=gr(),u="yAxis",d=Me(k=>Uc(k,u,t,l)),f=Me(k=>Sie(k,t)),p=Me(k=>wie(k,t)),g=Me(k=>O$(k,u,t,l)),y=Me(k=>qI(k,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||Ck(a)||m.isValidElement(a)||y==null)){var k=o.current;if(k){var P=k.getCalculatedWidth();Math.round(f.width)!==Math.round(P)&&c(vue({id:t,width:P}))}}},[g,f,c,a,t,n,y]),f==null||p==null||y==null)return null;var{dangerouslySetInnerHTML:v,ticks:x}=e,w=BD(e,Nfe),{id:b}=y,S=BD(y,Mfe);return m.createElement(_k,Vb({},w,S,{ref:o,labelRef:i,scale:d,x:p.x,y:p.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:le("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:g,axisType:u}))},Rfe={allowDataOverflow:ur.allowDataOverflow,allowDecimals:ur.allowDecimals,allowDuplicatedCategory:ur.allowDuplicatedCategory,angle:ur.angle,axisLine:Io.axisLine,hide:!1,includeHidden:ur.includeHidden,interval:ur.interval,minTickGap:ur.minTickGap,mirror:ur.mirror,orientation:ur.orientation,padding:ur.padding,reversed:ur.reversed,scale:ur.scale,tick:ur.tick,tickCount:ur.tickCount,tickLine:Io.tickLine,tickSize:Io.tickSize,type:ur.type,width:ur.width,yAxisId:0},Ife=e=>{var t=An(e,Rfe);return m.createElement(m.Fragment,null,m.createElement(jfe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),m.createElement(Afe,t))},W5=m.memo(Ife,z5);W5.displayName="YAxis";var $fe=(e,t)=>t,Nk=Y([$fe,wt,YI,ir,U$,fi,Ise,Er],Hse),Mk=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},H5=ra("mouseClick"),U5=gf();U5.startListening({actionCreator:H5,effect:(e,t)=>{var r=e.payload,n=Nk(t.getState(),Mk(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(Rie({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Kb=ra("mouseMove"),Y5=gf(),jp=null;Y5.startListening({actionCreator:Kb,effect:(e,t)=>{var r=e.payload;jp!==null&&cancelAnimationFrame(jp);var n=Mk(r);jp=requestAnimationFrame(()=>{var a=t.getState(),o=pk(a,a.tooltip.settings.shared);if(o==="axis"){var i=Nk(a,n);(i==null?void 0:i.activeIndex)!=null?t.dispatch(I$({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate})):t.dispatch(R$())}jp=null})}});var WD={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},V5=un({name:"rootProps",initialState:WD,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:WD.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Lfe=V5.reducer,{updateOptions:Ffe}=V5.actions,K5=un({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:che}=K5.actions,zfe=K5.reducer,q5=ra("keyDown"),G5=ra("focus"),Tk=gf();Tk.startListening({actionCreator:q5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var i=hk(a,Vc(r),Ef(r),Mf(r)),s=i==null?-1:Number(i);if(!(!Number.isFinite(s)||s<0)){var l=fi(r);if(o==="Enter"){var c=Gm(r,"axis","hover",String(a.index));t.dispatch(Lb({active:!a.active,activeIndex:a.index,activeDataKey:a.dataKey,activeCoordinate:c}));return}var u=Eie(r),d=u==="left-to-right"?1:-1,f=o==="ArrowRight"?1:-1,p=s+f*d;if(!(l==null||p>=l.length||p<0)){var g=Gm(r,"axis","hover",String(p));t.dispatch(Lb({active:!0,activeIndex:p.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}}});Tk.startListening({actionCreator:G5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip;if(!a.active&&a.index==null){var o="0",i=Gm(r,"axis","hover",String(o));t.dispatch(Lb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:i}))}}}});var In=ra("externalEvent"),X5=gf(),P0=new Map;X5.startListening({actionCreator:In,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var a=n.type,o=P0.get(a);o!==void 0&&cancelAnimationFrame(o);var i=requestAnimationFrame(()=>{try{var s=t.getState(),l={activeCoordinate:wse(s),activeDataKey:xse(s),activeIndex:Hd(s),activeLabel:K$(s),activeTooltipIndex:Hd(s),isTooltipActive:Sse(s)};r(l,n)}finally{P0.delete(a)}});P0.set(a,i)}}});var Bfe=Y([Yc],e=>e.tooltipItemPayloads),Wfe=Y([Bfe,_f,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var a=e.find(s=>s.settings.dataKey===n);if(a!=null){var{positions:o}=a;if(o!=null){var i=t(o,r);return i}}}),Q5=ra("touchMove"),Z5=gf();Z5.startListening({actionCreator:Q5,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),a=pk(n,n.tooltip.settings.shared);if(a==="axis"){var o=Nk(n,Mk({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));(o==null?void 0:o.activeIndex)!=null&&t.dispatch(I$({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(a==="item"){var i,s=r.touches[0];if(document.elementFromPoint==null)return;var l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(kee),u=(i=l.getAttribute(Cee))!==null&&i!==void 0?i:void 0,d=Wfe(t.getState(),c,u);t.dispatch(Aie({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}}});var Hfe=IA({brush:ede,cartesianAxis:yue,chartData:ble,errorBars:Oue,graphicalItems:Gce,layout:iee,legend:pte,options:mle,polarAxis:Lce,polarOptions:zfe,referenceElements:sde,rootProps:Lfe,tooltip:Iie,zIndex:nle}),Ufe=function(t){return MJ({reducer:Hfe,preloadedState:t,middleware:r=>{var n;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((n="es6")!==null&&n!==void 0?n:"")}).concat([U5.middleware,Y5.middleware,Tk.middleware,X5.middleware,Z5.middleware])},enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(QA({type:"raf"}))},devTools:Lc.devToolsEnabled})};function Yfe(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,a=dn(),o=m.useRef(null);if(a)return r;o.current==null&&(o.current=Ufe(t));var i=uS;return m.createElement(Xue,{context:i,store:o.current},r)}function Vfe(e){var{layout:t,margin:r}=e,n=gr(),a=dn();return m.useEffect(()=>{a||(n(nee(t)),n(ree(r)))},[n,a,t,r]),null}var Kfe=m.memo(Vfe,Ek);function qfe(e){var t=gr();return m.useEffect(()=>{t(Ffe(e))},[t,e]),null}function HD(e){var{zIndex:t,isPanorama:r}=e,n=r?"recharts-zindex-panorama-":"recharts-zindex-",a=k5("".concat(n).concat(t)),o=gr();return m.useLayoutEffect(()=>(o(tle({zIndex:t,elementId:a,isPanorama:r})),()=>{o(rle({zIndex:t,isPanorama:r}))}),[o,t,a,r]),m.createElement("g",{tabIndex:-1,id:a})}function UD(e){var{children:t,isPanorama:r}=e,n=Me(Yse);if(!n||n.length===0)return t;var a=n.filter(i=>i<0),o=n.filter(i=>i>0);return m.createElement(m.Fragment,null,a.map(i=>m.createElement(HD,{key:i,zIndex:i,isPanorama:r})),t,o.map(i=>m.createElement(HD,{key:i,zIndex:i,isPanorama:r})))}var Gfe=["children"];function Xfe(e,t){if(e==null)return{};var r,n,a=Qfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Qfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tg(){return tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tg.apply(null,arguments)}var Zfe={width:"100%",height:"100%",display:"block"},Jfe=m.forwardRef((e,t)=>{var r=CR(),n=PR(),a=jR();if(!uo(r)||!uo(n))return null;var{children:o,otherAttributes:i,title:s,desc:l}=e,c,u;return i!=null&&(typeof i.tabIndex=="number"?c=i.tabIndex:c=a?0:void 0,typeof i.role=="string"?u=i.role:u=a?"application":void 0),m.createElement(Bj,tg({},i,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:Zfe,ref:t}),o)}),epe=e=>{var{children:t}=e,r=Me(Wv);if(!r)return null;var{width:n,height:a,y:o,x:i}=r;return m.createElement(Bj,{width:n,height:a,x:i,y:o},t)},YD=m.forwardRef((e,t)=>{var{children:r}=e,n=Xfe(e,Gfe),a=dn();return a?m.createElement(epe,null,m.createElement(UD,{isPanorama:!0},r)):m.createElement(Jfe,tg({ref:t},n),m.createElement(UD,{isPanorama:!1},r))});function tpe(){var e=gr(),[t,r]=m.useState(null),n=Me(See);return m.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),o=a.width/t.offsetWidth;Ht(o)&&o!==n&&e(oee(o))}},[t,e,n]),r}function VD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rpe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VD(Object(r),!0).forEach(function(n){npe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function npe(e,t,r){return(t=ape(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ape(e){var t=ope(e,"string");return typeof t=="symbol"?t:t+""}function ope(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xs.apply(null,arguments)}var ipe=()=>(_le(),null);function rg(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var spe=m.forwardRef((e,t)=>{var r,n,a=m.useRef(null),[o,i]=m.useState({containerWidth:rg((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:rg((n=e.style)===null||n===void 0?void 0:n.height)}),s=m.useCallback((c,u)=>{i(d=>{var f=Math.round(c),p=Math.round(u);return d.containerWidth===f&&d.containerHeight===p?d:{containerWidth:f,containerHeight:p}})},[]),l=m.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null&&typeof ResizeObserver<"u"){var{width:u,height:d}=c.getBoundingClientRect();s(u,d);var f=g=>{var{width:y,height:v}=g[0].contentRect;s(y,v)},p=new ResizeObserver(f);p.observe(c),a.current=p}},[t,s]);return m.useEffect(()=>()=>{var c=a.current;c!=null&&c.disconnect()},[s]),m.createElement(m.Fragment,null,m.createElement(Uv,{width:o.containerWidth,height:o.containerHeight}),m.createElement("div",Xs({ref:l},e)))}),lpe=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[a,o]=m.useState({containerWidth:rg(r),containerHeight:rg(n)}),i=m.useCallback((l,c)=>{o(u=>{var d=Math.round(l),f=Math.round(c);return u.containerWidth===d&&u.containerHeight===f?u:{containerWidth:d,containerHeight:f}})},[]),s=m.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:c,height:u}=l.getBoundingClientRect();i(c,u)}},[t,i]);return m.createElement(m.Fragment,null,m.createElement(Uv,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",Xs({ref:s},e)))}),cpe=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(Uv,{width:r,height:n}),m.createElement("div",Xs({ref:t},e)))}),upe=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return Go(r)||Go(n)?m.createElement(lpe,Xs({},e,{ref:t})):m.createElement(cpe,Xs({},e,{ref:t}))});function dpe(e){return e===!0?spe:upe}var fpe=m.forwardRef((e,t)=>{var{children:r,className:n,height:a,onClick:o,onContextMenu:i,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:g,onTouchStart:y,style:v,width:x,responsive:w,dispatchTouchEvents:b=!0}=e,S=m.useRef(null),k=gr(),[P,E]=m.useState(null),[O,D]=m.useState(null),N=tpe(),_=wS(),C=(_==null?void 0:_.width)>0?_.width:x,M=(_==null?void 0:_.height)>0?_.height:a,T=m.useCallback(B=>{N(B),typeof t=="function"&&t(B),E(B),D(B),B!=null&&(S.current=B)},[N,t,E,D]),j=m.useCallback(B=>{k(H5(B)),k(In({handler:o,reactEvent:B}))},[k,o]),A=m.useCallback(B=>{k(Kb(B)),k(In({handler:c,reactEvent:B}))},[k,c]),L=m.useCallback(B=>{k(R$()),k(In({handler:u,reactEvent:B}))},[k,u]),I=m.useCallback(B=>{k(Kb(B)),k(In({handler:d,reactEvent:B}))},[k,d]),$=m.useCallback(()=>{k(G5())},[k]),z=m.useCallback(B=>{k(q5(B.key))},[k]),V=m.useCallback(B=>{k(In({handler:i,reactEvent:B}))},[k,i]),F=m.useCallback(B=>{k(In({handler:s,reactEvent:B}))},[k,s]),ne=m.useCallback(B=>{k(In({handler:l,reactEvent:B}))},[k,l]),ee=m.useCallback(B=>{k(In({handler:f,reactEvent:B}))},[k,f]),X=m.useCallback(B=>{k(In({handler:y,reactEvent:B}))},[k,y]),fe=m.useCallback(B=>{b&&k(Q5(B)),k(In({handler:g,reactEvent:B}))},[k,b,g]),q=m.useCallback(B=>{k(In({handler:p,reactEvent:B}))},[k,p]),ke=dpe(w);return m.createElement(t5.Provider,{value:P},m.createElement(VQ.Provider,{value:O},m.createElement(ke,{width:C??(v==null?void 0:v.width),height:M??(v==null?void 0:v.height),className:le("recharts-wrapper",n),style:rpe({position:"relative",cursor:"default",width:C,height:M},v),onClick:j,onContextMenu:V,onDoubleClick:F,onFocus:$,onKeyDown:z,onMouseDown:ne,onMouseEnter:A,onMouseLeave:L,onMouseMove:I,onMouseUp:ee,onTouchEnd:q,onTouchMove:fe,onTouchStart:X,ref:T},m.createElement(ipe,null),r)))}),ppe=["width","height","responsive","children","className","style","compact","title","desc"];function hpe(e,t){if(e==null)return{};var r,n,a=mpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function mpe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gpe=m.forwardRef((e,t)=>{var{width:r,height:n,responsive:a,children:o,className:i,style:s,compact:l,title:c,desc:u}=e,d=hpe(e,ppe),f=Na(d);return l?m.createElement(m.Fragment,null,m.createElement(Uv,{width:r,height:n}),m.createElement(YD,{otherAttributes:f,title:c,desc:u},o)):m.createElement(fpe,{className:i,style:s,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},m.createElement(YD,{otherAttributes:f,title:c,desc:u,ref:t},m.createElement(cde,null,o)))});function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qb.apply(null,arguments)}var vpe={top:5,right:5,bottom:5,left:5},ype={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:vpe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},xpe=m.forwardRef(function(t,r){var n,a=An(t.categoricalChartProps,ype),{chartName:o,defaultTooltipEventType:i,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:o,defaultTooltipEventType:i,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return m.createElement(Yfe,{preloadedState:{options:u},reduxStoreName:(n=c.id)!==null&&n!==void 0?n:o},m.createElement(Jue,{chartData:c.data}),m.createElement(Kfe,{layout:a.layout,margin:a.margin}),m.createElement(qfe,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),m.createElement(gpe,qb({},a,{ref:r})))}),bpe=["axis"],wpe=m.forwardRef((e,t)=>m.createElement(xpe,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:bpe,tooltipPayloadSearcher:ple,categoricalChartProps:e,ref:t}));const Spe=e=>{const t=new Date(e),r=new Date,n=r-t,a=Math.floor(n/1e3),o=Math.floor(a/60),i=Math.floor(o/60);if(a<60)return`${a}초 전`;if(o<60)return`${o}분 전`;if(i<24)return`${i}시간 전`;const s=t.getFullYear(),l=r.getFullYear(),c=t.getMonth()+1,u=t.getDate();return s===l?`${c}월 ${u}일`:`${s}년 ${c}월 ${u}일`},kpe=e=>{const t=new Date(e),r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),o=t.getHours(),i=String(t.getMinutes()).padStart(2,"0"),s=o<12?"오전":"오후",l=String(o%12||12).padStart(2,"0");return`${r}년 ${n}월 ${a}일 ${s} ${l}시 ${i}분`},Cpe=({item:e,children:t})=>{const[r,n]=m.useState(!1),[a,o]=m.useState({x:0,y:0}),i=m.useRef(null),s=l=>{const c=l.currentTarget.getBoundingClientRect();o({x:c.left,y:c.bottom+8}),n(!0)};return h.jsxs("div",{ref:i,onMouseEnter:s,onMouseLeave:()=>n(!1),className:"relative",children:[t,r&&h.jsxs("div",{className:"fixed z-50 bg-gray-800 text-white text-sm rounded-xl shadow-2xl p-4 min-w-[260px] max-w-[350px]",style:{left:a.x,top:a.y},children:[h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex gap-3 items-start",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"IP"}),h.jsx("span",{className:"font-mono font-medium",children:e.ip})]}),e.countryName&&h.jsxs("div",{className:"flex gap-3 items-start",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"국가"}),h.jsx("span",{children:e.countryName})]}),e.hostname&&h.jsxs("div",{className:"flex gap-3 items-start",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"호스트"}),h.jsx("span",{className:"font-mono text-xs break-all leading-relaxed",children:e.hostname})]}),e.mailFrom&&h.jsxs("div",{className:"flex gap-3 items-start",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"발신"}),h.jsx("span",{className:"break-all text-blue-300",children:e.mailFrom})]}),e.rcptTo&&h.jsxs("div",{className:"flex gap-3 items-start",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"수신"}),h.jsx("span",{className:"break-all text-green-300",children:e.rcptTo})]}),h.jsxs("div",{className:"flex gap-3 items-start pt-2 mt-2 border-t border-gray-600",children:[h.jsx("span",{className:"text-gray-400 shrink-0 w-14",children:"시간"}),h.jsx("span",{className:"text-yellow-200",children:kpe(e.connectedAt)})]})]}),h.jsx("div",{className:"absolute -top-2 left-5 w-4 h-4 bg-gray-800 rotate-45"})]})]})},Ap=({title:e,value:t,icon:r,bgColor:n,iconBg:a})=>h.jsx("div",{className:`relative overflow-hidden p-5 rounded-2xl shadow-sm border border-gray-100 h-24 ${n}`,children:h.jsxs("div",{className:"flex items-center justify-between h-full",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"text-gray-600 text-sm font-medium mb-1",children:e}),h.jsx("h3",{className:"text-2xl font-bold text-gray-800 truncate whitespace-nowrap",children:t})]}),h.jsx("div",{className:`p-3 rounded-xl flex-shrink-0 ${a}`,children:h.jsx(r,{size:24,className:"text-white"})})]})}),Ppe=({selected:e,onChange:t,disabled:r})=>{const n=[{value:"1d",label:"1일"},{value:"7d",label:"7일"},{value:"30d",label:"30일"},{value:"all",label:"전체"}];return h.jsx("div",{className:"flex gap-0.5 bg-gray-100 p-0.5 rounded-md shrink-0",children:n.map(a=>h.jsx("button",{onClick:()=>!r&&t(a.value),disabled:r,type:"button",className:`px-2 py-1 text-[12px] font-medium rounded transition-all cursor-pointer select-none ${e===a.value?"bg-white text-gray-800 shadow-sm":"text-gray-500 hover:text-gray-700"} ${r?"opacity-50":""}`,children:a.label},a.value))})},Epe=({active:e,payload:t,label:r})=>e&&t&&t.length?h.jsxs("div",{className:"bg-gray-900/95 backdrop-blur-md px-4 py-3 rounded-xl shadow-2xl border border-gray-700",children:[h.jsx("p",{className:"text-gray-300 text-xs mb-2 font-medium",children:r}),t.map((n,a)=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n.color}}),h.jsxs("span",{className:"text-white text-sm font-semibold",children:[n.name,": ",n.value]})]},a))]}):null,Ope=()=>{const{fetchStats:e}=ln(),[t,r]=m.useState(null),[n,a]=m.useState(!0),[o,i]=m.useState(!1),[s,l]=m.useState("all"),[c,u]=m.useState([]),[d,f]=m.useState(1),[p,g]=m.useState(!0),[y,v]=m.useState(!1),x=m.useRef(null),w=m.useRef(!1),[b,S]=m.useState([]),[k,P]=m.useState(1),[E,O]=m.useState(!0),[D,N]=m.useState(!1),_=m.useRef(null),C=m.useRef(!1),M=m.useCallback(async(z=s,V=!1)=>{V?a(!0):i(!0);try{const F=localStorage.getItem("email_token"),ee=await(await fetch(`/api/admin/stats?period=${z}`,{headers:{Authorization:`Bearer ${F}`}})).json();r(ee)}catch(F){console.error("통계 로드 오류:",F)}finally{a(!1),i(!1)}},[s]),T=m.useCallback(async(z=1,V=!1,F=s)=>{if(!w.current){w.current=!0,v(!0);try{const ne=localStorage.getItem("email_token"),ee=await fetch(`/api/admin/remote-ips?page=${z}&limit=10&period=${F}`,{headers:{Authorization:`Bearer ${ne}`}}),{data:X,pagination:fe}=await ee.json();u(V?X||[]:q=>[...q,...X||[]]),f(z),g((fe==null?void 0:fe.hasMore)??!1)}catch(ne){console.error("접속 IP 로드 오류:",ne)}finally{w.current=!1,v(!1)}}},[s]),j=m.useCallback(async(z=1,V=!1)=>{if(!C.current){C.current=!0,N(!0);try{const F=localStorage.getItem("email_token"),ne=await fetch(`/api/admin/recent-logs?page=${z}&limit=10`,{headers:{Authorization:`Bearer ${F}`}}),{data:ee,pagination:X}=await ne.json();S(V?ee||[]:fe=>[...fe,...ee||[]]),P(z),O((X==null?void 0:X.hasMore)??!1)}catch(F){console.error("최근 활동 로드 오류:",F)}finally{C.current=!1,N(!1)}}},[]);m.useEffect(()=>{M("all",!0),T(1,!0,"all"),j(1,!0)},[]);const A=z=>{l(z),M(z,!1),u([]),f(1),g(!0),w.current=!1,T(1,!0,z)},L=m.useCallback(z=>{const{scrollTop:V,scrollHeight:F,clientHeight:ne}=z.target;F-V<=ne+50&&!w.current&&f(ee=>(g(X=>(X&&T(ee+1,!1,s),X)),ee))},[s,T]),I=m.useCallback(z=>{const{scrollTop:V,scrollHeight:F,clientHeight:ne}=z.target;F-V<=ne+50&&!C.current&&P(ee=>(O(X=>(X&&j(ee+1,!1),X)),ee))},[j]);if(n||!t)return h.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsx("div",{className:"w-12 h-12 border-4 border-blue-400 border-t-transparent rounded-full animate-spin"}),h.jsx("span",{className:"text-gray-500 font-medium",children:"통계 로딩 중..."})]})});const $=t.storageLimit?(parseFloat(t.storageUsed)/t.storageLimit*100).toFixed(1):0;return h.jsxs("div",{className:"p-8 bg-gray-50 min-h-full overflow-y-auto overflow-x-hidden",children:[h.jsx("div",{className:"flex justify-between items-center mb-8",children:h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"메일서버 대시보드"}),h.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"실시간 서버 상태 및 통계"})]})}),h.jsxs("div",{className:"grid grid-cols-4 gap-5 mb-8",children:[h.jsx(Ap,{title:"전체 사용자",value:t.userCount,icon:Ku,bgColor:"bg-emerald-50",iconBg:"bg-emerald-400"}),h.jsx(Ap,{title:"전체 발송",value:t.totalSent||0,icon:nc,bgColor:"bg-blue-50",iconBg:"bg-blue-400"}),h.jsx(Ap,{title:"전체 수신",value:t.totalReceived||0,icon:JC,bgColor:"bg-violet-50",iconBg:"bg-violet-400"}),h.jsx(Ap,{title:"전체 스팸 차단",value:t.totalSpam||0,icon:t2,bgColor:"bg-red-50",iconBg:"bg-red-400"})]}),h.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-6",children:[h.jsxs("div",{className:"col-span-2 bg-white p-6 rounded-2xl shadow-sm border border-gray-100",children:[h.jsxs("div",{className:"flex items-center justify-between mb-6",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"주간 트래픽"}),h.jsx("p",{className:"text-sm text-gray-500",children:"최근 7일간 메일 발송/수신 현황"})]}),h.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-400"}),h.jsx("span",{className:"text-gray-600",children:"발송"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-400"}),h.jsx("span",{className:"text-gray-600",children:"수신"})]})]})]}),h.jsx("div",{className:"h-64",children:h.jsx(qee,{width:"100%",height:"100%",children:h.jsxs(wpe,{data:t.chartData,children:[h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"gradientSent",x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"0%",stopColor:"#60a5fa",stopOpacity:.4}),h.jsx("stop",{offset:"100%",stopColor:"#60a5fa",stopOpacity:.05})]}),h.jsxs("linearGradient",{id:"gradientReceived",x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"0%",stopColor:"#34d399",stopOpacity:.4}),h.jsx("stop",{offset:"100%",stopColor:"#34d399",stopOpacity:.05})]})]}),h.jsx(T5,{strokeDasharray:"3 3",vertical:!1,stroke:"#e5e7eb"}),h.jsx(B5,{dataKey:"name",stroke:"#9ca3af",fontSize:12,tickLine:!1,axisLine:!1}),h.jsx(W5,{stroke:"#9ca3af",fontSize:12,tickLine:!1,axisLine:!1,width:30}),h.jsx($le,{content:h.jsx(Epe,{})}),h.jsx(Ub,{type:"monotone",dataKey:"sent",stroke:"#60a5fa",strokeWidth:2.5,fill:"url(#gradientSent)",name:"발송",dot:{fill:"#60a5fa",strokeWidth:0,r:3},activeDot:{r:5,fill:"#60a5fa",stroke:"#fff",strokeWidth:2}}),h.jsx(Ub,{type:"monotone",dataKey:"received",stroke:"#34d399",strokeWidth:2.5,fill:"url(#gradientReceived)",name:"수신",dot:{fill:"#34d399",strokeWidth:0,r:3},activeDot:{r:5,fill:"#34d399",stroke:"#fff",strokeWidth:2}})]})})})]}),h.jsxs("div",{className:"bg-white p-6 rounded-2xl shadow-sm border border-gray-100",children:[h.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-5",children:"시스템 상태"}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-xl",children:[h.jsxs("div",{className:"flex items-center space-x-3",children:[h.jsx(t2,{className:"text-gray-600",size:20}),h.jsx("span",{className:"text-gray-700 font-medium",children:"스팸 필터링 서비스"})]}),h.jsx("span",{className:`px-3 py-1.5 text-xs font-bold rounded-full ${t.rspamdStatus==="Running"?"bg-emerald-100 text-emerald-700":"bg-red-100 text-red-700"}`,children:t.rspamdStatus==="Running"?"정상":"중지됨"})]}),h.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-xl",children:[h.jsxs("div",{className:"flex items-center space-x-3",children:[h.jsx(XF,{className:"text-gray-600",size:20}),h.jsx("span",{className:"text-gray-700 font-medium",children:"데이터베이스"})]}),h.jsx("span",{className:`px-3 py-1.5 text-xs font-bold rounded-full ${t.dbStatus==="Connected"?"bg-blue-100 text-blue-700":"bg-red-100 text-red-700"}`,children:t.dbStatus==="Connected"?"연결됨":"연결 끊김"})]})]}),h.jsxs("div",{className:"mt-6 pt-5 border-t border-gray-100",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center space-x-3",children:[h.jsx(TM,{className:"text-gray-600",size:20}),h.jsx("span",{className:"text-gray-700 font-medium",children:"스토리지"})]}),h.jsx("span",{className:"text-sm font-semibold text-gray-600",children:t.storageUsed})]}),h.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5",children:h.jsx("div",{className:`h-2.5 rounded-full ${$>=90?"bg-red-500":$>=70?"bg-amber-500":"bg-blue-500"}`,style:{width:`${Math.min($,100)}%`}})}),h.jsxs("p",{className:"text-xs text-gray-500 mt-2 text-right",children:[$,"% 사용 중 (최대 ",t.storageLimit," MB)"]})]})]})]}),h.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[h.jsxs("div",{className:`bg-white p-6 rounded-2xl shadow-sm border border-gray-100 transition-opacity overflow-hidden ${o?"opacity-60":""}`,children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-5 flex-nowrap",children:[h.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"사용자별 통계"}),h.jsx(Ppe,{selected:s,onChange:A,disabled:o})]}),h.jsx("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:t.topUsers&&t.topUsers.length>0?t.topUsers.map((z,V)=>h.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-blue-400 to-indigo-500 flex items-center justify-center text-white text-xs font-bold",children:V+1}),h.jsx("span",{className:"text-sm font-medium text-gray-700 truncate max-w-[100px]",children:z.email.split("@")[0]})]}),h.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-1 text-red-500",title:"발송",children:[h.jsx(YF,{size:14}),h.jsx("span",{children:z.sent})]}),h.jsxs("div",{className:"flex items-center gap-1 text-emerald-500",title:"수신",children:[h.jsx(HF,{size:14}),h.jsx("span",{children:z.received})]})]})]},V)):h.jsxs("div",{className:"text-center py-8 text-gray-400",children:[h.jsx(Ku,{size:32,className:"mx-auto mb-2"}),h.jsx("p",{className:"text-sm",children:"데이터 없음"})]})})]}),h.jsxs("div",{className:`bg-white p-6 rounded-2xl shadow-sm border border-gray-100 transition-opacity overflow-hidden ${o?"opacity-60":""}`,children:[h.jsxs("div",{className:"flex items-center justify-between mb-5",children:[h.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"접속 IP"}),h.jsx(ZC,{size:18,className:"text-blue-500"})]}),h.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto overflow-x-hidden",ref:x,onScroll:L,children:[c&&c.length>0?c.map((z,V)=>h.jsx(Cpe,{item:z,children:h.jsxs("div",{className:"flex items-center gap-3 p-2 bg-gray-50 rounded-lg hover:bg-blue-50 transition-colors cursor-default mr-2",children:[h.jsx("span",{className:"shrink-0 w-6 h-4 flex items-center justify-center",children:!z.country||z.country==="LOCAL"?h.jsx("span",{className:"text-base",children:"🏠"}):h.jsx("img",{src:`https://flagcdn.com/w40/${z.country.toLowerCase()}.png`,srcSet:`https://flagcdn.com/w80/${z.country.toLowerCase()}.png 2x`,width:"20",alt:z.country,className:"rounded-sm object-cover"})}),h.jsx("span",{className:"flex-1 text-sm font-mono text-gray-700 truncate",children:z.ip}),h.jsx("span",{className:"text-xs text-gray-400 shrink-0",children:Spe(z.connectedAt)})]})},V)):!y&&h.jsxs("div",{className:"text-center py-8 text-gray-400",children:[h.jsx(ZC,{size:32,className:"mx-auto mb-2"}),h.jsx("p",{className:"text-sm",children:"접속 기록 없음"})]}),y&&h.jsx("div",{className:"text-center py-3",children:h.jsx("div",{className:"w-5 h-5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin mx-auto"})})]})]}),h.jsxs("div",{className:"bg-white p-6 rounded-2xl shadow-sm border border-gray-100 overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between mb-5",children:[h.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"최근 활동"}),h.jsx(zh,{size:18,className:"text-gray-400"})]}),h.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",ref:_,onScroll:I,children:[b&&b.length>0?b.map((z,V)=>{let F=mz,ne="bg-gray-400";return z.type==="INBOX"?(F=JC,ne="bg-violet-400"):z.type==="SENT"?(F=nc,ne="bg-blue-400"):z.type==="USER"&&(F=Ku,ne="bg-emerald-400"),h.jsxs("div",{className:"flex items-center gap-3 p-2 hover:bg-gray-50 rounded-lg transition-colors mr-2",children:[h.jsx("div",{className:`p-2 rounded-lg ${ne}`,children:h.jsx(F,{size:14,className:"text-white"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"text-sm font-medium text-gray-700 truncate",children:z.message}),h.jsx("p",{className:"text-xs text-gray-400",children:new Date(z.date).toLocaleString("ko-KR",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]},V)}):!D&&h.jsxs("div",{className:"text-center py-6 text-gray-400",children:[h.jsx(zh,{size:28,className:"mx-auto mb-2"}),h.jsx("p",{className:"text-sm",children:"활동 없음"})]}),D&&h.jsx("div",{className:"text-center py-4",children:h.jsx("div",{className:"w-5 h-5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin mx-auto"})})]})]})]})]})},Dpe=cn(h.jsx("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"})),_pe=cn(h.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"})),Npe=cn(h.jsx("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"})),Mpe=cn(h.jsx("path",{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2M9 12c.83 0 1.5.67 1.5 1.5S9.83 15 9 15s-1.5-.67-1.5-1.5S8.17 12 9 12m3 6H6v-.75c0-1 2-1.5 3-1.5s3 .5 3 1.5zm1-9h-2V4h2zm5 7.5h-4V15h4zm0-3h-4V12h4z"})),E0=U.forwardRef(function(t,r){return h.jsx(Je,{ref:r,...t})}),Tpe=()=>{const{fetchUsers:e,addUser:t,deleteUser:r,updateUser:n,user:a}=ln(),[o,i]=m.useState([]),[s,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(!1),[p,g]=m.useState(!1),[y,v]=m.useState({email:"",password:"",name:"",isAdmin:!1}),[x,w]=m.useState(null),[b,S]=m.useState(null),[k,P]=m.useState({}),[E,O]=m.useState(""),[D,N]=m.useState(!0);m.useEffect(()=>{_()},[]);const _=async()=>{N(!0);try{const F=await e();i(F)}catch(F){console.error(F)}finally{N(!1)}},C=(F,ne=!1)=>{const ee={};return F.email||(ee.email="아이디를 입력해주세요."),F.name||(ee.name="이름을 입력해주세요."),!ne&&!F.password&&(ee.password="비밀번호를 입력해주세요."),F.password&&F.password.length<4&&(ee.password="비밀번호는 4자 이상이어야 합니다."),P(ee),Object.keys(ee).length===0},M=async()=>{const F=localStorage.getItem("email_token");if(!F)return!1;try{const ne=await fetch("/api/verify",{headers:{Authorization:`Bearer ${F}`}});if(ne.ok){const ee=await ne.json();if(ee.valid&&ee.user&&!ee.user.isAdmin)return sessionStorage.setItem("admin_denied_message","권한이 없습니다. 메인 화면으로 이동합니다."),window.location.href="/mail/inbox",!1}return!0}catch{return!0}},T=async()=>{await M()&&(P({}),O(""),u(!0))},j=async()=>{if(await M()&&(O(""),!!C(y)))try{const F=`${y.email}@caadiq.co.kr`;await t({...y,email:F}),u(!1),v({email:"",password:"",name:"",isAdmin:!1}),_()}catch(F){O("생성 실패: "+(F.message||"알 수 없는 오류"))}},A=async F=>{if(!await M())return;const[ne]=F.email.split("@");w({...F,emailId:ne,password:""}),P({}),O(""),f(!0)},L=async()=>{if(await M()&&(O(""),!!C(x,!0)))try{const F=`${x.emailId}@caadiq.co.kr`;n&&await n(x.id,{...x,email:F,password:x.password||void 0}),f(!1),w(null),_()}catch(F){O("수정 실패: "+(F.message||"오류 발생"))}},I=async F=>{await M()&&(S(F),g(!0))},$=async()=>{if(await M()&&b)try{await r(b.id),g(!1),S(null),_()}catch(F){console.error(F)}},z=o.filter(F=>F.email.toLowerCase().includes(s.toLowerCase())||F.name&&F.name.toLowerCase().includes(s.toLowerCase())),V={"& .MuiOutlinedInput-root":{borderRadius:"12px","&.Mui-focused fieldset":{borderColor:"#9ca3af",borderWidth:"1px"}},"& .MuiInputLabel-root.Mui-focused":{color:"#6b7280"}};return D?h.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsx("div",{className:"w-12 h-12 border-4 border-blue-400 border-t-transparent rounded-full animate-spin"}),h.jsx("span",{className:"text-gray-500 font-medium",children:"사용자 로딩 중..."})]})}):h.jsxs("div",{className:"p-8 bg-gray-50 min-h-full",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"사용자 관리"}),h.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"이메일 계정을 추가, 수정, 삭제합니다"})]}),h.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-6",children:[h.jsxs("div",{className:"relative w-full sm:w-72",children:[h.jsx(Bh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400",size:18}),h.jsx("input",{type:"text",placeholder:"이름 또는 이메일 검색...",value:s,onChange:F=>l(F.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-white border border-gray-200 rounded-xl text-sm focus:ring-2 focus:ring-blue-100 focus:border-blue-300 outline-none transition-all"})]}),h.jsx(ha,{variant:"contained",onClick:T,startIcon:h.jsx(xz,{className:"h-5 w-5"}),sx:{backgroundColor:"#6366f1",textTransform:"none",borderRadius:"12px",boxShadow:"none",fontWeight:600,px:3,"&:hover":{backgroundColor:"#4f46e5",boxShadow:"none"}},children:"사용자 추가"})]}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6",children:[h.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-100 flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-blue-100 rounded-xl",children:h.jsx(Ku,{className:"text-blue-600",size:20})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-2xl font-bold text-gray-800",children:o.length}),h.jsx("p",{className:"text-sm text-gray-500",children:"전체 사용자"})]})]}),h.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-100 flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-indigo-100 rounded-xl",children:h.jsx(xd,{className:"text-indigo-600",size:20})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-2xl font-bold text-gray-800",children:o.filter(F=>F.isAdmin).length}),h.jsx("p",{className:"text-sm text-gray-500",children:"관리자"})]})]}),h.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-100 flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-emerald-100 rounded-xl",children:h.jsx(Wh,{className:"text-emerald-600",size:20})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-2xl font-bold text-gray-800",children:o.filter(F=>!F.isAdmin).length}),h.jsx("p",{className:"text-sm text-gray-500",children:"일반 사용자"})]})]})]}),h.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden",children:h.jsxs("table",{className:"w-full",children:[h.jsx("thead",{className:"bg-gray-50 border-b border-gray-100",children:h.jsxs("tr",{children:[h.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"사용자"}),h.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"이름"}),h.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"권한"}),h.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"생성일"}),h.jsx("th",{className:"px-6 py-4 text-right text-xs font-semibold text-gray-500 uppercase",children:"작업"})]})}),h.jsx("tbody",{className:"divide-y divide-gray-100",children:z.length>0?z.map(F=>h.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[h.jsx("td",{className:"px-6 py-4",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("div",{className:`h-10 w-10 rounded-full flex items-center justify-center text-white mr-3 ${F.isAdmin?"bg-gradient-to-br from-indigo-500 to-purple-600":"bg-gradient-to-br from-gray-400 to-gray-500"}`,children:F.isAdmin?h.jsx(xd,{size:18}):h.jsx(Wh,{size:18})}),h.jsx("div",{className:"text-sm font-medium text-gray-900",children:F.email})]})}),h.jsx("td",{className:"px-6 py-4 text-sm text-gray-600",children:F.name||"-"}),h.jsx("td",{className:"px-6 py-4",children:F.isAdmin?h.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold bg-indigo-100 text-indigo-700",children:"관리자"}):h.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold bg-gray-100 text-gray-600",children:"일반"})}),h.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:new Date(F.createdAt).toLocaleDateString("ko-KR")}),h.jsx("td",{className:"px-6 py-4 text-right",children:h.jsxs("div",{className:"flex items-center justify-end gap-1",children:[h.jsx($n,{onClick:()=>A(F),size:"small",sx:{color:"#6b7280","&:hover":{color:"#6366f1",backgroundColor:"#eef2ff"}},children:h.jsx(RM,{size:16})}),h.jsx($n,{onClick:()=>I(F),size:"small",sx:{color:"#6b7280","&:hover":{color:"#ef4444",backgroundColor:"#fef2f2"}},children:h.jsx(Li,{size:16})})]})})]},F.id)):h.jsx("tr",{children:h.jsx("td",{colSpan:"5",className:"px-6 py-12 text-center text-gray-400",children:s?"검색 결과가 없습니다":"등록된 사용자가 없습니다"})})})]})}),h.jsx(ih,{open:c,onClose:(F,ne)=>ne!=="backdropClick"&&u(!1),TransitionComponent:E0,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{borderRadius:"20px",padding:"8px"}},children:h.jsx("form",{autoComplete:"off",onSubmit:F=>{F.preventDefault(),j()},children:h.jsxs("div",{className:"text-center p-6",children:[h.jsx("div",{className:"mx-auto bg-indigo-100 w-16 h-16 rounded-2xl flex items-center justify-center mb-4",children:h.jsx(Dpe,{sx:{fontSize:32,color:"#6366f1"}})}),h.jsx(e0,{sx:{fontWeight:700,padding:0,marginBottom:1,fontSize:"1.25rem"},children:"새 사용자 추가"}),h.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"새로운 계정 정보를 입력해주세요"}),E&&h.jsx("div",{className:"mb-4 text-sm text-red-600 bg-red-50 p-3 rounded-xl",children:E}),h.jsxs("div",{className:"space-y-4 text-left",children:[h.jsx(pl,{label:"이메일 (ID)",fullWidth:!0,variant:"outlined",value:y.email,error:!!k.email,helperText:k.email,name:"new_email_id_field",inputProps:{autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"},onChange:F=>{v({...y,email:F.target.value}),O(""),P({...k,email:""})},InputProps:{startAdornment:h.jsx(du,{position:"start",children:h.jsx(_pe,{color:"action",fontSize:"small"})}),endAdornment:h.jsx(du,{position:"end",children:h.jsx("span",{className:"text-gray-400 text-sm",children:"@caadiq.co.kr"})})},sx:V}),h.jsx(pl,{label:"이름",fullWidth:!0,variant:"outlined",value:y.name,error:!!k.name,helperText:k.name,name:"new_display_name_field",inputProps:{autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"},onChange:F=>{v({...y,name:F.target.value}),O(""),P({...k,name:""})},InputProps:{startAdornment:h.jsx(du,{position:"start",children:h.jsx(Mpe,{color:"action",fontSize:"small"})})},sx:V}),h.jsx(pl,{label:"비밀번호",type:"password",fullWidth:!0,variant:"outlined",value:y.password,error:!!k.password,helperText:k.password,name:"new_secret_key_field",inputProps:{autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"},onChange:F=>{v({...y,password:F.target.value}),O(""),P({...k,password:""})},InputProps:{startAdornment:h.jsx(du,{position:"start",children:h.jsx(Npe,{color:"action",fontSize:"small"})})},sx:V}),h.jsxs("div",{className:"flex items-center p-3 bg-gray-50 rounded-xl cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>v({...y,isAdmin:!y.isAdmin}),children:[h.jsx("div",{className:`mr-3 w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all ${y.isAdmin?"bg-indigo-500 border-indigo-500":"border-gray-300"}`,children:y.isAdmin&&h.jsx(rc,{className:"h-3.5 w-3.5 text-white",strokeWidth:3})}),h.jsxs("div",{children:[h.jsx("span",{className:"text-sm font-semibold text-gray-700",children:"관리자 권한 부여"}),h.jsx("p",{className:"text-xs text-gray-500",children:"시스템 설정 및 사용자 관리 가능"})]})]}),h.jsxs("div",{className:"flex gap-3 mt-6",children:[h.jsx(ha,{type:"button",onClick:()=>u(!1),fullWidth:!0,variant:"outlined",sx:{color:"#6b7280",borderColor:"#d1d5db",borderRadius:"12px",height:"48px",textTransform:"none",fontWeight:600},children:"취소"}),h.jsx(ha,{type:"submit",fullWidth:!0,variant:"contained",sx:{backgroundColor:"#6366f1",borderRadius:"12px",height:"48px",boxShadow:"none",textTransform:"none",fontWeight:600,"&:hover":{backgroundColor:"#4f46e5"}},children:"계정 생성"})]})]})]})})}),h.jsx(ih,{open:d,onClose:(F,ne)=>ne!=="backdropClick"&&f(!1),TransitionComponent:E0,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{borderRadius:"20px",padding:"8px"}},children:x&&h.jsx("form",{autoComplete:"off",onSubmit:F=>{F.preventDefault(),L()},children:h.jsxs("div",{className:"text-center p-6",children:[h.jsx(e0,{sx:{fontWeight:700,padding:0,marginBottom:1,fontSize:"1.25rem"},children:"사용자 정보 수정"}),E&&h.jsx("div",{className:"mb-4 text-sm text-red-600 bg-red-50 p-3 rounded-xl",children:E}),h.jsxs("div",{className:"space-y-4 text-left mt-4",children:[h.jsx(pl,{label:"이메일 (변경 불가)",fullWidth:!0,variant:"outlined",value:x.emailId,disabled:!0,InputProps:{endAdornment:h.jsx(du,{position:"end",children:h.jsx("span",{className:"text-gray-400 text-sm",children:"@caadiq.co.kr"})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",backgroundColor:"#f9fafb"}}}),h.jsx(pl,{label:"이름",fullWidth:!0,variant:"outlined",value:x.name,error:!!k.name,helperText:k.name,name:"edit_display_name_field",inputProps:{autoComplete:"new-password","data-lpignore":"true"},onChange:F=>{w({...x,name:F.target.value}),O(""),P({...k,name:""})},sx:V}),h.jsx(pl,{label:"새 비밀번호 (변경시에만 입력)",type:"password",fullWidth:!0,variant:"outlined",value:x.password,error:!!k.password,helperText:k.password,name:"edit_secret_key_field",inputProps:{autoComplete:"new-password","data-lpignore":"true"},placeholder:"변경하지 않으려면 비워두세요",onChange:F=>{w({...x,password:F.target.value}),O(""),P({...k,password:""})},sx:V}),(()=>{const F=x.email===(a==null?void 0:a.email);return h.jsxs("div",{className:`flex items-center p-3 bg-gray-50 rounded-xl transition-colors ${F?"opacity-60 cursor-not-allowed":"cursor-pointer hover:bg-gray-100"}`,onClick:()=>!F&&w({...x,isAdmin:!x.isAdmin}),children:[h.jsx("div",{className:`mr-3 w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all ${x.isAdmin?"bg-indigo-500 border-indigo-500":"border-gray-300"}`,children:x.isAdmin&&h.jsx(rc,{className:"h-3.5 w-3.5 text-white",strokeWidth:3})}),h.jsxs("div",{children:[h.jsx("span",{className:"text-sm font-semibold text-gray-700",children:"관리자 권한"}),F&&h.jsx("p",{className:"text-xs text-gray-500",children:"본인 권한은 변경할 수 없습니다"})]})]})})(),h.jsxs("div",{className:"flex gap-3 mt-6",children:[h.jsx(ha,{type:"button",onClick:()=>f(!1),fullWidth:!0,variant:"outlined",sx:{color:"#6b7280",borderColor:"#d1d5db",borderRadius:"12px",height:"48px",textTransform:"none",fontWeight:600},children:"취소"}),h.jsx(ha,{type:"submit",fullWidth:!0,variant:"contained",sx:{backgroundColor:"#6366f1",borderRadius:"12px",height:"48px",boxShadow:"none",textTransform:"none",fontWeight:600,"&:hover":{backgroundColor:"#4f46e5"}},children:"수정 저장"})]})]})]})})}),h.jsx(ih,{open:p,onClose:()=>g(!1),TransitionComponent:E0,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{borderRadius:"20px",padding:"8px"}},children:h.jsxs("div",{className:"text-center p-6",children:[h.jsx("div",{className:"mx-auto bg-red-100 w-16 h-16 rounded-2xl flex items-center justify-center mb-4",children:h.jsx(Li,{className:"h-8 w-8 text-red-500"})}),h.jsx(e0,{sx:{fontWeight:700,padding:0,marginBottom:1,fontSize:"1.25rem"},children:"사용자 삭제"}),h.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["정말로 ",h.jsx("strong",{className:"text-gray-700",children:b==null?void 0:b.name})," (",b==null?void 0:b.email,") 님을 삭제하시겠습니까?",h.jsx("br",{}),h.jsx("span",{className:"text-red-500",children:"이 작업은 되돌릴 수 없습니다."})]}),h.jsxs("div",{className:"flex gap-3",children:[h.jsx(ha,{onClick:()=>g(!1),fullWidth:!0,variant:"outlined",sx:{color:"#6b7280",borderColor:"#d1d5db",borderRadius:"12px",height:"48px",textTransform:"none",fontWeight:600},children:"취소"}),h.jsx(ha,{onClick:$,fullWidth:!0,variant:"contained",color:"error",sx:{borderRadius:"12px",height:"48px",boxShadow:"none",textTransform:"none",fontWeight:600},children:"삭제"})]})]})})]})},jpe=()=>{var fe;const{fetchEmailConfig:e,updateEmailConfig:t,testEmailConnection:r}=ln(),[n,a]=m.useState({resend_api_key:"",mail_from:""}),[o,i]=m.useState({user_storage_quota:"50"}),[s,l]=m.useState({session_expire_hours:"24"}),[c,u]=m.useState({gemini_api_key:"",gemini_model:"gemini-2.0-flash"}),[d,f]=m.useState([]),[p,g]=m.useState(!1),[y,v]=m.useState(!1),[x,w]=m.useState(!1),[b,S]=m.useState(!1),[k,P]=m.useState(!1),[E,O]=m.useState(!0),[D,N]=m.useState({type:"",text:"",open:!1}),[_,C]=m.useState(null),[M,T]=m.useState(!1),[j,A]=m.useState(!1),[L,I]=m.useState(!1);m.useEffect(()=>{$()},[]);const $=async()=>{O(!0);try{const q=await e();a({resend_api_key:q.resend_api_key||"",mail_from:q.mail_from||""}),i({user_storage_quota:q.user_storage_quota?(parseInt(q.user_storage_quota)/1024).toString():"50"}),l({session_expire_hours:q.session_expire_hours||"24"});try{const ke=localStorage.getItem("email_token"),B=await fetch("/api/admin/config/gemini",{headers:{Authorization:`Bearer ${ke}`}});if(B.ok){const W=await B.json();u({gemini_api_key:W.gemini_api_key||"",gemini_model:W.gemini_model||"gemini-2.0-flash"}),f(W.models||[])}}catch(ke){console.error("Gemini 설정 로드 실패:",ke)}}catch(q){console.error(q)}finally{O(!1)}},z=async()=>{const q=localStorage.getItem("email_token");if(!q)return!1;try{const ke=await fetch("/api/verify",{headers:{Authorization:`Bearer ${q}`}});if(ke.ok){const B=await ke.json();if(B.valid&&B.user&&!B.user.isAdmin)return sessionStorage.setItem("admin_denied_message","권한이 없습니다. 메인 화면으로 이동합니다."),window.location.href="/mail/inbox",!1}return!0}catch{return!0}},V=async()=>{if(await z()){g(!0);try{await t(n),N({type:"success",text:"이메일 설정이 저장되었습니다.",open:!0})}catch(q){N({type:"error",text:"이메일 설정 저장 실패: "+q.message,open:!0})}finally{g(!1)}}},F=async()=>{if(await z()){v(!0);try{await t({user_storage_quota:(parseFloat(o.user_storage_quota)*1024).toString()}),N({type:"success",text:"스토리지 설정이 저장되었습니다.",open:!0})}catch(q){N({type:"error",text:"스토리지 설정 저장 실패: "+q.message,open:!0})}finally{v(!1)}}},ne=async()=>{if(await z()){w(!0);try{await t(s),N({type:"success",text:"세션 설정이 저장되었습니다.",open:!0})}catch(q){N({type:"error",text:"세션 설정 저장 실패: "+q.message,open:!0})}finally{w(!1)}}},ee=async()=>{if(await z()){S(!0);try{const q=localStorage.getItem("email_token");if(!(await fetch("/api/admin/config/gemini",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${q}`},body:JSON.stringify(c)})).ok)throw new Error("저장 실패");N({type:"success",text:"Gemini 설정이 저장되었습니다.",open:!0})}catch(q){N({type:"error",text:"Gemini 설정 저장 실패: "+q.message,open:!0})}finally{S(!1)}}},X=async()=>{if(await z()){if(!n.resend_api_key){N({type:"error",text:"API 키를 입력해주세요.",open:!0});return}P(!0),C(null);try{await r({to:n.mail_from||"admin@caadiq.co.kr",resend_api_key:n.resend_api_key,mail_from:n.mail_from}),C("success"),N({type:"success",text:"연동 테스트 성공! 이메일이 발송되었습니다.",open:!0})}catch(q){C("error"),N({type:"error",text:"연동 테스트 실패: "+q.message,open:!0})}finally{P(!1)}}};return E?h.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsx("div",{className:"w-12 h-12 border-4 border-blue-400 border-t-transparent rounded-full animate-spin"}),h.jsx("span",{className:"text-gray-500 font-medium",children:"설정 로딩 중..."})]})}):h.jsxs("div",{className:"p-8 bg-gray-50 min-h-full",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"시스템 설정"}),h.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"메일 서버의 연동 및 스토리지 환경을 설정합니다"})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-white p-8 rounded-2xl shadow-sm border border-gray-100",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[h.jsx("div",{className:"p-3 bg-indigo-100 rounded-xl",children:h.jsx(nc,{className:"text-indigo-500",size:24})}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-bold text-gray-800",children:"Resend 연동"}),h.jsx("p",{className:"text-sm text-gray-500",children:"이메일 발송을 위한 Resend API 설정"})]})]}),h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(wa,{size:14,className:"text-gray-400"}),"발신자 이메일"]})}),h.jsx("input",{type:"email",value:n.mail_from,onChange:q=>a({...n,mail_from:q.target.value}),placeholder:"noreply@caadiq.co.kr",className:"w-full p-3.5 bg-gray-50 border border-gray-200 rounded-xl focus:ring-2 focus:ring-indigo-100 focus:border-indigo-300 outline-none transition-all"}),h.jsxs("p",{className:"text-xs text-gray-400 mt-1.5 flex items-center gap-1",children:[h.jsx(_M,{size:12}),"Resend에서 인증된 도메인의 이메일이어야 합니다"]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(e2,{size:14,className:"text-gray-400"}),"Resend API Key"]})}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:M?"text":"password",value:n.resend_api_key,onChange:q=>a({...n,resend_api_key:q.target.value}),placeholder:"re_xxxxx...",autoComplete:"off",className:"w-full p-3.5 pr-12 bg-gray-50 border border-gray-200 rounded-xl focus:ring-2 focus:ring-indigo-100 focus:border-indigo-300 outline-none transition-all font-mono text-sm"}),h.jsx("button",{type:"button",onClick:()=>T(!M),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1.5 text-gray-400 hover:text-gray-600 transition-colors",children:M?h.jsx(XC,{size:18}):h.jsx(QC,{size:18})})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-1.5",children:"Resend 대시보드에서 API 키를 발급받으세요"})]})]}),h.jsxs("div",{className:"mt-6 pt-6 border-t border-gray-100 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[_==="success"&&h.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 bg-emerald-50 px-3 py-1.5 rounded-lg",children:[h.jsx(KF,{size:16}),h.jsx("span",{className:"text-sm font-medium",children:"연동 성공"})]}),_==="error"&&h.jsxs("div",{className:"flex items-center gap-2 text-red-600 bg-red-50 px-3 py-1.5 rounded-lg",children:[h.jsx(bz,{size:16}),h.jsx("span",{className:"text-sm font-medium",children:"연동 실패"})]}),h.jsxs("button",{type:"button",onClick:X,disabled:k,className:"px-4 py-2 text-sm font-medium text-indigo-600 bg-indigo-50 border border-indigo-200 rounded-xl hover:bg-indigo-100 transition-colors flex items-center gap-2 disabled:opacity-50",children:[h.jsx(nu,{className:`h-4 w-4 ${k?"animate-spin":""}`}),"테스트"]})]}),h.jsxs("button",{type:"button",onClick:V,disabled:p,className:"px-5 py-2.5 text-sm font-semibold text-white bg-indigo-500 rounded-xl hover:bg-indigo-600 transition-colors flex items-center gap-2 disabled:opacity-50",children:[p?h.jsx(nu,{className:"h-4 w-4 animate-spin"}):h.jsx(Jf,{className:"h-4 w-4"}),"저장"]})]})]}),h.jsxs("div",{className:"bg-white p-8 rounded-2xl shadow-sm border border-gray-100",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[h.jsx("div",{className:"p-3 bg-amber-100 rounded-xl",children:h.jsx(Ex,{className:"text-amber-500",size:24})}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-bold text-gray-800",children:"Gemini AI 번역"}),h.jsx("p",{className:"text-sm text-gray-500",children:"이메일 번역을 위한 Google Gemini API 설정"})]})]}),h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(e2,{size:14,className:"text-gray-400"}),"Gemini API Key"]})}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:j?"text":"password",value:c.gemini_api_key,onChange:q=>u({...c,gemini_api_key:q.target.value}),placeholder:"AI...",autoComplete:"off",className:"w-full p-3.5 pr-12 bg-gray-50 border border-gray-200 rounded-xl focus:ring-2 focus:ring-amber-100 focus:border-amber-300 outline-none transition-all font-mono text-sm"}),h.jsx("button",{type:"button",onClick:()=>A(!j),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1.5 text-gray-400 hover:text-gray-600 transition-colors",children:j?h.jsx(XC,{size:18}):h.jsx(QC,{size:18})})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-1.5",children:"Google AI Studio에서 API 키를 발급받으세요"})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"모델 선택"}),h.jsxs("div",{className:"relative",children:[h.jsxs("button",{type:"button",onClick:()=>I(!L),className:"w-full text-left border border-gray-200 rounded-xl px-3.5 py-3 text-sm text-gray-700 bg-gray-50 flex items-center justify-between focus:border-amber-300 focus:ring-2 focus:ring-amber-100 transition-all",children:[h.jsx("span",{children:((fe=d.find(q=>q.id===c.gemini_model))==null?void 0:fe.name)||"Gemini 2.0 Flash"}),h.jsx(Eu,{className:`h-4 w-4 text-gray-400 transition-transform ${L?"rotate-180":""}`})]}),L&&h.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-gray-200 rounded-xl shadow-lg z-50 py-1 animate-fade-in-down max-h-64 overflow-y-auto",children:d.map(q=>h.jsxs("button",{type:"button",onClick:()=>{u({...c,gemini_model:q.id}),I(!1)},className:`w-full text-left px-4 py-2.5 text-sm hover:bg-gray-50 flex items-center justify-between gap-3 ${c.gemini_model===q.id?"bg-amber-50 text-amber-600 font-medium":"text-gray-700"}`,children:[h.jsx("span",{children:q.name}),c.gemini_model===q.id&&h.jsx(rc,{className:"h-4 w-4"})]},q.id))})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-1.5",children:"무료 티어에서 사용 가능한 모델입니다"})]})]}),h.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100 flex justify-end",children:h.jsxs("button",{type:"button",onClick:ee,disabled:b,className:"px-5 py-2.5 text-sm font-semibold text-white bg-amber-500 rounded-xl hover:bg-amber-600 transition-colors flex items-center gap-2 disabled:opacity-50",children:[b?h.jsx(nu,{className:"h-4 w-4 animate-spin"}):h.jsx(Jf,{className:"h-4 w-4"}),"저장"]})})]})]}),h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-white p-8 rounded-2xl shadow-sm border border-gray-100",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[h.jsx("div",{className:"p-3 bg-emerald-100 rounded-xl",children:h.jsx(TM,{className:"text-emerald-500",size:24})}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-bold text-gray-800",children:"스토리지 설정"}),h.jsx("p",{className:"text-sm text-gray-500",children:"사용자별 저장 공간 할당량"})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"사용자 기본 할당량"}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("input",{type:"number",value:o.user_storage_quota,onChange:q=>i({user_storage_quota:q.target.value}),placeholder:"50",min:"1",className:"w-32 p-3.5 bg-gray-50 border border-gray-200 rounded-xl focus:ring-2 focus:ring-emerald-100 focus:border-emerald-300 outline-none transition-all text-center font-semibold text-lg"}),h.jsx("span",{className:"text-gray-600 font-medium",children:"GB"})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"모든 사용자에게 적용되는 기본 스토리지 용량입니다"})]}),h.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100 flex justify-end",children:h.jsxs("button",{type:"button",onClick:F,disabled:y,className:"px-5 py-2.5 text-sm font-semibold text-white bg-emerald-500 rounded-xl hover:bg-emerald-600 transition-colors flex items-center gap-2 disabled:opacity-50",children:[y?h.jsx(nu,{className:"h-4 w-4 animate-spin"}):h.jsx(Jf,{className:"h-4 w-4"}),"저장"]})})]}),h.jsxs("div",{className:"bg-white p-8 rounded-2xl shadow-sm border border-gray-100",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[h.jsx("div",{className:"p-3 bg-violet-100 rounded-xl",children:h.jsx(xd,{className:"text-violet-500",size:24})}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-bold text-gray-800",children:"세션 설정"}),h.jsx("p",{className:"text-sm text-gray-500",children:"로그인 유지 시간"})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zh,{size:14,className:"text-gray-400"}),"세션 만료 시간"]})}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("input",{type:"number",value:s.session_expire_hours,onChange:q=>l({...s,session_expire_hours:q.target.value}),placeholder:"24",min:"1",max:"8760",className:"w-32 p-3.5 bg-gray-50 border border-gray-200 rounded-xl focus:ring-2 focus:ring-violet-100 focus:border-violet-300 outline-none transition-all text-center font-semibold text-lg"}),h.jsx("span",{className:"text-gray-600 font-medium",children:"시간"})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-1.5",children:"로그인 후 자동 로그아웃까지의 시간 (1~8760시간, 최대 1년)"})]}),h.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100 flex justify-end",children:h.jsxs("button",{type:"button",onClick:ne,disabled:x,className:"px-5 py-2.5 text-sm font-semibold text-white bg-violet-500 rounded-xl hover:bg-violet-600 transition-colors flex items-center gap-2 disabled:opacity-50",children:[x?h.jsx(nu,{className:"h-4 w-4 animate-spin"}):h.jsx(Jf,{className:"h-4 w-4"}),"저장"]})})]})]})]}),h.jsx(SQ,{open:D.open,autoHideDuration:4e3,onClose:()=>N({...D,open:!1}),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:h.jsx(lG,{severity:D.type,variant:"filled",onClose:()=>N({...D,open:!1}),sx:{borderRadius:"12px"},children:D.text})})]})},Ape=()=>{const e=ni(),t=Aa(),{user:r,initialLoading:n}=ln();if(m.useEffect(()=>{n||(r&&!r.isAdmin&&(sessionStorage.setItem("admin_denied_message","권한이 없습니다. 메인 화면으로 이동합니다."),window.location.href="/mail/inbox"),!n&&!r&&(window.location.href="/"))},[r,n]),n||!r||!r.isAdmin)return null;const a=()=>{const i=t.pathname;return i.includes("/users")?"users":i.includes("/settings")?"settings":"dashboard"},o=i=>{e(`/admin/${i}`)};return h.jsxs("div",{className:"flex h-screen bg-white overflow-hidden font-sans text-slate-800 min-w-[1400px]",children:[h.jsx("div",{className:"w-80 flex-shrink-0 h-full",children:h.jsx(RQ,{currentView:a(),onViewChange:o,onBack:()=>e("/")})}),h.jsx("div",{className:"flex-1 bg-[#f8f9fa] overflow-auto h-full",children:h.jsxs(hM,{children:[h.jsx(ga,{path:"dashboard",element:h.jsx(Ope,{})}),h.jsx(ga,{path:"users",element:h.jsx(Tpe,{})}),h.jsx(ga,{path:"settings",element:h.jsx(jpe,{})}),h.jsx(ga,{path:"*",element:h.jsx(Yu,{to:"dashboard",replace:!0})})]})})]})};function O0({children:e}){const{user:t}=ln(),r=Aa();return t?e:h.jsx(Yu,{to:"/login",state:{from:r},replace:!0})}function Rpe(){const{user:e,initialLoading:t}=ln();return t?h.jsx("div",{className:"h-screen flex items-center justify-center bg-white",children:"Loading..."}):h.jsx(B6,{children:h.jsxs(hM,{children:[h.jsx(ga,{path:"/login",element:h.jsx(N7,{})}),h.jsx(ga,{path:"/admin/*",element:h.jsx(O0,{children:e!=null&&e.isAdmin?h.jsx(Ape,{}):h.jsx(Yu,{to:"/",replace:!0})})}),h.jsx(ga,{path:"/mail/:mailbox",element:h.jsx(O0,{children:h.jsx(aE,{})})}),h.jsx(ga,{path:"/mail/:mailbox/:emailId",element:h.jsx(O0,{children:h.jsx(aE,{})})}),h.jsx(ga,{path:"/",element:h.jsx(Yu,{to:"/mail/inbox",replace:!0})}),h.jsx(ga,{path:"*",element:h.jsx(Yu,{to:"/",replace:!0})})]})})}function Ipe(){return h.jsxs(FF,{children:[h.jsx(Rpe,{}),h.jsx(LF,{position:"bottom-right",toastOptions:{duration:4e3,style:{background:"#333",color:"#fff",borderRadius:"8px",padding:"12px 16px",fontSize:"14px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},success:{iconTheme:{primary:"#4ade80",secondary:"#333"}},error:{iconTheme:{primary:"#ef4444",secondary:"#333"}}}})]})}D0.createRoot(document.getElementById("root")).render(h.jsx(U.StrictMode,{children:h.jsx(Ipe,{})}));