migrants-nt-sec/public/assets/index-BmGUTB7j.js

584 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 xU=Object.defineProperty;var bU=(e,t,r)=>t in e?xU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fE=(e,t,r)=>bU(e,typeof t!="symbol"?t+"":t,r);function wU(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var fh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty={exports:{}},Zc={},ky={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 dE;function _U(){if(dE)return Ye;dE=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=p&&L[p]||L["@@iterator"],typeof L=="function"?L:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function b(L,K,ae){this.props=L,this.context=K,this.refs=x,this.updater=ae||v}b.prototype.isReactComponent={},b.prototype.setState=function(L,K){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,K,"setState")},b.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=b.prototype;function A(L,K,ae){this.props=L,this.context=K,this.refs=x,this.updater=ae||v}var P=A.prototype=new S;P.constructor=A,w(P,b.prototype),P.isPureReactComponent=!0;var C=Array.isArray,N=Object.prototype.hasOwnProperty,E={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function k(L,K,ae){var ue,xe={},Ae=null,oe=null;if(K!=null)for(ue in K.ref!==void 0&&(oe=K.ref),K.key!==void 0&&(Ae=""+K.key),K)N.call(K,ue)&&!T.hasOwnProperty(ue)&&(xe[ue]=K[ue]);var ge=arguments.length-2;if(ge===1)xe.children=ae;else if(1<ge){for(var ne=Array(ge),fe=0;fe<ge;fe++)ne[fe]=arguments[fe+2];xe.children=ne}if(L&&L.defaultProps)for(ue in ge=L.defaultProps,ge)xe[ue]===void 0&&(xe[ue]=ge[ue]);return{$$typeof:e,type:L,key:Ae,ref:oe,props:xe,_owner:E.current}}function M(L,K){return{$$typeof:e,type:L.type,key:K,ref:L.ref,props:L.props,_owner:L._owner}}function z(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function D(L){var K={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ae){return K[ae]})}var B=/\/+/g;function U(L,K){return typeof L=="object"&&L!==null&&L.key!=null?D(""+L.key):K.toString(36)}function G(L,K,ae,ue,xe){var Ae=typeof L;(Ae==="undefined"||Ae==="boolean")&&(L=null);var oe=!1;if(L===null)oe=!0;else switch(Ae){case"string":case"number":oe=!0;break;case"object":switch(L.$$typeof){case e:case t:oe=!0}}if(oe)return oe=L,xe=xe(oe),L=ue===""?"."+U(oe,0):ue,C(xe)?(ae="",L!=null&&(ae=L.replace(B,"$&/")+"/"),G(xe,K,ae,"",function(fe){return fe})):xe!=null&&(z(xe)&&(xe=M(xe,ae+(!xe.key||oe&&oe.key===xe.key?"":(""+xe.key).replace(B,"$&/")+"/")+L)),K.push(xe)),1;if(oe=0,ue=ue===""?".":ue+":",C(L))for(var ge=0;ge<L.length;ge++){Ae=L[ge];var ne=ue+U(Ae,ge);oe+=G(Ae,K,ae,ne,xe)}else if(ne=g(L),typeof ne=="function")for(L=ne.call(L),ge=0;!(Ae=L.next()).done;)Ae=Ae.value,ne=ue+U(Ae,ge++),oe+=G(Ae,K,ae,ne,xe);else if(Ae==="object")throw K=String(L),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return oe}function Y(L,K,ae){if(L==null)return L;var ue=[],xe=0;return G(L,ue,"","",function(Ae){return K.call(ae,Ae,xe++)}),ue}function F(L){if(L._status===-1){var K=L._result;K=K(),K.then(function(ae){(L._status===0||L._status===-1)&&(L._status=1,L._result=ae)},function(ae){(L._status===0||L._status===-1)&&(L._status=2,L._result=ae)}),L._status===-1&&(L._status=0,L._result=K)}if(L._status===1)return L._result.default;throw L._result}var X={current:null},I={transition:null},W={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:I,ReactCurrentOwner:E};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ye.Children={map:Y,forEach:function(L,K,ae){Y(L,function(){K.apply(this,arguments)},ae)},count:function(L){var K=0;return Y(L,function(){K++}),K},toArray:function(L){return Y(L,function(K){return K})||[]},only:function(L){if(!z(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Ye.Component=b,Ye.Fragment=r,Ye.Profiler=i,Ye.PureComponent=A,Ye.StrictMode=n,Ye.Suspense=u,Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,Ye.act=Q,Ye.cloneElement=function(L,K,ae){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ue=w({},L.props),xe=L.key,Ae=L.ref,oe=L._owner;if(K!=null){if(K.ref!==void 0&&(Ae=K.ref,oe=E.current),K.key!==void 0&&(xe=""+K.key),L.type&&L.type.defaultProps)var ge=L.type.defaultProps;for(ne in K)N.call(K,ne)&&!T.hasOwnProperty(ne)&&(ue[ne]=K[ne]===void 0&&ge!==void 0?ge[ne]:K[ne])}var ne=arguments.length-2;if(ne===1)ue.children=ae;else if(1<ne){ge=Array(ne);for(var fe=0;fe<ne;fe++)ge[fe]=arguments[fe+2];ue.children=ge}return{$$typeof:e,type:L.type,key:xe,ref:Ae,props:ue,_owner:oe}},Ye.createContext=function(L){return L={$$typeof:o,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Ye.createElement=k,Ye.createFactory=function(L){var K=k.bind(null,L);return K.type=L,K},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(L){return{$$typeof:l,render:L}},Ye.isValidElement=z,Ye.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:F}},Ye.memo=function(L,K){return{$$typeof:f,type:L,compare:K===void 0?null:K}},Ye.startTransition=function(L){var K=I.transition;I.transition={};try{L()}finally{I.transition=K}},Ye.unstable_act=Q,Ye.useCallback=function(L,K){return X.current.useCallback(L,K)},Ye.useContext=function(L){return X.current.useContext(L)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(L){return X.current.useDeferredValue(L)},Ye.useEffect=function(L,K){return X.current.useEffect(L,K)},Ye.useId=function(){return X.current.useId()},Ye.useImperativeHandle=function(L,K,ae){return X.current.useImperativeHandle(L,K,ae)},Ye.useInsertionEffect=function(L,K){return X.current.useInsertionEffect(L,K)},Ye.useLayoutEffect=function(L,K){return X.current.useLayoutEffect(L,K)},Ye.useMemo=function(L,K){return X.current.useMemo(L,K)},Ye.useReducer=function(L,K,ae){return X.current.useReducer(L,K,ae)},Ye.useRef=function(L){return X.current.useRef(L)},Ye.useState=function(L){return X.current.useState(L)},Ye.useSyncExternalStore=function(L,K,ae){return X.current.useSyncExternalStore(L,K,ae)},Ye.useTransition=function(){return X.current.useTransition()},Ye.version="18.3.1",Ye}var hE;function $S(){return hE||(hE=1,ky.exports=_U()),ky.exports}/**
* @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 pE;function SU(){if(pE)return Zc;pE=1;var e=$S(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,u,f){var h,p={},g=null,v=null;f!==void 0&&(g=""+f),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(v=u.ref);for(h in u)n.call(u,h)&&!a.hasOwnProperty(h)&&(p[h]=u[h]);if(l&&l.defaultProps)for(h in u=l.defaultProps,u)p[h]===void 0&&(p[h]=u[h]);return{$$typeof:t,type:l,key:g,ref:v,props:p,_owner:i.current}}return Zc.Fragment=r,Zc.jsx=o,Zc.jsxs=o,Zc}var mE;function jU(){return mE||(mE=1,Ty.exports=SU()),Ty.exports}var d=jU(),_=$S();const V=ut(_),eL=wU({__proto__:null,default:V},[_]);var dh={},Ry={exports:{}},$r={},My={exports:{}},Iy={};/**
* @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.
*/var gE;function PU(){return gE||(gE=1,function(e){function t(I,W){var Q=I.length;I.push(W);e:for(;0<Q;){var L=Q-1>>>1,K=I[L];if(0<i(K,W))I[L]=W,I[Q]=K,Q=L;else break e}}function r(I){return I.length===0?null:I[0]}function n(I){if(I.length===0)return null;var W=I[0],Q=I.pop();if(Q!==W){I[0]=Q;e:for(var L=0,K=I.length,ae=K>>>1;L<ae;){var ue=2*(L+1)-1,xe=I[ue],Ae=ue+1,oe=I[Ae];if(0>i(xe,Q))Ae<K&&0>i(oe,xe)?(I[L]=oe,I[Ae]=Q,L=Ae):(I[L]=xe,I[ue]=Q,L=ue);else if(Ae<K&&0>i(oe,Q))I[L]=oe,I[Ae]=Q,L=Ae;else break e}}return W}function i(I,W){var Q=I.sortIndex-W.sortIndex;return Q!==0?Q:I.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],f=[],h=1,p=null,g=3,v=!1,w=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(I){for(var W=r(f);W!==null;){if(W.callback===null)n(f);else if(W.startTime<=I)n(f),W.sortIndex=W.expirationTime,t(u,W);else break;W=r(f)}}function C(I){if(x=!1,P(I),!w)if(r(u)!==null)w=!0,F(N);else{var W=r(f);W!==null&&X(C,W.startTime-I)}}function N(I,W){w=!1,x&&(x=!1,S(k),k=-1),v=!0;var Q=g;try{for(P(W),p=r(u);p!==null&&(!(p.expirationTime>W)||I&&!D());){var L=p.callback;if(typeof L=="function"){p.callback=null,g=p.priorityLevel;var K=L(p.expirationTime<=W);W=e.unstable_now(),typeof K=="function"?p.callback=K:p===r(u)&&n(u),P(W)}else n(u);p=r(u)}if(p!==null)var ae=!0;else{var ue=r(f);ue!==null&&X(C,ue.startTime-W),ae=!1}return ae}finally{p=null,g=Q,v=!1}}var E=!1,T=null,k=-1,M=5,z=-1;function D(){return!(e.unstable_now()-z<M)}function B(){if(T!==null){var I=e.unstable_now();z=I;var W=!0;try{W=T(!0,I)}finally{W?U():(E=!1,T=null)}}else E=!1}var U;if(typeof A=="function")U=function(){A(B)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,Y=G.port2;G.port1.onmessage=B,U=function(){Y.postMessage(null)}}else U=function(){b(B,0)};function F(I){T=I,E||(E=!0,U())}function X(I,W){k=b(function(){I(e.unstable_now())},W)}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(){w||v||(w=!0,F(N))},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"):M=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(I){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var Q=g;g=W;try{return I()}finally{g=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,W){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Q=g;g=I;try{return W()}finally{g=Q}},e.unstable_scheduleCallback=function(I,W,Q){var L=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?L+Q:L):Q=L,I){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=Q+K,I={id:h++,callback:W,priorityLevel:I,startTime:Q,expirationTime:K,sortIndex:-1},Q>L?(I.sortIndex=Q,t(f,I),r(u)===null&&I===r(f)&&(x?(S(k),k=-1):x=!0,X(C,Q-L))):(I.sortIndex=K,t(u,I),w||v||(w=!0,F(N))),I},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(I){var W=g;return function(){var Q=g;g=W;try{return I.apply(this,arguments)}finally{g=Q}}}}(Iy)),Iy}var vE;function AU(){return vE||(vE=1,My.exports=PU()),My.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 yE;function NU(){if(yE)return $r;yE=1;var e=$S(),t=AU();function r(s){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m<arguments.length;m++)c+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(s,c){o(s,c),o(s+"Capture",c)}function o(s,c){for(i[s]=c,s=0;s<c.length;s++)n.add(c[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},p={};function g(s){return u.call(p,s)?!0:u.call(h,s)?!1:f.test(s)?p[s]=!0:(h[s]=!0,!1)}function v(s,c,m,y){if(m!==null&&m.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return y?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function w(s,c,m,y){if(c===null||typeof c>"u"||v(s,c,m,y))return!0;if(y)return!1;if(m!==null)switch(m.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function x(s,c,m,y,j,O,R){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=y,this.attributeNamespace=j,this.mustUseProperty=m,this.propertyName=s,this.type=c,this.sanitizeURL=O,this.removeEmptyString=R}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){b[s]=new x(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var c=s[0];b[c]=new x(c,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){b[s]=new x(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){b[s]=new x(s,2,!1,s,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(s){b[s]=new x(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){b[s]=new x(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){b[s]=new x(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){b[s]=new x(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){b[s]=new x(s,5,!1,s.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(s){return s[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(s){var c=s.replace(S,A);b[c]=new x(c,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var c=s.replace(S,A);b[c]=new x(c,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var c=s.replace(S,A);b[c]=new x(c,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){b[s]=new x(s,1,!1,s.toLowerCase(),null,!1,!1)}),b.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){b[s]=new x(s,1,!1,s.toLowerCase(),null,!0,!0)});function P(s,c,m,y){var j=b.hasOwnProperty(c)?b[c]:null;(j!==null?j.type!==0:y||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(w(c,m,j,y)&&(m=null),y||j===null?g(c)&&(m===null?s.removeAttribute(c):s.setAttribute(c,""+m)):j.mustUseProperty?s[j.propertyName]=m===null?j.type===3?!1:"":m:(c=j.attributeName,y=j.attributeNamespace,m===null?s.removeAttribute(c):(j=j.type,m=j===3||j===4&&m===!0?"":""+m,y?s.setAttributeNS(y,c,m):s.setAttribute(c,m))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),D=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),I=Symbol.iterator;function W(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var Q=Object.assign,L;function K(s){if(L===void 0)try{throw Error()}catch(m){var c=m.stack.trim().match(/\n( *(at )?)/);L=c&&c[1]||""}return`
`+L+s}var ae=!1;function ue(s,c){if(!s||ae)return"";ae=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(ee){var y=ee}Reflect.construct(s,[],c)}else{try{c.call()}catch(ee){y=ee}s.call(c.prototype)}else{try{throw Error()}catch(ee){y=ee}s()}}catch(ee){if(ee&&y&&typeof ee.stack=="string"){for(var j=ee.stack.split(`
`),O=y.stack.split(`
`),R=j.length-1,$=O.length-1;1<=R&&0<=$&&j[R]!==O[$];)$--;for(;1<=R&&0<=$;R--,$--)if(j[R]!==O[$]){if(R!==1||$!==1)do if(R--,$--,0>$||j[R]!==O[$]){var q=`
`+j[R].replace(" at new "," at ");return s.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",s.displayName)),q}while(1<=R&&0<=$);break}}}finally{ae=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?K(s):""}function xe(s){switch(s.tag){case 5:return K(s.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return s=ue(s.type,!1),s;case 11:return s=ue(s.type.render,!1),s;case 1:return s=ue(s.type,!0),s;default:return""}}function Ae(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case T:return"Fragment";case E:return"Portal";case M:return"Profiler";case k:return"StrictMode";case U:return"Suspense";case G:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case D:return(s.displayName||"Context")+".Consumer";case z:return(s._context.displayName||"Context")+".Provider";case B:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Y:return c=s.displayName||null,c!==null?c:Ae(s.type)||"Memo";case F:c=s._payload,s=s._init;try{return Ae(s(c))}catch{}}return null}function oe(s){var c=s.type;switch(s.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=c.render,s=s.displayName||s.name||"",c.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(c);case 8:return c===k?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function ge(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ne(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function fe(s){var c=ne(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,c),y=""+s[c];if(!s.hasOwnProperty(c)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var j=m.get,O=m.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return j.call(this)},set:function(R){y=""+R,O.call(this,R)}}),Object.defineProperty(s,c,{enumerable:m.enumerable}),{getValue:function(){return y},setValue:function(R){y=""+R},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function me(s){s._valueTracker||(s._valueTracker=fe(s))}function re(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var m=c.getValue(),y="";return s&&(y=ne(s)?s.checked?"true":"false":s.value),s=y,s!==m?(c.setValue(s),!0):!1}function We(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function De(s,c){var m=c.checked;return Q({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function pt(s,c){var m=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;m=ge(c.value!=null?c.value:m),s._wrapperState={initialChecked:y,initialValue:m,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function mt(s,c){c=c.checked,c!=null&&P(s,"checked",c,!1)}function Pt(s,c){mt(s,c);var m=ge(c.value),y=c.type;if(m!=null)y==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}c.hasOwnProperty("value")?_r(s,c.type,m):c.hasOwnProperty("defaultValue")&&_r(s,c.type,ge(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(s.defaultChecked=!!c.defaultChecked)}function Ur(s,c,m){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var y=c.type;if(!(y!=="submit"&&y!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+s._wrapperState.initialValue,m||c===s.value||(s.value=c),s.defaultValue=c}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function _r(s,c,m){(c!=="number"||We(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var Zn=Array.isArray;function Tr(s,c,m,y){if(s=s.options,c){c={};for(var j=0;j<m.length;j++)c["$"+m[j]]=!0;for(m=0;m<s.length;m++)j=c.hasOwnProperty("$"+s[m].value),s[m].selected!==j&&(s[m].selected=j),j&&y&&(s[m].defaultSelected=!0)}else{for(m=""+ge(m),c=null,j=0;j<s.length;j++){if(s[j].value===m){s[j].selected=!0,y&&(s[j].defaultSelected=!0);return}c!==null||s[j].disabled||(c=s[j])}c!==null&&(c.selected=!0)}}function An(s,c){if(c.dangerouslySetInnerHTML!=null)throw Error(r(91));return Q({},c,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function ls(s,c){var m=c.value;if(m==null){if(m=c.children,c=c.defaultValue,m!=null){if(c!=null)throw Error(r(92));if(Zn(m)){if(1<m.length)throw Error(r(93));m=m[0]}c=m}c==null&&(c=""),m=c}s._wrapperState={initialValue:ge(m)}}function fc(s,c){var m=ge(c.value),y=ge(c.defaultValue);m!=null&&(m=""+m,m!==s.value&&(s.value=m),c.defaultValue==null&&s.defaultValue!==m&&(s.defaultValue=m)),y!=null&&(s.defaultValue=""+y)}function dc(s){var c=s.textContent;c===s._wrapperState.initialValue&&c!==""&&c!==null&&(s.value=c)}function jA(s){switch(s){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 Vg(s,c){return s==null||s==="http://www.w3.org/1999/xhtml"?jA(c):s==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var nd,PA=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,m,y,j){MSApp.execUnsafeLocalFunction(function(){return s(c,m,y,j)})}:s}(function(s,c){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=c;else{for(nd=nd||document.createElement("div"),nd.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=nd.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;c.firstChild;)s.appendChild(c.firstChild)}});function hc(s,c){if(c){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=c;return}}s.textContent=c}var pc={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},S9=["Webkit","ms","Moz","O"];Object.keys(pc).forEach(function(s){S9.forEach(function(c){c=c+s.charAt(0).toUpperCase()+s.substring(1),pc[c]=pc[s]})});function AA(s,c,m){return c==null||typeof c=="boolean"||c===""?"":m||typeof c!="number"||c===0||pc.hasOwnProperty(s)&&pc[s]?(""+c).trim():c+"px"}function NA(s,c){s=s.style;for(var m in c)if(c.hasOwnProperty(m)){var y=m.indexOf("--")===0,j=AA(m,c[m],y);m==="float"&&(m="cssFloat"),y?s.setProperty(m,j):s[m]=j}}var j9=Q({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 Ug(s,c){if(c){if(j9[s]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(r(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(r(61))}if(c.style!=null&&typeof c.style!="object")throw Error(r(62))}}function qg(s,c){if(s.indexOf("-")===-1)return typeof c.is=="string";switch(s){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 Wg=null;function Hg(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Kg=null,cs=null,us=null;function OA(s){if(s=Dc(s)){if(typeof Kg!="function")throw Error(r(280));var c=s.stateNode;c&&(c=Ad(c),Kg(s.stateNode,s.type,c))}}function EA(s){cs?us?us.push(s):us=[s]:cs=s}function CA(){if(cs){var s=cs,c=us;if(us=cs=null,OA(s),c)for(s=0;s<c.length;s++)OA(c[s])}}function TA(s,c){return s(c)}function kA(){}var Gg=!1;function RA(s,c,m){if(Gg)return s(c,m);Gg=!0;try{return TA(s,c,m)}finally{Gg=!1,(cs!==null||us!==null)&&(kA(),CA())}}function mc(s,c){var m=s.stateNode;if(m===null)return null;var y=Ad(m);if(y===null)return null;m=y[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(m&&typeof m!="function")throw Error(r(231,c,typeof m));return m}var Yg=!1;if(l)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){Yg=!0}}),window.addEventListener("test",gc,gc),window.removeEventListener("test",gc,gc)}catch{Yg=!1}function P9(s,c,m,y,j,O,R,$,q){var ee=Array.prototype.slice.call(arguments,3);try{c.apply(m,ee)}catch(le){this.onError(le)}}var vc=!1,id=null,ad=!1,Xg=null,A9={onError:function(s){vc=!0,id=s}};function N9(s,c,m,y,j,O,R,$,q){vc=!1,id=null,P9.apply(A9,arguments)}function O9(s,c,m,y,j,O,R,$,q){if(N9.apply(this,arguments),vc){if(vc){var ee=id;vc=!1,id=null}else throw Error(r(198));ad||(ad=!0,Xg=ee)}}function no(s){var c=s,m=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(m=c.return),s=c.return;while(s)}return c.tag===3?m:null}function MA(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function IA(s){if(no(s)!==s)throw Error(r(188))}function E9(s){var c=s.alternate;if(!c){if(c=no(s),c===null)throw Error(r(188));return c!==s?null:s}for(var m=s,y=c;;){var j=m.return;if(j===null)break;var O=j.alternate;if(O===null){if(y=j.return,y!==null){m=y;continue}break}if(j.child===O.child){for(O=j.child;O;){if(O===m)return IA(j),s;if(O===y)return IA(j),c;O=O.sibling}throw Error(r(188))}if(m.return!==y.return)m=j,y=O;else{for(var R=!1,$=j.child;$;){if($===m){R=!0,m=j,y=O;break}if($===y){R=!0,y=j,m=O;break}$=$.sibling}if(!R){for($=O.child;$;){if($===m){R=!0,m=O,y=j;break}if($===y){R=!0,y=O,m=j;break}$=$.sibling}if(!R)throw Error(r(189))}}if(m.alternate!==y)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?s:c}function DA(s){return s=E9(s),s!==null?$A(s):null}function $A(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var c=$A(s);if(c!==null)return c;s=s.sibling}return null}var LA=t.unstable_scheduleCallback,BA=t.unstable_cancelCallback,C9=t.unstable_shouldYield,T9=t.unstable_requestPaint,Bt=t.unstable_now,k9=t.unstable_getCurrentPriorityLevel,Zg=t.unstable_ImmediatePriority,FA=t.unstable_UserBlockingPriority,od=t.unstable_NormalPriority,R9=t.unstable_LowPriority,zA=t.unstable_IdlePriority,sd=null,Qn=null;function M9(s){if(Qn&&typeof Qn.onCommitFiberRoot=="function")try{Qn.onCommitFiberRoot(sd,s,void 0,(s.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:$9,I9=Math.log,D9=Math.LN2;function $9(s){return s>>>=0,s===0?32:31-(I9(s)/D9|0)|0}var ld=64,cd=4194304;function yc(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function ud(s,c){var m=s.pendingLanes;if(m===0)return 0;var y=0,j=s.suspendedLanes,O=s.pingedLanes,R=m&268435455;if(R!==0){var $=R&~j;$!==0?y=yc($):(O&=R,O!==0&&(y=yc(O)))}else R=m&~j,R!==0?y=yc(R):O!==0&&(y=yc(O));if(y===0)return 0;if(c!==0&&c!==y&&(c&j)===0&&(j=y&-y,O=c&-c,j>=O||j===16&&(O&4194240)!==0))return c;if((y&4)!==0&&(y|=m&16),c=s.entangledLanes,c!==0)for(s=s.entanglements,c&=y;0<c;)m=31-Nn(c),j=1<<m,y|=s[m],c&=~j;return y}function L9(s,c){switch(s){case 1:case 2:case 4:return c+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 c+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 B9(s,c){for(var m=s.suspendedLanes,y=s.pingedLanes,j=s.expirationTimes,O=s.pendingLanes;0<O;){var R=31-Nn(O),$=1<<R,q=j[R];q===-1?(($&m)===0||($&y)!==0)&&(j[R]=L9($,c)):q<=c&&(s.expiredLanes|=$),O&=~$}}function Qg(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function VA(){var s=ld;return ld<<=1,(ld&4194240)===0&&(ld=64),s}function Jg(s){for(var c=[],m=0;31>m;m++)c.push(s);return c}function xc(s,c,m){s.pendingLanes|=c,c!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,c=31-Nn(c),s[c]=m}function F9(s,c){var m=s.pendingLanes&~c;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=c,s.mutableReadLanes&=c,s.entangledLanes&=c,c=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<m;){var j=31-Nn(m),O=1<<j;c[j]=0,y[j]=-1,s[j]=-1,m&=~O}}function ev(s,c){var m=s.entangledLanes|=c;for(s=s.entanglements;m;){var y=31-Nn(m),j=1<<y;j&c|s[y]&c&&(s[y]|=c),m&=~j}}var ft=0;function UA(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var qA,tv,WA,HA,KA,rv=!1,fd=[],aa=null,oa=null,sa=null,bc=new Map,wc=new Map,la=[],z9="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 GA(s,c){switch(s){case"focusin":case"focusout":aa=null;break;case"dragenter":case"dragleave":oa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":bc.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":wc.delete(c.pointerId)}}function _c(s,c,m,y,j,O){return s===null||s.nativeEvent!==O?(s={blockedOn:c,domEventName:m,eventSystemFlags:y,nativeEvent:O,targetContainers:[j]},c!==null&&(c=Dc(c),c!==null&&tv(c)),s):(s.eventSystemFlags|=y,c=s.targetContainers,j!==null&&c.indexOf(j)===-1&&c.push(j),s)}function V9(s,c,m,y,j){switch(c){case"focusin":return aa=_c(aa,s,c,m,y,j),!0;case"dragenter":return oa=_c(oa,s,c,m,y,j),!0;case"mouseover":return sa=_c(sa,s,c,m,y,j),!0;case"pointerover":var O=j.pointerId;return bc.set(O,_c(bc.get(O)||null,s,c,m,y,j)),!0;case"gotpointercapture":return O=j.pointerId,wc.set(O,_c(wc.get(O)||null,s,c,m,y,j)),!0}return!1}function YA(s){var c=io(s.target);if(c!==null){var m=no(c);if(m!==null){if(c=m.tag,c===13){if(c=MA(m),c!==null){s.blockedOn=c,KA(s.priority,function(){WA(m)});return}}else if(c===3&&m.stateNode.current.memoizedState.isDehydrated){s.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}s.blockedOn=null}function dd(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var m=iv(s.domEventName,s.eventSystemFlags,c[0],s.nativeEvent);if(m===null){m=s.nativeEvent;var y=new m.constructor(m.type,m);Wg=y,m.target.dispatchEvent(y),Wg=null}else return c=Dc(m),c!==null&&tv(c),s.blockedOn=m,!1;c.shift()}return!0}function XA(s,c,m){dd(s)&&m.delete(c)}function U9(){rv=!1,aa!==null&&dd(aa)&&(aa=null),oa!==null&&dd(oa)&&(oa=null),sa!==null&&dd(sa)&&(sa=null),bc.forEach(XA),wc.forEach(XA)}function Sc(s,c){s.blockedOn===c&&(s.blockedOn=null,rv||(rv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,U9)))}function jc(s){function c(j){return Sc(j,s)}if(0<fd.length){Sc(fd[0],s);for(var m=1;m<fd.length;m++){var y=fd[m];y.blockedOn===s&&(y.blockedOn=null)}}for(aa!==null&&Sc(aa,s),oa!==null&&Sc(oa,s),sa!==null&&Sc(sa,s),bc.forEach(c),wc.forEach(c),m=0;m<la.length;m++)y=la[m],y.blockedOn===s&&(y.blockedOn=null);for(;0<la.length&&(m=la[0],m.blockedOn===null);)YA(m),m.blockedOn===null&&la.shift()}var fs=C.ReactCurrentBatchConfig,hd=!0;function q9(s,c,m,y){var j=ft,O=fs.transition;fs.transition=null;try{ft=1,nv(s,c,m,y)}finally{ft=j,fs.transition=O}}function W9(s,c,m,y){var j=ft,O=fs.transition;fs.transition=null;try{ft=4,nv(s,c,m,y)}finally{ft=j,fs.transition=O}}function nv(s,c,m,y){if(hd){var j=iv(s,c,m,y);if(j===null)wv(s,c,y,pd,m),GA(s,y);else if(V9(j,s,c,m,y))y.stopPropagation();else if(GA(s,y),c&4&&-1<z9.indexOf(s)){for(;j!==null;){var O=Dc(j);if(O!==null&&qA(O),O=iv(s,c,m,y),O===null&&wv(s,c,y,pd,m),O===j)break;j=O}j!==null&&y.stopPropagation()}else wv(s,c,y,null,m)}}var pd=null;function iv(s,c,m,y){if(pd=null,s=Hg(y),s=io(s),s!==null)if(c=no(s),c===null)s=null;else if(m=c.tag,m===13){if(s=MA(c),s!==null)return s;s=null}else if(m===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null);return pd=s,null}function ZA(s){switch(s){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(k9()){case Zg:return 1;case FA:return 4;case od:case R9:return 16;case zA:return 536870912;default:return 16}default:return 16}}var ca=null,av=null,md=null;function QA(){if(md)return md;var s,c=av,m=c.length,y,j="value"in ca?ca.value:ca.textContent,O=j.length;for(s=0;s<m&&c[s]===j[s];s++);var R=m-s;for(y=1;y<=R&&c[m-y]===j[O-y];y++);return md=j.slice(s,1<y?1-y:void 0)}function gd(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function vd(){return!0}function JA(){return!1}function qr(s){function c(m,y,j,O,R){this._reactName=m,this._targetInst=j,this.type=y,this.nativeEvent=O,this.target=R,this.currentTarget=null;for(var $ in s)s.hasOwnProperty($)&&(m=s[$],this[$]=m?m(O):O[$]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?vd:JA,this.isPropagationStopped=JA,this}return Q(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=vd)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=vd)},persist:function(){},isPersistent:vd}),c}var ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ov=qr(ds),Pc=Q({},ds,{view:0,detail:0}),H9=qr(Pc),sv,lv,Ac,yd=Q({},Pc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uv,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Ac&&(Ac&&s.type==="mousemove"?(sv=s.screenX-Ac.screenX,lv=s.screenY-Ac.screenY):lv=sv=0,Ac=s),sv)},movementY:function(s){return"movementY"in s?s.movementY:lv}}),eN=qr(yd),K9=Q({},yd,{dataTransfer:0}),G9=qr(K9),Y9=Q({},Pc,{relatedTarget:0}),cv=qr(Y9),X9=Q({},ds,{animationName:0,elapsedTime:0,pseudoElement:0}),Z9=qr(X9),Q9=Q({},ds,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),J9=qr(Q9),e8=Q({},ds,{data:0}),tN=qr(e8),t8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r8={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"},n8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i8(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=n8[s])?!!c[s]:!1}function uv(){return i8}var a8=Q({},Pc,{key:function(s){if(s.key){var c=t8[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=gd(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?r8[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uv,charCode:function(s){return s.type==="keypress"?gd(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?gd(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),o8=qr(a8),s8=Q({},yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rN=qr(s8),l8=Q({},Pc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uv}),c8=qr(l8),u8=Q({},ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),f8=qr(u8),d8=Q({},yd,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),h8=qr(d8),p8=[9,13,27,32],fv=l&&"CompositionEvent"in window,Nc=null;l&&"documentMode"in document&&(Nc=document.documentMode);var m8=l&&"TextEvent"in window&&!Nc,nN=l&&(!fv||Nc&&8<Nc&&11>=Nc),iN=" ",aN=!1;function oN(s,c){switch(s){case"keyup":return p8.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sN(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var hs=!1;function g8(s,c){switch(s){case"compositionend":return sN(c);case"keypress":return c.which!==32?null:(aN=!0,iN);case"textInput":return s=c.data,s===iN&&aN?null:s;default:return null}}function v8(s,c){if(hs)return s==="compositionend"||!fv&&oN(s,c)?(s=QA(),md=av=ca=null,hs=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return nN&&c.locale!=="ko"?null:c.data;default:return null}}var y8={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 lN(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!y8[s.type]:c==="textarea"}function cN(s,c,m,y){EA(y),c=Sd(c,"onChange"),0<c.length&&(m=new ov("onChange","change",null,m,y),s.push({event:m,listeners:c}))}var Oc=null,Ec=null;function x8(s){NN(s,0)}function xd(s){var c=ys(s);if(re(c))return s}function b8(s,c){if(s==="change")return c}var uN=!1;if(l){var dv;if(l){var hv="oninput"in document;if(!hv){var fN=document.createElement("div");fN.setAttribute("oninput","return;"),hv=typeof fN.oninput=="function"}dv=hv}else dv=!1;uN=dv&&(!document.documentMode||9<document.documentMode)}function dN(){Oc&&(Oc.detachEvent("onpropertychange",hN),Ec=Oc=null)}function hN(s){if(s.propertyName==="value"&&xd(Ec)){var c=[];cN(c,Ec,s,Hg(s)),RA(x8,c)}}function w8(s,c,m){s==="focusin"?(dN(),Oc=c,Ec=m,Oc.attachEvent("onpropertychange",hN)):s==="focusout"&&dN()}function _8(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return xd(Ec)}function S8(s,c){if(s==="click")return xd(c)}function j8(s,c){if(s==="input"||s==="change")return xd(c)}function P8(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var On=typeof Object.is=="function"?Object.is:P8;function Cc(s,c){if(On(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var m=Object.keys(s),y=Object.keys(c);if(m.length!==y.length)return!1;for(y=0;y<m.length;y++){var j=m[y];if(!u.call(c,j)||!On(s[j],c[j]))return!1}return!0}function pN(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function mN(s,c){var m=pN(s);s=0;for(var y;m;){if(m.nodeType===3){if(y=s+m.textContent.length,s<=c&&y>=c)return{node:m,offset:c-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=pN(m)}}function gN(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?gN(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function vN(){for(var s=window,c=We();c instanceof s.HTMLIFrameElement;){try{var m=typeof c.contentWindow.location.href=="string"}catch{m=!1}if(m)s=c.contentWindow;else break;c=We(s.document)}return c}function pv(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}function A8(s){var c=vN(),m=s.focusedElem,y=s.selectionRange;if(c!==m&&m&&m.ownerDocument&&gN(m.ownerDocument.documentElement,m)){if(y!==null&&pv(m)){if(c=y.start,s=y.end,s===void 0&&(s=c),"selectionStart"in m)m.selectionStart=c,m.selectionEnd=Math.min(s,m.value.length);else if(s=(c=m.ownerDocument||document)&&c.defaultView||window,s.getSelection){s=s.getSelection();var j=m.textContent.length,O=Math.min(y.start,j);y=y.end===void 0?O:Math.min(y.end,j),!s.extend&&O>y&&(j=y,y=O,O=j),j=mN(m,O);var R=mN(m,y);j&&R&&(s.rangeCount!==1||s.anchorNode!==j.node||s.anchorOffset!==j.offset||s.focusNode!==R.node||s.focusOffset!==R.offset)&&(c=c.createRange(),c.setStart(j.node,j.offset),s.removeAllRanges(),O>y?(s.addRange(c),s.extend(R.node,R.offset)):(c.setEnd(R.node,R.offset),s.addRange(c)))}}for(c=[],s=m;s=s.parentNode;)s.nodeType===1&&c.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<c.length;m++)s=c[m],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var N8=l&&"documentMode"in document&&11>=document.documentMode,ps=null,mv=null,Tc=null,gv=!1;function yN(s,c,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;gv||ps==null||ps!==We(y)||(y=ps,"selectionStart"in y&&pv(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Tc&&Cc(Tc,y)||(Tc=y,y=Sd(mv,"onSelect"),0<y.length&&(c=new ov("onSelect","select",null,c,m),s.push({event:c,listeners:y}),c.target=ps)))}function bd(s,c){var m={};return m[s.toLowerCase()]=c.toLowerCase(),m["Webkit"+s]="webkit"+c,m["Moz"+s]="moz"+c,m}var ms={animationend:bd("Animation","AnimationEnd"),animationiteration:bd("Animation","AnimationIteration"),animationstart:bd("Animation","AnimationStart"),transitionend:bd("Transition","TransitionEnd")},vv={},xN={};l&&(xN=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function wd(s){if(vv[s])return vv[s];if(!ms[s])return s;var c=ms[s],m;for(m in c)if(c.hasOwnProperty(m)&&m in xN)return vv[s]=c[m];return s}var bN=wd("animationend"),wN=wd("animationiteration"),_N=wd("animationstart"),SN=wd("transitionend"),jN=new Map,PN="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 ua(s,c){jN.set(s,c),a(c,[s])}for(var yv=0;yv<PN.length;yv++){var xv=PN[yv],O8=xv.toLowerCase(),E8=xv[0].toUpperCase()+xv.slice(1);ua(O8,"on"+E8)}ua(bN,"onAnimationEnd"),ua(wN,"onAnimationIteration"),ua(_N,"onAnimationStart"),ua("dblclick","onDoubleClick"),ua("focusin","onFocus"),ua("focusout","onBlur"),ua(SN,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kc="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(" "),C8=new Set("cancel close invalid load scroll toggle".split(" ").concat(kc));function AN(s,c,m){var y=s.type||"unknown-event";s.currentTarget=m,O9(y,c,void 0,s),s.currentTarget=null}function NN(s,c){c=(c&4)!==0;for(var m=0;m<s.length;m++){var y=s[m],j=y.event;y=y.listeners;e:{var O=void 0;if(c)for(var R=y.length-1;0<=R;R--){var $=y[R],q=$.instance,ee=$.currentTarget;if($=$.listener,q!==O&&j.isPropagationStopped())break e;AN(j,$,ee),O=q}else for(R=0;R<y.length;R++){if($=y[R],q=$.instance,ee=$.currentTarget,$=$.listener,q!==O&&j.isPropagationStopped())break e;AN(j,$,ee),O=q}}}if(ad)throw s=Xg,ad=!1,Xg=null,s}function _t(s,c){var m=c[Nv];m===void 0&&(m=c[Nv]=new Set);var y=s+"__bubble";m.has(y)||(ON(c,s,2,!1),m.add(y))}function bv(s,c,m){var y=0;c&&(y|=4),ON(m,s,y,c)}var _d="_reactListening"+Math.random().toString(36).slice(2);function Rc(s){if(!s[_d]){s[_d]=!0,n.forEach(function(m){m!=="selectionchange"&&(C8.has(m)||bv(m,!1,s),bv(m,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[_d]||(c[_d]=!0,bv("selectionchange",!1,c))}}function ON(s,c,m,y){switch(ZA(c)){case 1:var j=q9;break;case 4:j=W9;break;default:j=nv}m=j.bind(null,c,m,s),j=void 0,!Yg||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(j=!0),y?j!==void 0?s.addEventListener(c,m,{capture:!0,passive:j}):s.addEventListener(c,m,!0):j!==void 0?s.addEventListener(c,m,{passive:j}):s.addEventListener(c,m,!1)}function wv(s,c,m,y,j){var O=y;if((c&1)===0&&(c&2)===0&&y!==null)e:for(;;){if(y===null)return;var R=y.tag;if(R===3||R===4){var $=y.stateNode.containerInfo;if($===j||$.nodeType===8&&$.parentNode===j)break;if(R===4)for(R=y.return;R!==null;){var q=R.tag;if((q===3||q===4)&&(q=R.stateNode.containerInfo,q===j||q.nodeType===8&&q.parentNode===j))return;R=R.return}for(;$!==null;){if(R=io($),R===null)return;if(q=R.tag,q===5||q===6){y=O=R;continue e}$=$.parentNode}}y=y.return}RA(function(){var ee=O,le=Hg(m),ce=[];e:{var se=jN.get(s);if(se!==void 0){var ve=ov,_e=s;switch(s){case"keypress":if(gd(m)===0)break e;case"keydown":case"keyup":ve=o8;break;case"focusin":_e="focus",ve=cv;break;case"focusout":_e="blur",ve=cv;break;case"beforeblur":case"afterblur":ve=cv;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=eN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=G9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=c8;break;case bN:case wN:case _N:ve=Z9;break;case SN:ve=f8;break;case"scroll":ve=H9;break;case"wheel":ve=h8;break;case"copy":case"cut":case"paste":ve=J9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=rN}var Ne=(c&4)!==0,Ft=!Ne&&s==="scroll",Z=Ne?se!==null?se+"Capture":null:se;Ne=[];for(var H=ee,J;H!==null;){J=H;var de=J.stateNode;if(J.tag===5&&de!==null&&(J=de,Z!==null&&(de=mc(H,Z),de!=null&&Ne.push(Mc(H,de,J)))),Ft)break;H=H.return}0<Ne.length&&(se=new ve(se,_e,null,m,le),ce.push({event:se,listeners:Ne}))}}if((c&7)===0){e:{if(se=s==="mouseover"||s==="pointerover",ve=s==="mouseout"||s==="pointerout",se&&m!==Wg&&(_e=m.relatedTarget||m.fromElement)&&(io(_e)||_e[bi]))break e;if((ve||se)&&(se=le.window===le?le:(se=le.ownerDocument)?se.defaultView||se.parentWindow:window,ve?(_e=m.relatedTarget||m.toElement,ve=ee,_e=_e?io(_e):null,_e!==null&&(Ft=no(_e),_e!==Ft||_e.tag!==5&&_e.tag!==6)&&(_e=null)):(ve=null,_e=ee),ve!==_e)){if(Ne=eN,de="onMouseLeave",Z="onMouseEnter",H="mouse",(s==="pointerout"||s==="pointerover")&&(Ne=rN,de="onPointerLeave",Z="onPointerEnter",H="pointer"),Ft=ve==null?se:ys(ve),J=_e==null?se:ys(_e),se=new Ne(de,H+"leave",ve,m,le),se.target=Ft,se.relatedTarget=J,de=null,io(le)===ee&&(Ne=new Ne(Z,H+"enter",_e,m,le),Ne.target=J,Ne.relatedTarget=Ft,de=Ne),Ft=de,ve&&_e)t:{for(Ne=ve,Z=_e,H=0,J=Ne;J;J=gs(J))H++;for(J=0,de=Z;de;de=gs(de))J++;for(;0<H-J;)Ne=gs(Ne),H--;for(;0<J-H;)Z=gs(Z),J--;for(;H--;){if(Ne===Z||Z!==null&&Ne===Z.alternate)break t;Ne=gs(Ne),Z=gs(Z)}Ne=null}else Ne=null;ve!==null&&EN(ce,se,ve,Ne,!1),_e!==null&&Ft!==null&&EN(ce,Ft,_e,Ne,!0)}}e:{if(se=ee?ys(ee):window,ve=se.nodeName&&se.nodeName.toLowerCase(),ve==="select"||ve==="input"&&se.type==="file")var Ee=b8;else if(lN(se))if(uN)Ee=j8;else{Ee=_8;var ke=w8}else(ve=se.nodeName)&&ve.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Ee=S8);if(Ee&&(Ee=Ee(s,ee))){cN(ce,Ee,m,le);break e}ke&&ke(s,se,ee),s==="focusout"&&(ke=se._wrapperState)&&ke.controlled&&se.type==="number"&&_r(se,"number",se.value)}switch(ke=ee?ys(ee):window,s){case"focusin":(lN(ke)||ke.contentEditable==="true")&&(ps=ke,mv=ee,Tc=null);break;case"focusout":Tc=mv=ps=null;break;case"mousedown":gv=!0;break;case"contextmenu":case"mouseup":case"dragend":gv=!1,yN(ce,m,le);break;case"selectionchange":if(N8)break;case"keydown":case"keyup":yN(ce,m,le)}var Re;if(fv)e:{switch(s){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else hs?oN(s,m)&&(Be="onCompositionEnd"):s==="keydown"&&m.keyCode===229&&(Be="onCompositionStart");Be&&(nN&&m.locale!=="ko"&&(hs||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&hs&&(Re=QA()):(ca=le,av="value"in ca?ca.value:ca.textContent,hs=!0)),ke=Sd(ee,Be),0<ke.length&&(Be=new tN(Be,s,null,m,le),ce.push({event:Be,listeners:ke}),Re?Be.data=Re:(Re=sN(m),Re!==null&&(Be.data=Re)))),(Re=m8?g8(s,m):v8(s,m))&&(ee=Sd(ee,"onBeforeInput"),0<ee.length&&(le=new tN("onBeforeInput","beforeinput",null,m,le),ce.push({event:le,listeners:ee}),le.data=Re))}NN(ce,c)})}function Mc(s,c,m){return{instance:s,listener:c,currentTarget:m}}function Sd(s,c){for(var m=c+"Capture",y=[];s!==null;){var j=s,O=j.stateNode;j.tag===5&&O!==null&&(j=O,O=mc(s,m),O!=null&&y.unshift(Mc(s,O,j)),O=mc(s,c),O!=null&&y.push(Mc(s,O,j))),s=s.return}return y}function gs(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function EN(s,c,m,y,j){for(var O=c._reactName,R=[];m!==null&&m!==y;){var $=m,q=$.alternate,ee=$.stateNode;if(q!==null&&q===y)break;$.tag===5&&ee!==null&&($=ee,j?(q=mc(m,O),q!=null&&R.unshift(Mc(m,q,$))):j||(q=mc(m,O),q!=null&&R.push(Mc(m,q,$)))),m=m.return}R.length!==0&&s.push({event:c,listeners:R})}var T8=/\r\n?/g,k8=/\u0000|\uFFFD/g;function CN(s){return(typeof s=="string"?s:""+s).replace(T8,`
`).replace(k8,"")}function jd(s,c,m){if(c=CN(c),CN(s)!==c&&m)throw Error(r(425))}function Pd(){}var _v=null,Sv=null;function jv(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var Pv=typeof setTimeout=="function"?setTimeout:void 0,R8=typeof clearTimeout=="function"?clearTimeout:void 0,TN=typeof Promise=="function"?Promise:void 0,M8=typeof queueMicrotask=="function"?queueMicrotask:typeof TN<"u"?function(s){return TN.resolve(null).then(s).catch(I8)}:Pv;function I8(s){setTimeout(function(){throw s})}function Av(s,c){var m=c,y=0;do{var j=m.nextSibling;if(s.removeChild(m),j&&j.nodeType===8)if(m=j.data,m==="/$"){if(y===0){s.removeChild(j),jc(c);return}y--}else m!=="$"&&m!=="$?"&&m!=="$!"||y++;m=j}while(m);jc(c)}function fa(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return s}function kN(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var m=s.data;if(m==="$"||m==="$!"||m==="$?"){if(c===0)return s;c--}else m==="/$"&&c++}s=s.previousSibling}return null}var vs=Math.random().toString(36).slice(2),Jn="__reactFiber$"+vs,Ic="__reactProps$"+vs,bi="__reactContainer$"+vs,Nv="__reactEvents$"+vs,D8="__reactListeners$"+vs,$8="__reactHandles$"+vs;function io(s){var c=s[Jn];if(c)return c;for(var m=s.parentNode;m;){if(c=m[bi]||m[Jn]){if(m=c.alternate,c.child!==null||m!==null&&m.child!==null)for(s=kN(s);s!==null;){if(m=s[Jn])return m;s=kN(s)}return c}s=m,m=s.parentNode}return null}function Dc(s){return s=s[Jn]||s[bi],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ys(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function Ad(s){return s[Ic]||null}var Ov=[],xs=-1;function da(s){return{current:s}}function St(s){0>xs||(s.current=Ov[xs],Ov[xs]=null,xs--)}function yt(s,c){xs++,Ov[xs]=s.current,s.current=c}var ha={},ur=da(ha),kr=da(!1),ao=ha;function bs(s,c){var m=s.type.contextTypes;if(!m)return ha;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var j={},O;for(O in m)j[O]=c[O];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=c,s.__reactInternalMemoizedMaskedChildContext=j),j}function Rr(s){return s=s.childContextTypes,s!=null}function Nd(){St(kr),St(ur)}function RN(s,c,m){if(ur.current!==ha)throw Error(r(168));yt(ur,c),yt(kr,m)}function MN(s,c,m){var y=s.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return m;y=y.getChildContext();for(var j in y)if(!(j in c))throw Error(r(108,oe(s)||"Unknown",j));return Q({},m,y)}function Od(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||ha,ao=ur.current,yt(ur,s),yt(kr,kr.current),!0}function IN(s,c,m){var y=s.stateNode;if(!y)throw Error(r(169));m?(s=MN(s,c,ao),y.__reactInternalMemoizedMergedChildContext=s,St(kr),St(ur),yt(ur,s)):St(kr),yt(kr,m)}var wi=null,Ed=!1,Ev=!1;function DN(s){wi===null?wi=[s]:wi.push(s)}function L8(s){Ed=!0,DN(s)}function pa(){if(!Ev&&wi!==null){Ev=!0;var s=0,c=ft;try{var m=wi;for(ft=1;s<m.length;s++){var y=m[s];do y=y(!0);while(y!==null)}wi=null,Ed=!1}catch(j){throw wi!==null&&(wi=wi.slice(s+1)),LA(Zg,pa),j}finally{ft=c,Ev=!1}}return null}var ws=[],_s=0,Cd=null,Td=0,rn=[],nn=0,oo=null,_i=1,Si="";function so(s,c){ws[_s++]=Td,ws[_s++]=Cd,Cd=s,Td=c}function $N(s,c,m){rn[nn++]=_i,rn[nn++]=Si,rn[nn++]=oo,oo=s;var y=_i;s=Si;var j=32-Nn(y)-1;y&=~(1<<j),m+=1;var O=32-Nn(c)+j;if(30<O){var R=j-j%5;O=(y&(1<<R)-1).toString(32),y>>=R,j-=R,_i=1<<32-Nn(c)+j|m<<j|y,Si=O+s}else _i=1<<O|m<<j|y,Si=s}function Cv(s){s.return!==null&&(so(s,1),$N(s,1,0))}function Tv(s){for(;s===Cd;)Cd=ws[--_s],ws[_s]=null,Td=ws[--_s],ws[_s]=null;for(;s===oo;)oo=rn[--nn],rn[nn]=null,Si=rn[--nn],rn[nn]=null,_i=rn[--nn],rn[nn]=null}var Wr=null,Hr=null,At=!1,En=null;function LN(s,c){var m=ln(5,null,null,0);m.elementType="DELETED",m.stateNode=c,m.return=s,c=s.deletions,c===null?(s.deletions=[m],s.flags|=16):c.push(m)}function BN(s,c){switch(s.tag){case 5:var m=s.type;return c=c.nodeType!==1||m.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(s.stateNode=c,Wr=s,Hr=fa(c.firstChild),!0):!1;case 6:return c=s.pendingProps===""||c.nodeType!==3?null:c,c!==null?(s.stateNode=c,Wr=s,Hr=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(m=oo!==null?{id:_i,overflow:Si}:null,s.memoizedState={dehydrated:c,treeContext:m,retryLane:1073741824},m=ln(18,null,null,0),m.stateNode=c,m.return=s,s.child=m,Wr=s,Hr=null,!0):!1;default:return!1}}function kv(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Rv(s){if(At){var c=Hr;if(c){var m=c;if(!BN(s,c)){if(kv(s))throw Error(r(418));c=fa(m.nextSibling);var y=Wr;c&&BN(s,c)?LN(y,m):(s.flags=s.flags&-4097|2,At=!1,Wr=s)}}else{if(kv(s))throw Error(r(418));s.flags=s.flags&-4097|2,At=!1,Wr=s}}}function FN(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Wr=s}function kd(s){if(s!==Wr)return!1;if(!At)return FN(s),At=!0,!1;var c;if((c=s.tag!==3)&&!(c=s.tag!==5)&&(c=s.type,c=c!=="head"&&c!=="body"&&!jv(s.type,s.memoizedProps)),c&&(c=Hr)){if(kv(s))throw zN(),Error(r(418));for(;c;)LN(s,c),c=fa(c.nextSibling)}if(FN(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,c=0;s;){if(s.nodeType===8){var m=s.data;if(m==="/$"){if(c===0){Hr=fa(s.nextSibling);break e}c--}else m!=="$"&&m!=="$!"&&m!=="$?"||c++}s=s.nextSibling}Hr=null}}else Hr=Wr?fa(s.stateNode.nextSibling):null;return!0}function zN(){for(var s=Hr;s;)s=fa(s.nextSibling)}function Ss(){Hr=Wr=null,At=!1}function Mv(s){En===null?En=[s]:En.push(s)}var B8=C.ReactCurrentBatchConfig;function $c(s,c,m){if(s=m.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(r(309));var y=m.stateNode}if(!y)throw Error(r(147,s));var j=y,O=""+s;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===O?c.ref:(c=function(R){var $=j.refs;R===null?delete $[O]:$[O]=R},c._stringRef=O,c)}if(typeof s!="string")throw Error(r(284));if(!m._owner)throw Error(r(290,s))}return s}function Rd(s,c){throw s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s))}function VN(s){var c=s._init;return c(s._payload)}function UN(s){function c(Z,H){if(s){var J=Z.deletions;J===null?(Z.deletions=[H],Z.flags|=16):J.push(H)}}function m(Z,H){if(!s)return null;for(;H!==null;)c(Z,H),H=H.sibling;return null}function y(Z,H){for(Z=new Map;H!==null;)H.key!==null?Z.set(H.key,H):Z.set(H.index,H),H=H.sibling;return Z}function j(Z,H){return Z=_a(Z,H),Z.index=0,Z.sibling=null,Z}function O(Z,H,J){return Z.index=J,s?(J=Z.alternate,J!==null?(J=J.index,J<H?(Z.flags|=2,H):J):(Z.flags|=2,H)):(Z.flags|=1048576,H)}function R(Z){return s&&Z.alternate===null&&(Z.flags|=2),Z}function $(Z,H,J,de){return H===null||H.tag!==6?(H=Py(J,Z.mode,de),H.return=Z,H):(H=j(H,J),H.return=Z,H)}function q(Z,H,J,de){var Ee=J.type;return Ee===T?le(Z,H,J.props.children,de,J.key):H!==null&&(H.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===F&&VN(Ee)===H.type)?(de=j(H,J.props),de.ref=$c(Z,H,J),de.return=Z,de):(de=nh(J.type,J.key,J.props,null,Z.mode,de),de.ref=$c(Z,H,J),de.return=Z,de)}function ee(Z,H,J,de){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=Ay(J,Z.mode,de),H.return=Z,H):(H=j(H,J.children||[]),H.return=Z,H)}function le(Z,H,J,de,Ee){return H===null||H.tag!==7?(H=go(J,Z.mode,de,Ee),H.return=Z,H):(H=j(H,J),H.return=Z,H)}function ce(Z,H,J){if(typeof H=="string"&&H!==""||typeof H=="number")return H=Py(""+H,Z.mode,J),H.return=Z,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case N:return J=nh(H.type,H.key,H.props,null,Z.mode,J),J.ref=$c(Z,null,H),J.return=Z,J;case E:return H=Ay(H,Z.mode,J),H.return=Z,H;case F:var de=H._init;return ce(Z,de(H._payload),J)}if(Zn(H)||W(H))return H=go(H,Z.mode,J,null),H.return=Z,H;Rd(Z,H)}return null}function se(Z,H,J,de){var Ee=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ee!==null?null:$(Z,H,""+J,de);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case N:return J.key===Ee?q(Z,H,J,de):null;case E:return J.key===Ee?ee(Z,H,J,de):null;case F:return Ee=J._init,se(Z,H,Ee(J._payload),de)}if(Zn(J)||W(J))return Ee!==null?null:le(Z,H,J,de,null);Rd(Z,J)}return null}function ve(Z,H,J,de,Ee){if(typeof de=="string"&&de!==""||typeof de=="number")return Z=Z.get(J)||null,$(H,Z,""+de,Ee);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return Z=Z.get(de.key===null?J:de.key)||null,q(H,Z,de,Ee);case E:return Z=Z.get(de.key===null?J:de.key)||null,ee(H,Z,de,Ee);case F:var ke=de._init;return ve(Z,H,J,ke(de._payload),Ee)}if(Zn(de)||W(de))return Z=Z.get(J)||null,le(H,Z,de,Ee,null);Rd(H,de)}return null}function _e(Z,H,J,de){for(var Ee=null,ke=null,Re=H,Be=H=0,rr=null;Re!==null&&Be<J.length;Be++){Re.index>Be?(rr=Re,Re=null):rr=Re.sibling;var nt=se(Z,Re,J[Be],de);if(nt===null){Re===null&&(Re=rr);break}s&&Re&&nt.alternate===null&&c(Z,Re),H=O(nt,H,Be),ke===null?Ee=nt:ke.sibling=nt,ke=nt,Re=rr}if(Be===J.length)return m(Z,Re),At&&so(Z,Be),Ee;if(Re===null){for(;Be<J.length;Be++)Re=ce(Z,J[Be],de),Re!==null&&(H=O(Re,H,Be),ke===null?Ee=Re:ke.sibling=Re,ke=Re);return At&&so(Z,Be),Ee}for(Re=y(Z,Re);Be<J.length;Be++)rr=ve(Re,Z,Be,J[Be],de),rr!==null&&(s&&rr.alternate!==null&&Re.delete(rr.key===null?Be:rr.key),H=O(rr,H,Be),ke===null?Ee=rr:ke.sibling=rr,ke=rr);return s&&Re.forEach(function(Sa){return c(Z,Sa)}),At&&so(Z,Be),Ee}function Ne(Z,H,J,de){var Ee=W(J);if(typeof Ee!="function")throw Error(r(150));if(J=Ee.call(J),J==null)throw Error(r(151));for(var ke=Ee=null,Re=H,Be=H=0,rr=null,nt=J.next();Re!==null&&!nt.done;Be++,nt=J.next()){Re.index>Be?(rr=Re,Re=null):rr=Re.sibling;var Sa=se(Z,Re,nt.value,de);if(Sa===null){Re===null&&(Re=rr);break}s&&Re&&Sa.alternate===null&&c(Z,Re),H=O(Sa,H,Be),ke===null?Ee=Sa:ke.sibling=Sa,ke=Sa,Re=rr}if(nt.done)return m(Z,Re),At&&so(Z,Be),Ee;if(Re===null){for(;!nt.done;Be++,nt=J.next())nt=ce(Z,nt.value,de),nt!==null&&(H=O(nt,H,Be),ke===null?Ee=nt:ke.sibling=nt,ke=nt);return At&&so(Z,Be),Ee}for(Re=y(Z,Re);!nt.done;Be++,nt=J.next())nt=ve(Re,Z,Be,nt.value,de),nt!==null&&(s&&nt.alternate!==null&&Re.delete(nt.key===null?Be:nt.key),H=O(nt,H,Be),ke===null?Ee=nt:ke.sibling=nt,ke=nt);return s&&Re.forEach(function(yU){return c(Z,yU)}),At&&so(Z,Be),Ee}function Ft(Z,H,J,de){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case N:e:{for(var Ee=J.key,ke=H;ke!==null;){if(ke.key===Ee){if(Ee=J.type,Ee===T){if(ke.tag===7){m(Z,ke.sibling),H=j(ke,J.props.children),H.return=Z,Z=H;break e}}else if(ke.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===F&&VN(Ee)===ke.type){m(Z,ke.sibling),H=j(ke,J.props),H.ref=$c(Z,ke,J),H.return=Z,Z=H;break e}m(Z,ke);break}else c(Z,ke);ke=ke.sibling}J.type===T?(H=go(J.props.children,Z.mode,de,J.key),H.return=Z,Z=H):(de=nh(J.type,J.key,J.props,null,Z.mode,de),de.ref=$c(Z,H,J),de.return=Z,Z=de)}return R(Z);case E:e:{for(ke=J.key;H!==null;){if(H.key===ke)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){m(Z,H.sibling),H=j(H,J.children||[]),H.return=Z,Z=H;break e}else{m(Z,H);break}else c(Z,H);H=H.sibling}H=Ay(J,Z.mode,de),H.return=Z,Z=H}return R(Z);case F:return ke=J._init,Ft(Z,H,ke(J._payload),de)}if(Zn(J))return _e(Z,H,J,de);if(W(J))return Ne(Z,H,J,de);Rd(Z,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,H!==null&&H.tag===6?(m(Z,H.sibling),H=j(H,J),H.return=Z,Z=H):(m(Z,H),H=Py(J,Z.mode,de),H.return=Z,Z=H),R(Z)):m(Z,H)}return Ft}var js=UN(!0),qN=UN(!1),Md=da(null),Id=null,Ps=null,Iv=null;function Dv(){Iv=Ps=Id=null}function $v(s){var c=Md.current;St(Md),s._currentValue=c}function Lv(s,c,m){for(;s!==null;){var y=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),s===m)break;s=s.return}}function As(s,c){Id=s,Iv=Ps=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&c)!==0&&(Mr=!0),s.firstContext=null)}function an(s){var c=s._currentValue;if(Iv!==s)if(s={context:s,memoizedValue:c,next:null},Ps===null){if(Id===null)throw Error(r(308));Ps=s,Id.dependencies={lanes:0,firstContext:s}}else Ps=Ps.next=s;return c}var lo=null;function Bv(s){lo===null?lo=[s]:lo.push(s)}function WN(s,c,m,y){var j=c.interleaved;return j===null?(m.next=m,Bv(c)):(m.next=j.next,j.next=m),c.interleaved=m,ji(s,y)}function ji(s,c){s.lanes|=c;var m=s.alternate;for(m!==null&&(m.lanes|=c),m=s,s=s.return;s!==null;)s.childLanes|=c,m=s.alternate,m!==null&&(m.childLanes|=c),m=s,s=s.return;return m.tag===3?m.stateNode:null}var ma=!1;function Fv(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HN(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Pi(s,c){return{eventTime:s,lane:c,tag:0,payload:null,callback:null,next:null}}function ga(s,c,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(tt&2)!==0){var j=y.pending;return j===null?c.next=c:(c.next=j.next,j.next=c),y.pending=c,ji(s,m)}return j=y.interleaved,j===null?(c.next=c,Bv(y)):(c.next=j.next,j.next=c),y.interleaved=c,ji(s,m)}function Dd(s,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194240)!==0)){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,ev(s,m)}}function KN(s,c){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var j=null,O=null;if(m=m.firstBaseUpdate,m!==null){do{var R={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};O===null?j=O=R:O=O.next=R,m=m.next}while(m!==null);O===null?j=O=c:O=O.next=c}else j=O=c;m={baseState:y.baseState,firstBaseUpdate:j,lastBaseUpdate:O,shared:y.shared,effects:y.effects},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=c:s.next=c,m.lastBaseUpdate=c}function $d(s,c,m,y){var j=s.updateQueue;ma=!1;var O=j.firstBaseUpdate,R=j.lastBaseUpdate,$=j.shared.pending;if($!==null){j.shared.pending=null;var q=$,ee=q.next;q.next=null,R===null?O=ee:R.next=ee,R=q;var le=s.alternate;le!==null&&(le=le.updateQueue,$=le.lastBaseUpdate,$!==R&&($===null?le.firstBaseUpdate=ee:$.next=ee,le.lastBaseUpdate=q))}if(O!==null){var ce=j.baseState;R=0,le=ee=q=null,$=O;do{var se=$.lane,ve=$.eventTime;if((y&se)===se){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var _e=s,Ne=$;switch(se=c,ve=m,Ne.tag){case 1:if(_e=Ne.payload,typeof _e=="function"){ce=_e.call(ve,ce,se);break e}ce=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ne.payload,se=typeof _e=="function"?_e.call(ve,ce,se):_e,se==null)break e;ce=Q({},ce,se);break e;case 2:ma=!0}}$.callback!==null&&$.lane!==0&&(s.flags|=64,se=j.effects,se===null?j.effects=[$]:se.push($))}else ve={eventTime:ve,lane:se,tag:$.tag,payload:$.payload,callback:$.callback,next:null},le===null?(ee=le=ve,q=ce):le=le.next=ve,R|=se;if($=$.next,$===null){if($=j.shared.pending,$===null)break;se=$,$=se.next,se.next=null,j.lastBaseUpdate=se,j.shared.pending=null}}while(!0);if(le===null&&(q=ce),j.baseState=q,j.firstBaseUpdate=ee,j.lastBaseUpdate=le,c=j.shared.interleaved,c!==null){j=c;do R|=j.lane,j=j.next;while(j!==c)}else O===null&&(j.shared.lanes=0);fo|=R,s.lanes=R,s.memoizedState=ce}}function GN(s,c,m){if(s=c.effects,c.effects=null,s!==null)for(c=0;c<s.length;c++){var y=s[c],j=y.callback;if(j!==null){if(y.callback=null,y=m,typeof j!="function")throw Error(r(191,j));j.call(y)}}}var Lc={},ei=da(Lc),Bc=da(Lc),Fc=da(Lc);function co(s){if(s===Lc)throw Error(r(174));return s}function zv(s,c){switch(yt(Fc,c),yt(Bc,s),yt(ei,Lc),s=c.nodeType,s){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:Vg(null,"");break;default:s=s===8?c.parentNode:c,c=s.namespaceURI||null,s=s.tagName,c=Vg(c,s)}St(ei),yt(ei,c)}function Ns(){St(ei),St(Bc),St(Fc)}function YN(s){co(Fc.current);var c=co(ei.current),m=Vg(c,s.type);c!==m&&(yt(Bc,s),yt(ei,m))}function Vv(s){Bc.current===s&&(St(ei),St(Bc))}var Ct=da(0);function Ld(s){for(var c=s;c!==null;){if(c.tag===13){var m=c.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Uv=[];function qv(){for(var s=0;s<Uv.length;s++)Uv[s]._workInProgressVersionPrimary=null;Uv.length=0}var Bd=C.ReactCurrentDispatcher,Wv=C.ReactCurrentBatchConfig,uo=0,Tt=null,Kt=null,er=null,Fd=!1,zc=!1,Vc=0,F8=0;function fr(){throw Error(r(321))}function Hv(s,c){if(c===null)return!1;for(var m=0;m<c.length&&m<s.length;m++)if(!On(s[m],c[m]))return!1;return!0}function Kv(s,c,m,y,j,O){if(uo=O,Tt=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,Bd.current=s===null||s.memoizedState===null?q8:W8,s=m(y,j),zc){O=0;do{if(zc=!1,Vc=0,25<=O)throw Error(r(301));O+=1,er=Kt=null,c.updateQueue=null,Bd.current=H8,s=m(y,j)}while(zc)}if(Bd.current=Ud,c=Kt!==null&&Kt.next!==null,uo=0,er=Kt=Tt=null,Fd=!1,c)throw Error(r(300));return s}function Gv(){var s=Vc!==0;return Vc=0,s}function ti(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return er===null?Tt.memoizedState=er=s:er=er.next=s,er}function on(){if(Kt===null){var s=Tt.alternate;s=s!==null?s.memoizedState:null}else s=Kt.next;var c=er===null?Tt.memoizedState:er.next;if(c!==null)er=c,Kt=s;else{if(s===null)throw Error(r(310));Kt=s,s={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},er===null?Tt.memoizedState=er=s:er=er.next=s}return er}function Uc(s,c){return typeof c=="function"?c(s):c}function Yv(s){var c=on(),m=c.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var y=Kt,j=y.baseQueue,O=m.pending;if(O!==null){if(j!==null){var R=j.next;j.next=O.next,O.next=R}y.baseQueue=j=O,m.pending=null}if(j!==null){O=j.next,y=y.baseState;var $=R=null,q=null,ee=O;do{var le=ee.lane;if((uo&le)===le)q!==null&&(q=q.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),y=ee.hasEagerState?ee.eagerState:s(y,ee.action);else{var ce={lane:le,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};q===null?($=q=ce,R=y):q=q.next=ce,Tt.lanes|=le,fo|=le}ee=ee.next}while(ee!==null&&ee!==O);q===null?R=y:q.next=$,On(y,c.memoizedState)||(Mr=!0),c.memoizedState=y,c.baseState=R,c.baseQueue=q,m.lastRenderedState=y}if(s=m.interleaved,s!==null){j=s;do O=j.lane,Tt.lanes|=O,fo|=O,j=j.next;while(j!==s)}else j===null&&(m.lanes=0);return[c.memoizedState,m.dispatch]}function Xv(s){var c=on(),m=c.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var y=m.dispatch,j=m.pending,O=c.memoizedState;if(j!==null){m.pending=null;var R=j=j.next;do O=s(O,R.action),R=R.next;while(R!==j);On(O,c.memoizedState)||(Mr=!0),c.memoizedState=O,c.baseQueue===null&&(c.baseState=O),m.lastRenderedState=O}return[O,y]}function XN(){}function ZN(s,c){var m=Tt,y=on(),j=c(),O=!On(y.memoizedState,j);if(O&&(y.memoizedState=j,Mr=!0),y=y.queue,Zv(eO.bind(null,m,y,s),[s]),y.getSnapshot!==c||O||er!==null&&er.memoizedState.tag&1){if(m.flags|=2048,qc(9,JN.bind(null,m,y,j,c),void 0,null),tr===null)throw Error(r(349));(uo&30)!==0||QN(m,c,j)}return j}function QN(s,c,m){s.flags|=16384,s={getSnapshot:c,value:m},c=Tt.updateQueue,c===null?(c={lastEffect:null,stores:null},Tt.updateQueue=c,c.stores=[s]):(m=c.stores,m===null?c.stores=[s]:m.push(s))}function JN(s,c,m,y){c.value=m,c.getSnapshot=y,tO(c)&&rO(s)}function eO(s,c,m){return m(function(){tO(c)&&rO(s)})}function tO(s){var c=s.getSnapshot;s=s.value;try{var m=c();return!On(s,m)}catch{return!0}}function rO(s){var c=ji(s,1);c!==null&&Rn(c,s,1,-1)}function nO(s){var c=ti();return typeof s=="function"&&(s=s()),c.memoizedState=c.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uc,lastRenderedState:s},c.queue=s,s=s.dispatch=U8.bind(null,Tt,s),[c.memoizedState,s]}function qc(s,c,m,y){return s={tag:s,create:c,destroy:m,deps:y,next:null},c=Tt.updateQueue,c===null?(c={lastEffect:null,stores:null},Tt.updateQueue=c,c.lastEffect=s.next=s):(m=c.lastEffect,m===null?c.lastEffect=s.next=s:(y=m.next,m.next=s,s.next=y,c.lastEffect=s)),s}function iO(){return on().memoizedState}function zd(s,c,m,y){var j=ti();Tt.flags|=s,j.memoizedState=qc(1|c,m,void 0,y===void 0?null:y)}function Vd(s,c,m,y){var j=on();y=y===void 0?null:y;var O=void 0;if(Kt!==null){var R=Kt.memoizedState;if(O=R.destroy,y!==null&&Hv(y,R.deps)){j.memoizedState=qc(c,m,O,y);return}}Tt.flags|=s,j.memoizedState=qc(1|c,m,O,y)}function aO(s,c){return zd(8390656,8,s,c)}function Zv(s,c){return Vd(2048,8,s,c)}function oO(s,c){return Vd(4,2,s,c)}function sO(s,c){return Vd(4,4,s,c)}function lO(s,c){if(typeof c=="function")return s=s(),c(s),function(){c(null)};if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function cO(s,c,m){return m=m!=null?m.concat([s]):null,Vd(4,4,lO.bind(null,c,s),m)}function Qv(){}function uO(s,c){var m=on();c=c===void 0?null:c;var y=m.memoizedState;return y!==null&&c!==null&&Hv(c,y[1])?y[0]:(m.memoizedState=[s,c],s)}function fO(s,c){var m=on();c=c===void 0?null:c;var y=m.memoizedState;return y!==null&&c!==null&&Hv(c,y[1])?y[0]:(s=s(),m.memoizedState=[s,c],s)}function dO(s,c,m){return(uo&21)===0?(s.baseState&&(s.baseState=!1,Mr=!0),s.memoizedState=m):(On(m,c)||(m=VA(),Tt.lanes|=m,fo|=m,s.baseState=!0),c)}function z8(s,c){var m=ft;ft=m!==0&&4>m?m:4,s(!0);var y=Wv.transition;Wv.transition={};try{s(!1),c()}finally{ft=m,Wv.transition=y}}function hO(){return on().memoizedState}function V8(s,c,m){var y=ba(s);if(m={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null},pO(s))mO(c,m);else if(m=WN(s,c,m,y),m!==null){var j=jr();Rn(m,s,y,j),gO(m,c,y)}}function U8(s,c,m){var y=ba(s),j={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null};if(pO(s))mO(c,j);else{var O=s.alternate;if(s.lanes===0&&(O===null||O.lanes===0)&&(O=c.lastRenderedReducer,O!==null))try{var R=c.lastRenderedState,$=O(R,m);if(j.hasEagerState=!0,j.eagerState=$,On($,R)){var q=c.interleaved;q===null?(j.next=j,Bv(c)):(j.next=q.next,q.next=j),c.interleaved=j;return}}catch{}finally{}m=WN(s,c,j,y),m!==null&&(j=jr(),Rn(m,s,y,j),gO(m,c,y))}}function pO(s){var c=s.alternate;return s===Tt||c!==null&&c===Tt}function mO(s,c){zc=Fd=!0;var m=s.pending;m===null?c.next=c:(c.next=m.next,m.next=c),s.pending=c}function gO(s,c,m){if((m&4194240)!==0){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,ev(s,m)}}var Ud={readContext:an,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},q8={readContext:an,useCallback:function(s,c){return ti().memoizedState=[s,c===void 0?null:c],s},useContext:an,useEffect:aO,useImperativeHandle:function(s,c,m){return m=m!=null?m.concat([s]):null,zd(4194308,4,lO.bind(null,c,s),m)},useLayoutEffect:function(s,c){return zd(4194308,4,s,c)},useInsertionEffect:function(s,c){return zd(4,2,s,c)},useMemo:function(s,c){var m=ti();return c=c===void 0?null:c,s=s(),m.memoizedState=[s,c],s},useReducer:function(s,c,m){var y=ti();return c=m!==void 0?m(c):c,y.memoizedState=y.baseState=c,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:c},y.queue=s,s=s.dispatch=V8.bind(null,Tt,s),[y.memoizedState,s]},useRef:function(s){var c=ti();return s={current:s},c.memoizedState=s},useState:nO,useDebugValue:Qv,useDeferredValue:function(s){return ti().memoizedState=s},useTransition:function(){var s=nO(!1),c=s[0];return s=z8.bind(null,s[1]),ti().memoizedState=s,[c,s]},useMutableSource:function(){},useSyncExternalStore:function(s,c,m){var y=Tt,j=ti();if(At){if(m===void 0)throw Error(r(407));m=m()}else{if(m=c(),tr===null)throw Error(r(349));(uo&30)!==0||QN(y,c,m)}j.memoizedState=m;var O={value:m,getSnapshot:c};return j.queue=O,aO(eO.bind(null,y,O,s),[s]),y.flags|=2048,qc(9,JN.bind(null,y,O,m,c),void 0,null),m},useId:function(){var s=ti(),c=tr.identifierPrefix;if(At){var m=Si,y=_i;m=(y&~(1<<32-Nn(y)-1)).toString(32)+m,c=":"+c+"R"+m,m=Vc++,0<m&&(c+="H"+m.toString(32)),c+=":"}else m=F8++,c=":"+c+"r"+m.toString(32)+":";return s.memoizedState=c},unstable_isNewReconciler:!1},W8={readContext:an,useCallback:uO,useContext:an,useEffect:Zv,useImperativeHandle:cO,useInsertionEffect:oO,useLayoutEffect:sO,useMemo:fO,useReducer:Yv,useRef:iO,useState:function(){return Yv(Uc)},useDebugValue:Qv,useDeferredValue:function(s){var c=on();return dO(c,Kt.memoizedState,s)},useTransition:function(){var s=Yv(Uc)[0],c=on().memoizedState;return[s,c]},useMutableSource:XN,useSyncExternalStore:ZN,useId:hO,unstable_isNewReconciler:!1},H8={readContext:an,useCallback:uO,useContext:an,useEffect:Zv,useImperativeHandle:cO,useInsertionEffect:oO,useLayoutEffect:sO,useMemo:fO,useReducer:Xv,useRef:iO,useState:function(){return Xv(Uc)},useDebugValue:Qv,useDeferredValue:function(s){var c=on();return Kt===null?c.memoizedState=s:dO(c,Kt.memoizedState,s)},useTransition:function(){var s=Xv(Uc)[0],c=on().memoizedState;return[s,c]},useMutableSource:XN,useSyncExternalStore:ZN,useId:hO,unstable_isNewReconciler:!1};function Cn(s,c){if(s&&s.defaultProps){c=Q({},c),s=s.defaultProps;for(var m in s)c[m]===void 0&&(c[m]=s[m]);return c}return c}function Jv(s,c,m,y){c=s.memoizedState,m=m(y,c),m=m==null?c:Q({},c,m),s.memoizedState=m,s.lanes===0&&(s.updateQueue.baseState=m)}var qd={isMounted:function(s){return(s=s._reactInternals)?no(s)===s:!1},enqueueSetState:function(s,c,m){s=s._reactInternals;var y=jr(),j=ba(s),O=Pi(y,j);O.payload=c,m!=null&&(O.callback=m),c=ga(s,O,j),c!==null&&(Rn(c,s,j,y),Dd(c,s,j))},enqueueReplaceState:function(s,c,m){s=s._reactInternals;var y=jr(),j=ba(s),O=Pi(y,j);O.tag=1,O.payload=c,m!=null&&(O.callback=m),c=ga(s,O,j),c!==null&&(Rn(c,s,j,y),Dd(c,s,j))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var m=jr(),y=ba(s),j=Pi(m,y);j.tag=2,c!=null&&(j.callback=c),c=ga(s,j,y),c!==null&&(Rn(c,s,y,m),Dd(c,s,y))}};function vO(s,c,m,y,j,O,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,O,R):c.prototype&&c.prototype.isPureReactComponent?!Cc(m,y)||!Cc(j,O):!0}function yO(s,c,m){var y=!1,j=ha,O=c.contextType;return typeof O=="object"&&O!==null?O=an(O):(j=Rr(c)?ao:ur.current,y=c.contextTypes,O=(y=y!=null)?bs(s,j):ha),c=new c(m,O),s.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=qd,s.stateNode=c,c._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=j,s.__reactInternalMemoizedMaskedChildContext=O),c}function xO(s,c,m,y){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(m,y),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(m,y),c.state!==s&&qd.enqueueReplaceState(c,c.state,null)}function ey(s,c,m,y){var j=s.stateNode;j.props=m,j.state=s.memoizedState,j.refs={},Fv(s);var O=c.contextType;typeof O=="object"&&O!==null?j.context=an(O):(O=Rr(c)?ao:ur.current,j.context=bs(s,O)),j.state=s.memoizedState,O=c.getDerivedStateFromProps,typeof O=="function"&&(Jv(s,c,O,m),j.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(c=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),c!==j.state&&qd.enqueueReplaceState(j,j.state,null),$d(s,m,j,y),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308)}function Os(s,c){try{var m="",y=c;do m+=xe(y),y=y.return;while(y);var j=m}catch(O){j=`
Error generating stack: `+O.message+`
`+O.stack}return{value:s,source:c,stack:j,digest:null}}function ty(s,c,m){return{value:s,source:null,stack:m??null,digest:c??null}}function ry(s,c){try{console.error(c.value)}catch(m){setTimeout(function(){throw m})}}var K8=typeof WeakMap=="function"?WeakMap:Map;function bO(s,c,m){m=Pi(-1,m),m.tag=3,m.payload={element:null};var y=c.value;return m.callback=function(){Zd||(Zd=!0,vy=y),ry(s,c)},m}function wO(s,c,m){m=Pi(-1,m),m.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var j=c.value;m.payload=function(){return y(j)},m.callback=function(){ry(s,c)}}var O=s.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(m.callback=function(){ry(s,c),typeof y!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})}),m}function _O(s,c,m){var y=s.pingCache;if(y===null){y=s.pingCache=new K8;var j=new Set;y.set(c,j)}else j=y.get(c),j===void 0&&(j=new Set,y.set(c,j));j.has(m)||(j.add(m),s=sU.bind(null,s,c,m),c.then(s,s))}function SO(s){do{var c;if((c=s.tag===13)&&(c=s.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return s;s=s.return}while(s!==null);return null}function jO(s,c,m,y,j){return(s.mode&1)===0?(s===c?s.flags|=65536:(s.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(c=Pi(-1,1),c.tag=2,ga(m,c,1))),m.lanes|=1),s):(s.flags|=65536,s.lanes=j,s)}var G8=C.ReactCurrentOwner,Mr=!1;function Sr(s,c,m,y){c.child=s===null?qN(c,null,m,y):js(c,s.child,m,y)}function PO(s,c,m,y,j){m=m.render;var O=c.ref;return As(c,j),y=Kv(s,c,m,y,O,j),m=Gv(),s!==null&&!Mr?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~j,Ai(s,c,j)):(At&&m&&Cv(c),c.flags|=1,Sr(s,c,y,j),c.child)}function AO(s,c,m,y,j){if(s===null){var O=m.type;return typeof O=="function"&&!jy(O)&&O.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(c.tag=15,c.type=O,NO(s,c,O,y,j)):(s=nh(m.type,null,y,c,c.mode,j),s.ref=c.ref,s.return=c,c.child=s)}if(O=s.child,(s.lanes&j)===0){var R=O.memoizedProps;if(m=m.compare,m=m!==null?m:Cc,m(R,y)&&s.ref===c.ref)return Ai(s,c,j)}return c.flags|=1,s=_a(O,y),s.ref=c.ref,s.return=c,c.child=s}function NO(s,c,m,y,j){if(s!==null){var O=s.memoizedProps;if(Cc(O,y)&&s.ref===c.ref)if(Mr=!1,c.pendingProps=y=O,(s.lanes&j)!==0)(s.flags&131072)!==0&&(Mr=!0);else return c.lanes=s.lanes,Ai(s,c,j)}return ny(s,c,m,y,j)}function OO(s,c,m){var y=c.pendingProps,j=y.children,O=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Cs,Kr),Kr|=m;else{if((m&1073741824)===0)return s=O!==null?O.baseLanes|m:m,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:s,cachePool:null,transitions:null},c.updateQueue=null,yt(Cs,Kr),Kr|=s,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=O!==null?O.baseLanes:m,yt(Cs,Kr),Kr|=y}else O!==null?(y=O.baseLanes|m,c.memoizedState=null):y=m,yt(Cs,Kr),Kr|=y;return Sr(s,c,j,m),c.child}function EO(s,c){var m=c.ref;(s===null&&m!==null||s!==null&&s.ref!==m)&&(c.flags|=512,c.flags|=2097152)}function ny(s,c,m,y,j){var O=Rr(m)?ao:ur.current;return O=bs(c,O),As(c,j),m=Kv(s,c,m,y,O,j),y=Gv(),s!==null&&!Mr?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~j,Ai(s,c,j)):(At&&y&&Cv(c),c.flags|=1,Sr(s,c,m,j),c.child)}function CO(s,c,m,y,j){if(Rr(m)){var O=!0;Od(c)}else O=!1;if(As(c,j),c.stateNode===null)Hd(s,c),yO(c,m,y),ey(c,m,y,j),y=!0;else if(s===null){var R=c.stateNode,$=c.memoizedProps;R.props=$;var q=R.context,ee=m.contextType;typeof ee=="object"&&ee!==null?ee=an(ee):(ee=Rr(m)?ao:ur.current,ee=bs(c,ee));var le=m.getDerivedStateFromProps,ce=typeof le=="function"||typeof R.getSnapshotBeforeUpdate=="function";ce||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||($!==y||q!==ee)&&xO(c,R,y,ee),ma=!1;var se=c.memoizedState;R.state=se,$d(c,y,R,j),q=c.memoizedState,$!==y||se!==q||kr.current||ma?(typeof le=="function"&&(Jv(c,m,le,y),q=c.memoizedState),($=ma||vO(c,m,$,y,se,q,ee))?(ce||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=q),R.props=y,R.state=q,R.context=ee,y=$):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{R=c.stateNode,HN(s,c),$=c.memoizedProps,ee=c.type===c.elementType?$:Cn(c.type,$),R.props=ee,ce=c.pendingProps,se=R.context,q=m.contextType,typeof q=="object"&&q!==null?q=an(q):(q=Rr(m)?ao:ur.current,q=bs(c,q));var ve=m.getDerivedStateFromProps;(le=typeof ve=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||($!==ce||se!==q)&&xO(c,R,y,q),ma=!1,se=c.memoizedState,R.state=se,$d(c,y,R,j);var _e=c.memoizedState;$!==ce||se!==_e||kr.current||ma?(typeof ve=="function"&&(Jv(c,m,ve,y),_e=c.memoizedState),(ee=ma||vO(c,m,ee,y,se,_e,q)||!1)?(le||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(y,_e,q),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(y,_e,q)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||$===s.memoizedProps&&se===s.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&se===s.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=_e),R.props=y,R.state=_e,R.context=q,y=ee):(typeof R.componentDidUpdate!="function"||$===s.memoizedProps&&se===s.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&se===s.memoizedState||(c.flags|=1024),y=!1)}return iy(s,c,m,y,O,j)}function iy(s,c,m,y,j,O){EO(s,c);var R=(c.flags&128)!==0;if(!y&&!R)return j&&IN(c,m,!1),Ai(s,c,O);y=c.stateNode,G8.current=c;var $=R&&typeof m.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,s!==null&&R?(c.child=js(c,s.child,null,O),c.child=js(c,null,$,O)):Sr(s,c,$,O),c.memoizedState=y.state,j&&IN(c,m,!0),c.child}function TO(s){var c=s.stateNode;c.pendingContext?RN(s,c.pendingContext,c.pendingContext!==c.context):c.context&&RN(s,c.context,!1),zv(s,c.containerInfo)}function kO(s,c,m,y,j){return Ss(),Mv(j),c.flags|=256,Sr(s,c,m,y),c.child}var ay={dehydrated:null,treeContext:null,retryLane:0};function oy(s){return{baseLanes:s,cachePool:null,transitions:null}}function RO(s,c,m){var y=c.pendingProps,j=Ct.current,O=!1,R=(c.flags&128)!==0,$;if(($=R)||($=s!==null&&s.memoizedState===null?!1:(j&2)!==0),$?(O=!0,c.flags&=-129):(s===null||s.memoizedState!==null)&&(j|=1),yt(Ct,j&1),s===null)return Rv(c),s=c.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((c.mode&1)===0?c.lanes=1:s.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(R=y.children,s=y.fallback,O?(y=c.mode,O=c.child,R={mode:"hidden",children:R},(y&1)===0&&O!==null?(O.childLanes=0,O.pendingProps=R):O=ih(R,y,0,null),s=go(s,y,m,null),O.return=c,s.return=c,O.sibling=s,c.child=O,c.child.memoizedState=oy(m),c.memoizedState=ay,s):sy(c,R));if(j=s.memoizedState,j!==null&&($=j.dehydrated,$!==null))return Y8(s,c,R,y,$,j,m);if(O){O=y.fallback,R=c.mode,j=s.child,$=j.sibling;var q={mode:"hidden",children:y.children};return(R&1)===0&&c.child!==j?(y=c.child,y.childLanes=0,y.pendingProps=q,c.deletions=null):(y=_a(j,q),y.subtreeFlags=j.subtreeFlags&14680064),$!==null?O=_a($,O):(O=go(O,R,m,null),O.flags|=2),O.return=c,y.return=c,y.sibling=O,c.child=y,y=O,O=c.child,R=s.child.memoizedState,R=R===null?oy(m):{baseLanes:R.baseLanes|m,cachePool:null,transitions:R.transitions},O.memoizedState=R,O.childLanes=s.childLanes&~m,c.memoizedState=ay,y}return O=s.child,s=O.sibling,y=_a(O,{mode:"visible",children:y.children}),(c.mode&1)===0&&(y.lanes=m),y.return=c,y.sibling=null,s!==null&&(m=c.deletions,m===null?(c.deletions=[s],c.flags|=16):m.push(s)),c.child=y,c.memoizedState=null,y}function sy(s,c){return c=ih({mode:"visible",children:c},s.mode,0,null),c.return=s,s.child=c}function Wd(s,c,m,y){return y!==null&&Mv(y),js(c,s.child,null,m),s=sy(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function Y8(s,c,m,y,j,O,R){if(m)return c.flags&256?(c.flags&=-257,y=ty(Error(r(422))),Wd(s,c,R,y)):c.memoizedState!==null?(c.child=s.child,c.flags|=128,null):(O=y.fallback,j=c.mode,y=ih({mode:"visible",children:y.children},j,0,null),O=go(O,j,R,null),O.flags|=2,y.return=c,O.return=c,y.sibling=O,c.child=y,(c.mode&1)!==0&&js(c,s.child,null,R),c.child.memoizedState=oy(R),c.memoizedState=ay,O);if((c.mode&1)===0)return Wd(s,c,R,null);if(j.data==="$!"){if(y=j.nextSibling&&j.nextSibling.dataset,y)var $=y.dgst;return y=$,O=Error(r(419)),y=ty(O,y,void 0),Wd(s,c,R,y)}if($=(R&s.childLanes)!==0,Mr||$){if(y=tr,y!==null){switch(R&-R){case 4:j=2;break;case 16:j=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:j=32;break;case 536870912:j=268435456;break;default:j=0}j=(j&(y.suspendedLanes|R))!==0?0:j,j!==0&&j!==O.retryLane&&(O.retryLane=j,ji(s,j),Rn(y,s,j,-1))}return Sy(),y=ty(Error(r(421))),Wd(s,c,R,y)}return j.data==="$?"?(c.flags|=128,c.child=s.child,c=lU.bind(null,s),j._reactRetry=c,null):(s=O.treeContext,Hr=fa(j.nextSibling),Wr=c,At=!0,En=null,s!==null&&(rn[nn++]=_i,rn[nn++]=Si,rn[nn++]=oo,_i=s.id,Si=s.overflow,oo=c),c=sy(c,y.children),c.flags|=4096,c)}function MO(s,c,m){s.lanes|=c;var y=s.alternate;y!==null&&(y.lanes|=c),Lv(s.return,c,m)}function ly(s,c,m,y,j){var O=s.memoizedState;O===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:m,tailMode:j}:(O.isBackwards=c,O.rendering=null,O.renderingStartTime=0,O.last=y,O.tail=m,O.tailMode=j)}function IO(s,c,m){var y=c.pendingProps,j=y.revealOrder,O=y.tail;if(Sr(s,c,y.children,m),y=Ct.current,(y&2)!==0)y=y&1|2,c.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&MO(s,m,c);else if(s.tag===19)MO(s,m,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(yt(Ct,y),(c.mode&1)===0)c.memoizedState=null;else switch(j){case"forwards":for(m=c.child,j=null;m!==null;)s=m.alternate,s!==null&&Ld(s)===null&&(j=m),m=m.sibling;m=j,m===null?(j=c.child,c.child=null):(j=m.sibling,m.sibling=null),ly(c,!1,j,m,O);break;case"backwards":for(m=null,j=c.child,c.child=null;j!==null;){if(s=j.alternate,s!==null&&Ld(s)===null){c.child=j;break}s=j.sibling,j.sibling=m,m=j,j=s}ly(c,!0,m,null,O);break;case"together":ly(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Hd(s,c){(c.mode&1)===0&&s!==null&&(s.alternate=null,c.alternate=null,c.flags|=2)}function Ai(s,c,m){if(s!==null&&(c.dependencies=s.dependencies),fo|=c.lanes,(m&c.childLanes)===0)return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,m=_a(s,s.pendingProps),c.child=m,m.return=c;s.sibling!==null;)s=s.sibling,m=m.sibling=_a(s,s.pendingProps),m.return=c;m.sibling=null}return c.child}function X8(s,c,m){switch(c.tag){case 3:TO(c),Ss();break;case 5:YN(c);break;case 1:Rr(c.type)&&Od(c);break;case 4:zv(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,j=c.memoizedProps.value;yt(Md,y._currentValue),y._currentValue=j;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(yt(Ct,Ct.current&1),c.flags|=128,null):(m&c.child.childLanes)!==0?RO(s,c,m):(yt(Ct,Ct.current&1),s=Ai(s,c,m),s!==null?s.sibling:null);yt(Ct,Ct.current&1);break;case 19:if(y=(m&c.childLanes)!==0,(s.flags&128)!==0){if(y)return IO(s,c,m);c.flags|=128}if(j=c.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),yt(Ct,Ct.current),y)break;return null;case 22:case 23:return c.lanes=0,OO(s,c,m)}return Ai(s,c,m)}var DO,cy,$O,LO;DO=function(s,c){for(var m=c.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===c)break;for(;m.sibling===null;){if(m.return===null||m.return===c)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},cy=function(){},$O=function(s,c,m,y){var j=s.memoizedProps;if(j!==y){s=c.stateNode,co(ei.current);var O=null;switch(m){case"input":j=De(s,j),y=De(s,y),O=[];break;case"select":j=Q({},j,{value:void 0}),y=Q({},y,{value:void 0}),O=[];break;case"textarea":j=An(s,j),y=An(s,y),O=[];break;default:typeof j.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=Pd)}Ug(m,y);var R;m=null;for(ee in j)if(!y.hasOwnProperty(ee)&&j.hasOwnProperty(ee)&&j[ee]!=null)if(ee==="style"){var $=j[ee];for(R in $)$.hasOwnProperty(R)&&(m||(m={}),m[R]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(i.hasOwnProperty(ee)?O||(O=[]):(O=O||[]).push(ee,null));for(ee in y){var q=y[ee];if($=j!=null?j[ee]:void 0,y.hasOwnProperty(ee)&&q!==$&&(q!=null||$!=null))if(ee==="style")if($){for(R in $)!$.hasOwnProperty(R)||q&&q.hasOwnProperty(R)||(m||(m={}),m[R]="");for(R in q)q.hasOwnProperty(R)&&$[R]!==q[R]&&(m||(m={}),m[R]=q[R])}else m||(O||(O=[]),O.push(ee,m)),m=q;else ee==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,$=$?$.__html:void 0,q!=null&&$!==q&&(O=O||[]).push(ee,q)):ee==="children"?typeof q!="string"&&typeof q!="number"||(O=O||[]).push(ee,""+q):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(i.hasOwnProperty(ee)?(q!=null&&ee==="onScroll"&&_t("scroll",s),O||$===q||(O=[])):(O=O||[]).push(ee,q))}m&&(O=O||[]).push("style",m);var ee=O;(c.updateQueue=ee)&&(c.flags|=4)}},LO=function(s,c,m,y){m!==y&&(c.flags|=4)};function Wc(s,c){if(!At)switch(s.tailMode){case"hidden":c=s.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s.tail=null:m.sibling=null;break;case"collapsed":m=s.tail;for(var y=null;m!==null;)m.alternate!==null&&(y=m),m=m.sibling;y===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function dr(s){var c=s.alternate!==null&&s.alternate.child===s.child,m=0,y=0;if(c)for(var j=s.child;j!==null;)m|=j.lanes|j.childLanes,y|=j.subtreeFlags&14680064,y|=j.flags&14680064,j.return=s,j=j.sibling;else for(j=s.child;j!==null;)m|=j.lanes|j.childLanes,y|=j.subtreeFlags,y|=j.flags,j.return=s,j=j.sibling;return s.subtreeFlags|=y,s.childLanes=m,c}function Z8(s,c,m){var y=c.pendingProps;switch(Tv(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dr(c),null;case 1:return Rr(c.type)&&Nd(),dr(c),null;case 3:return y=c.stateNode,Ns(),St(kr),St(ur),qv(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(kd(c)?c.flags|=4:s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,En!==null&&(by(En),En=null))),cy(s,c),dr(c),null;case 5:Vv(c);var j=co(Fc.current);if(m=c.type,s!==null&&c.stateNode!=null)$O(s,c,m,y,j),s.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(r(166));return dr(c),null}if(s=co(ei.current),kd(c)){y=c.stateNode,m=c.type;var O=c.memoizedProps;switch(y[Jn]=c,y[Ic]=O,s=(c.mode&1)!==0,m){case"dialog":_t("cancel",y),_t("close",y);break;case"iframe":case"object":case"embed":_t("load",y);break;case"video":case"audio":for(j=0;j<kc.length;j++)_t(kc[j],y);break;case"source":_t("error",y);break;case"img":case"image":case"link":_t("error",y),_t("load",y);break;case"details":_t("toggle",y);break;case"input":pt(y,O),_t("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!O.multiple},_t("invalid",y);break;case"textarea":ls(y,O),_t("invalid",y)}Ug(m,O),j=null;for(var R in O)if(O.hasOwnProperty(R)){var $=O[R];R==="children"?typeof $=="string"?y.textContent!==$&&(O.suppressHydrationWarning!==!0&&jd(y.textContent,$,s),j=["children",$]):typeof $=="number"&&y.textContent!==""+$&&(O.suppressHydrationWarning!==!0&&jd(y.textContent,$,s),j=["children",""+$]):i.hasOwnProperty(R)&&$!=null&&R==="onScroll"&&_t("scroll",y)}switch(m){case"input":me(y),Ur(y,O,!0);break;case"textarea":me(y),dc(y);break;case"select":case"option":break;default:typeof O.onClick=="function"&&(y.onclick=Pd)}y=j,c.updateQueue=y,y!==null&&(c.flags|=4)}else{R=j.nodeType===9?j:j.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=jA(m)),s==="http://www.w3.org/1999/xhtml"?m==="script"?(s=R.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=R.createElement(m,{is:y.is}):(s=R.createElement(m),m==="select"&&(R=s,y.multiple?R.multiple=!0:y.size&&(R.size=y.size))):s=R.createElementNS(s,m),s[Jn]=c,s[Ic]=y,DO(s,c,!1,!1),c.stateNode=s;e:{switch(R=qg(m,y),m){case"dialog":_t("cancel",s),_t("close",s),j=y;break;case"iframe":case"object":case"embed":_t("load",s),j=y;break;case"video":case"audio":for(j=0;j<kc.length;j++)_t(kc[j],s);j=y;break;case"source":_t("error",s),j=y;break;case"img":case"image":case"link":_t("error",s),_t("load",s),j=y;break;case"details":_t("toggle",s),j=y;break;case"input":pt(s,y),j=De(s,y),_t("invalid",s);break;case"option":j=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},j=Q({},y,{value:void 0}),_t("invalid",s);break;case"textarea":ls(s,y),j=An(s,y),_t("invalid",s);break;default:j=y}Ug(m,j),$=j;for(O in $)if($.hasOwnProperty(O)){var q=$[O];O==="style"?NA(s,q):O==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,q!=null&&PA(s,q)):O==="children"?typeof q=="string"?(m!=="textarea"||q!=="")&&hc(s,q):typeof q=="number"&&hc(s,""+q):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(i.hasOwnProperty(O)?q!=null&&O==="onScroll"&&_t("scroll",s):q!=null&&P(s,O,q,R))}switch(m){case"input":me(s),Ur(s,y,!1);break;case"textarea":me(s),dc(s);break;case"option":y.value!=null&&s.setAttribute("value",""+ge(y.value));break;case"select":s.multiple=!!y.multiple,O=y.value,O!=null?Tr(s,!!y.multiple,O,!1):y.defaultValue!=null&&Tr(s,!!y.multiple,y.defaultValue,!0);break;default:typeof j.onClick=="function"&&(s.onclick=Pd)}switch(m){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return dr(c),null;case 6:if(s&&c.stateNode!=null)LO(s,c,s.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(r(166));if(m=co(Fc.current),co(ei.current),kd(c)){if(y=c.stateNode,m=c.memoizedProps,y[Jn]=c,(O=y.nodeValue!==m)&&(s=Wr,s!==null))switch(s.tag){case 3:jd(y.nodeValue,m,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&jd(y.nodeValue,m,(s.mode&1)!==0)}O&&(c.flags|=4)}else y=(m.nodeType===9?m:m.ownerDocument).createTextNode(y),y[Jn]=c,c.stateNode=y}return dr(c),null;case 13:if(St(Ct),y=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(At&&Hr!==null&&(c.mode&1)!==0&&(c.flags&128)===0)zN(),Ss(),c.flags|=98560,O=!1;else if(O=kd(c),y!==null&&y.dehydrated!==null){if(s===null){if(!O)throw Error(r(318));if(O=c.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(r(317));O[Jn]=c}else Ss(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;dr(c),O=!1}else En!==null&&(by(En),En=null),O=!0;if(!O)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=m,c):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(c.child.flags|=8192,(c.mode&1)!==0&&(s===null||(Ct.current&1)!==0?Gt===0&&(Gt=3):Sy())),c.updateQueue!==null&&(c.flags|=4),dr(c),null);case 4:return Ns(),cy(s,c),s===null&&Rc(c.stateNode.containerInfo),dr(c),null;case 10:return $v(c.type._context),dr(c),null;case 17:return Rr(c.type)&&Nd(),dr(c),null;case 19:if(St(Ct),O=c.memoizedState,O===null)return dr(c),null;if(y=(c.flags&128)!==0,R=O.rendering,R===null)if(y)Wc(O,!1);else{if(Gt!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(R=Ld(s),R!==null){for(c.flags|=128,Wc(O,!1),y=R.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),c.subtreeFlags=0,y=m,m=c.child;m!==null;)O=m,s=y,O.flags&=14680066,R=O.alternate,R===null?(O.childLanes=0,O.lanes=s,O.child=null,O.subtreeFlags=0,O.memoizedProps=null,O.memoizedState=null,O.updateQueue=null,O.dependencies=null,O.stateNode=null):(O.childLanes=R.childLanes,O.lanes=R.lanes,O.child=R.child,O.subtreeFlags=0,O.deletions=null,O.memoizedProps=R.memoizedProps,O.memoizedState=R.memoizedState,O.updateQueue=R.updateQueue,O.type=R.type,s=R.dependencies,O.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),m=m.sibling;return yt(Ct,Ct.current&1|2),c.child}s=s.sibling}O.tail!==null&&Bt()>Ts&&(c.flags|=128,y=!0,Wc(O,!1),c.lanes=4194304)}else{if(!y)if(s=Ld(R),s!==null){if(c.flags|=128,y=!0,m=s.updateQueue,m!==null&&(c.updateQueue=m,c.flags|=4),Wc(O,!0),O.tail===null&&O.tailMode==="hidden"&&!R.alternate&&!At)return dr(c),null}else 2*Bt()-O.renderingStartTime>Ts&&m!==1073741824&&(c.flags|=128,y=!0,Wc(O,!1),c.lanes=4194304);O.isBackwards?(R.sibling=c.child,c.child=R):(m=O.last,m!==null?m.sibling=R:c.child=R,O.last=R)}return O.tail!==null?(c=O.tail,O.rendering=c,O.tail=c.sibling,O.renderingStartTime=Bt(),c.sibling=null,m=Ct.current,yt(Ct,y?m&1|2:m&1),c):(dr(c),null);case 22:case 23:return _y(),y=c.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(c.flags|=8192),y&&(c.mode&1)!==0?(Kr&1073741824)!==0&&(dr(c),c.subtreeFlags&6&&(c.flags|=8192)):dr(c),null;case 24:return null;case 25:return null}throw Error(r(156,c.tag))}function Q8(s,c){switch(Tv(c),c.tag){case 1:return Rr(c.type)&&Nd(),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Ns(),St(kr),St(ur),qv(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 5:return Vv(c),null;case 13:if(St(Ct),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));Ss()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return St(Ct),null;case 4:return Ns(),null;case 10:return $v(c.type._context),null;case 22:case 23:return _y(),null;case 24:return null;default:return null}}var Kd=!1,hr=!1,J8=typeof WeakSet=="function"?WeakSet:Set,be=null;function Es(s,c){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(y){It(s,c,y)}else m.current=null}function uy(s,c,m){try{m()}catch(y){It(s,c,y)}}var BO=!1;function eU(s,c){if(_v=hd,s=vN(),pv(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var j=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var R=0,$=-1,q=-1,ee=0,le=0,ce=s,se=null;t:for(;;){for(var ve;ce!==m||j!==0&&ce.nodeType!==3||($=R+j),ce!==O||y!==0&&ce.nodeType!==3||(q=R+y),ce.nodeType===3&&(R+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)se=ce,ce=ve;for(;;){if(ce===s)break t;if(se===m&&++ee===j&&($=R),se===O&&++le===y&&(q=R),(ve=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=ve}m=$===-1||q===-1?null:{start:$,end:q}}else m=null}m=m||{start:0,end:0}}else m=null;for(Sv={focusedElem:s,selectionRange:m},hd=!1,be=c;be!==null;)if(c=be,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,be=s;else for(;be!==null;){c=be;try{var _e=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Ne=_e.memoizedProps,Ft=_e.memoizedState,Z=c.stateNode,H=Z.getSnapshotBeforeUpdate(c.elementType===c.type?Ne:Cn(c.type,Ne),Ft);Z.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var J=c.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(de){It(c,c.return,de)}if(s=c.sibling,s!==null){s.return=c.return,be=s;break}be=c.return}return _e=BO,BO=!1,_e}function Hc(s,c,m){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var j=y=y.next;do{if((j.tag&s)===s){var O=j.destroy;j.destroy=void 0,O!==void 0&&uy(c,m,O)}j=j.next}while(j!==y)}}function Gd(s,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&s)===s){var y=m.create;m.destroy=y()}m=m.next}while(m!==c)}}function fy(s){var c=s.ref;if(c!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof c=="function"?c(s):c.current=s}}function FO(s){var c=s.alternate;c!==null&&(s.alternate=null,FO(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&(delete c[Jn],delete c[Ic],delete c[Nv],delete c[D8],delete c[$8])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function zO(s){return s.tag===5||s.tag===3||s.tag===4}function VO(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||zO(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function dy(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?m.nodeType===8?m.parentNode.insertBefore(s,c):m.insertBefore(s,c):(m.nodeType===8?(c=m.parentNode,c.insertBefore(s,m)):(c=m,c.appendChild(s)),m=m._reactRootContainer,m!=null||c.onclick!==null||(c.onclick=Pd));else if(y!==4&&(s=s.child,s!==null))for(dy(s,c,m),s=s.sibling;s!==null;)dy(s,c,m),s=s.sibling}function hy(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?m.insertBefore(s,c):m.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(hy(s,c,m),s=s.sibling;s!==null;)hy(s,c,m),s=s.sibling}var ar=null,Tn=!1;function va(s,c,m){for(m=m.child;m!==null;)UO(s,c,m),m=m.sibling}function UO(s,c,m){if(Qn&&typeof Qn.onCommitFiberUnmount=="function")try{Qn.onCommitFiberUnmount(sd,m)}catch{}switch(m.tag){case 5:hr||Es(m,c);case 6:var y=ar,j=Tn;ar=null,va(s,c,m),ar=y,Tn=j,ar!==null&&(Tn?(s=ar,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):ar.removeChild(m.stateNode));break;case 18:ar!==null&&(Tn?(s=ar,m=m.stateNode,s.nodeType===8?Av(s.parentNode,m):s.nodeType===1&&Av(s,m),jc(s)):Av(ar,m.stateNode));break;case 4:y=ar,j=Tn,ar=m.stateNode.containerInfo,Tn=!0,va(s,c,m),ar=y,Tn=j;break;case 0:case 11:case 14:case 15:if(!hr&&(y=m.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){j=y=y.next;do{var O=j,R=O.destroy;O=O.tag,R!==void 0&&((O&2)!==0||(O&4)!==0)&&uy(m,c,R),j=j.next}while(j!==y)}va(s,c,m);break;case 1:if(!hr&&(Es(m,c),y=m.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=m.memoizedProps,y.state=m.memoizedState,y.componentWillUnmount()}catch($){It(m,c,$)}va(s,c,m);break;case 21:va(s,c,m);break;case 22:m.mode&1?(hr=(y=hr)||m.memoizedState!==null,va(s,c,m),hr=y):va(s,c,m);break;default:va(s,c,m)}}function qO(s){var c=s.updateQueue;if(c!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new J8),c.forEach(function(y){var j=cU.bind(null,s,y);m.has(y)||(m.add(y),y.then(j,j))})}}function kn(s,c){var m=c.deletions;if(m!==null)for(var y=0;y<m.length;y++){var j=m[y];try{var O=s,R=c,$=R;e:for(;$!==null;){switch($.tag){case 5:ar=$.stateNode,Tn=!1;break e;case 3:ar=$.stateNode.containerInfo,Tn=!0;break e;case 4:ar=$.stateNode.containerInfo,Tn=!0;break e}$=$.return}if(ar===null)throw Error(r(160));UO(O,R,j),ar=null,Tn=!1;var q=j.alternate;q!==null&&(q.return=null),j.return=null}catch(ee){It(j,c,ee)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)WO(c,s),c=c.sibling}function WO(s,c){var m=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(kn(c,s),ri(s),y&4){try{Hc(3,s,s.return),Gd(3,s)}catch(Ne){It(s,s.return,Ne)}try{Hc(5,s,s.return)}catch(Ne){It(s,s.return,Ne)}}break;case 1:kn(c,s),ri(s),y&512&&m!==null&&Es(m,m.return);break;case 5:if(kn(c,s),ri(s),y&512&&m!==null&&Es(m,m.return),s.flags&32){var j=s.stateNode;try{hc(j,"")}catch(Ne){It(s,s.return,Ne)}}if(y&4&&(j=s.stateNode,j!=null)){var O=s.memoizedProps,R=m!==null?m.memoizedProps:O,$=s.type,q=s.updateQueue;if(s.updateQueue=null,q!==null)try{$==="input"&&O.type==="radio"&&O.name!=null&&mt(j,O),qg($,R);var ee=qg($,O);for(R=0;R<q.length;R+=2){var le=q[R],ce=q[R+1];le==="style"?NA(j,ce):le==="dangerouslySetInnerHTML"?PA(j,ce):le==="children"?hc(j,ce):P(j,le,ce,ee)}switch($){case"input":Pt(j,O);break;case"textarea":fc(j,O);break;case"select":var se=j._wrapperState.wasMultiple;j._wrapperState.wasMultiple=!!O.multiple;var ve=O.value;ve!=null?Tr(j,!!O.multiple,ve,!1):se!==!!O.multiple&&(O.defaultValue!=null?Tr(j,!!O.multiple,O.defaultValue,!0):Tr(j,!!O.multiple,O.multiple?[]:"",!1))}j[Ic]=O}catch(Ne){It(s,s.return,Ne)}}break;case 6:if(kn(c,s),ri(s),y&4){if(s.stateNode===null)throw Error(r(162));j=s.stateNode,O=s.memoizedProps;try{j.nodeValue=O}catch(Ne){It(s,s.return,Ne)}}break;case 3:if(kn(c,s),ri(s),y&4&&m!==null&&m.memoizedState.isDehydrated)try{jc(c.containerInfo)}catch(Ne){It(s,s.return,Ne)}break;case 4:kn(c,s),ri(s);break;case 13:kn(c,s),ri(s),j=s.child,j.flags&8192&&(O=j.memoizedState!==null,j.stateNode.isHidden=O,!O||j.alternate!==null&&j.alternate.memoizedState!==null||(gy=Bt())),y&4&&qO(s);break;case 22:if(le=m!==null&&m.memoizedState!==null,s.mode&1?(hr=(ee=hr)||le,kn(c,s),hr=ee):kn(c,s),ri(s),y&8192){if(ee=s.memoizedState!==null,(s.stateNode.isHidden=ee)&&!le&&(s.mode&1)!==0)for(be=s,le=s.child;le!==null;){for(ce=be=le;be!==null;){switch(se=be,ve=se.child,se.tag){case 0:case 11:case 14:case 15:Hc(4,se,se.return);break;case 1:Es(se,se.return);var _e=se.stateNode;if(typeof _e.componentWillUnmount=="function"){y=se,m=se.return;try{c=y,_e.props=c.memoizedProps,_e.state=c.memoizedState,_e.componentWillUnmount()}catch(Ne){It(y,m,Ne)}}break;case 5:Es(se,se.return);break;case 22:if(se.memoizedState!==null){GO(ce);continue}}ve!==null?(ve.return=se,be=ve):GO(ce)}le=le.sibling}e:for(le=null,ce=s;;){if(ce.tag===5){if(le===null){le=ce;try{j=ce.stateNode,ee?(O=j.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none"):($=ce.stateNode,q=ce.memoizedProps.style,R=q!=null&&q.hasOwnProperty("display")?q.display:null,$.style.display=AA("display",R))}catch(Ne){It(s,s.return,Ne)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=ee?"":ce.memoizedProps}catch(Ne){It(s,s.return,Ne)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===s)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===s)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===s)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:kn(c,s),ri(s),y&4&&qO(s);break;case 21:break;default:kn(c,s),ri(s)}}function ri(s){var c=s.flags;if(c&2){try{e:{for(var m=s.return;m!==null;){if(zO(m)){var y=m;break e}m=m.return}throw Error(r(160))}switch(y.tag){case 5:var j=y.stateNode;y.flags&32&&(hc(j,""),y.flags&=-33);var O=VO(s);hy(s,O,j);break;case 3:case 4:var R=y.stateNode.containerInfo,$=VO(s);dy(s,$,R);break;default:throw Error(r(161))}}catch(q){It(s,s.return,q)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function tU(s,c,m){be=s,HO(s)}function HO(s,c,m){for(var y=(s.mode&1)!==0;be!==null;){var j=be,O=j.child;if(j.tag===22&&y){var R=j.memoizedState!==null||Kd;if(!R){var $=j.alternate,q=$!==null&&$.memoizedState!==null||hr;$=Kd;var ee=hr;if(Kd=R,(hr=q)&&!ee)for(be=j;be!==null;)R=be,q=R.child,R.tag===22&&R.memoizedState!==null?YO(j):q!==null?(q.return=R,be=q):YO(j);for(;O!==null;)be=O,HO(O),O=O.sibling;be=j,Kd=$,hr=ee}KO(s)}else(j.subtreeFlags&8772)!==0&&O!==null?(O.return=j,be=O):KO(s)}}function KO(s){for(;be!==null;){var c=be;if((c.flags&8772)!==0){var m=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:hr||Gd(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!hr)if(m===null)y.componentDidMount();else{var j=c.elementType===c.type?m.memoizedProps:Cn(c.type,m.memoizedProps);y.componentDidUpdate(j,m.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var O=c.updateQueue;O!==null&&GN(c,O,y);break;case 3:var R=c.updateQueue;if(R!==null){if(m=null,c.child!==null)switch(c.child.tag){case 5:m=c.child.stateNode;break;case 1:m=c.child.stateNode}GN(c,R,m)}break;case 5:var $=c.stateNode;if(m===null&&c.flags&4){m=$;var q=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":q.autoFocus&&m.focus();break;case"img":q.src&&(m.src=q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var ee=c.alternate;if(ee!==null){var le=ee.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&jc(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}hr||c.flags&512&&fy(c)}catch(se){It(c,c.return,se)}}if(c===s){be=null;break}if(m=c.sibling,m!==null){m.return=c.return,be=m;break}be=c.return}}function GO(s){for(;be!==null;){var c=be;if(c===s){be=null;break}var m=c.sibling;if(m!==null){m.return=c.return,be=m;break}be=c.return}}function YO(s){for(;be!==null;){var c=be;try{switch(c.tag){case 0:case 11:case 15:var m=c.return;try{Gd(4,c)}catch(q){It(c,m,q)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var j=c.return;try{y.componentDidMount()}catch(q){It(c,j,q)}}var O=c.return;try{fy(c)}catch(q){It(c,O,q)}break;case 5:var R=c.return;try{fy(c)}catch(q){It(c,R,q)}}}catch(q){It(c,c.return,q)}if(c===s){be=null;break}var $=c.sibling;if($!==null){$.return=c.return,be=$;break}be=c.return}}var rU=Math.ceil,Yd=C.ReactCurrentDispatcher,py=C.ReactCurrentOwner,sn=C.ReactCurrentBatchConfig,tt=0,tr=null,Ut=null,or=0,Kr=0,Cs=da(0),Gt=0,Kc=null,fo=0,Xd=0,my=0,Gc=null,Ir=null,gy=0,Ts=1/0,Ni=null,Zd=!1,vy=null,ya=null,Qd=!1,xa=null,Jd=0,Yc=0,yy=null,eh=-1,th=0;function jr(){return(tt&6)!==0?Bt():eh!==-1?eh:eh=Bt()}function ba(s){return(s.mode&1)===0?1:(tt&2)!==0&&or!==0?or&-or:B8.transition!==null?(th===0&&(th=VA()),th):(s=ft,s!==0||(s=window.event,s=s===void 0?16:ZA(s.type)),s)}function Rn(s,c,m,y){if(50<Yc)throw Yc=0,yy=null,Error(r(185));xc(s,m,y),((tt&2)===0||s!==tr)&&(s===tr&&((tt&2)===0&&(Xd|=m),Gt===4&&wa(s,or)),Dr(s,y),m===1&&tt===0&&(c.mode&1)===0&&(Ts=Bt()+500,Ed&&pa()))}function Dr(s,c){var m=s.callbackNode;B9(s,c);var y=ud(s,s===tr?or:0);if(y===0)m!==null&&BA(m),s.callbackNode=null,s.callbackPriority=0;else if(c=y&-y,s.callbackPriority!==c){if(m!=null&&BA(m),c===1)s.tag===0?L8(ZO.bind(null,s)):DN(ZO.bind(null,s)),M8(function(){(tt&6)===0&&pa()}),m=null;else{switch(UA(y)){case 1:m=Zg;break;case 4:m=FA;break;case 16:m=od;break;case 536870912:m=zA;break;default:m=od}m=aE(m,XO.bind(null,s))}s.callbackPriority=c,s.callbackNode=m}}function XO(s,c){if(eh=-1,th=0,(tt&6)!==0)throw Error(r(327));var m=s.callbackNode;if(ks()&&s.callbackNode!==m)return null;var y=ud(s,s===tr?or:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||c)c=rh(s,y);else{c=y;var j=tt;tt|=2;var O=JO();(tr!==s||or!==c)&&(Ni=null,Ts=Bt()+500,po(s,c));do try{aU();break}catch($){QO(s,$)}while(!0);Dv(),Yd.current=O,tt=j,Ut!==null?c=0:(tr=null,or=0,c=Gt)}if(c!==0){if(c===2&&(j=Qg(s),j!==0&&(y=j,c=xy(s,j))),c===1)throw m=Kc,po(s,0),wa(s,y),Dr(s,Bt()),m;if(c===6)wa(s,y);else{if(j=s.current.alternate,(y&30)===0&&!nU(j)&&(c=rh(s,y),c===2&&(O=Qg(s),O!==0&&(y=O,c=xy(s,O))),c===1))throw m=Kc,po(s,0),wa(s,y),Dr(s,Bt()),m;switch(s.finishedWork=j,s.finishedLanes=y,c){case 0:case 1:throw Error(r(345));case 2:mo(s,Ir,Ni);break;case 3:if(wa(s,y),(y&130023424)===y&&(c=gy+500-Bt(),10<c)){if(ud(s,0)!==0)break;if(j=s.suspendedLanes,(j&y)!==y){jr(),s.pingedLanes|=s.suspendedLanes&j;break}s.timeoutHandle=Pv(mo.bind(null,s,Ir,Ni),c);break}mo(s,Ir,Ni);break;case 4:if(wa(s,y),(y&4194240)===y)break;for(c=s.eventTimes,j=-1;0<y;){var R=31-Nn(y);O=1<<R,R=c[R],R>j&&(j=R),y&=~O}if(y=j,y=Bt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*rU(y/1960))-y,10<y){s.timeoutHandle=Pv(mo.bind(null,s,Ir,Ni),y);break}mo(s,Ir,Ni);break;case 5:mo(s,Ir,Ni);break;default:throw Error(r(329))}}}return Dr(s,Bt()),s.callbackNode===m?XO.bind(null,s):null}function xy(s,c){var m=Gc;return s.current.memoizedState.isDehydrated&&(po(s,c).flags|=256),s=rh(s,c),s!==2&&(c=Ir,Ir=m,c!==null&&by(c)),s}function by(s){Ir===null?Ir=s:Ir.push.apply(Ir,s)}function nU(s){for(var c=s;;){if(c.flags&16384){var m=c.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var y=0;y<m.length;y++){var j=m[y],O=j.getSnapshot;j=j.value;try{if(!On(O(),j))return!1}catch{return!1}}}if(m=c.child,c.subtreeFlags&16384&&m!==null)m.return=c,c=m;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function wa(s,c){for(c&=~my,c&=~Xd,s.suspendedLanes|=c,s.pingedLanes&=~c,s=s.expirationTimes;0<c;){var m=31-Nn(c),y=1<<m;s[m]=-1,c&=~y}}function ZO(s){if((tt&6)!==0)throw Error(r(327));ks();var c=ud(s,0);if((c&1)===0)return Dr(s,Bt()),null;var m=rh(s,c);if(s.tag!==0&&m===2){var y=Qg(s);y!==0&&(c=y,m=xy(s,y))}if(m===1)throw m=Kc,po(s,0),wa(s,c),Dr(s,Bt()),m;if(m===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=c,mo(s,Ir,Ni),Dr(s,Bt()),null}function wy(s,c){var m=tt;tt|=1;try{return s(c)}finally{tt=m,tt===0&&(Ts=Bt()+500,Ed&&pa())}}function ho(s){xa!==null&&xa.tag===0&&(tt&6)===0&&ks();var c=tt;tt|=1;var m=sn.transition,y=ft;try{if(sn.transition=null,ft=1,s)return s()}finally{ft=y,sn.transition=m,tt=c,(tt&6)===0&&pa()}}function _y(){Kr=Cs.current,St(Cs)}function po(s,c){s.finishedWork=null,s.finishedLanes=0;var m=s.timeoutHandle;if(m!==-1&&(s.timeoutHandle=-1,R8(m)),Ut!==null)for(m=Ut.return;m!==null;){var y=m;switch(Tv(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Nd();break;case 3:Ns(),St(kr),St(ur),qv();break;case 5:Vv(y);break;case 4:Ns();break;case 13:St(Ct);break;case 19:St(Ct);break;case 10:$v(y.type._context);break;case 22:case 23:_y()}m=m.return}if(tr=s,Ut=s=_a(s.current,null),or=Kr=c,Gt=0,Kc=null,my=Xd=fo=0,Ir=Gc=null,lo!==null){for(c=0;c<lo.length;c++)if(m=lo[c],y=m.interleaved,y!==null){m.interleaved=null;var j=y.next,O=m.pending;if(O!==null){var R=O.next;O.next=j,y.next=R}m.pending=y}lo=null}return s}function QO(s,c){do{var m=Ut;try{if(Dv(),Bd.current=Ud,Fd){for(var y=Tt.memoizedState;y!==null;){var j=y.queue;j!==null&&(j.pending=null),y=y.next}Fd=!1}if(uo=0,er=Kt=Tt=null,zc=!1,Vc=0,py.current=null,m===null||m.return===null){Gt=1,Kc=c,Ut=null;break}e:{var O=s,R=m.return,$=m,q=c;if(c=or,$.flags|=32768,q!==null&&typeof q=="object"&&typeof q.then=="function"){var ee=q,le=$,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var se=le.alternate;se?(le.updateQueue=se.updateQueue,le.memoizedState=se.memoizedState,le.lanes=se.lanes):(le.updateQueue=null,le.memoizedState=null)}var ve=SO(R);if(ve!==null){ve.flags&=-257,jO(ve,R,$,O,c),ve.mode&1&&_O(O,ee,c),c=ve,q=ee;var _e=c.updateQueue;if(_e===null){var Ne=new Set;Ne.add(q),c.updateQueue=Ne}else _e.add(q);break e}else{if((c&1)===0){_O(O,ee,c),Sy();break e}q=Error(r(426))}}else if(At&&$.mode&1){var Ft=SO(R);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),jO(Ft,R,$,O,c),Mv(Os(q,$));break e}}O=q=Os(q,$),Gt!==4&&(Gt=2),Gc===null?Gc=[O]:Gc.push(O),O=R;do{switch(O.tag){case 3:O.flags|=65536,c&=-c,O.lanes|=c;var Z=bO(O,q,c);KN(O,Z);break e;case 1:$=q;var H=O.type,J=O.stateNode;if((O.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(ya===null||!ya.has(J)))){O.flags|=65536,c&=-c,O.lanes|=c;var de=wO(O,$,c);KN(O,de);break e}}O=O.return}while(O!==null)}tE(m)}catch(Ee){c=Ee,Ut===m&&m!==null&&(Ut=m=m.return);continue}break}while(!0)}function JO(){var s=Yd.current;return Yd.current=Ud,s===null?Ud:s}function Sy(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),tr===null||(fo&268435455)===0&&(Xd&268435455)===0||wa(tr,or)}function rh(s,c){var m=tt;tt|=2;var y=JO();(tr!==s||or!==c)&&(Ni=null,po(s,c));do try{iU();break}catch(j){QO(s,j)}while(!0);if(Dv(),tt=m,Yd.current=y,Ut!==null)throw Error(r(261));return tr=null,or=0,Gt}function iU(){for(;Ut!==null;)eE(Ut)}function aU(){for(;Ut!==null&&!C9();)eE(Ut)}function eE(s){var c=iE(s.alternate,s,Kr);s.memoizedProps=s.pendingProps,c===null?tE(s):Ut=c,py.current=null}function tE(s){var c=s;do{var m=c.alternate;if(s=c.return,(c.flags&32768)===0){if(m=Z8(m,c,Kr),m!==null){Ut=m;return}}else{if(m=Q8(m,c),m!==null){m.flags&=32767,Ut=m;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Gt=6,Ut=null;return}}if(c=c.sibling,c!==null){Ut=c;return}Ut=c=s}while(c!==null);Gt===0&&(Gt=5)}function mo(s,c,m){var y=ft,j=sn.transition;try{sn.transition=null,ft=1,oU(s,c,m,y)}finally{sn.transition=j,ft=y}return null}function oU(s,c,m,y){do ks();while(xa!==null);if((tt&6)!==0)throw Error(r(327));m=s.finishedWork;var j=s.finishedLanes;if(m===null)return null;if(s.finishedWork=null,s.finishedLanes=0,m===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var O=m.lanes|m.childLanes;if(F9(s,O),s===tr&&(Ut=tr=null,or=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||Qd||(Qd=!0,aE(od,function(){return ks(),null})),O=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||O){O=sn.transition,sn.transition=null;var R=ft;ft=1;var $=tt;tt|=4,py.current=null,eU(s,m),WO(m,s),A8(Sv),hd=!!_v,Sv=_v=null,s.current=m,tU(m),T9(),tt=$,ft=R,sn.transition=O}else s.current=m;if(Qd&&(Qd=!1,xa=s,Jd=j),O=s.pendingLanes,O===0&&(ya=null),M9(m.stateNode),Dr(s,Bt()),c!==null)for(y=s.onRecoverableError,m=0;m<c.length;m++)j=c[m],y(j.value,{componentStack:j.stack,digest:j.digest});if(Zd)throw Zd=!1,s=vy,vy=null,s;return(Jd&1)!==0&&s.tag!==0&&ks(),O=s.pendingLanes,(O&1)!==0?s===yy?Yc++:(Yc=0,yy=s):Yc=0,pa(),null}function ks(){if(xa!==null){var s=UA(Jd),c=sn.transition,m=ft;try{if(sn.transition=null,ft=16>s?16:s,xa===null)var y=!1;else{if(s=xa,xa=null,Jd=0,(tt&6)!==0)throw Error(r(331));var j=tt;for(tt|=4,be=s.current;be!==null;){var O=be,R=O.child;if((be.flags&16)!==0){var $=O.deletions;if($!==null){for(var q=0;q<$.length;q++){var ee=$[q];for(be=ee;be!==null;){var le=be;switch(le.tag){case 0:case 11:case 15:Hc(8,le,O)}var ce=le.child;if(ce!==null)ce.return=le,be=ce;else for(;be!==null;){le=be;var se=le.sibling,ve=le.return;if(FO(le),le===ee){be=null;break}if(se!==null){se.return=ve,be=se;break}be=ve}}}var _e=O.alternate;if(_e!==null){var Ne=_e.child;if(Ne!==null){_e.child=null;do{var Ft=Ne.sibling;Ne.sibling=null,Ne=Ft}while(Ne!==null)}}be=O}}if((O.subtreeFlags&2064)!==0&&R!==null)R.return=O,be=R;else e:for(;be!==null;){if(O=be,(O.flags&2048)!==0)switch(O.tag){case 0:case 11:case 15:Hc(9,O,O.return)}var Z=O.sibling;if(Z!==null){Z.return=O.return,be=Z;break e}be=O.return}}var H=s.current;for(be=H;be!==null;){R=be;var J=R.child;if((R.subtreeFlags&2064)!==0&&J!==null)J.return=R,be=J;else e:for(R=H;be!==null;){if($=be,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Gd(9,$)}}catch(Ee){It($,$.return,Ee)}if($===R){be=null;break e}var de=$.sibling;if(de!==null){de.return=$.return,be=de;break e}be=$.return}}if(tt=j,pa(),Qn&&typeof Qn.onPostCommitFiberRoot=="function")try{Qn.onPostCommitFiberRoot(sd,s)}catch{}y=!0}return y}finally{ft=m,sn.transition=c}}return!1}function rE(s,c,m){c=Os(m,c),c=bO(s,c,1),s=ga(s,c,1),c=jr(),s!==null&&(xc(s,1,c),Dr(s,c))}function It(s,c,m){if(s.tag===3)rE(s,s,m);else for(;c!==null;){if(c.tag===3){rE(c,s,m);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(ya===null||!ya.has(y))){s=Os(m,s),s=wO(c,s,1),c=ga(c,s,1),s=jr(),c!==null&&(xc(c,1,s),Dr(c,s));break}}c=c.return}}function sU(s,c,m){var y=s.pingCache;y!==null&&y.delete(c),c=jr(),s.pingedLanes|=s.suspendedLanes&m,tr===s&&(or&m)===m&&(Gt===4||Gt===3&&(or&130023424)===or&&500>Bt()-gy?po(s,0):my|=m),Dr(s,c)}function nE(s,c){c===0&&((s.mode&1)===0?c=1:(c=cd,cd<<=1,(cd&130023424)===0&&(cd=4194304)));var m=jr();s=ji(s,c),s!==null&&(xc(s,c,m),Dr(s,m))}function lU(s){var c=s.memoizedState,m=0;c!==null&&(m=c.retryLane),nE(s,m)}function cU(s,c){var m=0;switch(s.tag){case 13:var y=s.stateNode,j=s.memoizedState;j!==null&&(m=j.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(r(314))}y!==null&&y.delete(c),nE(s,m)}var iE;iE=function(s,c,m){if(s!==null)if(s.memoizedProps!==c.pendingProps||kr.current)Mr=!0;else{if((s.lanes&m)===0&&(c.flags&128)===0)return Mr=!1,X8(s,c,m);Mr=(s.flags&131072)!==0}else Mr=!1,At&&(c.flags&1048576)!==0&&$N(c,Td,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;Hd(s,c),s=c.pendingProps;var j=bs(c,ur.current);As(c,m),j=Kv(null,c,y,s,j,m);var O=Gv();return c.flags|=1,typeof j=="object"&&j!==null&&typeof j.render=="function"&&j.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Rr(y)?(O=!0,Od(c)):O=!1,c.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,Fv(c),j.updater=qd,c.stateNode=j,j._reactInternals=c,ey(c,y,s,m),c=iy(null,c,y,!0,O,m)):(c.tag=0,At&&O&&Cv(c),Sr(null,c,j,m),c=c.child),c;case 16:y=c.elementType;e:{switch(Hd(s,c),s=c.pendingProps,j=y._init,y=j(y._payload),c.type=y,j=c.tag=fU(y),s=Cn(y,s),j){case 0:c=ny(null,c,y,s,m);break e;case 1:c=CO(null,c,y,s,m);break e;case 11:c=PO(null,c,y,s,m);break e;case 14:c=AO(null,c,y,Cn(y.type,s),m);break e}throw Error(r(306,y,""))}return c;case 0:return y=c.type,j=c.pendingProps,j=c.elementType===y?j:Cn(y,j),ny(s,c,y,j,m);case 1:return y=c.type,j=c.pendingProps,j=c.elementType===y?j:Cn(y,j),CO(s,c,y,j,m);case 3:e:{if(TO(c),s===null)throw Error(r(387));y=c.pendingProps,O=c.memoizedState,j=O.element,HN(s,c),$d(c,y,null,m);var R=c.memoizedState;if(y=R.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},c.updateQueue.baseState=O,c.memoizedState=O,c.flags&256){j=Os(Error(r(423)),c),c=kO(s,c,y,m,j);break e}else if(y!==j){j=Os(Error(r(424)),c),c=kO(s,c,y,m,j);break e}else for(Hr=fa(c.stateNode.containerInfo.firstChild),Wr=c,At=!0,En=null,m=qN(c,null,y,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(Ss(),y===j){c=Ai(s,c,m);break e}Sr(s,c,y,m)}c=c.child}return c;case 5:return YN(c),s===null&&Rv(c),y=c.type,j=c.pendingProps,O=s!==null?s.memoizedProps:null,R=j.children,jv(y,j)?R=null:O!==null&&jv(y,O)&&(c.flags|=32),EO(s,c),Sr(s,c,R,m),c.child;case 6:return s===null&&Rv(c),null;case 13:return RO(s,c,m);case 4:return zv(c,c.stateNode.containerInfo),y=c.pendingProps,s===null?c.child=js(c,null,y,m):Sr(s,c,y,m),c.child;case 11:return y=c.type,j=c.pendingProps,j=c.elementType===y?j:Cn(y,j),PO(s,c,y,j,m);case 7:return Sr(s,c,c.pendingProps,m),c.child;case 8:return Sr(s,c,c.pendingProps.children,m),c.child;case 12:return Sr(s,c,c.pendingProps.children,m),c.child;case 10:e:{if(y=c.type._context,j=c.pendingProps,O=c.memoizedProps,R=j.value,yt(Md,y._currentValue),y._currentValue=R,O!==null)if(On(O.value,R)){if(O.children===j.children&&!kr.current){c=Ai(s,c,m);break e}}else for(O=c.child,O!==null&&(O.return=c);O!==null;){var $=O.dependencies;if($!==null){R=O.child;for(var q=$.firstContext;q!==null;){if(q.context===y){if(O.tag===1){q=Pi(-1,m&-m),q.tag=2;var ee=O.updateQueue;if(ee!==null){ee=ee.shared;var le=ee.pending;le===null?q.next=q:(q.next=le.next,le.next=q),ee.pending=q}}O.lanes|=m,q=O.alternate,q!==null&&(q.lanes|=m),Lv(O.return,m,c),$.lanes|=m;break}q=q.next}}else if(O.tag===10)R=O.type===c.type?null:O.child;else if(O.tag===18){if(R=O.return,R===null)throw Error(r(341));R.lanes|=m,$=R.alternate,$!==null&&($.lanes|=m),Lv(R,m,c),R=O.sibling}else R=O.child;if(R!==null)R.return=O;else for(R=O;R!==null;){if(R===c){R=null;break}if(O=R.sibling,O!==null){O.return=R.return,R=O;break}R=R.return}O=R}Sr(s,c,j.children,m),c=c.child}return c;case 9:return j=c.type,y=c.pendingProps.children,As(c,m),j=an(j),y=y(j),c.flags|=1,Sr(s,c,y,m),c.child;case 14:return y=c.type,j=Cn(y,c.pendingProps),j=Cn(y.type,j),AO(s,c,y,j,m);case 15:return NO(s,c,c.type,c.pendingProps,m);case 17:return y=c.type,j=c.pendingProps,j=c.elementType===y?j:Cn(y,j),Hd(s,c),c.tag=1,Rr(y)?(s=!0,Od(c)):s=!1,As(c,m),yO(c,y,j),ey(c,y,j,m),iy(null,c,y,!0,s,m);case 19:return IO(s,c,m);case 22:return OO(s,c,m)}throw Error(r(156,c.tag))};function aE(s,c){return LA(s,c)}function uU(s,c,m,y){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(s,c,m,y){return new uU(s,c,m,y)}function jy(s){return s=s.prototype,!(!s||!s.isReactComponent)}function fU(s){if(typeof s=="function")return jy(s)?1:0;if(s!=null){if(s=s.$$typeof,s===B)return 11;if(s===Y)return 14}return 2}function _a(s,c){var m=s.alternate;return m===null?(m=ln(s.tag,c,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=c,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,c=s.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function nh(s,c,m,y,j,O){var R=2;if(y=s,typeof s=="function")jy(s)&&(R=1);else if(typeof s=="string")R=5;else e:switch(s){case T:return go(m.children,j,O,c);case k:R=8,j|=8;break;case M:return s=ln(12,m,c,j|2),s.elementType=M,s.lanes=O,s;case U:return s=ln(13,m,c,j),s.elementType=U,s.lanes=O,s;case G:return s=ln(19,m,c,j),s.elementType=G,s.lanes=O,s;case X:return ih(m,j,O,c);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case z:R=10;break e;case D:R=9;break e;case B:R=11;break e;case Y:R=14;break e;case F:R=16,y=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return c=ln(R,m,c,j),c.elementType=s,c.type=y,c.lanes=O,c}function go(s,c,m,y){return s=ln(7,s,y,c),s.lanes=m,s}function ih(s,c,m,y){return s=ln(22,s,y,c),s.elementType=X,s.lanes=m,s.stateNode={isHidden:!1},s}function Py(s,c,m){return s=ln(6,s,null,c),s.lanes=m,s}function Ay(s,c,m){return c=ln(4,s.children!==null?s.children:[],s.key,c),c.lanes=m,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}function dU(s,c,m,y,j){this.tag=c,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jg(0),this.expirationTimes=Jg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jg(0),this.identifierPrefix=y,this.onRecoverableError=j,this.mutableSourceEagerHydrationData=null}function Ny(s,c,m,y,j,O,R,$,q){return s=new dU(s,c,m,$,q),c===1?(c=1,O===!0&&(c|=8)):c=0,O=ln(3,null,null,c),s.current=O,O.stateNode=s,O.memoizedState={element:y,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fv(O),s}function hU(s,c,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:y==null?null:""+y,children:s,containerInfo:c,implementation:m}}function oE(s){if(!s)return ha;s=s._reactInternals;e:{if(no(s)!==s||s.tag!==1)throw Error(r(170));var c=s;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Rr(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(r(171))}if(s.tag===1){var m=s.type;if(Rr(m))return MN(s,m,c)}return c}function sE(s,c,m,y,j,O,R,$,q){return s=Ny(m,y,!0,s,j,O,R,$,q),s.context=oE(null),m=s.current,y=jr(),j=ba(m),O=Pi(y,j),O.callback=c??null,ga(m,O,j),s.current.lanes=j,xc(s,j,y),Dr(s,y),s}function ah(s,c,m,y){var j=c.current,O=jr(),R=ba(j);return m=oE(m),c.context===null?c.context=m:c.pendingContext=m,c=Pi(O,R),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=ga(j,c,R),s!==null&&(Rn(s,j,R,O),Dd(s,j,R)),R}function oh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function lE(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var m=s.retryLane;s.retryLane=m!==0&&m<c?m:c}}function Oy(s,c){lE(s,c),(s=s.alternate)&&lE(s,c)}function pU(){return null}var cE=typeof reportError=="function"?reportError:function(s){console.error(s)};function Ey(s){this._internalRoot=s}sh.prototype.render=Ey.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));ah(s,c,null,null)},sh.prototype.unmount=Ey.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;ho(function(){ah(null,s,null,null)}),c[bi]=null}};function sh(s){this._internalRoot=s}sh.prototype.unstable_scheduleHydration=function(s){if(s){var c=HA();s={blockedOn:null,target:s,priority:c};for(var m=0;m<la.length&&c!==0&&c<la[m].priority;m++);la.splice(m,0,s),m===0&&YA(s)}};function Cy(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function lh(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function uE(){}function mU(s,c,m,y,j){if(j){if(typeof y=="function"){var O=y;y=function(){var ee=oh(R);O.call(ee)}}var R=sE(c,y,s,0,null,!1,!1,"",uE);return s._reactRootContainer=R,s[bi]=R.current,Rc(s.nodeType===8?s.parentNode:s),ho(),R}for(;j=s.lastChild;)s.removeChild(j);if(typeof y=="function"){var $=y;y=function(){var ee=oh(q);$.call(ee)}}var q=Ny(s,0,!1,null,null,!1,!1,"",uE);return s._reactRootContainer=q,s[bi]=q.current,Rc(s.nodeType===8?s.parentNode:s),ho(function(){ah(c,q,m,y)}),q}function ch(s,c,m,y,j){var O=m._reactRootContainer;if(O){var R=O;if(typeof j=="function"){var $=j;j=function(){var q=oh(R);$.call(q)}}ah(c,R,s,j)}else R=mU(m,c,s,j,y);return oh(R)}qA=function(s){switch(s.tag){case 3:var c=s.stateNode;if(c.current.memoizedState.isDehydrated){var m=yc(c.pendingLanes);m!==0&&(ev(c,m|1),Dr(c,Bt()),(tt&6)===0&&(Ts=Bt()+500,pa()))}break;case 13:ho(function(){var y=ji(s,1);if(y!==null){var j=jr();Rn(y,s,1,j)}}),Oy(s,1)}},tv=function(s){if(s.tag===13){var c=ji(s,134217728);if(c!==null){var m=jr();Rn(c,s,134217728,m)}Oy(s,134217728)}},WA=function(s){if(s.tag===13){var c=ba(s),m=ji(s,c);if(m!==null){var y=jr();Rn(m,s,c,y)}Oy(s,c)}},HA=function(){return ft},KA=function(s,c){var m=ft;try{return ft=s,c()}finally{ft=m}},Kg=function(s,c,m){switch(c){case"input":if(Pt(s,m),c=m.name,m.type==="radio"&&c!=null){for(m=s;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<m.length;c++){var y=m[c];if(y!==s&&y.form===s.form){var j=Ad(y);if(!j)throw Error(r(90));re(y),Pt(y,j)}}}break;case"textarea":fc(s,m);break;case"select":c=m.value,c!=null&&Tr(s,!!m.multiple,c,!1)}},TA=wy,kA=ho;var gU={usingClientEntryPoint:!1,Events:[Dc,ys,Ad,EA,CA,wy]},Xc={findFiberByHostInstance:io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vU={bundleType:Xc.bundleType,version:Xc.version,rendererPackageName:Xc.rendererPackageName,rendererConfig:Xc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=DA(s),s===null?null:s.stateNode},findFiberByHostInstance:Xc.findFiberByHostInstance||pU,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 uh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uh.isDisabled&&uh.supportsFiber)try{sd=uh.inject(vU),Qn=uh}catch{}}return $r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gU,$r.createPortal=function(s,c){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cy(c))throw Error(r(200));return hU(s,c,null,m)},$r.createRoot=function(s,c){if(!Cy(s))throw Error(r(299));var m=!1,y="",j=cE;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(j=c.onRecoverableError)),c=Ny(s,1,!1,null,null,m,!1,y,j),s[bi]=c.current,Rc(s.nodeType===8?s.parentNode:s),new Ey(c)},$r.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=DA(c),s=s===null?null:s.stateNode,s},$r.flushSync=function(s){return ho(s)},$r.hydrate=function(s,c,m){if(!lh(c))throw Error(r(200));return ch(null,s,c,!0,m)},$r.hydrateRoot=function(s,c,m){if(!Cy(s))throw Error(r(405));var y=m!=null&&m.hydratedSources||null,j=!1,O="",R=cE;if(m!=null&&(m.unstable_strictMode===!0&&(j=!0),m.identifierPrefix!==void 0&&(O=m.identifierPrefix),m.onRecoverableError!==void 0&&(R=m.onRecoverableError)),c=sE(c,null,s,1,m??null,j,!1,O,R),s[bi]=c.current,Rc(s),y)for(s=0;s<y.length;s++)m=y[s],j=m._getVersion,j=j(m._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[m,j]:c.mutableSourceEagerHydrationData.push(m,j);return new sh(c)},$r.render=function(s,c,m){if(!lh(c))throw Error(r(200));return ch(null,s,c,!1,m)},$r.unmountComponentAtNode=function(s){if(!lh(s))throw Error(r(40));return s._reactRootContainer?(ho(function(){ch(null,null,s,!1,function(){s._reactRootContainer=null,s[bi]=null})}),!0):!1},$r.unstable_batchedUpdates=wy,$r.unstable_renderSubtreeIntoContainer=function(s,c,m,y){if(!lh(m))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return ch(s,c,m,!1,y)},$r.version="18.3.1-next-f1338f8080-20240426",$r}var xE;function tL(){if(xE)return Ry.exports;xE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ry.exports=NU(),Ry.exports}var bE;function OU(){if(bE)return dh;bE=1;var e=tL();return dh.createRoot=e.createRoot,dh.hydrateRoot=e.hydrateRoot,dh}var EU=OU(),Qc={},wE;function CU(){if(wE)return Qc;wE=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.parse=o,Qc.serialize=f;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,a=(()=>{const g=function(){};return g.prototype=Object.create(null),g})();function o(g,v){const w=new a,x=g.length;if(x<2)return w;const b=(v==null?void 0:v.decode)||h;let S=0;do{const A=g.indexOf("=",S);if(A===-1)break;const P=g.indexOf(";",S),C=P===-1?x:P;if(A>C){S=g.lastIndexOf(";",A-1)+1;continue}const N=l(g,S,A),E=u(g,A,N),T=g.slice(N,E);if(w[T]===void 0){let k=l(g,A+1,C),M=u(g,C,k);const z=b(g.slice(k,M));w[T]=z}S=C+1}while(S<x);return w}function l(g,v,w){do{const x=g.charCodeAt(v);if(x!==32&&x!==9)return v}while(++v<w);return w}function u(g,v,w){for(;v>w;){const x=g.charCodeAt(--v);if(x!==32&&x!==9)return v+1}return w}function f(g,v,w){const x=(w==null?void 0:w.encode)||encodeURIComponent;if(!e.test(g))throw new TypeError(`argument name is invalid: ${g}`);const b=x(v);if(!t.test(b))throw new TypeError(`argument val is invalid: ${v}`);let S=g+"="+b;if(!w)return S;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);S+="; Max-Age="+w.maxAge}if(w.domain){if(!r.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);S+="; Domain="+w.domain}if(w.path){if(!n.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);S+="; Path="+w.path}if(w.expires){if(!p(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);S+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(S+="; HttpOnly"),w.secure&&(S+="; Secure"),w.partitioned&&(S+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":S+="; Priority=Low";break;case"medium":S+="; Priority=Medium";break;case"high":S+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":S+="; SameSite=Strict";break;case"lax":S+="; SameSite=Lax";break;case"none":S+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return S}function h(g){if(g.indexOf("%")===-1)return g;try{return decodeURIComponent(g)}catch{return g}}function p(g){return i.call(g)==="[object Date]"}return Qc}CU();var _E="popstate";function TU(e={}){function t(n,i){let{pathname:a,search:o,hash:l}=n.location;return g1("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Mu(i)}return RU(t,r,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kU(){return Math.random().toString(36).substring(2,10)}function SE(e,t){return{usr:e.state,key:e.key,idx:t}}function g1(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$l(t):t,state:r,key:t&&t.key||n||kU()}}function Mu({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 $l(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 RU(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,l="POP",u=null,f=h();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function h(){return(o.state||{idx:null}).idx}function p(){l="POP";let b=h(),S=b==null?null:b-f;f=b,u&&u({action:l,location:x.location,delta:S})}function g(b,S){l="PUSH";let A=g1(x.location,b,S);f=h()+1;let P=SE(A,f),C=x.createHref(A);try{o.pushState(P,"",C)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(C)}a&&u&&u({action:l,location:x.location,delta:1})}function v(b,S){l="REPLACE";let A=g1(x.location,b,S);f=h();let P=SE(A,f),C=x.createHref(A);o.replaceState(P,"",C),a&&u&&u({action:l,location:x.location,delta:0})}function w(b){return MU(b)}let x={get action(){return l},get location(){return e(i,o)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(_E,p),u=b,()=>{i.removeEventListener(_E,p),u=null}},createHref(b){return t(i,b)},createURL:w,encodeLocation(b){let S=w(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:v,go(b){return o.go(b)}};return x}function MU(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Et(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Mu(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function rL(e,t,r="/"){return IU(e,t,r,!1)}function IU(e,t,r,n){let i=typeof t=="string"?$l(t):t,a=Ui(i.pathname||"/",r);if(a==null)return null;let o=nL(e);DU(o);let l=null;for(let u=0;l==null&&u<o.length;++u){let f=KU(a);l=WU(o[u],f,n)}return l}function nL(e,t=[],r=[],n=""){let i=(a,o,l)=>{let u={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};u.relativePath.startsWith("/")&&(Et(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 f=$i([n,u.relativePath]),h=r.concat(u);a.children&&a.children.length>0&&(Et(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),nL(a.children,t,h,f)),!(a.path==null&&!a.index)&&t.push({path:f,score:UU(f,a.index),routesMeta:h})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let u of iL(a.path))i(a,o,u)}),t}function iL(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=iL(n.join("/")),l=[];return l.push(...o.map(u=>u===""?a:[a,u].join("/"))),i&&l.push(...o),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function DU(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qU(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var $U=/^:[\w-]+$/,LU=3,BU=2,FU=1,zU=10,VU=-2,jE=e=>e==="*";function UU(e,t){let r=e.split("/"),n=r.length;return r.some(jE)&&(n+=VU),t&&(n+=BU),r.filter(i=>!jE(i)).reduce((i,a)=>i+($U.test(a)?LU:a===""?FU:zU),n)}function qU(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function WU(e,t,r=!1){let{routesMeta:n}=e,i={},a="/",o=[];for(let l=0;l<n.length;++l){let u=n[l],f=l===n.length-1,h=a==="/"?t:t.slice(a.length)||"/",p=ep({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),g=u.route;if(!p&&f&&r&&!n[n.length-1].route.index&&(p=ep({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:$i([a,p.pathname]),pathnameBase:ZU($i([a,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(a=$i([a,p.pathnameBase]))}return o}function ep(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=HU(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((f,{paramName:h,isOptional:p},g)=>{if(h==="*"){let w=l[g]||"";o=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const v=l[g];return p&&!v?f[h]=void 0:f[h]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:o,pattern:e}}function HU(e,t=!1,r=!0){xn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,u)=>(n.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function KU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xn(!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 Ui(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)||"/"}function GU(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?$l(e):e;return{pathname:r?r.startsWith("/")?r:YU(r,t):t,search:QU(n),hash:JU(i)}}function YU(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Dy(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 XU(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function LS(e){let t=XU(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function BS(e,t,r,n=!1){let i;typeof e=="string"?i=$l(e):(i={...e},Et(!i.pathname||!i.pathname.includes("?"),Dy("?","pathname","search",i)),Et(!i.pathname||!i.pathname.includes("#"),Dy("#","pathname","hash",i)),Et(!i.search||!i.search.includes("#"),Dy("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=r;else{let p=t.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),p-=1;i.pathname=g.join("/")}l=p>=0?t[p]:"/"}let u=GU(i,l),f=o&&o!=="/"&&o.endsWith("/"),h=(a||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}var $i=e=>e.join("/").replace(/\/\/+/g,"/"),ZU=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),QU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function eq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var aL=["POST","PUT","PATCH","DELETE"];new Set(aL);var tq=["GET",...aL];new Set(tq);var Ll=_.createContext(null);Ll.displayName="DataRouter";var _m=_.createContext(null);_m.displayName="DataRouterState";var oL=_.createContext({isTransitioning:!1});oL.displayName="ViewTransition";var rq=_.createContext(new Map);rq.displayName="Fetchers";var nq=_.createContext(null);nq.displayName="Await";var qn=_.createContext(null);qn.displayName="Navigation";var Tf=_.createContext(null);Tf.displayName="Location";var Wn=_.createContext({outlet:null,matches:[],isDataRoute:!1});Wn.displayName="Route";var FS=_.createContext(null);FS.displayName="RouteError";function iq(e,{relative:t}={}){Et(Bl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=_.useContext(qn),{hash:i,pathname:a,search:o}=kf(e,{relative:t}),l=a;return r!=="/"&&(l=a==="/"?r:$i([r,a])),n.createHref({pathname:l,search:o,hash:i})}function Bl(){return _.useContext(Tf)!=null}function Ji(){return Et(Bl(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Tf).location}var sL="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lL(e){_.useContext(qn).static||_.useLayoutEffect(e)}function Hn(){let{isDataRoute:e}=_.useContext(Wn);return e?vq():aq()}function aq(){Et(Bl(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Ll),{basename:t,navigator:r}=_.useContext(qn),{matches:n}=_.useContext(Wn),{pathname:i}=Ji(),a=JSON.stringify(LS(n)),o=_.useRef(!1);return lL(()=>{o.current=!0}),_.useCallback((u,f={})=>{if(xn(o.current,sL),!o.current)return;if(typeof u=="number"){r.go(u);return}let h=BS(u,JSON.parse(a),i,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:$i([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,a,i,e])}_.createContext(null);function zS(){let{matches:e}=_.useContext(Wn),t=e[e.length-1];return t?t.params:{}}function kf(e,{relative:t}={}){let{matches:r}=_.useContext(Wn),{pathname:n}=Ji(),i=JSON.stringify(LS(r));return _.useMemo(()=>BS(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function oq(e,t){return cL(e,t)}function cL(e,t,r,n){var A;Et(Bl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:a}=_.useContext(qn),{matches:o}=_.useContext(Wn),l=o[o.length-1],u=l?l.params:{},f=l?l.pathname:"/",h=l?l.pathnameBase:"/",p=l&&l.route;{let P=p&&p.path||"";uL(f,!p||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${P}">) 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="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let g=Ji(),v;if(t){let P=typeof t=="string"?$l(t):t;Et(h==="/"||((A=P.pathname)==null?void 0:A.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${P.pathname}" was given in the \`location\` prop.`),v=P}else v=g;let w=v.pathname||"/",x=w;if(h!=="/"){let P=h.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(P.length).join("/")}let b=!a&&r&&r.matches&&r.matches.length>0?r.matches:rL(e,{pathname:x});xn(p||b!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),xn(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 S=fq(b&&b.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:$i([h,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:$i([h,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),o,r,n);return t&&S?_.createElement(Tf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},S):S}function sq(){let e=gq(),t=eq(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)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:a},"ErrorBoundary")," or"," ",_.createElement("code",{style:a},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:i},r):null,o)}var lq=_.createElement(sq,null),cq=class extends _.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?_.createElement(Wn.Provider,{value:this.props.routeContext},_.createElement(FS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function uq({routeContext:e,match:t,children:r}){let n=_.useContext(Ll);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Wn.Provider,{value:e},r)}function fq(e,t=[],r=null,n=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 i=e,a=r==null?void 0:r.errors;if(a!=null){let u=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);Et(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let o=!1,l=-1;if(r)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=u),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){o=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((u,f,h)=>{let p,g=!1,v=null,w=null;r&&(p=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||lq,o&&(l<0&&h===0?(uL("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):l===h&&(g=!0,w=f.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,h+1)),b=()=>{let S;return p?S=v:g?S=w:f.route.Component?S=_.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=u,_.createElement(uq,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?_.createElement(cq,{location:r.location,revalidation:r.revalidation,component:v,error:p,children:b(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}function VS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dq(e){let t=_.useContext(Ll);return Et(t,VS(e)),t}function hq(e){let t=_.useContext(_m);return Et(t,VS(e)),t}function pq(e){let t=_.useContext(Wn);return Et(t,VS(e)),t}function US(e){let t=pq(e),r=t.matches[t.matches.length-1];return Et(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function mq(){return US("useRouteId")}function gq(){var n;let e=_.useContext(FS),t=hq("useRouteError"),r=US("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function vq(){let{router:e}=dq("useNavigate"),t=US("useNavigate"),r=_.useRef(!1);return lL(()=>{r.current=!0}),_.useCallback(async(i,a={})=>{xn(r.current,sL),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var PE={};function uL(e,t,r){!t&&!PE[e]&&(PE[e]=!0,xn(!1,r))}_.memo(yq);function yq({routes:e,future:t,state:r}){return cL(e,void 0,r,t)}function fL({to:e,replace:t,state:r,relative:n}){Et(Bl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=_.useContext(qn);xn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=_.useContext(Wn),{pathname:o}=Ji(),l=Hn(),u=BS(e,LS(a),o,n==="path"),f=JSON.stringify(u);return _.useEffect(()=>{l(JSON.parse(f),{replace:t,state:r,relative:n})},[l,f,n,t,r]),null}function sr(e){Et(!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 xq({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:a=!1}){Et(!Bl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=_.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);typeof r=="string"&&(r=$l(r));let{pathname:u="/",search:f="",hash:h="",state:p=null,key:g="default"}=r,v=_.useMemo(()=>{let w=Ui(u,o);return w==null?null:{location:{pathname:w,search:f,hash:h,state:p,key:g},navigationType:n}},[o,u,f,h,p,g,n]);return xn(v!=null,`<Router basename="${o}"> is not able to match the URL "${u}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:_.createElement(qn.Provider,{value:l},_.createElement(Tf.Provider,{children:t,value:v}))}function bq({children:e,location:t}){return oq(v1(e),t)}function v1(e,t=[]){let r=[];return _.Children.forEach(e,(n,i)=>{if(!_.isValidElement(n))return;let a=[...t,i];if(n.type===_.Fragment){r.push.apply(r,v1(n.props.children,a));return}Et(n.type===sr,`[${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>`),Et(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,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&&(o.children=v1(n.props.children,a)),r.push(o)}),r}var Fh="get",zh="application/x-www-form-urlencoded";function Sm(e){return e!=null&&typeof e.tagName=="string"}function wq(e){return Sm(e)&&e.tagName.toLowerCase()==="button"}function _q(e){return Sm(e)&&e.tagName.toLowerCase()==="form"}function Sq(e){return Sm(e)&&e.tagName.toLowerCase()==="input"}function jq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Pq(e,t){return e.button===0&&(!t||t==="_self")&&!jq(e)}function y1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function Aq(e,t){let r=y1(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}var hh=null;function Nq(){if(hh===null)try{new FormData(document.createElement("form"),0),hh=!1}catch{hh=!0}return hh}var Oq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $y(e){return e!=null&&!Oq.has(e)?(xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zh}"`),null):e}function Eq(e,t){let r,n,i,a,o;if(_q(e)){let l=e.getAttribute("action");n=l?Ui(l,t):null,r=e.getAttribute("method")||Fh,i=$y(e.getAttribute("enctype"))||zh,a=new FormData(e)}else if(wq(e)||Sq(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(n=u?Ui(u,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Fh,i=$y(e.getAttribute("formenctype"))||$y(l.getAttribute("enctype"))||zh,a=new FormData(l,e),!Nq()){let{name:f,type:h,value:p}=e;if(h==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,p)}}else{if(Sm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Fh,n=null,i=zh,o=e}return a&&i==="text/plain"&&(o=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}function qS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Cq(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 Tq(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 kq(e,t,r){let n=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let o=await Cq(a,r);return o.links?o.links():[]}return[]}));return Dq(n.flat(1).filter(Tq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function AE(e,t,r,n,i,a){let o=(u,f)=>r[f]?u.route.id!==r[f].route.id:!0,l=(u,f)=>{var h;return r[f].pathname!==u.pathname||((h=r[f].route.path)==null?void 0:h.endsWith("*"))&&r[f].params["*"]!==u.params["*"]};return a==="assets"?t.filter((u,f)=>o(u,f)||l(u,f)):a==="data"?t.filter((u,f)=>{var p;let h=n.routes[u.route.id];if(!h||!h.hasLoader)return!1;if(o(u,f)||l(u,f))return!0;if(u.route.shouldRevalidate){let g=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((p=r[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Rq(e,t,{includeHydrateFallback:r}={}){return Mq(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function Mq(e){return[...new Set(e)]}function Iq(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Dq(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let a=JSON.stringify(Iq(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $q=new Set([100,101,204,205]);function Lq(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&Ui(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function dL(){let e=_.useContext(Ll);return qS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Bq(){let e=_.useContext(_m);return qS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var WS=_.createContext(void 0);WS.displayName="FrameworkContext";function hL(){let e=_.useContext(WS);return qS(e,"You must render this element inside a <HydratedRouter> element"),e}function Fq(e,t){let r=_.useContext(WS),[n,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,g=_.useRef(null);_.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let x=S=>{S.forEach(A=>{o(A.isIntersecting)})},b=new IntersectionObserver(x,{threshold:.5});return g.current&&b.observe(g.current),()=>{b.disconnect()}}},[e]),_.useEffect(()=>{if(n){let x=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),o(!1)};return r?e!=="intent"?[a,g,{}]:[a,g,{onFocus:Jc(l,v),onBlur:Jc(u,w),onMouseEnter:Jc(f,v),onMouseLeave:Jc(h,w),onTouchStart:Jc(p,v)}]:[!1,g,{}]}function Jc(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function zq({page:e,...t}){let{router:r}=dL(),n=_.useMemo(()=>rL(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?_.createElement(Uq,{page:e,matches:n,...t}):null}function Vq(e){let{manifest:t,routeModules:r}=hL(),[n,i]=_.useState([]);return _.useEffect(()=>{let a=!1;return kq(e,t,r).then(o=>{a||i(o)}),()=>{a=!0}},[e,t,r]),n}function Uq({page:e,matches:t,...r}){let n=Ji(),{manifest:i,routeModules:a}=hL(),{basename:o}=dL(),{loaderData:l,matches:u}=Bq(),f=_.useMemo(()=>AE(e,t,u,i,n,"data"),[e,t,u,i,n]),h=_.useMemo(()=>AE(e,t,u,i,n,"assets"),[e,t,u,i,n]),p=_.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,x=!1;if(t.forEach(S=>{var P;let A=i.routes[S.route.id];!A||!A.hasLoader||(!f.some(C=>C.route.id===S.route.id)&&S.route.id in l&&((P=a[S.route.id])!=null&&P.shouldRevalidate)||A.hasClientLoader?x=!0:w.add(S.route.id))}),w.size===0)return[];let b=Lq(e,o);return x&&w.size>0&&b.searchParams.set("_routes",t.filter(S=>w.has(S.route.id)).map(S=>S.route.id).join(",")),[b.pathname+b.search]},[o,l,n,i,f,t,e,a]),g=_.useMemo(()=>Rq(h,i),[h,i]),v=Vq(h);return _.createElement(_.Fragment,null,p.map(w=>_.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),g.map(w=>_.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:x})=>_.createElement("link",{key:w,...x})))}function qq(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var pL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pL&&(window.__reactRouterVersion="7.6.0")}catch{}function Wq({basename:e,children:t,window:r}){let n=_.useRef();n.current==null&&(n.current=TU({window:r,v5Compat:!0}));let i=n.current,[a,o]=_.useState({action:i.action,location:i.location}),l=_.useCallback(u=>{_.startTransition(()=>o(u))},[o]);return _.useLayoutEffect(()=>i.listen(l),[i,l]),_.createElement(xq,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i})}var mL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ct=_.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:o,state:l,target:u,to:f,preventScrollReset:h,viewTransition:p,...g},v){let{basename:w}=_.useContext(qn),x=typeof f=="string"&&mL.test(f),b,S=!1;if(typeof f=="string"&&x&&(b=f,pL))try{let M=new URL(window.location.href),z=f.startsWith("//")?new URL(M.protocol+f):new URL(f),D=Ui(z.pathname,w);z.origin===M.origin&&D!=null?f=D+z.search+z.hash:S=!0}catch{xn(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=iq(f,{relative:i}),[P,C,N]=Fq(n,g),E=Yq(f,{replace:o,state:l,target:u,preventScrollReset:h,relative:i,viewTransition:p});function T(M){t&&t(M),M.defaultPrevented||E(M)}let k=_.createElement("a",{...g,...N,href:b||A,onClick:S||a?t:T,ref:qq(v,C),target:u,"data-discover":!x&&r==="render"?"true":void 0});return P&&!x?_.createElement(_.Fragment,null,k,_.createElement(zq,{page:A})):k});ct.displayName="Link";var Hq=_.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:o,viewTransition:l,children:u,...f},h){let p=kf(o,{relative:f.relative}),g=Ji(),v=_.useContext(_m),{navigator:w,basename:x}=_.useContext(qn),b=v!=null&&t7(p)&&l===!0,S=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,A=g.pathname,P=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(A=A.toLowerCase(),P=P?P.toLowerCase():null,S=S.toLowerCase()),P&&x&&(P=Ui(P,x)||P);const C=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let N=A===S||!i&&A.startsWith(S)&&A.charAt(C)==="/",E=P!=null&&(P===S||!i&&P.startsWith(S)&&P.charAt(S.length)==="/"),T={isActive:N,isPending:E,isTransitioning:b},k=N?t:void 0,M;typeof n=="function"?M=n(T):M=[n,N?"active":null,E?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let z=typeof a=="function"?a(T):a;return _.createElement(ct,{...f,"aria-current":k,className:M,ref:h,style:z,to:o,viewTransition:l},typeof u=="function"?u(T):u)});Hq.displayName="NavLink";var Kq=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:a,method:o=Fh,action:l,onSubmit:u,relative:f,preventScrollReset:h,viewTransition:p,...g},v)=>{let w=Jq(),x=e7(l,{relative:f}),b=o.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&mL.test(l),A=P=>{if(u&&u(P),P.defaultPrevented)return;P.preventDefault();let C=P.nativeEvent.submitter,N=(C==null?void 0:C.getAttribute("formmethod"))||o;w(C||P.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:i,state:a,relative:f,preventScrollReset:h,viewTransition:p})};return _.createElement("form",{ref:v,method:b,action:x,onSubmit:n?u:A,...g,"data-discover":!S&&e==="render"?"true":void 0})});Kq.displayName="Form";function Gq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gL(e){let t=_.useContext(Ll);return Et(t,Gq(e)),t}function Yq(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:a,viewTransition:o}={}){let l=Hn(),u=Ji(),f=kf(e,{relative:a});return _.useCallback(h=>{if(Pq(h,t)){h.preventDefault();let p=r!==void 0?r:Mu(u)===Mu(f);l(e,{replace:p,state:n,preventScrollReset:i,relative:a,viewTransition:o})}},[u,l,f,r,n,t,e,i,a,o])}function Xq(e){xn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(y1(e)),r=_.useRef(!1),n=Ji(),i=_.useMemo(()=>Aq(n.search,r.current?null:t.current),[n.search]),a=Hn(),o=_.useCallback((l,u)=>{const f=y1(typeof l=="function"?l(i):l);r.current=!0,a("?"+f,u)},[a,i]);return[i,o]}var Zq=0,Qq=()=>`__${String(++Zq)}__`;function Jq(){let{router:e}=gL("useSubmit"),{basename:t}=_.useContext(qn),r=mq();return _.useCallback(async(n,i={})=>{let{action:a,method:o,encType:l,formData:u,body:f}=Eq(n,t);if(i.navigate===!1){let h=i.fetcherKey||Qq();await e.fetch(h,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:f,formMethod:i.method||o,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:f,formMethod:i.method||o,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}function e7(e,{relative:t}={}){let{basename:r}=_.useContext(qn),n=_.useContext(Wn);Et(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...kf(e||".",{relative:t})},o=Ji();if(e==null){a.search=o.search;let l=new URLSearchParams(a.search),u=l.getAll("index");if(u.some(h=>h==="")){l.delete("index"),u.filter(p=>p).forEach(p=>l.append("index",p));let h=l.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:$i([r,a.pathname])),Mu(a)}function t7(e,t={}){let r=_.useContext(oL);Et(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=gL("useViewTransitionState"),i=kf(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=Ui(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Ui(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ep(i.pathname,o)!=null||ep(i.pathname,a)!=null}[...$q];var Rf=tL();const r7=ut(Rf);let n7={data:""},i7=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n7,a7=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,o7=/\/\*[^]*?\*\/| +/g,NE=/\n+/g,ka=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?ka(o,a):a+"{"+ka(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=ka(o,t?t.replace(/([^,])+/g,l=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,l):l?l+" "+u:u)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ka.p?ka.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Oi={},vL=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+vL(e[r]);return t}return e},s7=(e,t,r,n,i)=>{let a=vL(e),o=Oi[a]||(Oi[a]=(u=>{let f=0,h=11;for(;f<u.length;)h=101*h+u.charCodeAt(f++)>>>0;return"go"+h})(a));if(!Oi[o]){let u=a!==e?e:(f=>{let h,p,g=[{}];for(;h=a7.exec(f.replace(o7,""));)h[4]?g.shift():h[3]?(p=h[3].replace(NE," ").trim(),g.unshift(g[0][p]=g[0][p]||{})):g[0][h[1]]=h[2].replace(NE," ").trim();return g[0]})(e);Oi[o]=ka(i?{["@keyframes "+o]:u}:u,r?"":"."+o)}let l=r&&Oi.g?Oi.g:null;return r&&(Oi.g=Oi[o]),((u,f,h,p)=>{p?f.data=f.data.replace(p,u):f.data.indexOf(u)===-1&&(f.data=h?u+f.data:f.data+u)})(Oi[o],t,n,l),o},l7=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let l=o(r),u=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=u?"."+u:l&&typeof l=="object"?l.props?"":ka(l,""):l===!1?"":l}return n+i+(o??"")},"");function jm(e){let t=this||{},r=e.call?e(t.p):e;return s7(r.unshift?r.raw?l7(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,i7(t.target),t.g,t.o,t.k)}let yL,x1,b1;jm.bind({g:1});let qi=jm.bind({k:1});function c7(e,t,r,n){ka.p=t,yL=e,x1=r,b1=n}function Ga(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let l=Object.assign({},a),u=l.className||i.className;r.p=Object.assign({theme:x1&&x1()},l),r.o=/ *go\d+/.test(u),l.className=jm.apply(r,n)+(u?" "+u:"");let f=e;return e[0]&&(f=l.as||e,delete l.as),b1&&f[0]&&b1(l),yL(f,l)}return i}}var u7=e=>typeof e=="function",tp=(e,t)=>u7(e)?e(t):e,f7=(()=>{let e=0;return()=>(++e).toString()})(),xL=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),d7=20,bL=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,d7)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return bL(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Vh=[],Ao={toasts:[],pausedAt:void 0},es=e=>{Ao=bL(Ao,e),Vh.forEach(t=>{t(Ao)})},h7={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},p7=(e={})=>{let[t,r]=_.useState(Ao),n=_.useRef(Ao);_.useEffect(()=>(n.current!==Ao&&r(Ao),Vh.push(r),()=>{let a=Vh.indexOf(r);a>-1&&Vh.splice(a,1)}),[]);let i=t.toasts.map(a=>{var o,l,u;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((o=e[a.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((l=e[a.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||h7[a.type],style:{...e.style,...(u=e[a.type])==null?void 0:u.style,...a.style}}});return{...t,toasts:i}},m7=(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)||f7()}),Mf=e=>(t,r)=>{let n=m7(t,e,r);return es({type:2,toast:n}),n.id},Nt=(e,t)=>Mf("blank")(e,t);Nt.error=Mf("error");Nt.success=Mf("success");Nt.loading=Mf("loading");Nt.custom=Mf("custom");Nt.dismiss=e=>{es({type:3,toastId:e})};Nt.remove=e=>es({type:4,toastId:e});Nt.promise=(e,t,r)=>{let n=Nt.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let a=t.success?tp(t.success,i):void 0;return a?Nt.success(a,{id:n,...r,...r==null?void 0:r.success}):Nt.dismiss(n),i}).catch(i=>{let a=t.error?tp(t.error,i):void 0;a?Nt.error(a,{id:n,...r,...r==null?void 0:r.error}):Nt.dismiss(n)}),e};var g7=(e,t)=>{es({type:1,toast:{id:e,height:t}})},v7=()=>{es({type:5,time:Date.now()})},_u=new Map,y7=1e3,x7=(e,t=y7)=>{if(_u.has(e))return;let r=setTimeout(()=>{_u.delete(e),es({type:4,toastId:e})},t);_u.set(e,r)},b7=e=>{let{toasts:t,pausedAt:r}=p7(e);_.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(l=>{if(l.duration===1/0)return;let u=(l.duration||0)+l.pauseDuration-(a-l.createdAt);if(u<0){l.visible&&Nt.dismiss(l.id);return}return setTimeout(()=>Nt.dismiss(l.id),u)});return()=>{o.forEach(l=>l&&clearTimeout(l))}},[t,r]);let n=_.useCallback(()=>{r&&es({type:6,time:Date.now()})},[r]),i=_.useCallback((a,o)=>{let{reverseOrder:l=!1,gutter:u=8,defaultPosition:f}=o||{},h=t.filter(v=>(v.position||f)===(a.position||f)&&v.height),p=h.findIndex(v=>v.id===a.id),g=h.filter((v,w)=>w<p&&v.visible).length;return h.filter(v=>v.visible).slice(...l?[g+1]:[0,g]).reduce((v,w)=>v+(w.height||0)+u,0)},[t]);return _.useEffect(()=>{t.forEach(a=>{if(a.dismissed)x7(a.id,a.removeDelay);else{let o=_u.get(a.id);o&&(clearTimeout(o),_u.delete(a.id))}})},[t]),{toasts:t,handlers:{updateHeight:g7,startPause:v7,endPause:n,calculateOffset:i}}},w7=qi`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,_7=qi`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,S7=qi`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,j7=Ga("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${w7} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${_7} 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: ${S7} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,P7=qi`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,A7=Ga("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: ${P7} 1s linear infinite;
`,N7=qi`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,O7=qi`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,E7=Ga("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${N7} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${O7} 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;
}
`,C7=Ga("div")`
position: absolute;
`,T7=Ga("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,k7=qi`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,R7=Ga("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${k7} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,M7=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?_.createElement(R7,null,t):t:r==="blank"?null:_.createElement(T7,null,_.createElement(A7,{...n}),r!=="loading"&&_.createElement(C7,null,r==="error"?_.createElement(j7,{...n}):_.createElement(E7,{...n})))},I7=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,D7=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,$7="0%{opacity:0;} 100%{opacity:1;}",L7="0%{opacity:1;} 100%{opacity:0;}",B7=Ga("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;
`,F7=Ga("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,z7=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=xL()?[$7,L7]:[I7(r),D7(r)];return{animation:t?`${qi(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${qi(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},V7=_.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?z7(e.position||t||"top-center",e.visible):{opacity:0},a=_.createElement(M7,{toast:e}),o=_.createElement(F7,{...e.ariaProps},tp(e.message,e));return _.createElement(B7,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):_.createElement(_.Fragment,null,a,o))});c7(_.createElement);var U7=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=_.useCallback(o=>{if(o){let l=()=>{let u=o.getBoundingClientRect().height;n(e,u)};l(),new MutationObserver(l).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return _.createElement("div",{ref:a,className:t,style:r},i)},q7=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:xL()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},W7=jm`
z-index: 9999;
> * {
pointer-events: auto;
}
`,ph=16,H7=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:l,handlers:u}=b7(r);return _.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:ph,left:ph,right:ph,bottom:ph,pointerEvents:"none",...a},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(f=>{let h=f.position||t,p=u.calculateOffset(f,{reverseOrder:e,gutter:n,defaultPosition:t}),g=q7(h,p);return _.createElement(U7,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?W7:"",style:g},f.type==="custom"?tp(f.message,f):i?i(f):_.createElement(V7,{toast:f,position:h}))}))},Fn=Nt;/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),OE=e=>{const t=G7(e);return t.charAt(0).toUpperCase()+t.slice(1)},wL=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Y7=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var X7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z7=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...l},u)=>_.createElement("svg",{ref:u,...X7,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:wL("lucide",i),...!a&&!Y7(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,h])=>_.createElement(f,h)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ve=(e,t)=>{const r=_.forwardRef(({className:n,...i},a)=>_.createElement(Z7,{ref:a,iconNode:t,className:wL(`lucide-${K7(OE(e))}`,`lucide-${e}`,n),...i}));return r.displayName=OE(e),r};/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q7=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_L=Ve("arrow-left",Q7);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J7=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],eW=Ve("bell",J7);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tW=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Vs=Ve("calendar",tW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rW=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],rp=Ve("camera",rW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nW=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],SL=Ve("chart-column",nW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iW=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],aW=Ve("chart-no-axes-column",iW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oW=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],HS=Ve("check",oW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sW=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],KS=Ve("chevron-down",sW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lW=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],cW=Ve("chevron-left",lW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uW=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],EE=Ve("chevron-right",uW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fW=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jL=Ve("chevron-up",fW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],GS=Ve("circle-plus",dW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hW=[["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"}]],pW=Ve("circle-x",hW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gW=Ve("circle",mW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],PL=Ve("clock",vW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yW=[["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"}]],CE=Ve("database",yW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xW=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bW=Ve("eye-off",xW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wW=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_W=Ve("eye",wW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SW=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],YS=Ve("file-text",SW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jW=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],PW=Ve("funnel",jW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AW=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Pm=Ve("house",AW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NW=[["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"}]],OW=Ve("image",NW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EW=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],AL=Ve("loader-circle",EW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CW=[["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"}]],w1=Ve("lock",CW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TW=[["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"}]],_1=Ve("log-out",TW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kW=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],NL=Ve("mail",kW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RW=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Am=Ve("map-pin",RW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MW=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],IW=Ve("menu",MW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DW=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],$W=Ve("pencil",DW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LW=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],XS=Ve("save",LW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],np=Ve("search",BW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FW=[["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"}]],zW=Ve("settings",FW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VW=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],Ly=Ve("ship",VW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UW=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],OL=Ve("shield",UW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qW=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],WW=Ve("square-pen",qW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HW=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],TE=Ve("star",HW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KW=[["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"}]],Fo=Ve("trash-2",KW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GW=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],YW=Ve("trending-down",GW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XW=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],ZW=Ve("trending-up",XW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QW=[["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"}]],ZS=Ve("user-plus",QW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JW=[["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"}]],gr=Ve("user",JW);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eH=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],QS=Ve("users",eH);/**
* @license lucide-react v0.510.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tH=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fl=Ve("x",tH);function kE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nm(...e){return t=>{let r=!1;const n=e.map(i=>{const a=kE(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():kE(e[i],null)}}}}function at(...e){return _.useCallback(Nm(...e),e)}function zo(e){const t=rH(e),r=_.forwardRef((n,i)=>{const{children:a,...o}=n,l=_.Children.toArray(a),u=l.find(iH);if(u){const f=u.props.children,h=l.map(p=>p===u?_.Children.count(f)>1?_.Children.only(null):_.isValidElement(f)?f.props.children:null:p);return d.jsx(t,{...o,ref:i,children:_.isValidElement(f)?_.cloneElement(f,void 0,h):null})}return d.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var EL=zo("Slot");function rH(e){const t=_.forwardRef((r,n)=>{const{children:i,...a}=r;if(_.isValidElement(i)){const o=oH(i),l=aH(a,i.props);return i.type!==_.Fragment&&(l.ref=n?Nm(n,o):o),_.cloneElement(i,l)}return _.Children.count(i)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nH=Symbol("radix.slottable");function iH(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nH}function aH(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const u=a(...l);return i(...l),u}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function oH(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function CL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=CL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function He(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=CL(e))&&(n&&(n+=" "),n+=t);return n}const RE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ME=He,TL=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ME(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const h=r==null?void 0:r[f],p=a==null?void 0:a[f];if(h===null)return null;const g=RE(h)||RE(p);return i[f][g]}),l=r&&Object.entries(r).reduce((f,h)=>{let[p,g]=h;return g===void 0||(f[p]=g),f},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,h)=>{let{class:p,className:g,...v}=h;return Object.entries(v).every(w=>{let[x,b]=w;return Array.isArray(b)?b.includes({...a,...l}[x]):{...a,...l}[x]===b})?[...f,p,g]:f},[]);return ME(e,o,u,r==null?void 0:r.class,r==null?void 0:r.className)},JS="-",sH=e=>{const t=cH(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(JS);return l[0]===""&&l.length!==1&&l.shift(),kL(l,t)||lH(o)},getConflictingClassGroupIds:(o,l)=>{const u=r[o]||[];return l&&n[o]?[...u,...n[o]]:u}}},kL=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?kL(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(JS);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},IE=/^\[(.+)\]$/,lH=e=>{if(IE.test(e)){const t=IE.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},cH=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const i in r)S1(r[i],n,i,t);return n},S1=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:DE(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(uH(i)){S1(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{S1(o,DE(t,a),r,n)})})},DE=(e,t)=>{let r=e;return t.split(JS).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},uH=e=>e.isThemeGetter,fH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},j1="!",P1=":",dH=P1.length,hH=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,l=0,u=0,f;for(let w=0;w<i.length;w++){let x=i[w];if(o===0&&l===0){if(x===P1){a.push(i.slice(u,w)),u=w+dH;continue}if(x==="/"){f=w;continue}}x==="["?o++:x==="]"?o--:x==="("?l++:x===")"&&l--}const h=a.length===0?i:i.substring(u),p=pH(h),g=p!==h,v=f&&f>u?f-u:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const i=t+P1,a=n;n=o=>o.startsWith(i)?a(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},pH=e=>e.endsWith(j1)?e.substring(0,e.length-1):e.startsWith(j1)?e.substring(1):e,mH=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const i=[];let a=[];return n.forEach(o=>{o[0]==="["||t[o]?(i.push(...a.sort(),o),a=[]):a.push(o)}),i.push(...a.sort()),i}},gH=e=>({cache:fH(e.cacheSize),parseClassName:hH(e),sortModifiers:mH(e),...sH(e)}),vH=/\s+/,yH=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],l=e.trim().split(vH);let u="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:x}=r(h);if(p){u=h+(u.length>0?" "+u:u);continue}let b=!!x,S=n(b?w.substring(0,x):w);if(!S){if(!b){u=h+(u.length>0?" "+u:u);continue}if(S=n(w),!S){u=h+(u.length>0?" "+u:u);continue}b=!1}const A=a(g).join(":"),P=v?A+j1:A,C=P+S;if(o.includes(C))continue;o.push(C);const N=i(S,b);for(let E=0;E<N.length;++E){const T=N[E];o.push(P+T)}u=h+(u.length>0?" "+u:u)}return u};function xH(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=RL(t))&&(n&&(n+=" "),n+=r);return n}const RL=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=RL(e[n]))&&(r&&(r+=" "),r+=t);return r};function bH(e,...t){let r,n,i,a=o;function o(u){const f=t.reduce((h,p)=>p(h),e());return r=gH(f),n=r.cache.get,i=r.cache.set,a=l,l(u)}function l(u){const f=n(u);if(f)return f;const h=yH(u,r);return i(u,h),h}return function(){return a(xH.apply(null,arguments))}}const Yt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ML=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wH=/^\d+\/\d+$/,_H=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,PH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rs=e=>wH.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),ja=e=>!!e&&Number.isInteger(Number(e)),By=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Ei=e=>_H.test(e),NH=()=>!0,OH=e=>SH.test(e)&&!jH.test(e),DL=()=>!1,EH=e=>PH.test(e),CH=e=>AH.test(e),TH=e=>!Se(e)&&!je(e),kH=e=>zl(e,BL,DL),Se=e=>ML.test(e),vo=e=>zl(e,FL,OH),Fy=e=>zl(e,$H,Ge),$E=e=>zl(e,$L,DL),RH=e=>zl(e,LL,CH),mh=e=>zl(e,zL,EH),je=e=>IL.test(e),eu=e=>Vl(e,FL),MH=e=>Vl(e,LH),LE=e=>Vl(e,$L),IH=e=>Vl(e,BL),DH=e=>Vl(e,LL),gh=e=>Vl(e,zL,!0),zl=(e,t,r)=>{const n=ML.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Vl=(e,t,r=!1)=>{const n=IL.exec(e);return n?n[1]?t(n[1]):r:!1},$L=e=>e==="position"||e==="percentage",LL=e=>e==="image"||e==="url",BL=e=>e==="length"||e==="size"||e==="bg-size",FL=e=>e==="length",$H=e=>e==="number",LH=e=>e==="family-name",zL=e=>e==="shadow",BH=()=>{const e=Yt("color"),t=Yt("font"),r=Yt("text"),n=Yt("font-weight"),i=Yt("tracking"),a=Yt("leading"),o=Yt("breakpoint"),l=Yt("container"),u=Yt("spacing"),f=Yt("radius"),h=Yt("shadow"),p=Yt("inset-shadow"),g=Yt("text-shadow"),v=Yt("drop-shadow"),w=Yt("blur"),x=Yt("perspective"),b=Yt("aspect"),S=Yt("ease"),A=Yt("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),je,Se],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[je,Se,u],M=()=>[Rs,"full","auto",...k()],z=()=>[ja,"none","subgrid",je,Se],D=()=>["auto",{span:["full",ja,je,Se]},ja,je,Se],B=()=>[ja,"auto",je,Se],U=()=>["auto","min","max","fr",je,Se],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...k()],X=()=>[Rs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],I=()=>[e,je,Se],W=()=>[...C(),LE,$E,{position:[je,Se]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",IH,kH,{size:[je,Se]}],K=()=>[By,eu,vo],ae=()=>["","none","full",f,je,Se],ue=()=>["",Ge,eu,vo],xe=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ge,By,LE,$E],ge=()=>["","none",w,je,Se],ne=()=>["none",Ge,je,Se],fe=()=>["none",Ge,je,Se],me=()=>[Ge,je,Se],re=()=>[Rs,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ei],breakpoint:[Ei],color:[NH],container:[Ei],"drop-shadow":[Ei],ease:["in","out","in-out"],font:[TH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ei],shadow:[Ei],spacing:["px",Ge],text:[Ei],"text-shadow":[Ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rs,Se,je,b]}],container:["container"],columns:[{columns:[Ge,Se,je,l]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[ja,"auto",je,Se]}],basis:[{basis:[Rs,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,Rs,"auto","initial","none",Se]}],grow:[{grow:["",Ge,je,Se]}],shrink:[{shrink:["",Ge,je,Se]}],order:[{order:[ja,"first","last","none",je,Se]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[l,"screen",...X()]}],"min-w":[{"min-w":[l,"screen","none",...X()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,eu,vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,je,Fy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",By,Se]}],"font-family":[{font:[MH,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,je,Se]}],"line-clamp":[{"line-clamp":[Ge,"none",je,Fy]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",je,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",je,vo]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ge,"auto",je,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ja,je,Se],radial:["",je,Se],conic:[ja,je,Se]},DH,RH]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,je,Se]}],"outline-w":[{outline:["",Ge,eu,vo]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",h,gh,mh]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",p,gh,mh]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ge,vo]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",g,gh,mh]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ge,je,Se]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[je,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Se]}],filter:[{filter:["","none",je,Se]}],blur:[{blur:ge()}],brightness:[{brightness:[Ge,je,Se]}],contrast:[{contrast:[Ge,je,Se]}],"drop-shadow":[{"drop-shadow":["","none",v,gh,mh]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ge,je,Se]}],"hue-rotate":[{"hue-rotate":[Ge,je,Se]}],invert:[{invert:["",Ge,je,Se]}],saturate:[{saturate:[Ge,je,Se]}],sepia:[{sepia:["",Ge,je,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Se]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,je,Se]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,je,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,je,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,je,Se]}],"backdrop-invert":[{"backdrop-invert":["",Ge,je,Se]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,je,Se]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,je,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,je,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",je,Se]}],ease:[{ease:["linear","initial",S,je,Se]}],delay:[{delay:[Ge,je,Se]}],animate:[{animate:["none",A,je,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,je,Se]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[je,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Se]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ge,eu,vo,Fy]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},FH=bH(BH);function Ke(...e){return FH(He(e))}const zH=TL("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Te=_.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const o=n?EL:"button";return d.jsx(o,{"data-slot":"button",className:Ke(zH({variant:t,size:r,className:e})),ref:a,...i})});function Qe({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:Ke("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function bn({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:Ke("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function wn({className:e,...t}){return d.jsx("div",{"data-slot":"card-title",className:Ke("leading-none font-semibold",e),...t})}function ts({className:e,...t}){return d.jsx("div",{"data-slot":"card-description",className:Ke("text-muted-foreground text-sm",e),...t})}function Je({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:Ke("px-6",e),...t})}function Om({className:e,...t}){return d.jsx("div",{"data-slot":"card-footer",className:Ke("flex items-center px-6 [.border-t]:",e),...t})}function kt({className:e,type:t,...r}){return d.jsx("input",{type:t,"data-slot":"input",className:Ke("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var VH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ie=VH.reduce((e,t)=>{const r=zo(`Primitive.${t}`),n=_.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function VL(e,t){e&&Rf.flushSync(()=>e.dispatchEvent(t))}var UH="Label",UL=_.forwardRef((e,t)=>d.jsx(Ie.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));UL.displayName=UH;var qH=UL;function $t({className:e,...t}){return d.jsx(qH,{"data-slot":"label",className:Ke("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const BE={searchTerm:"",firstName:"",lastName:"",dateOfBirth:"",yearOfArrival:"",regionOfOrigin:"",settlementLocation:""},WH={searchTerm:"full_name",firstName:"christian_name",lastName:"surname",dateOfBirth:"date_of_birth",yearOfArrival:"date_of_arrival_nt",regionOfOrigin:"place_of_birth",settlementLocation:"town_or_city"};function HH(){const e=Hn(),[t,r]=_.useState(BE),[n,i]=_.useState(!1),a=(v,w)=>{r(x=>({...x,[v]:w}))},o=()=>{const v=new URLSearchParams;return Object.entries(t).forEach(([w,x])=>{if(x.trim()){const b=WH[w];v.append(b,x.trim())}}),v},l=()=>{const v=o();e(`/search-results?${v.toString()}`)},u=()=>{r(BE)},f=()=>{i(v=>!v)},h=Object.values(t).some(Boolean),p=()=>Object.entries(t).filter(([v,w])=>!!w).map(([v,w])=>({key:v,value:w,label:g(v)})),g=v=>({searchTerm:"Name",firstName:"First",lastName:"Last",dateOfBirth:"Date of Birth",yearOfArrival:"Year of Arrival",regionOfOrigin:"Region",settlementLocation:"Settlement"})[v];return{fields:t,isAdvancedSearch:n,hasActiveFilters:h,handleFieldChange:a,executeSearch:l,clearAllFields:u,toggleAdvancedSearch:f,getActiveFilters:p}}const KH=[{id:"firstName",label:"First Name",placeholder:"First Name"},{id:"lastName",label:"Last Name",placeholder:"Last Name"},{id:"dateOfBirth",label:"Date of Birth",placeholder:"YYYY-MM-DD"},{id:"yearOfArrival",label:"Year of Arrival",placeholder:"YYYY"},{id:"regionOfOrigin",label:"Region of Origin",placeholder:"Region/Place of Birth"},{id:"settlementLocation",label:"Settlement Location",placeholder:"Town or City"}];function GH(){const{fields:e,isAdvancedSearch:t,handleFieldChange:r,executeSearch:n,clearAllFields:i,toggleAdvancedSearch:a}=HH(),o=u=>{u.preventDefault(),n()},l=u=>{const{id:f,value:h}=u.target;r(f,h)};return d.jsx("div",{className:"w-full space-y-6",children:d.jsxs("form",{onSubmit:o,className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsx("div",{className:"flex-1",children:d.jsx(kt,{id:"searchTerm",placeholder:"Search by name...",value:e.searchTerm,onChange:l,className:"h-12 bg-white border-gray-300 focus:border-[#01796F] focus:ring-1 focus:ring-[#01796F] placeholder:text-gray-500 text-gray-900 rounded-md transition-all duration-300"})}),d.jsxs(Te,{type:"submit",className:"h-12 px-6 bg-[#01796F] hover:bg-[#015a54] text-white font-medium rounded-md shadow-md transition-all duration-300 border-0",children:[d.jsx(np,{className:"mr-2 h-4 w-4"}),"Search"]})]}),d.jsx("div",{className:"text-center",children:d.jsx(Te,{type:"button",variant:"ghost",className:"text-[#9B2335] hover:text-[#7a1c29] hover:bg-gray-100 rounded-md px-6 py-2 transition-all duration-300",onClick:a,children:t?d.jsxs(d.Fragment,{children:[d.jsx(jL,{className:"mr-2 h-4 w-4"}),"Hide Advanced Search"]}):d.jsxs(d.Fragment,{children:[d.jsx(KS,{className:"mr-2 h-4 w-4"}),"Show Advanced Search"]})})}),t&&d.jsxs("div",{className:"bg-gray-50 rounded-md p-6 border border-gray-200 space-y-6",children:[d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:KH.map(({id:u,label:f,placeholder:h})=>d.jsxs("div",{className:"space-y-2",children:[d.jsx($t,{htmlFor:u,className:"text-sm font-medium text-gray-700",children:f}),d.jsx(kt,{id:u,placeholder:h,value:e[u],onChange:l,className:"bg-white border-gray-300 focus:border-[#01796F] focus:ring-1 focus:ring-[#01796F] placeholder:text-gray-500 text-gray-900 rounded-md transition-all duration-300"})]},u))}),d.jsx("div",{className:"flex justify-center pt-4",children:d.jsx(Te,{type:"button",variant:"outline",className:"bg-white border-gray-300 text-gray-700 hover:bg-gray-100 hover:border-gray-400 rounded-md transition-all duration-300",onClick:i,children:"Clear All Filters"})})]})]})})}function qL(e,t){return function(){return e.apply(t,arguments)}}const{toString:YH}=Object.prototype,{getPrototypeOf:ej}=Object,{iterator:Em,toStringTag:WL}=Symbol,Cm=(e=>t=>{const r=YH.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Cm(t)===e),Tm=e=>t=>typeof t===e,{isArray:Ul}=Array,Iu=Tm("undefined");function XH(e){return e!==null&&!Iu(e)&&e.constructor!==null&&!Iu(e.constructor)&&Fr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const HL=Kn("ArrayBuffer");function ZH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&HL(e.buffer),t}const QH=Tm("string"),Fr=Tm("function"),KL=Tm("number"),km=e=>e!==null&&typeof e=="object",JH=e=>e===!0||e===!1,Uh=e=>{if(Cm(e)!=="object")return!1;const t=ej(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(WL in e)&&!(Em in e)},eK=Kn("Date"),tK=Kn("File"),rK=Kn("Blob"),nK=Kn("FileList"),iK=e=>km(e)&&Fr(e.pipe),aK=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Fr(e.append)&&((t=Cm(e))==="formdata"||t==="object"&&Fr(e.toString)&&e.toString()==="[object FormData]"))},oK=Kn("URLSearchParams"),[sK,lK,cK,uK]=["ReadableStream","Request","Response","Headers"].map(Kn),fK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function If(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Ul(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(n=0;n<o;n++)l=a[n],t.call(null,e[l],l,e)}}function GL(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const No=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YL=e=>!Iu(e)&&e!==No;function A1(){const{caseless:e}=YL(this)&&this||{},t={},r=(n,i)=>{const a=e&&GL(t,i)||i;Uh(t[a])&&Uh(n)?t[a]=A1(t[a],n):Uh(n)?t[a]=A1({},n):Ul(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&If(arguments[n],r);return t}const dK=(e,t,r,{allOwnKeys:n}={})=>(If(t,(i,a)=>{r&&Fr(i)?e[a]=qL(i,r):e[a]=i},{allOwnKeys:n}),e),hK=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pK=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},mK=(e,t,r,n)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&ej(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},gK=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},vK=e=>{if(!e)return null;if(Ul(e))return e;let t=e.length;if(!KL(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},yK=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ej(Uint8Array)),xK=(e,t)=>{const n=(e&&e[Em]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},bK=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},wK=Kn("HTMLFormElement"),_K=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),FE=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),SK=Kn("RegExp"),XL=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};If(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},jK=e=>{XL(e,(t,r)=>{if(Fr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Fr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},PK=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Ul(e)?n(e):n(String(e).split(t)),r},AK=()=>{},NK=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function OK(e){return!!(e&&Fr(e.append)&&e[WL]==="FormData"&&e[Em])}const EK=e=>{const t=new Array(10),r=(n,i)=>{if(km(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=Ul(n)?[]:{};return If(n,(o,l)=>{const u=r(o,i+1);!Iu(u)&&(a[l]=u)}),t[i]=void 0,a}}return n};return r(e,0)},CK=Kn("AsyncFunction"),TK=e=>e&&(km(e)||Fr(e))&&Fr(e.then)&&Fr(e.catch),ZL=((e,t)=>e?setImmediate:t?((r,n)=>(No.addEventListener("message",({source:i,data:a})=>{i===No&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),No.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Fr(No.postMessage)),kK=typeof queueMicrotask<"u"?queueMicrotask.bind(No):typeof process<"u"&&process.nextTick||ZL,RK=e=>e!=null&&Fr(e[Em]),te={isArray:Ul,isArrayBuffer:HL,isBuffer:XH,isFormData:aK,isArrayBufferView:ZH,isString:QH,isNumber:KL,isBoolean:JH,isObject:km,isPlainObject:Uh,isReadableStream:sK,isRequest:lK,isResponse:cK,isHeaders:uK,isUndefined:Iu,isDate:eK,isFile:tK,isBlob:rK,isRegExp:SK,isFunction:Fr,isStream:iK,isURLSearchParams:oK,isTypedArray:yK,isFileList:nK,forEach:If,merge:A1,extend:dK,trim:fK,stripBOM:hK,inherits:pK,toFlatObject:mK,kindOf:Cm,kindOfTest:Kn,endsWith:gK,toArray:vK,forEachEntry:xK,matchAll:bK,isHTMLForm:wK,hasOwnProperty:FE,hasOwnProp:FE,reduceDescriptors:XL,freezeMethods:jK,toObjectSet:PK,toCamelCase:_K,noop:AK,toFiniteNumber:NK,findKey:GL,global:No,isContextDefined:YL,isSpecCompliantForm:OK,toJSONObject:EK,isAsyncFn:CK,isThenable:TK,setImmediate:ZL,asap:kK,isIterable:RK};function Ue(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}te.inherits(Ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:te.toJSONObject(this.config),code:this.code,status:this.status}}});const QL=Ue.prototype,JL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{JL[e]={value:e}});Object.defineProperties(Ue,JL);Object.defineProperty(QL,"isAxiosError",{value:!0});Ue.from=(e,t,r,n,i,a)=>{const o=Object.create(QL);return te.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),Ue.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const MK=null;function N1(e){return te.isPlainObject(e)||te.isArray(e)}function e3(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function zE(e,t,r){return e?e.concat(t).map(function(i,a){return i=e3(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function IK(e){return te.isArray(e)&&!e.some(N1)}const DK=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function Rm(e,t,r){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=te.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!te.isUndefined(b[x])});const n=r.metaTokens,i=r.visitor||h,a=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(i))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(te.isDate(w))return w.toISOString();if(!u&&te.isBlob(w))throw new Ue("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(w)||te.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,x,b){let S=w;if(w&&!b&&typeof w=="object"){if(te.endsWith(x,"{}"))x=n?x:x.slice(0,-2),w=JSON.stringify(w);else if(te.isArray(w)&&IK(w)||(te.isFileList(w)||te.endsWith(x,"[]"))&&(S=te.toArray(w)))return x=e3(x),S.forEach(function(P,C){!(te.isUndefined(P)||P===null)&&t.append(o===!0?zE([x],C,a):o===null?x:x+"[]",f(P))}),!1}return N1(w)?!0:(t.append(zE(b,x,a),f(w)),!1)}const p=[],g=Object.assign(DK,{defaultVisitor:h,convertValue:f,isVisitable:N1});function v(w,x){if(!te.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));p.push(w),te.forEach(w,function(S,A){(!(te.isUndefined(S)||S===null)&&i.call(t,S,te.isString(A)?A.trim():A,x,g))===!0&&v(S,x?x.concat(A):[A])}),p.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return v(e),t}function VE(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function tj(e,t){this._pairs=[],e&&Rm(e,this,t)}const t3=tj.prototype;t3.append=function(t,r){this._pairs.push([t,r])};t3.toString=function(t){const r=t?function(n){return t.call(this,n,VE)}:VE;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function $K(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function r3(e,t,r){if(!t)return e;const n=r&&r.encode||$K;te.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=te.isURLSearchParams(t)?t.toString():new tj(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class UE{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(n){n!==null&&t(n)})}}const n3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},LK=typeof URLSearchParams<"u"?URLSearchParams:tj,BK=typeof FormData<"u"?FormData:null,FK=typeof Blob<"u"?Blob:null,zK={isBrowser:!0,classes:{URLSearchParams:LK,FormData:BK,Blob:FK},protocols:["http","https","file","blob","url","data"]},rj=typeof window<"u"&&typeof document<"u",O1=typeof navigator=="object"&&navigator||void 0,VK=rj&&(!O1||["ReactNative","NativeScript","NS"].indexOf(O1.product)<0),UK=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qK=rj&&window.location.href||"http://localhost",WK=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rj,hasStandardBrowserEnv:VK,hasStandardBrowserWebWorkerEnv:UK,navigator:O1,origin:qK},Symbol.toStringTag,{value:"Module"})),yr={...WK,...zK};function HK(e,t){return Rm(e,new yr.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return yr.isNode&&te.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function KK(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GK(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function i3(e){function t(r,n,i,a){let o=r[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=a>=r.length;return o=!o&&te.isArray(i)?i.length:o,u?(te.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!te.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&te.isArray(i[o])&&(i[o]=GK(i[o])),!l)}if(te.isFormData(e)&&te.isFunction(e.entries)){const r={};return te.forEachEntry(e,(n,i)=>{t(KK(n),i,r,0)}),r}return null}function YK(e,t,r){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Df={transitional:n3,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=te.isObject(t);if(a&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return i?JSON.stringify(i3(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return HK(t,this.formSerializer).toString();if((l=te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Rm(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),YK(t)):t}],transformResponse:[function(t){const r=this.transitional||Df.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?Ue.from(l,Ue.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yr.classes.FormData,Blob:yr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{Df.headers[e]={}});const XK=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZK=e=>{const t={};let r,n,i;return e&&e.split(`
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&XK[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},qE=Symbol("internals");function tu(e){return e&&String(e).trim().toLowerCase()}function qh(e){return e===!1||e==null?e:te.isArray(e)?e.map(qh):String(e)}function QK(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const JK=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zy(e,t,r,n,i){if(te.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!te.isString(t)){if(te.isString(n))return t.indexOf(n)!==-1;if(te.isRegExp(n))return n.test(t)}}function eG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function tG(e,t){const r=te.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let zr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(l,u,f){const h=tu(u);if(!h)throw new Error("header name must be a non-empty string");const p=te.findKey(i,h);(!p||i[p]===void 0||f===!0||f===void 0&&i[p]!==!1)&&(i[p||u]=qh(l))}const o=(l,u)=>te.forEach(l,(f,h)=>a(f,h,u));if(te.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(te.isString(t)&&(t=t.trim())&&!JK(t))o(ZK(t),r);else if(te.isObject(t)&&te.isIterable(t)){let l={},u,f;for(const h of t){if(!te.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[f=h[0]]=(u=l[f])?te.isArray(u)?[...u,h[1]]:[u,h[1]]:h[1]}o(l,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=tu(t),t){const n=te.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return QK(i);if(te.isFunction(r))return r.call(this,i,n);if(te.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=tu(t),t){const n=te.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zy(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=tu(o),o){const l=te.findKey(n,o);l&&(!r||zy(n,n[l],l,r))&&(delete n[l],i=!0)}}return te.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||zy(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return te.forEach(this,(i,a)=>{const o=te.findKey(n,a);if(o){r[o]=qh(i),delete r[a];return}const l=t?eG(a):String(a).trim();l!==a&&delete r[a],r[l]=qh(i),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return te.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&te.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[qE]=this[qE]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=tu(o);n[l]||(tG(i,o),n[l]=!0)}return te.isArray(t)?t.forEach(a):a(t),this}};zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);te.reduceDescriptors(zr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});te.freezeMethods(zr);function Vy(e,t){const r=this||Df,n=t||r,i=zr.from(n.headers);let a=n.data;return te.forEach(e,function(l){a=l.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function a3(e){return!!(e&&e.__CANCEL__)}function ql(e,t,r){Ue.call(this,e??"canceled",Ue.ERR_CANCELED,t,r),this.name="CanceledError"}te.inherits(ql,Ue,{__CANCEL__:!0});function o3(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ue("Request failed with status code "+r.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rG(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nG(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),h=n[a];o||(o=f),r[i]=u,n[i]=f;let p=a,g=0;for(;p!==i;)g+=r[p++],p=p%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),f-o<t)return;const v=h&&f-h;return v?Math.round(g*1e3/v):void 0}}function iG(e,t){let r=0,n=1e3/t,i,a;const o=(f,h=Date.now())=>{r=h,i=null,a&&(clearTimeout(a),a=null),e.apply(null,f)};return[(...f)=>{const h=Date.now(),p=h-r;p>=n?o(f,h):(i=f,a||(a=setTimeout(()=>{a=null,o(i)},n-p)))},()=>i&&o(i)]}const ip=(e,t,r=3)=>{let n=0;const i=nG(50,250);return iG(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,u=o-n,f=i(u),h=o<=l;n=o;const p={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:f||void 0,estimated:f&&l&&h?(l-o)/f:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},r)},WE=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},HE=e=>(...t)=>te.asap(()=>e(...t)),aG=yr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,yr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(yr.origin),yr.navigator&&/(msie|trident)/i.test(yr.navigator.userAgent)):()=>!0,oG=yr.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];te.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),te.isString(n)&&o.push("path="+n),te.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sG(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lG(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function s3(e,t,r){let n=!sG(t);return e&&(n||r==!1)?lG(e,t):t}const KE=e=>e instanceof zr?{...e}:e;function Vo(e,t){t=t||{};const r={};function n(f,h,p,g){return te.isPlainObject(f)&&te.isPlainObject(h)?te.merge.call({caseless:g},f,h):te.isPlainObject(h)?te.merge({},h):te.isArray(h)?h.slice():h}function i(f,h,p,g){if(te.isUndefined(h)){if(!te.isUndefined(f))return n(void 0,f,p,g)}else return n(f,h,p,g)}function a(f,h){if(!te.isUndefined(h))return n(void 0,h)}function o(f,h){if(te.isUndefined(h)){if(!te.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}function l(f,h,p){if(p in t)return n(f,h);if(p in e)return n(void 0,f)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(f,h,p)=>i(KE(f),KE(h),p,!0)};return te.forEach(Object.keys(Object.assign({},e,t)),function(h){const p=u[h]||i,g=p(e[h],t[h],h);te.isUndefined(g)&&p!==l||(r[h]=g)}),r}const l3=e=>{const t=Vo({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:l}=t;t.headers=o=zr.from(o),t.url=r3(s3(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(te.isFormData(r)){if(yr.hasStandardBrowserEnv||yr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[f,...h]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([f||"multipart/form-data",...h].join("; "))}}if(yr.hasStandardBrowserEnv&&(n&&te.isFunction(n)&&(n=n(t)),n||n!==!1&&aG(t.url))){const f=i&&a&&oG.read(a);f&&o.set(i,f)}return t},cG=typeof XMLHttpRequest<"u",uG=cG&&function(e){return new Promise(function(r,n){const i=l3(e);let a=i.data;const o=zr.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:f}=i,h,p,g,v,w;function x(){v&&v(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function S(){if(!b)return;const P=zr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:P,config:e,request:b};o3(function(T){r(T),x()},function(T){n(T),x()},N),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new Ue("Request aborted",Ue.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Ue("Network Error",Ue.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const N=i.transitional||n3;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),n(new Ue(C,N.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,b)),b=null},a===void 0&&o.setContentType(null),"setRequestHeader"in b&&te.forEach(o.toJSON(),function(C,N){b.setRequestHeader(N,C)}),te.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),f&&([g,w]=ip(f,!0),b.addEventListener("progress",g)),u&&b.upload&&([p,v]=ip(u),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(h=P=>{b&&(n(!P||P.type?new ql(null,e,b):P),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const A=rG(i.url);if(A&&yr.protocols.indexOf(A)===-1){n(new Ue("Unsupported protocol "+A+":",Ue.ERR_BAD_REQUEST,e));return}b.send(a||null)})},fG=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(f){if(!i){i=!0,l();const h=f instanceof Error?f:this.reason;n.abort(h instanceof Ue?h:new ql(h instanceof Error?h.message:h))}};let o=t&&setTimeout(()=>{o=null,a(new Ue(`timeout ${t} of ms exceeded`,Ue.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:u}=n;return u.unsubscribe=()=>te.asap(l),u}},dG=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},hG=async function*(e,t){for await(const r of pG(e))yield*dG(r,t)},pG=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},GE=(e,t,r,n)=>{const i=hG(e,t);let a=0,o,l=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:f,value:h}=await i.next();if(f){l(),u.close();return}let p=h.byteLength;if(r){let g=a+=p;r(g)}u.enqueue(new Uint8Array(h))}catch(f){throw l(f),f}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},Mm=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",c3=Mm&&typeof ReadableStream=="function",mG=Mm&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),u3=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gG=c3&&u3(()=>{let e=!1;const t=new Request(yr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),YE=64*1024,E1=c3&&u3(()=>te.isReadableStream(new Response("").body)),ap={stream:E1&&(e=>e.body)};Mm&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ap[t]&&(ap[t]=te.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Ue(`Response type '${t}' is not supported`,Ue.ERR_NOT_SUPPORT,n)})})})(new Response);const vG=async e=>{if(e==null)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e))return(await new Request(yr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(te.isArrayBufferView(e)||te.isArrayBuffer(e))return e.byteLength;if(te.isURLSearchParams(e)&&(e=e+""),te.isString(e))return(await mG(e)).byteLength},yG=async(e,t)=>{const r=te.toFiniteNumber(e.getContentLength());return r??vG(t)},xG=Mm&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:a,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:f,headers:h,withCredentials:p="same-origin",fetchOptions:g}=l3(e);f=f?(f+"").toLowerCase():"text";let v=fG([i,a&&a.toAbortSignal()],o),w;const x=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(u&&gG&&r!=="get"&&r!=="head"&&(b=await yG(h,n))!==0){let N=new Request(t,{method:"POST",body:n,duplex:"half"}),E;if(te.isFormData(n)&&(E=N.headers.get("content-type"))&&h.setContentType(E),N.body){const[T,k]=WE(b,ip(HE(u)));n=GE(N.body,YE,T,k)}}te.isString(p)||(p=p?"include":"omit");const S="credentials"in Request.prototype;w=new Request(t,{...g,signal:v,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:n,duplex:"half",credentials:S?p:void 0});let A=await fetch(w);const P=E1&&(f==="stream"||f==="response");if(E1&&(l||P&&x)){const N={};["status","statusText","headers"].forEach(M=>{N[M]=A[M]});const E=te.toFiniteNumber(A.headers.get("content-length")),[T,k]=l&&WE(E,ip(HE(l),!0))||[];A=new Response(GE(A.body,YE,T,()=>{k&&k(),x&&x()}),N)}f=f||"text";let C=await ap[te.findKey(ap,f)||"text"](A,e);return!P&&x&&x(),await new Promise((N,E)=>{o3(N,E,{data:C,headers:zr.from(A.headers),status:A.status,statusText:A.statusText,config:e,request:w})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new Ue("Network Error",Ue.ERR_NETWORK,e,w),{cause:S.cause||S}):Ue.from(S,S&&S.code,e,w)}}),C1={http:MK,xhr:uG,fetch:xG};te.forEach(C1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const XE=e=>`- ${e}`,bG=e=>te.isFunction(e)||e===null||e===!1,f3={getAdapter:e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a<t;a++){r=e[a];let o;if(n=r,!bG(r)&&(n=C1[(o=String(r)).toLowerCase()],n===void 0))throw new Ue(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+a]=n}if(!n){const a=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
`+a.map(XE).join(`
`):" "+XE(a[0]):"as no adapter specified";throw new Ue("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:C1};function Uy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ql(null,e)}function ZE(e){return Uy(e),e.headers=zr.from(e.headers),e.data=Vy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),f3.getAdapter(e.adapter||Df.adapter)(e).then(function(n){return Uy(e),n.data=Vy.call(e,e.transformResponse,n),n.headers=zr.from(n.headers),n},function(n){return a3(n)||(Uy(e),n&&n.response&&(n.response.data=Vy.call(e,e.transformResponse,n.response),n.response.headers=zr.from(n.response.headers))),Promise.reject(n)})}const d3="1.9.0",Im={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Im[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const QE={};Im.transitional=function(t,r,n){function i(a,o){return"[Axios v"+d3+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,l)=>{if(t===!1)throw new Ue(i(o," has been removed"+(r?" in "+r:"")),Ue.ERR_DEPRECATED);return r&&!QE[o]&&(QE[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,l):!0}};Im.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wG(e,t,r){if(typeof e!="object")throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const l=e[a],u=l===void 0||o(l,a,e);if(u!==!0)throw new Ue("option "+a+" must be "+u,Ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ue("Unknown option "+a,Ue.ERR_BAD_OPTION)}}const Wh={assertOptions:wG,validators:Im},ni=Wh.validators;let Io=class{constructor(t){this.defaults=t||{},this.interceptors={request:new UE,response:new UE}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Vo(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Wh.assertOptions(n,{silentJSONParsing:ni.transitional(ni.boolean),forcedJSONParsing:ni.transitional(ni.boolean),clarifyTimeoutError:ni.transitional(ni.boolean)},!1),i!=null&&(te.isFunction(i)?r.paramsSerializer={serialize:i}:Wh.assertOptions(i,{encode:ni.function,serialize:ni.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Wh.assertOptions(r,{baseUrl:ni.spelling("baseURL"),withXsrfToken:ni.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&te.merge(a.common,a[r.method]);a&&te.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),r.headers=zr.concat(o,a);const l=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(u=u&&x.synchronous,l.unshift(x.fulfilled,x.rejected))});const f=[];this.interceptors.response.forEach(function(x){f.push(x.fulfilled,x.rejected)});let h,p=0,g;if(!u){const w=[ZE.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,f),g=w.length,h=Promise.resolve(r);p<g;)h=h.then(w[p++],w[p++]);return h}g=l.length;let v=r;for(p=0;p<g;){const w=l[p++],x=l[p++];try{v=w(v)}catch(b){x.call(this,b);break}}try{h=ZE.call(this,v)}catch(w){return Promise.reject(w)}for(p=0,g=f.length;p<g;)h=h.then(f[p++],f[p++]);return h}getUri(t){t=Vo(this.defaults,t);const r=s3(t.baseURL,t.url,t.allowAbsoluteUrls);return r3(r,t.params,t.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(t){Io.prototype[t]=function(r,n){return this.request(Vo(n||{},{method:t,url:r,data:(n||{}).data}))}});te.forEach(["post","put","patch"],function(t){function r(n){return function(a,o,l){return this.request(Vo(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Io.prototype[t]=r(),Io.prototype[t+"Form"]=r(!0)});let _G=class h3{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{n.subscribe(l),a=l}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,l){n.reason||(n.reason=new ql(a,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new h3(function(i){t=i}),cancel:t}}};function SG(e){return function(r){return e.apply(null,r)}}function jG(e){return te.isObject(e)&&e.isAxiosError===!0}const T1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(T1).forEach(([e,t])=>{T1[t]=e});function p3(e){const t=new Io(e),r=qL(Io.prototype.request,t);return te.extend(r,Io.prototype,t,{allOwnKeys:!0}),te.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return p3(Vo(e,i))},r}const Vt=p3(Df);Vt.Axios=Io;Vt.CanceledError=ql;Vt.CancelToken=_G;Vt.isCancel=a3;Vt.VERSION=d3;Vt.toFormData=Rm;Vt.AxiosError=Ue;Vt.Cancel=Vt.CanceledError;Vt.all=function(t){return Promise.all(t)};Vt.spread=SG;Vt.isAxiosError=jG;Vt.mergeConfig=Vo;Vt.AxiosHeaders=zr;Vt.formToJSON=e=>i3(te.isHTMLForm(e)?new FormData(e):e);Vt.getAdapter=f3.getAdapter;Vt.HttpStatusCode=T1;Vt.default=Vt;const{Axios:R1e,AxiosError:M1e,CanceledError:I1e,isCancel:D1e,CancelToken:$1e,VERSION:L1e,all:B1e,Cancel:F1e,isAxiosError:z1e,spread:V1e,toFormData:U1e,AxiosHeaders:q1e,HttpStatusCode:W1e,formToJSON:H1e,getAdapter:K1e,mergeConfig:G1e}=Vt;class PG{constructor(){fE(this,"api");this.api=Vt.create({baseURL:"https://migrants.staging.anss.au",headers:{"Content-Type":"application/json"},withCredentials:!0}),this.api.interceptors.request.use(t=>{const r=localStorage.getItem("token");return r&&(t.headers.Authorization=`Bearer ${r}`),t}),this.api.interceptors.response.use(t=>t,t=>{var r;return((r=t.response)==null?void 0:r.status)===401&&(localStorage.removeItem("token"),localStorage.removeItem("user"),window.location.href="/login"),Promise.reject(t)})}get baseURL(){return this.api.defaults.baseURL||""}async login(t){return await this.api.get("/sanctum/csrf-cookie"),this.api.post("/api/login",t).then(r=>(localStorage.setItem("token",r.data.token),localStorage.setItem("user",JSON.stringify(r.data.user)),r.data))}async register(t){return this.api.post("/api/register",t).then(r=>r.data)}async createUser(t){return this.api.post("/api/register",t).then(r=>r.data)}async updateUser(t){return this.api.put("/api/user/account",t).then(r=>r.data)}async displayAllUsers(){return this.api.get("/api/users").then(t=>t.data.data)}async logout(){return this.api.post("/api/logout").then(t=>(localStorage.removeItem("token"),localStorage.removeItem("user"),t.data))}async fetchCurrentUser(){return this.api.get("/api/user").then(t=>t.data.data.user)}async getMigrants(t=1,r=10,n={}){return this.api.get("/api/migrants",{params:{page:t,per_page:r,...n}}).then(i=>i.data.data)}async getMigrantsByUrl(t){return this.api.get(t).then(r=>r.data)}async getMigrantById(t){return this.api.get(`/api/migrants/${t}`).then(r=>r.data.data)}async createMigrant(t){return this.api.post("/api/migrants",t,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>r.data.data)}async updateMigrant(t,r){return r.append("_method","PUT"),this.api.post(`/api/migrants/${t}`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(n=>n.data.data)}async deleteMigrant(t){return this.api.delete(`/api/migrants/${t}`).then(r=>r.data)}async getPhotos(t){return this.api.get(`/api/migrants/${t}/photos`).then(r=>{const n=r.data.data.photos;return Array.isArray(n)?n:n?[n]:[]})}async getDashboardStats(){return(await this.api.get("/api/dashboard/stats")).data}async getRecentActivityLogs(){return this.api.get("/api/activity-logs").then(t=>t.data.data)}}const ht=new PG;function AG(){const e=Hn(),[t,r]=_.useState(0),[n,i]=_.useState([]);_.useEffect(()=>{async function o(){const l=await ht.getMigrants(1,6);i(l.data||[]),r(l.total||0)}o()},[]);const a=o=>{o.preventDefault();const l=document.getElementById("contact");l&&l.scrollIntoView({behavior:"smooth",block:"start"})};return d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"border-b",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(ct,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-[#9B2335]",children:"Italian Migrants NT"})}),d.jsxs("nav",{className:"hidden md:flex gap-6",children:[d.jsx(ct,{to:"/",className:"text-sm font-medium hover:underline underline-offset-4",children:"Home"}),d.jsx("a",{href:"#about",className:"text-sm font-medium hover:underline underline-offset-4",children:"About"}),d.jsx("a",{href:"#stories",className:"text-sm font-medium hover:underline underline-offset-4",children:"Stories"}),d.jsx("a",{href:"#contact",onClick:a,className:"text-sm font-medium hover:underline underline-offset-4",children:"Contact"})]})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"w-full py-12 md:py-16 lg:py-20 bg-[#E8DCCA]",children:d.jsx("div",{className:"container px-4 md:px-6",children:d.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[d.jsxs("div",{className:"text-left space-y-6",children:[d.jsxs("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-bold font-serif text-[#9B2335] mb-6",children:["Discover Your",d.jsx("span",{className:"block",children:"Italian Heritage"})]}),d.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-xl leading-relaxed",children:"Search our comprehensive database of Italian migrants to the Northern Territory. Uncover family histories, personal stories, and cultural contributions spanning over a century."}),d.jsxs("div",{className:"grid grid-cols-3 gap-4 py-6",children:[d.jsxs("div",{className:"text-center bg-white rounded-lg p-4 border shadow-sm",children:[d.jsx("div",{className:"text-2xl font-bold text-[#9B2335]",children:t.toLocaleString()}),d.jsx("div",{className:"text-gray-600 text-sm",children:"Records"})]}),d.jsxs("div",{className:"text-center bg-white rounded-lg p-4 border shadow-sm",children:[d.jsx("div",{className:"text-2xl font-bold text-[#9B2335]",children:"100+"}),d.jsx("div",{className:"text-gray-600 text-sm",children:"Years"})]}),d.jsxs("div",{className:"text-center bg-white rounded-lg p-4 border shadow-sm",children:[d.jsx("div",{className:"text-2xl font-bold text-[#9B2335]",children:"156"}),d.jsx("div",{className:"text-gray-600 text-sm",children:"Regions"})]})]})]}),d.jsx("div",{className:"bg-white rounded-lg p-8 border shadow-md",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsx("h2",{className:"text-2xl font-bold text-[#9B2335] mb-2",children:"Search Database"}),d.jsx("p",{className:"text-muted-foreground",children:"Find your Italian ancestors"})]}),d.jsx(GH,{}),d.jsx("div",{className:"text-center",children:d.jsx(Te,{size:"lg",onClick:()=>e("/search-results"),className:"w-full bg-[#01796F] hover:bg-[#015a54] text-white",children:"Browse All Records"})})]})})]})})}),d.jsx("section",{className:"w-full py-16 bg-gray-100",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsxs("div",{className:"text-center mb-12",children:[d.jsx("h2",{className:"text-3xl font-bold text-[#9B2335] font-serif mb-4",children:"Search Tips"}),d.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Get the most out of your search with these helpful tips"})]}),d.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:[d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg border shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(np,{className:"h-6 w-6 text-white"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Name Variations"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Try different spellings and shortened versions of names as they may have been anglicized upon arrival."})]}),d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg border shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(PL,{className:"h-6 w-6 text-white"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Date Ranges"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Use broader date ranges as exact arrival dates may not always be recorded accurately."})]}),d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg border shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(Am,{className:"h-6 w-6 text-white"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Regional Search"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Search by Italian region or province if you know your family's origin to narrow results."})]})]})]})}),d.jsx("section",{id:"stories",className:"w-full py-16 bg-white",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsxs("div",{className:"text-center mb-12",children:[d.jsx("h2",{className:"text-3xl font-bold text-[#9B2335] font-serif mb-4",children:"Featured Stories"}),d.jsx("p",{className:"text-gray-600 max-w-3xl mx-auto text-lg",children:"Discover remarkable personal journeys found in our database. Each story represents courage, determination, and the pursuit of a better life."})]}),d.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto",children:n.slice(0,6).map(o=>{var u,f;const l=(u=o.photos)==null?void 0:u.find(h=>h.is_profile_photo);return d.jsx(Qe,{className:"overflow-hidden pt-0",children:d.jsx(Je,{className:"p-6",children:d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"aspect-square overflow-hidden rounded-xl",children:d.jsx("img",{src:l?`/${l.file_path}`:"/assets/placeholder.png?height=400&width=600",alt:`Portrait of ${o.full_name||o.surname||"Unnamed"}`,className:"object-cover w-full h-full hover:scale-105 transition-transform duration-300"})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-lg font-bold text-[#9B2335]",children:o.full_name||o.surname||"Unnamed"}),d.jsxs("p",{className:"text-sm font-medium",children:["Arrived"," ",(f=o.migration)!=null&&f.date_of_arrival_nt?new Date(o.migration.date_of_arrival_nt).getFullYear():"Unknown"]}),d.jsx("p",{className:"text-sm leading-relaxed line-clamp-2",children:o.additional_notes||"A story of courage and determination in the Northern Territory."}),d.jsx(Te,{size:"sm",className:"w-full mt-3 bg-[#01796F] hover:bg-[#015a54] text-white",onClick:()=>e(`/migrant-profile/${o.person_id}`),children:"View Full Record"})]})]})})},o.person_id)})})]})}),d.jsx("section",{id:"about",className:"w-full py-16 bg-[#E8DCCA]",children:d.jsx("div",{className:"container px-4 md:px-6",children:d.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[d.jsx("h2",{className:"text-3xl font-bold text-[#9B2335] font-serif mb-6",children:"Preserving Our Heritage"}),d.jsx("p",{className:"text-gray-600 text-lg leading-relaxed mb-8",children:"This digital archive aims to preserve and celebrate the contributions of Italian migrants to the Northern Territory. By documenting their stories, photographs, and historical records, we ensure that their legacy continues for generations to come."}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[d.jsx(Te,{className:"bg-[#01796F] hover:bg-[#015a54] text-white",children:"Contribute a Story"}),d.jsx(Te,{variant:"outline",className:"border-[#9B2335] text-[#9B2335] hover:bg-gray-100",children:"View Gallery"})]})]})})})]}),d.jsx("footer",{id:"contact",className:"bg-[#1A2A57] text-white border-t",children:"// ... keep existing code (footer content)"})]})}const NG=()=>d.jsx("main",{children:d.jsx(AG,{})}),OG=()=>d.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen px-4 text-center",children:[d.jsx("h1",{className:"text-6xl font-bold mb-4",children:"404"}),d.jsx("h2",{className:"text-2xl font-semibold mb-6",children:"Record Not Found"}),d.jsx("p",{className:"text-gray-600 mb-8 max-w-md",children:"We couldn't find the migrant record you're looking for. It may have been removed or never existed."}),d.jsx(ct,{to:"/",className:"btn btn-primary",children:"Return to Homepage"})]});function Pe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function EG(e,t){const r=_.createContext(t),n=a=>{const{children:o,...l}=a,u=_.useMemo(()=>l,Object.values(l));return d.jsx(r.Provider,{value:u,children:o})};n.displayName=e+"Provider";function i(a){const o=_.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Sn(e,t=[]){let r=[];function n(a,o){const l=_.createContext(o),u=r.length;r=[...r,o];const f=p=>{var S;const{scope:g,children:v,...w}=p,x=((S=g==null?void 0:g[e])==null?void 0:S[u])||l,b=_.useMemo(()=>w,Object.values(w));return d.jsx(x.Provider,{value:b,children:v})};f.displayName=a+"Provider";function h(p,g){var x;const v=((x=g==null?void 0:g[e])==null?void 0:x[u])||l,w=_.useContext(v);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const i=()=>{const a=r.map(o=>_.createContext(o));return function(l){const u=(l==null?void 0:l[e])||a;return _.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return i.scopeName=e,[n,CG(i,...t)]}function CG(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((l,{useScope:u,scopeName:f})=>{const p=u(a)[`__scope${f}`];return{...l,...p}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function nj(e){const t=e+"CollectionProvider",[r,n]=Sn(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:b,children:S}=x,A=V.useRef(null),P=V.useRef(new Map).current;return d.jsx(i,{scope:b,itemMap:P,collectionRef:A,children:S})};o.displayName=t;const l=e+"CollectionSlot",u=zo(l),f=V.forwardRef((x,b)=>{const{scope:S,children:A}=x,P=a(l,S),C=at(b,P.collectionRef);return d.jsx(u,{ref:C,children:A})});f.displayName=l;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=zo(h),v=V.forwardRef((x,b)=>{const{scope:S,children:A,...P}=x,C=V.useRef(null),N=at(b,C),E=a(h,S);return V.useEffect(()=>(E.itemMap.set(C,{ref:C,...P}),()=>void E.itemMap.delete(C))),d.jsx(g,{[p]:"",ref:N,children:A})});v.displayName=h;function w(x){const b=a(e+"CollectionConsumer",x);return V.useCallback(()=>{const A=b.collectionRef.current;if(!A)return[];const P=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((E,T)=>P.indexOf(E.ref.current)-P.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:f,ItemSlot:v},w,n]}var wr=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},TG=eL[" useId ".trim().toString()]||(()=>{}),kG=0;function oi(e){const[t,r]=_.useState(TG());return wr(()=>{r(n=>n??String(kG++))},[e]),e||(t?`radix-${t}`:"")}function pi(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var RG=eL[" useInsertionEffect ".trim().toString()]||wr;function za({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=MG({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:i;{const h=_.useRef(e!==void 0);_.useEffect(()=>{const p=h.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,n])}const f=_.useCallback(h=>{var p;if(l){const g=IG(h)?h(e):h;g!==e&&((p=o.current)==null||p.call(o,g))}else a(h)},[l,e,a,o]);return[u,f]}function MG({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),i=_.useRef(r),a=_.useRef(t);return RG(()=>{a.current=t},[t]),_.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function IG(e){return typeof e=="function"}var DG=_.createContext(void 0);function $f(e){const t=_.useContext(DG);return e||t||"ltr"}var qy="rovingFocusGroup.onEntryFocus",$G={bubbles:!1,cancelable:!0},Lf="RovingFocusGroup",[k1,m3,LG]=nj(Lf),[BG,Wl]=Sn(Lf,[LG]),[FG,zG]=BG(Lf),g3=_.forwardRef((e,t)=>d.jsx(k1.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(k1.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(VG,{...e,ref:t})})}));g3.displayName=Lf;var VG=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...p}=e,g=_.useRef(null),v=at(t,g),w=$f(a),[x,b]=za({prop:o,defaultProp:l??null,onChange:u,caller:Lf}),[S,A]=_.useState(!1),P=pi(f),C=m3(r),N=_.useRef(!1),[E,T]=_.useState(0);return _.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(qy,P),()=>k.removeEventListener(qy,P)},[P]),d.jsx(FG,{scope:r,orientation:n,dir:w,loop:i,currentTabStopId:x,onItemFocus:_.useCallback(k=>b(k),[b]),onItemShiftTab:_.useCallback(()=>A(!0),[]),onFocusableItemAdd:_.useCallback(()=>T(k=>k+1),[]),onFocusableItemRemove:_.useCallback(()=>T(k=>k-1),[]),children:d.jsx(Ie.div,{tabIndex:S||E===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Pe(e.onMouseDown,()=>{N.current=!0}),onFocus:Pe(e.onFocus,k=>{const M=!N.current;if(k.target===k.currentTarget&&M&&!S){const z=new CustomEvent(qy,$G);if(k.currentTarget.dispatchEvent(z),!z.defaultPrevented){const D=C().filter(F=>F.focusable),B=D.find(F=>F.active),U=D.find(F=>F.id===x),Y=[B,U,...D].filter(Boolean).map(F=>F.ref.current);x3(Y,h)}}N.current=!1}),onBlur:Pe(e.onBlur,()=>A(!1))})})}),v3="RovingFocusGroupItem",y3=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:o,...l}=e,u=oi(),f=a||u,h=zG(v3,r),p=h.currentTabStopId===f,g=m3(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:x}=h;return _.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(k1.ItemSlot,{scope:r,id:f,focusable:n,active:i,children:d.jsx(Ie.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:Pe(e.onMouseDown,b=>{n?h.onItemFocus(f):b.preventDefault()}),onFocus:Pe(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:Pe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){h.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const S=WG(b,h.orientation,h.dir);if(S!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let P=g().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")P.reverse();else if(S==="prev"||S==="next"){S==="prev"&&P.reverse();const C=P.indexOf(b.currentTarget);P=h.loop?HG(P,C+1):P.slice(C+1)}setTimeout(()=>x3(P))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:x!=null}):o})})});y3.displayName=v3;var UG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function WG(e,t,r){const n=qG(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return UG[n]}function x3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function HG(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ij=g3,aj=y3;function KG(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var Gn=e=>{const{present:t,children:r}=e,n=GG(t),i=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),a=at(n.ref,YG(i));return typeof r=="function"||n.isPresent?_.cloneElement(i,{ref:a}):null};Gn.displayName="Presence";function GG(e){const[t,r]=_.useState(),n=_.useRef(null),i=_.useRef(e),a=_.useRef("none"),o=e?"mounted":"unmounted",[l,u]=KG(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const f=vh(n.current);a.current=l==="mounted"?f:"none"},[l]),wr(()=>{const f=n.current,h=i.current;if(h!==e){const g=a.current,v=vh(f);e?u("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),wr(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=v=>{const x=vh(n.current).includes(v.animationName);if(v.target===t&&x&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=v=>{v.target===t&&(a.current=vh(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:_.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function vh(e){return(e==null?void 0:e.animationName)||"none"}function YG(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Dm="Tabs",[XG,Y1e]=Sn(Dm,[Wl]),b3=Wl(),[ZG,oj]=XG(Dm),w3=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:u="automatic",...f}=e,h=$f(l),[p,g]=za({prop:n,onChange:i,defaultProp:a??"",caller:Dm});return d.jsx(ZG,{scope:r,baseId:oi(),value:p,onValueChange:g,orientation:o,dir:h,activationMode:u,children:d.jsx(Ie.div,{dir:h,"data-orientation":o,...f,ref:t})})});w3.displayName=Dm;var _3="TabsList",S3=_.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=oj(_3,r),o=b3(r);return d.jsx(ij,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:d.jsx(Ie.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});S3.displayName=_3;var j3="TabsTrigger",P3=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,o=oj(j3,r),l=b3(r),u=O3(o.baseId,n),f=E3(o.baseId,n),h=n===o.value;return d.jsx(aj,{asChild:!0,...l,focusable:!i,active:h,children:d.jsx(Ie.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:Pe(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?o.onValueChange(n):p.preventDefault()}),onKeyDown:Pe(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&o.onValueChange(n)}),onFocus:Pe(e.onFocus,()=>{const p=o.activationMode!=="manual";!h&&!i&&p&&o.onValueChange(n)})})})});P3.displayName=j3;var A3="TabsContent",N3=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...o}=e,l=oj(A3,r),u=O3(l.baseId,n),f=E3(l.baseId,n),h=n===l.value,p=_.useRef(h);return _.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),d.jsx(Gn,{present:i||h,children:({present:g})=>d.jsx(Ie.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!g,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});N3.displayName=A3;function O3(e,t){return`${e}-trigger-${t}`}function E3(e,t){return`${e}-content-${t}`}var QG=w3,JG=S3,eY=P3,tY=N3;function sj({className:e,...t}){return d.jsx(QG,{"data-slot":"tabs",className:Ke("flex flex-col gap-2",e),...t})}function C3({className:e,...t}){return d.jsx(JG,{"data-slot":"tabs-list",className:Ke("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Us({className:e,...t}){return d.jsx(eY,{"data-slot":"tabs-trigger",className:Ke("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Oo({className:e,...t}){return d.jsx(tY,{"data-slot":"tabs-content",className:Ke("flex-1 outline-none",e),...t})}const Ri=(e,t="medium")=>{if(!e)return"";try{const r=e.includes(".")?e.split(".")[0]+"Z":e,n=new Date(r);if(isNaN(n.getTime()))return"";switch(t){case"short":return n.toLocaleDateString("en-AU",{year:"numeric"});case"medium":return n.toLocaleDateString("en-AU",{day:"numeric",month:"short",year:"numeric"});case"long":return n.toLocaleDateString("en-AU",{day:"numeric",month:"long",year:"numeric"});case"year":return n.getFullYear().toString();default:return n.toLocaleDateString()}}catch(r){return console.error(`Error formatting date: ${e}`,r),""}};function rY(){var u,f,h,p,g,v,w,x,b,S,A;const{id:e}=zS(),[t,r]=_.useState(null),[n,i]=_.useState(!0),[a,o]=_.useState(null),l=(u=t==null?void 0:t.photos)==null?void 0:u.find(P=>P.is_profile_photo);return _.useEffect(()=>{(async()=>{try{if(!e){o("No ID provided in URL."),i(!1);return}const C=await ht.getMigrantById(e);r(C)}catch{o("Failed to load migrant data.")}finally{i(!1)}})()},[e]),n?d.jsx("p",{className:"text-gray-500 p-4",children:"Loading..."}):a?d.jsx("p",{className:"text-red-500 p-4",children:a}):t?d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"border-b",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(ct,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-[#9B2335]",children:"Italian Migrants NT"})}),d.jsx("nav",{className:"hidden md:flex gap-6",children:["home","about","search","stories","contact"].map(P=>d.jsx(ct,{to:"/",className:"text-sm font-medium hover:underline underline-offset-4 capitalize",children:P},P))})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"w-full py-12 md:py-16 lg:py-20 bg-[#E8DCCA]",children:d.jsx("div",{className:"container px-4 md:px-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row gap-8 items-start",children:[d.jsx("div",{className:"w-full md:w-1/3 lg:w-1/4",children:d.jsxs("div",{className:"sticky top-20 space-y-4",children:[d.jsx("div",{className:"overflow-hidden rounded-xl border-4 border-white shadow-lg",children:d.jsx("img",{src:l&&l.file_path?l.file_path.startsWith("http")?l.file_path:`${ht.baseURL}${l.file_path}`:"/assets/placeholder.png",alt:`${t.full_name||"Migrant profile"}`,className:"aspect-[3/4] object-cover w-full"})}),d.jsx("div",{className:"flex justify-between",children:d.jsxs(Te,{variant:"outline",size:"sm",className:"w-full",children:[d.jsx(OW,{className:"mr-2 h-4 w-4"}),"View All Photos"]})})]})}),d.jsxs("div",{className:"w-full md:w-2/3 lg:w-3/4 space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl font-serif text-[#9B2335]",children:t.full_name}),d.jsxs("div",{className:"flex flex-wrap gap-4 mt-4",children:[d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(Vs,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["Arrived ",Ri(((f=t.migration)==null?void 0:f.date_of_arrival_nt)||((h=t.migration)==null?void 0:h.date_of_arrival_aus)||"Unknown","short")]})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(gr,{className:"mr-1 h-4 w-4"}),d.jsx("span",{children:(p=t.migration)!=null&&p.arrival_period?`Age ${t.migration.arrival_period} at migration`:"Age unknown at migration"})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(Pm,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["From ",((g=t.migration)==null?void 0:g.arrival_period)||"Unknown location"]})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(Am,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["Settled in ",((v=t.residence)==null?void 0:v.town_or_city)||"Northern Territory"]})]})]})]}),d.jsxs(sj,{defaultValue:"biography",className:"w-full",children:[d.jsxs(C3,{className:"grid w-full grid-cols-4",children:[d.jsx(Us,{value:"biography",children:"Biography"}),d.jsx(Us,{value:"photos",children:"Photos"}),d.jsx(Us,{value:"documents",children:"Documents"}),d.jsx(Us,{value:"family",children:"Family"})]}),d.jsx(Oo,{value:"biography",className:"mt-6",children:d.jsx(Qe,{children:d.jsx(Je,{className:"pt-6",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"font-medium text-[#01796F]",children:"Personal Information"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[d.jsx("span",{className:"font-medium",children:"Birth Date:"}),d.jsx("span",{children:Ri(t.date_of_birth||"Unknown","long")}),d.jsx("span",{className:"font-medium",children:"Birth Place:"}),d.jsx("span",{children:t.place_of_birth}),d.jsx("span",{className:"font-medium",children:"Occupation:"}),d.jsx("span",{children:t.occupation})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"font-medium text-[#01796F]",children:"Migration Details"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[d.jsx("span",{className:"font-medium",children:"Year of Arrival:"}),d.jsx("span",{children:Ri(((w=t.migration)==null?void 0:w.date_of_arrival_nt)||"Unknown","long")}),d.jsx("span",{className:"font-medium",children:"Age at Migration:"}),d.jsx("span",{children:((x=t.migration)==null?void 0:x.arrival_period)||"Unknown"}),d.jsx("span",{className:"font-medium",children:"Region of Origin:"}),d.jsx("span",{children:t.place_of_birth}),d.jsx("span",{className:"font-medium",children:"Settlement:"}),d.jsx("span",{children:((b=t.residence)==null?void 0:b.town_or_city)||"Northern Territory"})]})]})]}),d.jsxs("div",{className:"pt-4",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-2",children:"Biography"}),d.jsx("div",{className:" max-w-none text-[#747474]",children:t.additional_notes?t.additional_notes.split(`
`).map((P,C)=>d.jsx("p",{className:"mb-4",children:P},C)):d.jsxs("p",{className:"mb-4",children:[t.full_name," was an Italian migrant who made the journey to the Northern Territory of Australia. Born in ",t.place_of_birth||"Italy",", ",t.full_name," sought new opportunities and a better life abroad. This migrant arrived in the Northern Territory in ",Ri(((S=t.migration)==null?void 0:S.date_of_arrival_nt)||"Unknown","year")||"the early 20th century",". In Australia, ",t.full_name," worked as ",t.occupation||"a laborer"," and contributed to the growing Italian community.",t.full_name,"'s story represents the courage and determination of Italian migrants who helped shape the Northern Territory's rich multicultural heritage."]})})]})]})})})}),d.jsx(Oo,{value:"photos",className:"mt-6",children:d.jsx(Qe,{children:d.jsxs(Je,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Photos"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(A=t.photos)==null?void 0:A.map(P=>d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{className:"overflow-hidden rounded-lg border",children:d.jsx("img",{src:P.file_path?P.file_path.startsWith("http")?P.file_path:`${ht.baseURL}${P.file_path}`:"/assets/placeholder.png?height=400&width=600",alt:P.caption||"Migrant photo",className:"aspect-video object-cover w-full",onError:C=>{C.currentTarget.src="/assets/placeholder.png?height=400&width=600"}})}),d.jsx("p",{className:"text-sm text-muted-foreground",children:P.caption||"No caption available"})]},P.id)),d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})]})]})})}),d.jsx(Oo,{value:"documents",className:"mt-6",children:d.jsx(Qe,{children:d.jsxs(Je,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Documents"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.naturalization?d.jsxs("div",{className:"flex items-center p-4 border rounded-lg",children:[d.jsx(YS,{className:"h-8 w-8 text-[#9B2335] mr-4"}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-medium",children:"Naturalization Certificate"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:Ri(t.naturalization.date_of_naturalisation,"long")}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Certificate No: ",t.naturalization.no_of_cert||"N/A"]})]}),d.jsx(Te,{variant:"ghost",size:"sm",className:"ml-auto",children:"View"})]}):d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})})]})})}),d.jsx(Oo,{value:"family",className:"mt-6",children:d.jsx(Qe,{children:d.jsxs(Je,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Family Information"}),d.jsx("div",{className:"space-y-4",children:t.family?d.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[t.family.names_of_parents&&d.jsxs("div",{className:"p-4 border rounded-lg",children:[d.jsxs("h4",{className:"font-medium flex items-center",children:[d.jsx(gr,{className:"h-5 w-5 text-[#9B2335] mr-2"}),"Parents"]}),d.jsx("p",{className:"mt-2 text-sm text-gray-600",children:t.family.names_of_parents})]}),t.family.names_of_children&&d.jsxs("div",{className:"p-4 border rounded-lg",children:[d.jsxs("h4",{className:"font-medium flex items-center",children:[d.jsx(gr,{className:"h-5 w-5 text-[#9B2335] mr-2"}),"Children"]}),d.jsx("p",{className:"mt-2 text-sm text-gray-600",children:t.family.names_of_children})]})]}):d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})})]})})})]})]})]})})}),d.jsx("section",{className:"w-full py-12 md:py-24 lg:py-32",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsx("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tighter sm:text-4xl font-serif text-[#1A2A57]",children:"Historical Context"}),d.jsxs("p",{className:"max-w-[900px] text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed",children:["Understanding the historical context of ",t.full_name,"'s migration journey."]})]})}),d.jsxs("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-8",children:[d.jsx(Qe,{children:d.jsx(Je,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Ly,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Italy in the 1920s"}),d.jsx("p",{className:"text-muted-foreground",children:"Post-World War I Italy faced economic hardship, political instability, and the rise of fascism under Mussolini, prompting many Italians to seek opportunities abroad."})]})})}),d.jsx(Qe,{children:d.jsx(Je,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Ly,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Migration Journey"}),d.jsx("p",{className:"text-muted-foreground",children:"The journey from Italy to Australia was long and arduous, typically involving multiple ships and taking several weeks or even months to complete."})]})})}),d.jsx(Qe,{children:d.jsx(Je,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Ly,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Northern Territory in the 1920s"}),d.jsx("p",{className:"text-muted-foreground",children:"The Northern Territory in the 1920s was sparsely populated and developing, with opportunities in fishing, agriculture, and infrastructure projects attracting migrants."})]})})})]})]})})]}),d.jsx("footer",{className:"border-t bg-[#1A2A57] text-white",children:d.jsxs("div",{className:"container flex flex-col gap-2 sm:flex-row py-6 w-full items-center px-4 md:px-6",children:[d.jsxs("p",{className:"text-xs",children:["© ",new Date().getFullYear()," Italian Migrants NT. All rights reserved."]}),d.jsxs("nav",{className:"sm:ml-auto flex gap-4 sm:gap-6",children:[d.jsx(ct,{to:"/terms",className:"text-xs hover:underline underline-offset-4",children:"Terms of Service"}),d.jsx(ct,{to:"/privacy",className:"text-xs hover:underline underline-offset-4",children:"Privacy"}),d.jsx(ct,{to:"/admin",className:"text-xs hover:underline underline-offset-4",children:"Admin"})]})]})})]}):d.jsx("p",{className:"p-4",children:"No data found."})}const nY=()=>{const{id:e}=zS(),[t,r]=_.useState(null),[n,i]=_.useState(!0),[a,o]=_.useState(null);return _.useEffect(()=>{if(!e){o("No ID provided in the URL."),i(!1);return}(async()=>{try{const u=await ht.getMigrantById(e);r(u)}catch{o("Failed to load migrant data.")}finally{i(!1)}})()},[e]),n?d.jsx("p",{className:"text-gray-500",children:"Loading..."}):a?d.jsx("p",{className:"text-red-500",children:a}):t?d.jsx(rY,{}):d.jsx("p",{children:"No data found."})};function iY(){const[e,t]=_.useState(""),[r,n]=_.useState(""),[i,a]=_.useState(!1),[o,l]=_.useState(!1),[u,f]=_.useState(""),h=Hn(),p=async g=>{var v,w;g.preventDefault(),f(""),l(!0);try{const x=await ht.login({email:e,password:r});console.log("Response:",x),h("/admin")}catch(x){console.error("Login error:",x),(w=(v=x.response)==null?void 0:v.data)!=null&&w.message?f(x.response.data.message):f("Login failed. Please check your input and try again.")}finally{l(!1)}};return d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100 p-4",children:d.jsx("div",{className:"w-full max-w-md",children:d.jsxs(Qe,{children:[d.jsx(bn,{children:d.jsx(wn,{className:"text-center text-xl font-semibold",children:"Login"})}),d.jsxs("form",{onSubmit:p,children:[d.jsxs(Je,{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx($t,{htmlFor:"email",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx(NL,{className:"absolute left-3 top-2.5 size-5 text-gray-400"}),d.jsx(kt,{id:"email",type:"email",placeholder:"admin@example.com",className:"pl-10",value:e,onChange:g=>t(g.target.value),required:!0,autoComplete:"username"})]})]}),d.jsxs("div",{children:[d.jsx($t,{htmlFor:"password",children:"Password"}),d.jsxs("div",{className:"relative",children:[d.jsx(w1,{className:"absolute left-3 top-2.5 size-5 text-gray-400"}),d.jsx(kt,{id:"password",type:i?"text":"password",className:"pl-10 pr-10",value:r,onChange:g=>n(g.target.value),required:!0,autoComplete:"current-password"}),d.jsx("button",{type:"button",className:"absolute right-3 top-2.5 text-gray-500 hover:text-gray-700",onClick:()=>a(!i),"aria-label":i?"Hide password":"Show password",children:i?d.jsx(bW,{className:"size-5"}):d.jsx(_W,{className:"size-5"})})]})]}),u&&d.jsx("div",{className:"rounded-md bg-red-100 px-4 py-2 text-sm text-red-700 border border-red-300 animate-fade-in",children:u})]}),d.jsx(Om,{children:d.jsx(Te,{type:"submit",className:"w-full mt-4",disabled:o,children:o?"Authenticating...":"Sign In"})})]})]})})})}const aY=e=>{var r;const t={};for(const n of e){const i=(r=n.migration)==null?void 0:r.date_of_arrival_nt;if(i){const a=i.slice(0,4);t[a]=(t[a]||0)+1}}return Object.entries(t).map(([n,i])=>({year:parseInt(n,10),count:i})).sort((n,i)=>n.year-i.year)},oY=e=>{var r;const t={};for(const n of e){const i=((r=n.residence)==null?void 0:r.town_or_city)||"Unknown";t[i]=(t[i]||0)+1}return Object.entries(t).map(([n,i])=>({name:n,value:i}))},sY=e=>{const t={};for(const r of e){const n=r.occupation||"Unknown";t[n]=(t[n]||0)+1}return Object.entries(t).map(([r,n])=>({occupation:r,value:n}))},lj=()=>{const[e,t]=_.useState([]),[r,n]=_.useState([]),[i,a]=_.useState([]),[o,l]=_.useState(!0),[u,f]=_.useState(null);return _.useEffect(()=>{(async()=>{try{const g=(await ht.getMigrants(1,1e3)).data??[],v=aY(g),w=oY(g),x=sY(g);t(v),n(w),a(x)}catch{f("Error fetching data")}finally{l(!1)}})()},[]),{migrationData:e,residenceData:r,occupationData:i,loading:o,error:u}};var Wy,JE;function Vr(){if(JE)return Wy;JE=1;var e=Array.isArray;return Wy=e,Wy}var Hy,eC;function T3(){if(eC)return Hy;eC=1;var e=typeof fh=="object"&&fh&&fh.Object===Object&&fh;return Hy=e,Hy}var Ky,tC;function vi(){if(tC)return Ky;tC=1;var e=T3(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Ky=r,Ky}var Gy,rC;function Bf(){if(rC)return Gy;rC=1;var e=vi(),t=e.Symbol;return Gy=t,Gy}var Yy,nC;function lY(){if(nC)return Yy;nC=1;var e=Bf(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=r.call(o,i),u=o[i];try{o[i]=void 0;var f=!0}catch{}var h=n.call(o);return f&&(l?o[i]=u:delete o[i]),h}return Yy=a,Yy}var Xy,iC;function cY(){if(iC)return Xy;iC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Xy=r,Xy}var Zy,aC;function ea(){if(aC)return Zy;aC=1;var e=Bf(),t=lY(),r=cY(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:n:a&&a in Object(l)?t(l):r(l)}return Zy=o,Zy}var Qy,oC;function ta(){if(oC)return Qy;oC=1;function e(t){return t!=null&&typeof t=="object"}return Qy=e,Qy}var Jy,sC;function Hl(){if(sC)return Jy;sC=1;var e=ea(),t=ta(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Jy=n,Jy}var e0,lC;function cj(){if(lC)return e0;lC=1;var e=Vr(),t=Hl(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return e0=i,e0}var t0,cC;function Ya(){if(cC)return t0;cC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return t0=e,t0}var r0,uC;function uj(){if(uC)return r0;uC=1;var e=ea(),t=Ya(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var u=e(l);return u==n||u==i||u==r||u==a}return r0=o,r0}var n0,fC;function uY(){if(fC)return n0;fC=1;var e=vi(),t=e["__core-js_shared__"];return n0=t,n0}var i0,dC;function fY(){if(dC)return i0;dC=1;var e=uY(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return i0=r,i0}var a0,hC;function k3(){if(hC)return a0;hC=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return a0=r,a0}var o0,pC;function dY(){if(pC)return o0;pC=1;var e=uj(),t=fY(),r=Ya(),n=k3(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,u=o.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!r(g)||t(g))return!1;var v=e(g)?h:a;return v.test(n(g))}return o0=p,o0}var s0,mC;function hY(){if(mC)return s0;mC=1;function e(t,r){return t==null?void 0:t[r]}return s0=e,s0}var l0,gC;function rs(){if(gC)return l0;gC=1;var e=dY(),t=hY();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return l0=r,l0}var c0,vC;function $m(){if(vC)return c0;vC=1;var e=rs(),t=e(Object,"create");return c0=t,c0}var u0,yC;function pY(){if(yC)return u0;yC=1;var e=$m();function t(){this.__data__=e?e(null):{},this.size=0}return u0=t,u0}var f0,xC;function mY(){if(xC)return f0;xC=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return f0=e,f0}var d0,bC;function gY(){if(bC)return d0;bC=1;var e=$m(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return n.call(o,a)?o[a]:void 0}return d0=i,d0}var h0,wC;function vY(){if(wC)return h0;wC=1;var e=$m(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return h0=n,h0}var p0,_C;function yY(){if(_C)return p0;_C=1;var e=$m(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return p0=r,p0}var m0,SC;function xY(){if(SC)return m0;SC=1;var e=pY(),t=mY(),r=gY(),n=vY(),i=yY();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,m0=a,m0}var g0,jC;function bY(){if(jC)return g0;jC=1;function e(){this.__data__=[],this.size=0}return g0=e,g0}var v0,PC;function fj(){if(PC)return v0;PC=1;function e(t,r){return t===r||t!==t&&r!==r}return v0=e,v0}var y0,AC;function Lm(){if(AC)return y0;AC=1;var e=fj();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return y0=t,y0}var x0,NC;function wY(){if(NC)return x0;NC=1;var e=Lm(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():r.call(a,o,1),--this.size,!0}return x0=n,x0}var b0,OC;function _Y(){if(OC)return b0;OC=1;var e=Lm();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return b0=t,b0}var w0,EC;function SY(){if(EC)return w0;EC=1;var e=Lm();function t(r){return e(this.__data__,r)>-1}return w0=t,w0}var _0,CC;function jY(){if(CC)return _0;CC=1;var e=Lm();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return _0=t,_0}var S0,TC;function Bm(){if(TC)return S0;TC=1;var e=bY(),t=wY(),r=_Y(),n=SY(),i=jY();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,S0=a,S0}var j0,kC;function dj(){if(kC)return j0;kC=1;var e=rs(),t=vi(),r=e(t,"Map");return j0=r,j0}var P0,RC;function PY(){if(RC)return P0;RC=1;var e=xY(),t=Bm(),r=dj();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return P0=n,P0}var A0,MC;function AY(){if(MC)return A0;MC=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return A0=e,A0}var N0,IC;function Fm(){if(IC)return N0;IC=1;var e=AY();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return N0=t,N0}var O0,DC;function NY(){if(DC)return O0;DC=1;var e=Fm();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return O0=t,O0}var E0,$C;function OY(){if($C)return E0;$C=1;var e=Fm();function t(r){return e(this,r).get(r)}return E0=t,E0}var C0,LC;function EY(){if(LC)return C0;LC=1;var e=Fm();function t(r){return e(this,r).has(r)}return C0=t,C0}var T0,BC;function CY(){if(BC)return T0;BC=1;var e=Fm();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return T0=t,T0}var k0,FC;function hj(){if(FC)return k0;FC=1;var e=PY(),t=NY(),r=OY(),n=EY(),i=CY();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,k0=a,k0}var R0,zC;function R3(){if(zC)return R0;zC=1;var e=hj(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],u=a.cache;if(u.has(l))return u.get(l);var f=n.apply(this,o);return a.cache=u.set(l,f)||u,f};return a.cache=new(r.Cache||e),a}return r.Cache=e,R0=r,R0}var M0,VC;function TY(){if(VC)return M0;VC=1;var e=R3(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return M0=r,M0}var I0,UC;function kY(){if(UC)return I0;UC=1;var e=TY(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,u,f){a.push(u?f.replace(r,"$1"):l||o)}),a});return I0=n,I0}var D0,qC;function pj(){if(qC)return D0;qC=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return D0=e,D0}var $0,WC;function RY(){if(WC)return $0;WC=1;var e=Bf(),t=pj(),r=Vr(),n=Hl(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(n(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return $0=o,$0}var L0,HC;function M3(){if(HC)return L0;HC=1;var e=RY();function t(r){return r==null?"":e(r)}return L0=t,L0}var B0,KC;function I3(){if(KC)return B0;KC=1;var e=Vr(),t=cj(),r=kY(),n=M3();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return B0=i,B0}var F0,GC;function zm(){if(GC)return F0;GC=1;var e=Hl();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return F0=t,F0}var z0,YC;function mj(){if(YC)return z0;YC=1;var e=I3(),t=zm();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return z0=r,z0}var V0,XC;function D3(){if(XC)return V0;XC=1;var e=mj();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return V0=t,V0}var MY=D3();const Qr=ut(MY);var U0,ZC;function IY(){if(ZC)return U0;ZC=1;function e(t){return t==null}return U0=e,U0}var DY=IY();const Ze=ut(DY);var q0,QC;function $Y(){if(QC)return q0;QC=1;var e=ea(),t=Vr(),r=ta(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return q0=i,q0}var LY=$Y();const Uo=ut(LY);var BY=uj();const Fe=ut(BY);var FY=Ya();const Kl=ut(FY);var W0={exports:{}},st={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var JC;function zY(){if(JC)return st;JC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function x(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case r:case i:case n:case f:case h:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case u:case g:case p:case a:return b;default:return S}}case t:return S}}}return st.ContextConsumer=o,st.ContextProvider=a,st.Element=e,st.ForwardRef=u,st.Fragment=r,st.Lazy=g,st.Memo=p,st.Portal=t,st.Profiler=i,st.StrictMode=n,st.Suspense=f,st.SuspenseList=h,st.isAsyncMode=function(){return!1},st.isConcurrentMode=function(){return!1},st.isContextConsumer=function(b){return x(b)===o},st.isContextProvider=function(b){return x(b)===a},st.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},st.isForwardRef=function(b){return x(b)===u},st.isFragment=function(b){return x(b)===r},st.isLazy=function(b){return x(b)===g},st.isMemo=function(b){return x(b)===p},st.isPortal=function(b){return x(b)===t},st.isProfiler=function(b){return x(b)===i},st.isStrictMode=function(b){return x(b)===n},st.isSuspense=function(b){return x(b)===f},st.isSuspenseList=function(b){return x(b)===h},st.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===f||b===h||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===p||b.$$typeof===a||b.$$typeof===o||b.$$typeof===u||b.$$typeof===w||b.getModuleId!==void 0)},st.typeOf=x,st}var eT;function VY(){return eT||(eT=1,W0.exports=zY()),W0.exports}var UY=VY(),H0,tT;function $3(){if(tT)return H0;tT=1;var e=ea(),t=ta(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return H0=n,H0}var K0,rT;function qY(){if(rT)return K0;rT=1;var e=$3();function t(r){return e(r)&&r!=+r}return K0=t,K0}var WY=qY();const Ff=ut(WY);var HY=$3();const KY=ut(HY);var Ar=function(t){return t===0?0:t>0?1:-1},Eo=function(t){return Uo(t)&&t.indexOf("%")===t.length-1},pe=function(t){return KY(t)&&!Ff(t)},Qt=function(t){return pe(t)||Uo(t)},GY=0,zf=function(t){var r=++GY;return"".concat(t||"").concat(r)},Nr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&!Uo(t))return n;var a;if(Eo(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Ff(a)&&(a=n),i&&a>r&&(a=r),a},Ra=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},YY=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},Ea=function(t,r){return pe(t)&&pe(r)?function(n){return t+n*(r-t)}:function(){return r}};function R1(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Qr(n,t))===r})}var XY=function(t,r){return pe(t)&&pe(r)?t-r:Uo(t)&&Uo(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function el(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function M1(e){"@babel/helpers - typeof";return M1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M1(e)}var ZY=["viewBox","children"],QY=["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"],nT=["points","pathLength"],G0={svg:ZY,polygon:nT,polyline:nT},gj=["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"],op=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(_.isValidElement(t)&&(n=t.props),!Kl(n))return null;var i={};return Object.keys(n).forEach(function(a){gj.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},JY=function(t,r,n){return function(i){return t(r,n,i),null}},qo=function(t,r,n){if(!Kl(t)||M1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];gj.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=JY(o,r,n))}),i},eX=["children"],tX=["children"];function iT(e,t){if(e==null)return{};var r=rX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var aT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Li=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},oT=null,Y0=null,vj=function e(t){if(t===oT&&Array.isArray(Y0))return Y0;var r=[];return _.Children.forEach(t,function(n){Ze(n)||(UY.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Y0=r,oT=t,r};function gn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Li(i)}):n=[Li(t)],vj(e).forEach(function(i){var a=Qr(i,"type.displayName")||Qr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Yr(e,t){var r=gn(e,t);return r&&r[0]}var sT=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!pe(n)||n<=0||!pe(i)||i<=0)},nX=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],iX=function(t){return t&&t.type&&Uo(t.type)&&nX.indexOf(t.type)>=0},aX=function(t,r,n,i){var a,o=(a=G0==null?void 0:G0[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Fe(t)&&(i&&o.includes(r)||QY.includes(r))||n&&gj.includes(r)},Le=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(_.isValidElement(t)&&(i=t.props),!Kl(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;aX((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},I1=function e(t,r){if(t===r)return!0;var n=_.Children.count(t);if(n!==_.Children.count(r))return!1;if(n===0)return!0;if(n===1)return lT(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!lT(a,o))return!1}return!0},lT=function(t,r){if(Ze(t)&&Ze(r))return!0;if(!Ze(t)&&!Ze(r)){var n=t.props||{},i=n.children,a=iT(n,eX),o=r.props||{},l=o.children,u=iT(o,tX);return i&&l?el(a,u)&&I1(i,l):!i&&!l?el(a,u):!1}return!1},cT=function(t,r){var n=[],i={};return vj(t).forEach(function(a,o){if(iX(a))n.push(a);else if(a){var l=Li(a.type),u=r[l]||{},f=u.handler,h=u.once;if(f&&(!h||!i[l])){var p=f(a,l,o);n.push(p),i[l]=!0}}}),n},oX=function(t){var r=t&&t.type;return r&&aT[r]?aT[r]:null},sX=function(t,r){return vj(r).indexOf(t)},lX=["children","width","height","viewBox","className","style","title","desc"];function D1(){return D1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D1.apply(this,arguments)}function cX(e,t){if(e==null)return{};var r=uX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $1(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,f=cX(e,lX),h=i||{width:r,height:n,x:0,y:0},p=He("recharts-surface",a);return V.createElement("svg",D1({},Le(f,!0,"svg"),{className:p,width:r,height:n,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),V.createElement("title",null,l),V.createElement("desc",null,u),t)}var fX=["children","className"];function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L1.apply(this,arguments)}function dX(e,t){if(e==null)return{};var r=hX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var dt=V.forwardRef(function(e,t){var r=e.children,n=e.className,i=dX(e,fX),a=He("recharts-layer",n);return V.createElement("g",L1({className:a},Le(i,!0),{ref:t}),r)}),zn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},X0,uT;function pX(){if(uT)return X0;uT=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return X0=e,X0}var Z0,fT;function mX(){if(fT)return Z0;fT=1;var e=pX();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return Z0=t,Z0}var Q0,dT;function L3(){if(dT)return Q0;dT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function u(f){return l.test(f)}return Q0=u,Q0}var J0,hT;function gX(){if(hT)return J0;hT=1;function e(t){return t.split("")}return J0=e,J0}var ex,pT;function vX(){if(pT)return ex;pT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",h="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",w=f+"?",x="["+a+"]?",b="(?:"+v+"(?:"+[h,p,g].join("|")+")"+x+w+")*",S=x+w+b,A="(?:"+[h+l+"?",l,p,g,o].join("|")+")",P=RegExp(u+"(?="+u+")|"+A+S,"g");function C(N){return N.match(P)||[]}return ex=C,ex}var tx,mT;function yX(){if(mT)return tx;mT=1;var e=gX(),t=L3(),r=vX();function n(i){return t(i)?r(i):e(i)}return tx=n,tx}var rx,gT;function xX(){if(gT)return rx;gT=1;var e=mX(),t=L3(),r=yX(),n=M3();function i(a){return function(o){o=n(o);var l=t(o)?r(o):void 0,u=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return u[a]()+f}}return rx=i,rx}var nx,vT;function bX(){if(vT)return nx;vT=1;var e=xX(),t=e("toUpperCase");return nx=t,nx}var wX=bX();const Vm=ut(wX);function bt(e){return function(){return e}}const B3=Math.cos,sp=Math.sin,Yn=Math.sqrt,lp=Math.PI,Um=2*lp,B1=Math.PI,F1=2*B1,_o=1e-6,_X=F1-_o;function F3(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function SX(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F3;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class jX{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F3:SX(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,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=n-t,f=i-r,h=o-t,p=l-r,g=h*h+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>_o)if(!(Math.abs(p*u-f*h)>_o)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,w=i-l,x=u*u+f*f,b=v*v+w*w,S=Math.sqrt(x),A=Math.sqrt(g),P=a*Math.tan((B1-Math.acos((x+g-b)/(2*S*A)))/2),C=P/A,N=P/S;Math.abs(C-1)>_o&&this._append`L${t+C*h},${r+C*p}`,this._append`A${a},${a},0,0,${+(p*v>h*w)},${this._x1=t+N*u},${this._y1=r+N*f}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),f=t+l,h=r+u,p=1^o,g=o?i-a:a-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>_o||Math.abs(this._y1-h)>_o)&&this._append`L${f},${h}`,n&&(g<0&&(g=g%F1+F1),g>_X?this._append`A${n},${n},0,1,${p},${t-l},${r-u}A${n},${n},0,1,${p},${this._x1=f},${this._y1=h}`:g>_o&&this._append`A${n},${n},0,${+(g>=B1)},${p},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function yj(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 jX(t)}function xj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function z3(e){this._context=e}z3.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 qm(e){return new z3(e)}function V3(e){return e[0]}function U3(e){return e[1]}function q3(e,t){var r=bt(!0),n=null,i=qm,a=null,o=yj(l);e=typeof e=="function"?e:e===void 0?V3:bt(e),t=typeof t=="function"?t:t===void 0?U3:bt(t);function l(u){var f,h=(u=xj(u)).length,p,g=!1,v;for(n==null&&(a=i(v=o())),f=0;f<=h;++f)!(f<h&&r(p=u[f],f,u))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+e(p,f,u),+t(p,f,u));if(v)return a=null,v+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:bt(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:bt(+u),l):t},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:bt(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n},l}function yh(e,t,r){var n=null,i=bt(!0),a=null,o=qm,l=null,u=yj(f);e=typeof e=="function"?e:e===void 0?V3:bt(+e),t=typeof t=="function"?t:bt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?U3:bt(+r);function f(p){var g,v,w,x=(p=xj(p)).length,b,S=!1,A,P=new Array(x),C=new Array(x);for(a==null&&(l=o(A=u())),g=0;g<=x;++g){if(!(g<x&&i(b=p[g],g,p))===S)if(S=!S)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),w=g-1;w>=v;--w)l.point(P[w],C[w]);l.lineEnd(),l.areaEnd()}S&&(P[g]=+e(b,g,p),C[g]=+t(b,g,p),l.point(n?+n(b,g,p):P[g],r?+r(b,g,p):C[g]))}if(A)return l=null,A+""||null}function h(){return q3().defined(i).curve(o).context(a)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),n=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),f):e},f.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:bt(+p),f):n},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),r=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),f):t},f.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:bt(+p),f):r},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(r)},f.lineX1=function(){return h().x(n).y(t)},f.defined=function(p){return arguments.length?(i=typeof p=="function"?p:bt(!!p),f):i},f.curve=function(p){return arguments.length?(o=p,a!=null&&(l=o(a)),f):o},f.context=function(p){return arguments.length?(p==null?a=l=null:l=o(a=p),f):a},f}class W3{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 PX(e){return new W3(e,!0)}function AX(e){return new W3(e,!1)}const bj={draw(e,t){const r=Yn(t/lp);e.moveTo(r,0),e.arc(0,0,r,0,Um)}},NX={draw(e,t){const r=Yn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H3=Yn(1/3),OX=H3*2,EX={draw(e,t){const r=Yn(t/OX),n=r*H3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},CX={draw(e,t){const r=Yn(t),n=-r/2;e.rect(n,n,r,r)}},TX=.8908130915292852,K3=sp(lp/10)/sp(7*lp/10),kX=sp(Um/10)*K3,RX=-B3(Um/10)*K3,MX={draw(e,t){const r=Yn(t*TX),n=kX*r,i=RX*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Um*a/5,l=B3(o),u=sp(o);e.lineTo(u*r,-l*r),e.lineTo(l*n-u*i,u*n+l*i)}e.closePath()}},ix=Yn(3),IX={draw(e,t){const r=-Yn(t/(ix*3));e.moveTo(0,r*2),e.lineTo(-ix*r,-r),e.lineTo(ix*r,-r),e.closePath()}},cn=-.5,un=Yn(3)/2,z1=1/Yn(12),DX=(z1/2+1)*3,$X={draw(e,t){const r=Yn(t/DX),n=r/2,i=r*z1,a=n,o=r*z1+r,l=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(cn*n-un*i,un*n+cn*i),e.lineTo(cn*a-un*o,un*a+cn*o),e.lineTo(cn*l-un*u,un*l+cn*u),e.lineTo(cn*n+un*i,cn*i-un*n),e.lineTo(cn*a+un*o,cn*o-un*a),e.lineTo(cn*l+un*u,cn*u-un*l),e.closePath()}};function LX(e,t){let r=null,n=yj(i);e=typeof e=="function"?e:bt(e||bj),t=typeof t=="function"?t:bt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:bt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:bt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function cp(){}function up(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 G3(e){this._context=e}G3.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:up(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:up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function BX(e){return new G3(e)}function Y3(e){this._context=e}Y3.prototype={areaStart:cp,areaEnd:cp,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:up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function FX(e){return new Y3(e)}function X3(e){this._context=e}X3.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:up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zX(e){return new X3(e)}function Z3(e){this._context=e}Z3.prototype={areaStart:cp,areaEnd:cp,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 VX(e){return new Z3(e)}function yT(e){return e<0?-1:1}function xT(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(yT(a)+yT(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function bT(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ax(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function fp(e){this._context=e}fp.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:ax(this,this._t0,bT(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,ax(this,bT(this,r=xT(this,e,t)),r);break;default:ax(this,this._t0,r=xT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Q3(e){this._context=new J3(e)}(Q3.prototype=Object.create(fp.prototype)).point=function(e,t){fp.prototype.point.call(this,t,e)};function J3(e){this._context=e}J3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function UX(e){return new fp(e)}function qX(e){return new Q3(e)}function e4(e){this._context=e}e4.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=wT(e),i=wT(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(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 wT(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function WX(e){return new e4(e)}function Wm(e,t){this._context=e,this._t=t}Wm.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 HX(e){return new Wm(e,.5)}function KX(e){return new Wm(e,0)}function GX(e){return new Wm(e,1)}function al(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function V1(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function YX(e,t){return e[t]}function XX(e){const t=[];return t.key=e,t}function ZX(){var e=bt([]),t=V1,r=al,n=YX;function i(a){var o=Array.from(e.apply(this,arguments),XX),l,u=o.length,f=-1,h;for(const p of a)for(l=0,++f;l<u;++l)(o[l][f]=[0,+n(p,o[l].key,f,a)]).data=p;for(l=0,h=xj(t(o));l<u;++l)o[h[l]].index=l;return r(o,h),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:bt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:bt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?V1:typeof a=="function"?a:bt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??al,i):r},i}function QX(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}al(e,t)}}function JX(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}al(e,t)}}function eZ(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,u=0,f=0;l<o;++l){for(var h=e[t[l]],p=h[n][1]||0,g=h[n-1][1]||0,v=(p-g)/2,w=0;w<l;++w){var x=e[t[w]],b=x[n][1]||0,S=x[n-1][1]||0;v+=b-S}u+=p,f+=v*p}i[n-1][1]+=i[n-1][0]=r,u&&(r-=f/u)}i[n-1][1]+=i[n-1][0]=r,al(e,t)}}function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}var tZ=["type","size","sizeType"];function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U1.apply(this,arguments)}function _T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ST(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_T(Object(r),!0).forEach(function(n){rZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rZ(e,t,r){return t=nZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nZ(e){var t=iZ(e,"string");return Du(t)=="symbol"?t:t+""}function iZ(e,t){if(Du(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aZ(e,t){if(e==null)return{};var r=oZ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var t4={symbolCircle:bj,symbolCross:NX,symbolDiamond:EX,symbolSquare:CX,symbolStar:MX,symbolTriangle:IX,symbolWye:$X},sZ=Math.PI/180,lZ=function(t){var r="symbol".concat(Vm(t));return t4[r]||bj},cZ=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*sZ;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},uZ=function(t,r){t4["symbol".concat(Vm(t))]=r},wj=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=aZ(t,tZ),f=ST(ST({},u),{},{type:n,size:a,sizeType:l}),h=function(){var b=lZ(n),S=LX().type(b).size(cZ(a,l,n));return S()},p=f.className,g=f.cx,v=f.cy,w=Le(f,!0);return g===+g&&v===+v&&a===+a?V.createElement("path",U1({},w,{className:He("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(v,")"),d:h()})):null};wj.registerSymbol=uZ;function ol(e){"@babel/helpers - typeof";return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q1.apply(this,arguments)}function jT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(r),!0).forEach(function(n){$u(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hZ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n4(n.key),n)}}function pZ(e,t,r){return t&&hZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mZ(e,t,r){return t=dp(t),gZ(e,r4()?Reflect.construct(t,r||[],dp(e).constructor):t.apply(e,r))}function gZ(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vZ(e)}function vZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r4=function(){return!!e})()}function dp(e){return dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dp(e)}function yZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W1(e,t)}function W1(e,t){return W1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},W1(e,t)}function $u(e,t,r){return t=n4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n4(e){var t=xZ(e,"string");return ol(t)=="symbol"?t:t+""}function xZ(e,t){if(ol(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ol(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mn=32,_j=function(e){function t(){return dZ(this,t),mZ(this,t,arguments)}return yZ(t,e),pZ(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Mn/2,o=Mn/6,l=Mn/3,u=n.inactive?i:n.color;if(n.type==="plainline")return V.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Mn,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return V.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(l,`
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
H`).concat(Mn,"M").concat(2*l,",").concat(a,`
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return V.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Mn/8,"h").concat(Mn,"v").concat(Mn*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(V.isValidElement(n.legendIcon)){var f=fZ({},n);return delete f.legendIcon,V.cloneElement(n.legendIcon,f)}return V.createElement(wj,{fill:u,cx:a,cy:a,size:Mn,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,u=i.formatter,f=i.inactiveColor,h={x:0,y:0,width:Mn,height:Mn},p={display:l==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,w){var x=v.formatter||u,b=He($u($u({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",v.inactive));if(v.type==="none")return null;var S=Fe(v.value)?null:v.value;zn(!Fe(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var A=v.inactive?f:v.color;return V.createElement("li",q1({className:b,style:p,key:"legend-item-".concat(w)},qo(n.props,v,w)),V.createElement($1,{width:o,height:o,viewBox:h,style:g},n.renderIcon(v)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},x?x(S,v,w):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(_.PureComponent);$u(_j,"displayName","Legend");$u(_j,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var ox,PT;function bZ(){if(PT)return ox;PT=1;var e=Bm();function t(){this.__data__=new e,this.size=0}return ox=t,ox}var sx,AT;function wZ(){if(AT)return sx;AT=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return sx=e,sx}var lx,NT;function _Z(){if(NT)return lx;NT=1;function e(t){return this.__data__.get(t)}return lx=e,lx}var cx,OT;function SZ(){if(OT)return cx;OT=1;function e(t){return this.__data__.has(t)}return cx=e,cx}var ux,ET;function jZ(){if(ET)return ux;ET=1;var e=Bm(),t=dj(),r=hj(),n=200;function i(a,o){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!t||u.length<n-1)return u.push([a,o]),this.size=++l.size,this;l=this.__data__=new r(u)}return l.set(a,o),this.size=l.size,this}return ux=i,ux}var fx,CT;function i4(){if(CT)return fx;CT=1;var e=Bm(),t=bZ(),r=wZ(),n=_Z(),i=SZ(),a=jZ();function o(l){var u=this.__data__=new e(l);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,fx=o,fx}var dx,TT;function PZ(){if(TT)return dx;TT=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return dx=t,dx}var hx,kT;function AZ(){if(kT)return hx;kT=1;function e(t){return this.__data__.has(t)}return hx=e,hx}var px,RT;function a4(){if(RT)return px;RT=1;var e=hj(),t=PZ(),r=AZ();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,px=n,px}var mx,MT;function o4(){if(MT)return mx;MT=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return mx=e,mx}var gx,IT;function s4(){if(IT)return gx;IT=1;function e(t,r){return t.has(r)}return gx=e,gx}var vx,DT;function l4(){if(DT)return vx;DT=1;var e=a4(),t=o4(),r=s4(),n=1,i=2;function a(o,l,u,f,h,p){var g=u&n,v=o.length,w=l.length;if(v!=w&&!(g&&w>v))return!1;var x=p.get(o),b=p.get(l);if(x&&b)return x==l&&b==o;var S=-1,A=!0,P=u&i?new e:void 0;for(p.set(o,l),p.set(l,o);++S<v;){var C=o[S],N=l[S];if(f)var E=g?f(N,C,S,l,o,p):f(C,N,S,o,l,p);if(E!==void 0){if(E)continue;A=!1;break}if(P){if(!t(l,function(T,k){if(!r(P,k)&&(C===T||h(C,T,u,f,p)))return P.push(k)})){A=!1;break}}else if(!(C===N||h(C,N,u,f,p))){A=!1;break}}return p.delete(o),p.delete(l),A}return vx=a,vx}var yx,$T;function NZ(){if($T)return yx;$T=1;var e=vi(),t=e.Uint8Array;return yx=t,yx}var xx,LT;function OZ(){if(LT)return xx;LT=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return xx=e,xx}var bx,BT;function Sj(){if(BT)return bx;BT=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return bx=e,bx}var wx,FT;function EZ(){if(FT)return wx;FT=1;var e=Bf(),t=NZ(),r=fj(),n=l4(),i=OZ(),a=Sj(),o=1,l=2,u="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",x="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",A="[object DataView]",P=e?e.prototype:void 0,C=P?P.valueOf:void 0;function N(E,T,k,M,z,D,B){switch(k){case A:if(E.byteLength!=T.byteLength||E.byteOffset!=T.byteOffset)return!1;E=E.buffer,T=T.buffer;case S:return!(E.byteLength!=T.byteLength||!D(new t(E),new t(T)));case u:case f:case g:return r(+E,+T);case h:return E.name==T.name&&E.message==T.message;case v:case x:return E==T+"";case p:var U=i;case w:var G=M&o;if(U||(U=a),E.size!=T.size&&!G)return!1;var Y=B.get(E);if(Y)return Y==T;M|=l,B.set(E,T);var F=n(U(E),U(T),M,z,D,B);return B.delete(E),F;case b:if(C)return C.call(E)==C.call(T)}return!1}return wx=N,wx}var _x,zT;function c4(){if(zT)return _x;zT=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return _x=e,_x}var Sx,VT;function CZ(){if(VT)return Sx;VT=1;var e=c4(),t=Vr();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return Sx=r,Sx}var jx,UT;function TZ(){if(UT)return jx;UT=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var l=t[n];r(l,n,t)&&(o[a++]=l)}return o}return jx=e,jx}var Px,qT;function kZ(){if(qT)return Px;qT=1;function e(){return[]}return Px=e,Px}var Ax,WT;function RZ(){if(WT)return Ax;WT=1;var e=TZ(),t=kZ(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return n.call(o,l)}))}:t;return Ax=a,Ax}var Nx,HT;function MZ(){if(HT)return Nx;HT=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Nx=e,Nx}var Ox,KT;function IZ(){if(KT)return Ox;KT=1;var e=ea(),t=ta(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Ox=n,Ox}var Ex,GT;function jj(){if(GT)return Ex;GT=1;var e=IZ(),t=ta(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return Ex=a,Ex}var du={exports:{}},Cx,YT;function DZ(){if(YT)return Cx;YT=1;function e(){return!1}return Cx=e,Cx}du.exports;var XT;function u4(){return XT||(XT=1,function(e,t){var r=vi(),n=DZ(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?r.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||n;e.exports=f}(du,du.exports)),du.exports}var Tx,ZT;function Pj(){if(ZT)return Tx;ZT=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Tx=r,Tx}var kx,QT;function Aj(){if(QT)return kx;QT=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return kx=t,kx}var Rx,JT;function $Z(){if(JT)return Rx;JT=1;var e=ea(),t=Aj(),r=ta(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",p="[object Object]",g="[object RegExp]",v="[object Set]",w="[object String]",x="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",P="[object Float64Array]",C="[object Int8Array]",N="[object Int16Array]",E="[object Int32Array]",T="[object Uint8Array]",k="[object Uint8ClampedArray]",M="[object Uint16Array]",z="[object Uint32Array]",D={};D[A]=D[P]=D[C]=D[N]=D[E]=D[T]=D[k]=D[M]=D[z]=!0,D[n]=D[i]=D[b]=D[a]=D[S]=D[o]=D[l]=D[u]=D[f]=D[h]=D[p]=D[g]=D[v]=D[w]=D[x]=!1;function B(U){return r(U)&&t(U.length)&&!!D[e(U)]}return Rx=B,Rx}var Mx,ek;function f4(){if(ek)return Mx;ek=1;function e(t){return function(r){return t(r)}}return Mx=e,Mx}var hu={exports:{}};hu.exports;var tk;function LZ(){return tk||(tk=1,function(e,t){var r=T3(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l}(hu,hu.exports)),hu.exports}var Ix,rk;function d4(){if(rk)return Ix;rk=1;var e=$Z(),t=f4(),r=LZ(),n=r&&r.isTypedArray,i=n?t(n):e;return Ix=i,Ix}var Dx,nk;function BZ(){if(nk)return Dx;nk=1;var e=MZ(),t=jj(),r=Vr(),n=u4(),i=Pj(),a=d4(),o=Object.prototype,l=o.hasOwnProperty;function u(f,h){var p=r(f),g=!p&&t(f),v=!p&&!g&&n(f),w=!p&&!g&&!v&&a(f),x=p||g||v||w,b=x?e(f.length,String):[],S=b.length;for(var A in f)(h||l.call(f,A))&&!(x&&(A=="length"||v&&(A=="offset"||A=="parent")||w&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,S)))&&b.push(A);return b}return Dx=u,Dx}var $x,ik;function FZ(){if(ik)return $x;ik=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return $x=t,$x}var Lx,ak;function h4(){if(ak)return Lx;ak=1;function e(t,r){return function(n){return t(r(n))}}return Lx=e,Lx}var Bx,ok;function zZ(){if(ok)return Bx;ok=1;var e=h4(),t=e(Object.keys,Object);return Bx=t,Bx}var Fx,sk;function VZ(){if(sk)return Fx;sk=1;var e=FZ(),t=zZ(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))n.call(a,l)&&l!="constructor"&&o.push(l);return o}return Fx=i,Fx}var zx,lk;function Vf(){if(lk)return zx;lk=1;var e=uj(),t=Aj();function r(n){return n!=null&&t(n.length)&&!e(n)}return zx=r,zx}var Vx,ck;function Hm(){if(ck)return Vx;ck=1;var e=BZ(),t=VZ(),r=Vf();function n(i){return r(i)?e(i):t(i)}return Vx=n,Vx}var Ux,uk;function UZ(){if(uk)return Ux;uk=1;var e=CZ(),t=RZ(),r=Hm();function n(i){return e(i,r,t)}return Ux=n,Ux}var qx,fk;function qZ(){if(fk)return qx;fk=1;var e=UZ(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,l,u,f,h){var p=l&t,g=e(a),v=g.length,w=e(o),x=w.length;if(v!=x&&!p)return!1;for(var b=v;b--;){var S=g[b];if(!(p?S in o:n.call(o,S)))return!1}var A=h.get(a),P=h.get(o);if(A&&P)return A==o&&P==a;var C=!0;h.set(a,o),h.set(o,a);for(var N=p;++b<v;){S=g[b];var E=a[S],T=o[S];if(u)var k=p?u(T,E,S,o,a,h):u(E,T,S,a,o,h);if(!(k===void 0?E===T||f(E,T,l,u,h):k)){C=!1;break}N||(N=S=="constructor")}if(C&&!N){var M=a.constructor,z=o.constructor;M!=z&&"constructor"in a&&"constructor"in o&&!(typeof M=="function"&&M instanceof M&&typeof z=="function"&&z instanceof z)&&(C=!1)}return h.delete(a),h.delete(o),C}return qx=i,qx}var Wx,dk;function WZ(){if(dk)return Wx;dk=1;var e=rs(),t=vi(),r=e(t,"DataView");return Wx=r,Wx}var Hx,hk;function HZ(){if(hk)return Hx;hk=1;var e=rs(),t=vi(),r=e(t,"Promise");return Hx=r,Hx}var Kx,pk;function p4(){if(pk)return Kx;pk=1;var e=rs(),t=vi(),r=e(t,"Set");return Kx=r,Kx}var Gx,mk;function KZ(){if(mk)return Gx;mk=1;var e=rs(),t=vi(),r=e(t,"WeakMap");return Gx=r,Gx}var Yx,gk;function GZ(){if(gk)return Yx;gk=1;var e=WZ(),t=dj(),r=HZ(),n=p4(),i=KZ(),a=ea(),o=k3(),l="[object Map]",u="[object Object]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",g="[object DataView]",v=o(e),w=o(t),x=o(r),b=o(n),S=o(i),A=a;return(e&&A(new e(new ArrayBuffer(1)))!=g||t&&A(new t)!=l||r&&A(r.resolve())!=f||n&&A(new n)!=h||i&&A(new i)!=p)&&(A=function(P){var C=a(P),N=C==u?P.constructor:void 0,E=N?o(N):"";if(E)switch(E){case v:return g;case w:return l;case x:return f;case b:return h;case S:return p}return C}),Yx=A,Yx}var Xx,vk;function YZ(){if(vk)return Xx;vk=1;var e=i4(),t=l4(),r=EZ(),n=qZ(),i=GZ(),a=Vr(),o=u4(),l=d4(),u=1,f="[object Arguments]",h="[object Array]",p="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(x,b,S,A,P,C){var N=a(x),E=a(b),T=N?h:i(x),k=E?h:i(b);T=T==f?p:T,k=k==f?p:k;var M=T==p,z=k==p,D=T==k;if(D&&o(x)){if(!o(b))return!1;N=!0,M=!1}if(D&&!M)return C||(C=new e),N||l(x)?t(x,b,S,A,P,C):r(x,b,T,S,A,P,C);if(!(S&u)){var B=M&&v.call(x,"__wrapped__"),U=z&&v.call(b,"__wrapped__");if(B||U){var G=B?x.value():x,Y=U?b.value():b;return C||(C=new e),P(G,Y,S,A,C)}}return D?(C||(C=new e),n(x,b,S,A,P,C)):!1}return Xx=w,Xx}var Zx,yk;function Nj(){if(yk)return Zx;yk=1;var e=YZ(),t=ta();function r(n,i,a,o,l){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,l)}return Zx=r,Zx}var Qx,xk;function XZ(){if(xk)return Qx;xk=1;var e=i4(),t=Nj(),r=1,n=2;function i(a,o,l,u){var f=l.length,h=f,p=!u;if(a==null)return!h;for(a=Object(a);f--;){var g=l[f];if(p&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<h;){g=l[f];var v=g[0],w=a[v],x=g[1];if(p&&g[2]){if(w===void 0&&!(v in a))return!1}else{var b=new e;if(u)var S=u(w,x,v,a,o,b);if(!(S===void 0?t(x,w,r|n,u,b):S))return!1}}return!0}return Qx=i,Qx}var Jx,bk;function m4(){if(bk)return Jx;bk=1;var e=Ya();function t(r){return r===r&&!e(r)}return Jx=t,Jx}var eb,wk;function ZZ(){if(wk)return eb;wk=1;var e=m4(),t=Hm();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],l=n[o];i[a]=[o,l,e(l)]}return i}return eb=r,eb}var tb,_k;function g4(){if(_k)return tb;_k=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return tb=e,tb}var rb,Sk;function QZ(){if(Sk)return rb;Sk=1;var e=XZ(),t=ZZ(),r=g4();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return rb=n,rb}var nb,jk;function JZ(){if(jk)return nb;jk=1;function e(t,r){return t!=null&&r in Object(t)}return nb=e,nb}var ib,Pk;function eQ(){if(Pk)return ib;Pk=1;var e=I3(),t=jj(),r=Vr(),n=Pj(),i=Aj(),a=zm();function o(l,u,f){u=e(u,l);for(var h=-1,p=u.length,g=!1;++h<p;){var v=a(u[h]);if(!(g=l!=null&&f(l,v)))break;l=l[v]}return g||++h!=p?g:(p=l==null?0:l.length,!!p&&i(p)&&n(v,p)&&(r(l)||t(l)))}return ib=o,ib}var ab,Ak;function tQ(){if(Ak)return ab;Ak=1;var e=JZ(),t=eQ();function r(n,i){return n!=null&&t(n,i,e)}return ab=r,ab}var ob,Nk;function rQ(){if(Nk)return ob;Nk=1;var e=Nj(),t=D3(),r=tQ(),n=cj(),i=m4(),a=g4(),o=zm(),l=1,u=2;function f(h,p){return n(h)&&i(p)?a(o(h),p):function(g){var v=t(g,h);return v===void 0&&v===p?r(g,h):e(p,v,l|u)}}return ob=f,ob}var sb,Ok;function Gl(){if(Ok)return sb;Ok=1;function e(t){return t}return sb=e,sb}var lb,Ek;function nQ(){if(Ek)return lb;Ek=1;function e(t){return function(r){return r==null?void 0:r[t]}}return lb=e,lb}var cb,Ck;function iQ(){if(Ck)return cb;Ck=1;var e=mj();function t(r){return function(n){return e(n,r)}}return cb=t,cb}var ub,Tk;function aQ(){if(Tk)return ub;Tk=1;var e=nQ(),t=iQ(),r=cj(),n=zm();function i(a){return r(a)?e(n(a)):t(a)}return ub=i,ub}var fb,kk;function yi(){if(kk)return fb;kk=1;var e=QZ(),t=rQ(),r=Gl(),n=Vr(),i=aQ();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return fb=a,fb}var db,Rk;function v4(){if(Rk)return db;Rk=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return db=e,db}var hb,Mk;function oQ(){if(Mk)return hb;Mk=1;function e(t){return t!==t}return hb=e,hb}var pb,Ik;function sQ(){if(Ik)return pb;Ik=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return pb=e,pb}var mb,Dk;function lQ(){if(Dk)return mb;Dk=1;var e=v4(),t=oQ(),r=sQ();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return mb=n,mb}var gb,$k;function cQ(){if($k)return gb;$k=1;var e=lQ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return gb=t,gb}var vb,Lk;function uQ(){if(Lk)return vb;Lk=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return vb=e,vb}var yb,Bk;function fQ(){if(Bk)return yb;Bk=1;function e(){}return yb=e,yb}var xb,Fk;function dQ(){if(Fk)return xb;Fk=1;var e=p4(),t=fQ(),r=Sj(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return xb=i,xb}var bb,zk;function hQ(){if(zk)return bb;zk=1;var e=a4(),t=cQ(),r=uQ(),n=s4(),i=dQ(),a=Sj(),o=200;function l(u,f,h){var p=-1,g=t,v=u.length,w=!0,x=[],b=x;if(h)w=!1,g=r;else if(v>=o){var S=f?null:i(u);if(S)return a(S);w=!1,g=n,b=new e}else b=f?[]:x;e:for(;++p<v;){var A=u[p],P=f?f(A):A;if(A=h||A!==0?A:0,w&&P===P){for(var C=b.length;C--;)if(b[C]===P)continue e;f&&b.push(P),x.push(A)}else g(b,P,h)||(b!==x&&b.push(P),x.push(A))}return x}return bb=l,bb}var wb,Vk;function pQ(){if(Vk)return wb;Vk=1;var e=yi(),t=hQ();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return wb=r,wb}var mQ=pQ();const Uk=ut(mQ);function y4(e,t,r){return t===!0?Uk(e,r):Fe(t)?Uk(e,t):e}function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}var gQ=["ref"];function qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(r),!0).forEach(function(n){Km(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b4(n.key),n)}}function yQ(e,t,r){return t&&Wk(e.prototype,t),r&&Wk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xQ(e,t,r){return t=hp(t),bQ(e,x4()?Reflect.construct(t,r||[],hp(e).constructor):t.apply(e,r))}function bQ(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wQ(e)}function wQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x4=function(){return!!e})()}function hp(e){return hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hp(e)}function _Q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H1(e,t)}function H1(e,t){return H1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},H1(e,t)}function Km(e,t,r){return t=b4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b4(e){var t=SQ(e,"string");return sl(t)=="symbol"?t:t+""}function SQ(e,t){if(sl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function jQ(e,t){if(e==null)return{};var r=PQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function AQ(e){return e.value}function NQ(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var r=jQ(t,gQ);return V.createElement(_j,r)}var Hk=1,Da=function(e){function t(){var r;vQ(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=xQ(this,t,[].concat(i)),Km(r,"lastBoundingBox",{width:-1,height:-1}),r}return _Q(t,e),yQ(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Hk||Math.abs(i.height-this.lastBoundingBox.height)>Hk)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ci({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,f=i.chartWidth,h=i.chartHeight,p,g;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();p={left:((f||0)-v.width)/2}}else p=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var w=this.getBBoxSnapshot();g={top:((h||0)-w.height)/2}}else g=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Ci(Ci({},p),g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,f=i.payloadUniqBy,h=i.payload,p=Ci(Ci({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return V.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(v){n.wrapperNode=v}},NQ(a,Ci(Ci({},this.props),{},{payload:y4(h,f,AQ)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Ci(Ci({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&pe(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(_.PureComponent);Km(Da,"displayName","Legend");Km(Da,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var _b,Kk;function OQ(){if(Kk)return _b;Kk=1;var e=Bf(),t=jj(),r=Vr(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return _b=i,_b}var Sb,Gk;function w4(){if(Gk)return Sb;Gk=1;var e=c4(),t=OQ();function r(n,i,a,o,l){var u=-1,f=n.length;for(a||(a=t),l||(l=[]);++u<f;){var h=n[u];i>0&&a(h)?i>1?r(h,i-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Sb=r,Sb}var jb,Yk;function EQ(){if(Yk)return jb;Yk=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),l=i(r),u=l.length;u--;){var f=l[t?u:++a];if(n(o[f],f,o)===!1)break}return r}}return jb=e,jb}var Pb,Xk;function CQ(){if(Xk)return Pb;Xk=1;var e=EQ(),t=e();return Pb=t,Pb}var Ab,Zk;function _4(){if(Zk)return Ab;Zk=1;var e=CQ(),t=Hm();function r(n,i){return n&&e(n,i,t)}return Ab=r,Ab}var Nb,Qk;function TQ(){if(Qk)return Nb;Qk=1;var e=Vf();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,l=n?o:-1,u=Object(i);(n?l--:++l<o)&&a(u[l],l,u)!==!1;);return i}}return Nb=t,Nb}var Ob,Jk;function Oj(){if(Jk)return Ob;Jk=1;var e=_4(),t=TQ(),r=t(e);return Ob=r,Ob}var Eb,e2;function S4(){if(e2)return Eb;e2=1;var e=Oj(),t=Vf();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(l,u,f){o[++a]=i(l,u,f)}),o}return Eb=r,Eb}var Cb,t2;function kQ(){if(t2)return Cb;t2=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Cb=e,Cb}var Tb,r2;function RQ(){if(r2)return Tb;r2=1;var e=Hl();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,l=e(r),u=n!==void 0,f=n===null,h=n===n,p=e(n);if(!f&&!p&&!l&&r>n||l&&u&&h&&!f&&!p||a&&u&&h||!i&&h||!o)return 1;if(!a&&!l&&!p&&r<n||p&&i&&o&&!a&&!l||f&&i&&o||!u&&o||!h)return-1}return 0}return Tb=t,Tb}var kb,n2;function MQ(){if(n2)return kb;n2=1;var e=RQ();function t(r,n,i){for(var a=-1,o=r.criteria,l=n.criteria,u=o.length,f=i.length;++a<u;){var h=e(o[a],l[a]);if(h){if(a>=f)return h;var p=i[a];return h*(p=="desc"?-1:1)}}return r.index-n.index}return kb=t,kb}var Rb,i2;function IQ(){if(i2)return Rb;i2=1;var e=pj(),t=mj(),r=yi(),n=S4(),i=kQ(),a=f4(),o=MQ(),l=Gl(),u=Vr();function f(h,p,g){p.length?p=e(p,function(x){return u(x)?function(b){return t(b,x.length===1?x[0]:x)}:x}):p=[l];var v=-1;p=e(p,a(r));var w=n(h,function(x,b,S){var A=e(p,function(P){return P(x)});return{criteria:A,index:++v,value:x}});return i(w,function(x,b){return o(x,b,g)})}return Rb=f,Rb}var Mb,a2;function DQ(){if(a2)return Mb;a2=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Mb=e,Mb}var Ib,o2;function $Q(){if(o2)return Ib;o2=1;var e=DQ(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,l=-1,u=t(o.length-i,0),f=Array(u);++l<u;)f[l]=o[i+l];l=-1;for(var h=Array(i+1);++l<i;)h[l]=o[l];return h[i]=a(f),e(n,this,h)}}return Ib=r,Ib}var Db,s2;function LQ(){if(s2)return Db;s2=1;function e(t){return function(){return t}}return Db=e,Db}var $b,l2;function j4(){if(l2)return $b;l2=1;var e=rs(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return $b=t,$b}var Lb,c2;function BQ(){if(c2)return Lb;c2=1;var e=LQ(),t=j4(),r=Gl(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return Lb=n,Lb}var Bb,u2;function FQ(){if(u2)return Bb;u2=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var l=r(),u=t-(l-o);if(o=l,u>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Bb=n,Bb}var Fb,f2;function zQ(){if(f2)return Fb;f2=1;var e=BQ(),t=FQ(),r=t(e);return Fb=r,Fb}var zb,d2;function VQ(){if(d2)return zb;d2=1;var e=Gl(),t=$Q(),r=zQ();function n(i,a){return r(t(i,a,e),i+"")}return zb=n,zb}var Vb,h2;function Gm(){if(h2)return Vb;h2=1;var e=fj(),t=Vf(),r=Pj(),n=Ya();function i(a,o,l){if(!n(l))return!1;var u=typeof o;return(u=="number"?t(l)&&r(o,l.length):u=="string"&&o in l)?e(l[o],a):!1}return Vb=i,Vb}var Ub,p2;function UQ(){if(p2)return Ub;p2=1;var e=w4(),t=IQ(),r=VQ(),n=Gm(),i=r(function(a,o){if(a==null)return[];var l=o.length;return l>1&&n(a,o[0],o[1])?o=[]:l>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Ub=i,Ub}var qQ=UQ();const Ej=ut(qQ);function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function K1(){return K1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K1.apply(this,arguments)}function WQ(e,t){return YQ(e)||GQ(e,t)||KQ(e,t)||HQ()}function HQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KQ(e,t){if(e){if(typeof e=="string")return m2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m2(e,t)}}function m2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function YQ(e){if(Array.isArray(e))return e}function g2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g2(Object(r),!0).forEach(function(n){XQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XQ(e,t,r){return t=ZQ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZQ(e){var t=QQ(e,"string");return Lu(t)=="symbol"?t:t+""}function QQ(e,t){if(Lu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JQ(e){return Array.isArray(e)&&Qt(e[0])&&Qt(e[1])?e.join(" ~ "):e}var eJ=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,u=t.labelStyle,f=u===void 0?{}:u,h=t.payload,p=t.formatter,g=t.itemSorter,v=t.wrapperClassName,w=t.labelClassName,x=t.label,b=t.labelFormatter,S=t.accessibilityLayer,A=S===void 0?!1:S,P=function(){if(h&&h.length){var B={padding:0,margin:0},U=(g?Ej(h,g):h).map(function(G,Y){if(G.type==="none")return null;var F=qb({display:"block",paddingTop:4,paddingBottom:4,color:G.color||"#000"},l),X=G.formatter||p||JQ,I=G.value,W=G.name,Q=I,L=W;if(X&&Q!=null&&L!=null){var K=X(I,W,G,Y,h);if(Array.isArray(K)){var ae=WQ(K,2);Q=ae[0],L=ae[1]}else Q=K}return V.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Y),style:F},Qt(L)?V.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Qt(L)?V.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,V.createElement("span",{className:"recharts-tooltip-item-value"},Q),V.createElement("span",{className:"recharts-tooltip-item-unit"},G.unit||""))});return V.createElement("ul",{className:"recharts-tooltip-item-list",style:B},U)}return null},C=qb({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),N=qb({margin:0},f),E=!Ze(x),T=E?x:"",k=He("recharts-default-tooltip",v),M=He("recharts-tooltip-label",w);E&&b&&h!==void 0&&h!==null&&(T=b(x,h));var z=A?{role:"status","aria-live":"assertive"}:{};return V.createElement("div",K1({className:k,style:C},z),V.createElement("p",{className:M,style:N},V.isValidElement(T)?T:"".concat(T)),P())};function Bu(e){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}function xh(e,t,r){return t=tJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tJ(e){var t=rJ(e,"string");return Bu(t)=="symbol"?t:t+""}function rJ(e,t){if(Bu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ru="recharts-tooltip-wrapper",nJ={visibility:"hidden"};function iJ(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return He(ru,xh(xh(xh(xh({},"".concat(ru,"-right"),pe(r)&&t&&pe(t.x)&&r>=t.x),"".concat(ru,"-left"),pe(r)&&t&&pe(t.x)&&r<t.x),"".concat(ru,"-bottom"),pe(n)&&t&&pe(t.y)&&n>=t.y),"".concat(ru,"-top"),pe(n)&&t&&pe(t.y)&&n<t.y))}function v2(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,f=e.viewBoxDimension;if(a&&pe(a[n]))return a[n];var h=r[n]-l-i,p=r[n]+i;if(t[n])return o[n]?h:p;if(o[n]){var g=h,v=u[n];return g<v?Math.max(p,u[n]):Math.max(h,u[n])}var w=p+l,x=u[n]+f;return w>x?Math.max(h,u[n]):Math.max(p,u[n])}function aJ(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function oJ(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,h,p;return o.height>0&&o.width>0&&r?(h=v2({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),p=v2({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=aJ({translateX:h,translateY:p,useTranslate3d:l})):f=nJ,{cssProperties:f,cssClasses:iJ({translateX:h,translateY:p,coordinate:r})}}function ll(e){"@babel/helpers - typeof";return ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ll(e)}function y2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function x2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y2(Object(r),!0).forEach(function(n){Y1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lJ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A4(n.key),n)}}function cJ(e,t,r){return t&&lJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uJ(e,t,r){return t=pp(t),fJ(e,P4()?Reflect.construct(t,r||[],pp(e).constructor):t.apply(e,r))}function fJ(e,t){if(t&&(ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dJ(e)}function dJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P4=function(){return!!e})()}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pp(e)}function hJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G1(e,t)}function G1(e,t){return G1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},G1(e,t)}function Y1(e,t,r){return t=A4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A4(e){var t=pJ(e,"string");return ll(t)=="symbol"?t:t+""}function pJ(e,t){if(ll(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ll(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var b2=1,mJ=function(e){function t(){var r;sJ(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=uJ(this,t,[].concat(i)),Y1(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Y1(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,u,f,h;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&l!==void 0?l:0,y:(f=(h=r.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&f!==void 0?f:0}})}}),r}return hJ(t,e),cJ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>b2||Math.abs(n.height-this.state.lastBoundingBox.height)>b2)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.children,h=i.coordinate,p=i.hasPayload,g=i.isAnimationActive,v=i.offset,w=i.position,x=i.reverseDirection,b=i.useTranslate3d,S=i.viewBox,A=i.wrapperStyle,P=oJ({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:w,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:S}),C=P.cssClasses,N=P.cssProperties,E=x2(x2({transition:g&&a?"transform ".concat(l,"ms ").concat(u):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&p?"visible":"hidden",position:"absolute",top:0,left:0},A);return V.createElement("div",{tabIndex:-1,className:C,style:E,ref:function(k){n.wrapperNode=k}},f)}}])}(_.PureComponent),gJ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Yl={isSsr:gJ()};function cl(e){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(e)}function w2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w2(Object(r),!0).forEach(function(n){Cj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yJ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O4(n.key),n)}}function xJ(e,t,r){return t&&yJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bJ(e,t,r){return t=mp(t),wJ(e,N4()?Reflect.construct(t,r||[],mp(e).constructor):t.apply(e,r))}function wJ(e,t){if(t&&(cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _J(e)}function _J(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N4=function(){return!!e})()}function mp(e){return mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mp(e)}function SJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X1(e,t)}function X1(e,t){return X1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},X1(e,t)}function Cj(e,t,r){return t=O4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O4(e){var t=jJ(e,"string");return cl(t)=="symbol"?t:t+""}function jJ(e,t){if(cl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function PJ(e){return e.dataKey}function AJ(e,t){return V.isValidElement(e)?V.cloneElement(e,t):typeof e=="function"?V.createElement(e,t):V.createElement(eJ,t)}var hn=function(e){function t(){return vJ(this,t),bJ(this,t,arguments)}return SJ(t,e),xJ(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.content,h=i.coordinate,p=i.filterNull,g=i.isAnimationActive,v=i.offset,w=i.payload,x=i.payloadUniqBy,b=i.position,S=i.reverseDirection,A=i.useTranslate3d,P=i.viewBox,C=i.wrapperStyle,N=w??[];p&&N.length&&(N=y4(w.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),x,PJ));var E=N.length>0;return V.createElement(mJ,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:g,active:a,coordinate:h,hasPayload:E,offset:v,position:b,reverseDirection:S,useTranslate3d:A,viewBox:P,wrapperStyle:C},AJ(f,_2(_2({},this.props),{},{payload:N})))}}])}(_.PureComponent);Cj(hn,"displayName","Tooltip");Cj(hn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Yl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Wb,S2;function NJ(){if(S2)return Wb;S2=1;var e=vi(),t=function(){return e.Date.now()};return Wb=t,Wb}var Hb,j2;function OJ(){if(j2)return Hb;j2=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Hb=t,Hb}var Kb,P2;function EJ(){if(P2)return Kb;P2=1;var e=OJ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Kb=r,Kb}var Gb,A2;function E4(){if(A2)return Gb;A2=1;var e=EJ(),t=Ya(),r=Hl(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return n;if(t(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=t(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var p=a.test(f);return p||o.test(f)?l(f.slice(2),p?2:8):i.test(f)?n:+f}return Gb=u,Gb}var Yb,N2;function CJ(){if(N2)return Yb;N2=1;var e=Ya(),t=NJ(),r=E4(),n="Expected a function",i=Math.max,a=Math.min;function o(l,u,f){var h,p,g,v,w,x,b=0,S=!1,A=!1,P=!0;if(typeof l!="function")throw new TypeError(n);u=r(u)||0,e(f)&&(S=!!f.leading,A="maxWait"in f,g=A?i(r(f.maxWait)||0,u):g,P="trailing"in f?!!f.trailing:P);function C(U){var G=h,Y=p;return h=p=void 0,b=U,v=l.apply(Y,G),v}function N(U){return b=U,w=setTimeout(k,u),S?C(U):v}function E(U){var G=U-x,Y=U-b,F=u-G;return A?a(F,g-Y):F}function T(U){var G=U-x,Y=U-b;return x===void 0||G>=u||G<0||A&&Y>=g}function k(){var U=t();if(T(U))return M(U);w=setTimeout(k,E(U))}function M(U){return w=void 0,P&&h?C(U):(h=p=void 0,v)}function z(){w!==void 0&&clearTimeout(w),b=0,h=x=p=w=void 0}function D(){return w===void 0?v:M(t())}function B(){var U=t(),G=T(U);if(h=arguments,p=this,x=U,G){if(w===void 0)return N(x);if(A)return clearTimeout(w),w=setTimeout(k,u),C(x)}return w===void 0&&(w=setTimeout(k,u)),v}return B.cancel=z,B.flush=D,B}return Yb=o,Yb}var Xb,O2;function TJ(){if(O2)return Xb;O2=1;var e=CJ(),t=Ya(),r="Expected a function";function n(i,a,o){var l=!0,u=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(l="leading"in o?!!o.leading:l,u="trailing"in o?!!o.trailing:u),e(i,a,{leading:l,maxWait:a,trailing:u})}return Xb=n,Xb}var kJ=TJ();const C4=ut(kJ);function Fu(e){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}function E2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){RJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RJ(e,t,r){return t=MJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MJ(e){var t=IJ(e,"string");return Fu(t)=="symbol"?t:t+""}function IJ(e,t){if(Fu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DJ(e,t){return FJ(e)||BJ(e,t)||LJ(e,t)||$J()}function $J(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LJ(e,t){if(e){if(typeof e=="string")return C2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C2(e,t)}}function C2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BJ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function FJ(e){if(Array.isArray(e))return e}var Tj=_.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,l=e.height,u=l===void 0?"100%":l,f=e.minWidth,h=f===void 0?0:f,p=e.minHeight,g=e.maxHeight,v=e.children,w=e.debounce,x=w===void 0?0:w,b=e.id,S=e.className,A=e.onResize,P=e.style,C=P===void 0?{}:P,N=_.useRef(null),E=_.useRef();E.current=A,_.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var T=_.useState({containerWidth:i.width,containerHeight:i.height}),k=DJ(T,2),M=k[0],z=k[1],D=_.useCallback(function(U,G){z(function(Y){var F=Math.round(U),X=Math.round(G);return Y.containerWidth===F&&Y.containerHeight===X?Y:{containerWidth:F,containerHeight:X}})},[]);_.useEffect(function(){var U=function(W){var Q,L=W[0].contentRect,K=L.width,ae=L.height;D(K,ae),(Q=E.current)===null||Q===void 0||Q.call(E,K,ae)};x>0&&(U=C4(U,x,{trailing:!0,leading:!1}));var G=new ResizeObserver(U),Y=N.current.getBoundingClientRect(),F=Y.width,X=Y.height;return D(F,X),G.observe(N.current),function(){G.disconnect()}},[D,x]);var B=_.useMemo(function(){var U=M.containerWidth,G=M.containerHeight;if(U<0||G<0)return null;zn(Eo(o)||Eo(u),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,o,u),zn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var Y=Eo(o)?U:o,F=Eo(u)?G:u;r&&r>0&&(Y?F=Y/r:F&&(Y=F*r),g&&F>g&&(F=g)),zn(Y>0||F>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.`,Y,F,o,u,h,p,r);var X=!Array.isArray(v)&&Li(v.type).endsWith("Chart");return V.Children.map(v,function(I){return V.isValidElement(I)?_.cloneElement(I,bh({width:Y,height:F},X?{style:bh({height:"100%",width:"100%",maxHeight:F,maxWidth:Y},I.props.style)}:{})):I})},[r,v,u,g,p,h,M,o]);return V.createElement("div",{id:b?"".concat(b):void 0,className:He("recharts-responsive-container",S),style:bh(bh({},C),{},{width:o,height:u,minWidth:h,minHeight:p,maxHeight:g}),ref:N},B)}),Ym=function(t){return null};Ym.displayName="Cell";function zu(e){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}function T2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Z1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(r),!0).forEach(function(n){zJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zJ(e,t,r){return t=VJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VJ(e){var t=UJ(e,"string");return zu(t)=="symbol"?t:t+""}function UJ(e,t){if(zu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ms={widthCache:{},cacheCount:0},qJ=2e3,WJ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},k2="recharts_measurement_span";function HJ(e){var t=Z1({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Su=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Yl.isSsr)return{width:0,height:0};var n=HJ(r),i=JSON.stringify({text:t,copyStyle:n});if(Ms.widthCache[i])return Ms.widthCache[i];try{var a=document.getElementById(k2);a||(a=document.createElement("span"),a.setAttribute("id",k2),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Z1(Z1({},WJ),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Ms.widthCache[i]=u,++Ms.cacheCount>qJ&&(Ms.cacheCount=0,Ms.widthCache={}),u}catch{return{width:0,height:0}}},KJ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function gp(e,t){return ZJ(e)||XJ(e,t)||YJ(e,t)||GJ()}function GJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YJ(e,t){if(e){if(typeof e=="string")return R2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R2(e,t)}}function R2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XJ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function ZJ(e){if(Array.isArray(e))return e}function QJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eee(n.key),n)}}function JJ(e,t,r){return t&&M2(e.prototype,t),r&&M2(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eee(e){var t=tee(e,"string");return Vu(t)=="symbol"?t:t+""}function tee(e,t){if(Vu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var I2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,D2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ree=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,nee=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,T4={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},iee=Object.keys(T4),qs="NaN";function aee(e,t){return e*T4[t]}var wh=function(){function e(t,r){QJ(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!ree.test(r)&&(this.num=NaN,this.unit=""),iee.includes(r)&&(this.num=aee(t,r),this.unit="px")}return JJ(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=nee.exec(r))!==null&&n!==void 0?n:[],a=gp(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])}();function k4(e){if(e.includes(qs))return qs;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=I2.exec(t))!==null&&r!==void 0?r:[],i=gp(n,4),a=i[1],o=i[2],l=i[3],u=wh.parse(a??""),f=wh.parse(l??""),h=o==="*"?u.multiply(f):u.divide(f);if(h.isNaN())return qs;t=t.replace(I2,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=D2.exec(t))!==null&&p!==void 0?p:[],v=gp(g,4),w=v[1],x=v[2],b=v[3],S=wh.parse(w??""),A=wh.parse(b??""),P=x==="+"?S.add(A):S.subtract(A);if(P.isNaN())return qs;t=t.replace(D2,P.toString())}return t}var $2=/\(([^()]*)\)/;function oee(e){for(var t=e;t.includes("(");){var r=$2.exec(t),n=gp(r,2),i=n[1];t=t.replace($2,k4(i))}return t}function see(e){var t=e.replace(/\s+/g,"");return t=oee(t),t=k4(t),t}function lee(e){try{return see(e)}catch{return qs}}function Zb(e){var t=lee(e.slice(5,-1));return t===qs?"":t}var cee=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],uee=["dx","dy","angle","className","breakAll"];function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q1.apply(this,arguments)}function L2(e,t){if(e==null)return{};var r=fee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function B2(e,t){return mee(e)||pee(e,t)||hee(e,t)||dee()}function dee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hee(e,t){if(e){if(typeof e=="string")return F2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F2(e,t)}}function F2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pee(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function mee(e){if(Array.isArray(e))return e}var R4=/[ \f\n\r\t\v\u2028\u2029]+/,M4=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Ze(r)||(n?a=r.toString().split(""):a=r.toString().split(R4));var o=a.map(function(u){return{word:u,width:Su(u,i).width}}),l=n?0:Su(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},gee=function(t,r,n,i,a){var o=t.maxLines,l=t.children,u=t.style,f=t.breakAll,h=pe(o),p=l,g=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Y.reduce(function(F,X){var I=X.word,W=X.width,Q=F[F.length-1];if(Q&&(i==null||a||Q.width+W+n<Number(i)))Q.words.push(I),Q.width+=W+n;else{var L={words:[I],width:W};F.push(L)}return F},[])},v=g(r),w=function(Y){return Y.reduce(function(F,X){return F.width>X.width?F:X})};if(!h)return v;for(var x="…",b=function(Y){var F=p.slice(0,Y),X=M4({breakAll:f,style:u,children:F+x}).wordsWithComputedWidth,I=g(X),W=I.length>o||w(I).width>Number(i);return[W,I]},S=0,A=p.length-1,P=0,C;S<=A&&P<=p.length-1;){var N=Math.floor((S+A)/2),E=N-1,T=b(E),k=B2(T,2),M=k[0],z=k[1],D=b(N),B=B2(D,1),U=B[0];if(!M&&!U&&(S=N+1),M&&U&&(A=N-1),!M&&U){C=z;break}P++}return C||v},z2=function(t){var r=Ze(t)?[]:t.toString().split(R4);return[{words:r}]},vee=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!Yl.isSsr){var u,f,h=M4({breakAll:o,children:i,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;u=p,f=g}else return z2(i);return gee({breakAll:o,children:i,maxLines:l,style:a},u,f,r,n)}return z2(i)},V2="#808080",Wo=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,f=u===void 0?"0.71em":u,h=t.scaleToFit,p=h===void 0?!1:h,g=t.textAnchor,v=g===void 0?"start":g,w=t.verticalAnchor,x=w===void 0?"end":w,b=t.fill,S=b===void 0?V2:b,A=L2(t,cee),P=_.useMemo(function(){return vee({breakAll:A.breakAll,children:A.children,maxLines:A.maxLines,scaleToFit:p,style:A.style,width:A.width})},[A.breakAll,A.children,A.maxLines,p,A.style,A.width]),C=A.dx,N=A.dy,E=A.angle,T=A.className,k=A.breakAll,M=L2(A,uee);if(!Qt(n)||!Qt(a))return null;var z=n+(pe(C)?C:0),D=a+(pe(N)?N:0),B;switch(x){case"start":B=Zb("calc(".concat(f,")"));break;case"middle":B=Zb("calc(".concat((P.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:B=Zb("calc(".concat(P.length-1," * -").concat(l,")"));break}var U=[];if(p){var G=P[0].width,Y=A.width;U.push("scale(".concat((pe(Y)?Y/G:1)/G,")"))}return E&&U.push("rotate(".concat(E,", ").concat(z,", ").concat(D,")")),U.length&&(M.transform=U.join(" ")),V.createElement("text",Q1({},Le(M,!0),{x:z,y:D,className:He("recharts-text",T),textAnchor:v,fill:S.includes("url")?V2:S}),P.map(function(F,X){var I=F.words.join(k?"":" ");return V.createElement("tspan",{x:z,dy:X===0?B:l,key:"".concat(I,"-").concat(X)},I)}))};function $a(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yee(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kj(e){let t,r,n;e.length!==2?(t=$a,r=(l,u)=>$a(e(l),u),n=(l,u)=>e(l)-u):(t=e===$a||e===yee?e:xee,r=e,n=e);function i(l,u,f=0,h=l.length){if(f<h){if(t(u,u)!==0)return h;do{const p=f+h>>>1;r(l[p],u)<0?f=p+1:h=p}while(f<h)}return f}function a(l,u,f=0,h=l.length){if(f<h){if(t(u,u)!==0)return h;do{const p=f+h>>>1;r(l[p],u)<=0?f=p+1:h=p}while(f<h)}return f}function o(l,u,f=0,h=l.length){const p=i(l,u,f,h-1);return p>f&&n(l[p-1],u)>-n(l[p],u)?p-1:p}return{left:i,center:o,right:a}}function xee(){return 0}function I4(e){return e===null?NaN:+e}function*bee(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const wee=kj($a),Uf=wee.right;kj(I4).center;class U2 extends Map{constructor(t,r=jee){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(q2(this,t))}has(t){return super.has(q2(this,t))}set(t,r){return super.set(_ee(this,t),r)}delete(t){return super.delete(See(this,t))}}function q2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function _ee({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function See({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function jee(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Pee(e=$a){if(e===$a)return D4;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 D4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Aee=Math.sqrt(50),Nee=Math.sqrt(10),Oee=Math.sqrt(2);function vp(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=Aee?10:a>=Nee?5:a>=Oee?2:1;let l,u,f;return i<0?(f=Math.pow(10,-i)/o,l=Math.round(e*f),u=Math.round(t*f),l/f<e&&++l,u/f>t&&--u,f=-f):(f=Math.pow(10,i)*o,l=Math.round(e/f),u=Math.round(t/f),l*f<e&&++l,u*f>t&&--u),u<l&&.5<=r&&r<2?vp(e,t,r*2):[l,u,f]}function J1(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?vp(t,e,r):vp(e,t,r);if(!(a>=i))return[];const l=a-i+1,u=new Array(l);if(n)if(o<0)for(let f=0;f<l;++f)u[f]=(a-f)/-o;else for(let f=0;f<l;++f)u[f]=(a-f)*o;else if(o<0)for(let f=0;f<l;++f)u[f]=(i+f)/-o;else for(let f=0;f<l;++f)u[f]=(i+f)*o;return u}function e_(e,t,r){return t=+t,e=+e,r=+r,vp(e,t,r)[2]}function t_(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?e_(t,e,r):e_(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function W2(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function H2(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function $4(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?D4:Pee(i);n>r;){if(n-r>600){const u=n-r+1,f=t-r+1,h=Math.log(u),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(u-p)/u)*(f-u/2<0?-1:1),v=Math.max(r,Math.floor(t-f*p/u+g)),w=Math.min(n,Math.floor(t+(u-f)*p/u+g));$4(e,t,v,w,i)}const a=e[t];let o=r,l=n;for(nu(e,r,t),i(e[n],a)>0&&nu(e,r,n);o<l;){for(nu(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?nu(e,r,l):(++l,nu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function nu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Eee(e,t,r){if(e=Float64Array.from(bee(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return H2(e);if(t>=1)return W2(e);var n,i=(n-1)*t,a=Math.floor(i),o=W2($4(e,a).subarray(0,a+1)),l=H2(e.subarray(a+1));return o+(l-o)*(i-a)}}function Cee(e,t,r=I4){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function Tee(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function jn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ra(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 r_=Symbol("implicit");function Rj(){var e=new U2,t=[],r=[],n=r_;function i(a){let o=e.get(a);if(o===void 0){if(n!==r_)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new U2;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Rj(t,r).unknown(n)},jn.apply(i,arguments),i}function Uu(){var e=Rj().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,l=!1,u=0,f=0,h=.5;delete e.unknown;function p(){var g=t().length,v=i<n,w=v?i:n,x=v?n:i;a=(x-w)/Math.max(1,g-u+f*2),l&&(a=Math.floor(a)),w+=(x-w-a*(g-u))*h,o=a*(1-u),l&&(w=Math.round(w),o=Math.round(o));var b=Tee(g).map(function(S){return w+a*S});return r(v?b.reverse():b)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,p()):[n,i]},e.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,l=!0,p()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(g){return arguments.length?(l=!!g,p()):l},e.padding=function(g){return arguments.length?(u=Math.min(1,f=+g),p()):u},e.paddingInner=function(g){return arguments.length?(u=Math.min(1,g),p()):u},e.paddingOuter=function(g){return arguments.length?(f=+g,p()):f},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),p()):h},e.copy=function(){return Uu(t(),[n,i]).round(l).paddingInner(u).paddingOuter(f).align(h)},jn.apply(p(),arguments)}function L4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return L4(t())},e}function ju(){return L4(Uu.apply(null,arguments).paddingInner(1))}function Mj(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function B4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function qf(){}var qu=.7,yp=1/qu,tl="\\s*([+-]?\\d+)\\s*",Wu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kee=/^#([0-9a-f]{3,8})$/,Ree=new RegExp(`^rgb\\(${tl},${tl},${tl}\\)$`),Mee=new RegExp(`^rgb\\(${si},${si},${si}\\)$`),Iee=new RegExp(`^rgba\\(${tl},${tl},${tl},${Wu}\\)$`),Dee=new RegExp(`^rgba\\(${si},${si},${si},${Wu}\\)$`),$ee=new RegExp(`^hsl\\(${Wu},${si},${si}\\)$`),Lee=new RegExp(`^hsla\\(${Wu},${si},${si},${Wu}\\)$`),K2={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};Mj(qf,Hu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:G2,formatHex:G2,formatHex8:Bee,formatHsl:Fee,formatRgb:Y2,toString:Y2});function G2(){return this.rgb().formatHex()}function Bee(){return this.rgb().formatHex8()}function Fee(){return F4(this).formatHsl()}function Y2(){return this.rgb().formatRgb()}function Hu(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kee.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?X2(t):r===3?new Lr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?_h(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?_h(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=Ree.exec(e))?new Lr(t[1],t[2],t[3],1):(t=Mee.exec(e))?new Lr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Iee.exec(e))?_h(t[1],t[2],t[3],t[4]):(t=Dee.exec(e))?_h(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$ee.exec(e))?J2(t[1],t[2]/100,t[3]/100,1):(t=Lee.exec(e))?J2(t[1],t[2]/100,t[3]/100,t[4]):K2.hasOwnProperty(e)?X2(K2[e]):e==="transparent"?new Lr(NaN,NaN,NaN,0):null}function X2(e){return new Lr(e>>16&255,e>>8&255,e&255,1)}function _h(e,t,r,n){return n<=0&&(e=t=r=NaN),new Lr(e,t,r,n)}function zee(e){return e instanceof qf||(e=Hu(e)),e?(e=e.rgb(),new Lr(e.r,e.g,e.b,e.opacity)):new Lr}function n_(e,t,r,n){return arguments.length===1?zee(e):new Lr(e,t,r,n??1)}function Lr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Mj(Lr,n_,B4(qf,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Lr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new Lr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lr(Do(this.r),Do(this.g),Do(this.b),xp(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:Z2,formatHex:Z2,formatHex8:Vee,formatRgb:Q2,toString:Q2}));function Z2(){return`#${Co(this.r)}${Co(this.g)}${Co(this.b)}`}function Vee(){return`#${Co(this.r)}${Co(this.g)}${Co(this.b)}${Co((isNaN(this.opacity)?1:this.opacity)*255)}`}function Q2(){const e=xp(this.opacity);return`${e===1?"rgb(":"rgba("}${Do(this.r)}, ${Do(this.g)}, ${Do(this.b)}${e===1?")":`, ${e})`}`}function xp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Do(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Co(e){return e=Do(e),(e<16?"0":"")+e.toString(16)}function J2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Bn(e,t,r,n)}function F4(e){if(e instanceof Bn)return new Bn(e.h,e.s,e.l,e.opacity);if(e instanceof qf||(e=Hu(e)),!e)return new Bn;if(e instanceof Bn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(r-n)/l+(r<n)*6:r===a?o=(n-t)/l+2:o=(t-r)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Bn(o,l,u,e.opacity)}function Uee(e,t,r,n){return arguments.length===1?F4(e):new Bn(e,t,r,n??1)}function Bn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Mj(Bn,Uee,B4(qf,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Bn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new Bn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Lr(Qb(e>=240?e-240:e+120,i,n),Qb(e,i,n),Qb(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Bn(eR(this.h),Sh(this.s),Sh(this.l),xp(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=xp(this.opacity);return`${e===1?"hsl(":"hsla("}${eR(this.h)}, ${Sh(this.s)*100}%, ${Sh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function eR(e){return e=(e||0)%360,e<0?e+360:e}function Sh(e){return Math.max(0,Math.min(1,e||0))}function Qb(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 Ij=e=>()=>e;function qee(e,t){return function(r){return e+r*t}}function Wee(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 Hee(e){return(e=+e)==1?z4:function(t,r){return r-t?Wee(t,r,e):Ij(isNaN(t)?r:t)}}function z4(e,t){var r=t-e;return r?qee(e,r):Ij(isNaN(e)?t:e)}const tR=function e(t){var r=Hee(t);function n(i,a){var o=r((i=n_(i)).r,(a=n_(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),f=z4(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=l(h),i.b=u(h),i.opacity=f(h),i+""}}return n.gamma=e,n}(1);function Kee(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function Gee(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Yee(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Xl(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}function Xee(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function bp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Zee(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Xl(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var i_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jb=new RegExp(i_.source,"g");function Qee(e){return function(){return e}}function Jee(e){return function(t){return e(t)+""}}function ete(e,t){var r=i_.lastIndex=Jb.lastIndex=0,n,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(n=i_.exec(e))&&(i=Jb.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:bp(n,i)})),r=Jb.lastIndex;return r<t.length&&(a=t.slice(r),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?Jee(u[0].x):Qee(t):(t=u.length,function(f){for(var h=0,p;h<t;++h)l[(p=u[h]).i]=p.x(f);return l.join("")})}function Xl(e,t){var r=typeof t,n;return t==null||r==="boolean"?Ij(t):(r==="number"?bp:r==="string"?(n=Hu(t))?(t=n,tR):ete:t instanceof Hu?tR:t instanceof Date?Xee:Gee(t)?Kee:Array.isArray(t)?Yee:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Zee:bp)(e,t)}function Dj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function tte(e,t){t===void 0&&(t=e,e=Xl);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[l](o-l)}}function rte(e){return function(){return e}}function wp(e){return+e}var rR=[0,1];function Or(e){return e}function a_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:rte(isNaN(t)?NaN:.5)}function nte(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ite(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=a_(i,n),a=r(o,a)):(n=a_(n,i),a=r(a,o)),function(l){return a(n(l))}}function ate(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=a_(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(l){var u=Uf(e,l,1,n)-1;return a[u](i[u](l))}}function Wf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Xm(){var e=rR,t=rR,r=Xl,n,i,a,o=Or,l,u,f;function h(){var g=Math.min(e.length,t.length);return o!==Or&&(o=nte(e[0],e[g-1])),l=g>2?ate:ite,u=f=null,p}function p(g){return g==null||isNaN(g=+g)?a:(u||(u=l(e.map(n),t,r)))(n(o(g)))}return p.invert=function(g){return o(i((f||(f=l(t,e.map(n),bp)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,wp),h()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),h()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),r=Dj,h()},p.clamp=function(g){return arguments.length?(o=g?!0:Or,h()):o!==Or},p.interpolate=function(g){return arguments.length?(r=g,h()):r},p.unknown=function(g){return arguments.length?(a=g,p):a},function(g,v){return n=g,i=v,h()}}function $j(){return Xm()(Or,Or)}function ote(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function _p(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 ul(e){return e=_p(Math.abs(e)),e?e[1]:NaN}function ste(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function lte(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var cte=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ku(e){if(!(t=cte.exec(e)))throw new Error("invalid format: "+e);var t;return new Lj({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]})}Ku.prototype=Lj.prototype;function Lj(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+""}Lj.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 ute(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var V4;function fte(e,t){var r=_p(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(V4=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+_p(e,Math.max(0,t+a-1))[0]}function nR(e,t){var r=_p(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const iR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ote,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)=>nR(e*100,t),r:nR,s:fte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function aR(e){return e}var oR=Array.prototype.map,sR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dte(e){var t=e.grouping===void 0||e.thousands===void 0?aR:ste(oR.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?aR:lte(oR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(p){p=Ku(p);var g=p.fill,v=p.align,w=p.sign,x=p.symbol,b=p.zero,S=p.width,A=p.comma,P=p.precision,C=p.trim,N=p.type;N==="n"?(A=!0,N="g"):iR[N]||(P===void 0&&(P=12),C=!0,N="g"),(b||g==="0"&&v==="=")&&(b=!0,g="0",v="=");var E=x==="$"?r:x==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",T=x==="$"?n:/[%p]/.test(N)?o:"",k=iR[N],M=/[defgprs%]/.test(N);P=P===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function z(D){var B=E,U=T,G,Y,F;if(N==="c")U=k(D)+U,D="";else{D=+D;var X=D<0||1/D<0;if(D=isNaN(D)?u:k(Math.abs(D),P),C&&(D=ute(D)),X&&+D==0&&w!=="+"&&(X=!1),B=(X?w==="("?w:l:w==="-"||w==="("?"":w)+B,U=(N==="s"?sR[8+V4/3]:"")+U+(X&&w==="("?")":""),M){for(G=-1,Y=D.length;++G<Y;)if(F=D.charCodeAt(G),48>F||F>57){U=(F===46?i+D.slice(G+1):D.slice(G))+U,D=D.slice(0,G);break}}}A&&!b&&(D=t(D,1/0));var I=B.length+D.length+U.length,W=I<S?new Array(S-I+1).join(g):"";switch(A&&b&&(D=t(W+D,W.length?S-U.length:1/0),W=""),v){case"<":D=B+D+U+W;break;case"=":D=B+W+D+U;break;case"^":D=W.slice(0,I=W.length>>1)+B+D+U+W.slice(I);break;default:D=W+B+D+U;break}return a(D)}return z.toString=function(){return p+""},z}function h(p,g){var v=f((p=Ku(p),p.type="f",p)),w=Math.max(-8,Math.min(8,Math.floor(ul(g)/3)))*3,x=Math.pow(10,-w),b=sR[8+w/3];return function(S){return v(x*S)+b}}return{format:f,formatPrefix:h}}var jh,Bj,U4;hte({thousands:",",grouping:[3],currency:["$",""]});function hte(e){return jh=dte(e),Bj=jh.format,U4=jh.formatPrefix,jh}function pte(e){return Math.max(0,-ul(Math.abs(e)))}function mte(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ul(t)/3)))*3-ul(Math.abs(e)))}function gte(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ul(t)-ul(e))+1}function q4(e,t,r,n){var i=t_(e,t,r),a;switch(n=Ku(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=mte(i,o))&&(n.precision=a),U4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=gte(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=pte(i))&&(n.precision=a-(n.type==="%")*2);break}}return Bj(n)}function Xa(e){var t=e.domain;return e.ticks=function(r){var n=t();return J1(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return q4(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],u,f,h=10;for(l<o&&(f=o,o=l,l=f,f=i,i=a,a=f);h-- >0;){if(f=e_(o,l,r),f===u)return n[i]=o,n[a]=l,t(n);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function Sp(){var e=$j();return e.copy=function(){return Wf(e,Sp())},jn.apply(e,arguments),Xa(e)}function W4(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,wp),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return W4(e).unknown(t)},e=arguments.length?Array.from(e,wp):[0,1],Xa(r)}function H4(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function lR(e){return Math.log(e)}function cR(e){return Math.exp(e)}function vte(e){return-Math.log(-e)}function yte(e){return-Math.exp(-e)}function xte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function bte(e){return e===10?xte:e===Math.E?Math.exp:t=>Math.pow(e,t)}function wte(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 uR(e){return(t,r)=>-e(-t,r)}function Fj(e){const t=e(lR,cR),r=t.domain;let n=10,i,a;function o(){return i=wte(n),a=bte(n),r()[0]<0?(i=uR(i),a=uR(a),e(vte,yte)):e(lR,cR),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const u=r();let f=u[0],h=u[u.length-1];const p=h<f;p&&([f,h]=[h,f]);let g=i(f),v=i(h),w,x;const b=l==null?10:+l;let S=[];if(!(n%1)&&v-g<b){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(w=1;w<n;++w)if(x=g<0?w/a(-g):w*a(g),!(x<f)){if(x>h)break;S.push(x)}}else for(;g<=v;++g)for(w=n-1;w>=1;--w)if(x=g>0?w/a(-g):w*a(g),!(x<f)){if(x>h)break;S.push(x)}S.length*2<b&&(S=J1(f,h,b))}else S=J1(g,v,Math.min(v-g,b)).map(a);return p?S.reverse():S},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Ku(u)).precision==null&&(u.trim=!0),u=Bj(u)),l===1/0)return u;const f=Math.max(1,n*l/t.ticks().length);return h=>{let p=h/a(Math.round(i(h)));return p*n<n-.5&&(p*=n),p<=f?u(h):""}},t.nice=()=>r(H4(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function K4(){const e=Fj(Xm()).domain([1,10]);return e.copy=()=>Wf(e,K4()).base(e.base()),jn.apply(e,arguments),e}function fR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function dR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zj(e){var t=1,r=e(fR(t),dR(t));return r.constant=function(n){return arguments.length?e(fR(t=+n),dR(t)):t},Xa(r)}function G4(){var e=zj(Xm());return e.copy=function(){return Wf(e,G4()).constant(e.constant())},jn.apply(e,arguments)}function hR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function _te(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ste(e){return e<0?-e*e:e*e}function Vj(e){var t=e(Or,Or),r=1;function n(){return r===1?e(Or,Or):r===.5?e(_te,Ste):e(hR(r),hR(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Xa(t)}function Uj(){var e=Vj(Xm());return e.copy=function(){return Wf(e,Uj()).exponent(e.exponent())},jn.apply(e,arguments),e}function jte(){return Uj.apply(null,arguments).exponent(.5)}function pR(e){return Math.sign(e)*e*e}function Pte(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Y4(){var e=$j(),t=[0,1],r=!1,n;function i(a){var o=Pte(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(pR(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,wp)).map(pR)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Y4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},jn.apply(i,arguments),Xa(i)}function X4(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=Cee(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Uf(r,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort($a),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return X4().domain(e).range(t).unknown(n)},jn.apply(a,arguments)}function Z4(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Uf(n,u,0,r)]:a}function l(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*t-(u-r)*e)/(r+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,l()):[e,t]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,l()):i.slice()},o.invertExtent=function(u){var f=i.indexOf(u);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Z4().domain([e,t]).range(i).unknown(a)},jn.apply(Xa(o),arguments)}function Q4(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Uf(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Q4().domain(e).range(t).unknown(r)},jn.apply(i,arguments)}const ew=new Date,tw=new Date;function Jt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let f;do u.push(f=new Date(+a)),t(a,l),e(a);while(f<a&&a<o);return u},i.filter=a=>Jt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(ew.setTime(+a),tw.setTime(+o),e(ew),e(tw),Math.floor(r(ew,tw))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const jp=Jt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Jt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):jp);jp.range;const Mi=1e3,mn=Mi*60,Ii=mn*60,Wi=Ii*24,qj=Wi*7,mR=Wi*30,rw=Wi*365,To=Jt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCSeconds());To.range;const Wj=Jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mi)},(e,t)=>{e.setTime(+e+t*mn)},(e,t)=>(t-e)/mn,e=>e.getMinutes());Wj.range;const Hj=Jt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mn)},(e,t)=>(t-e)/mn,e=>e.getUTCMinutes());Hj.range;const Kj=Jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mi-e.getMinutes()*mn)},(e,t)=>{e.setTime(+e+t*Ii)},(e,t)=>(t-e)/Ii,e=>e.getHours());Kj.range;const Gj=Jt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ii)},(e,t)=>(t-e)/Ii,e=>e.getUTCHours());Gj.range;const Hf=Jt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mn)/Wi,e=>e.getDate()-1);Hf.range;const Zm=Jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wi,e=>e.getUTCDate()-1);Zm.range;const J4=Jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wi,e=>Math.floor(e/Wi));J4.range;function ns(e){return Jt(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())*mn)/qj)}const Qm=ns(0),Pp=ns(1),Ate=ns(2),Nte=ns(3),fl=ns(4),Ote=ns(5),Ete=ns(6);Qm.range;Pp.range;Ate.range;Nte.range;fl.range;Ote.range;Ete.range;function is(e){return Jt(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)/qj)}const Jm=is(0),Ap=is(1),Cte=is(2),Tte=is(3),dl=is(4),kte=is(5),Rte=is(6);Jm.range;Ap.range;Cte.range;Tte.range;dl.range;kte.range;Rte.range;const Yj=Jt(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());Yj.range;const Xj=Jt(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());Xj.range;const Hi=Jt(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());Hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jt(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)});Hi.range;const Ki=Jt(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());Ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jt(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)});Ki.range;function eB(e,t,r,n,i,a){const o=[[To,1,Mi],[To,5,5*Mi],[To,15,15*Mi],[To,30,30*Mi],[a,1,mn],[a,5,5*mn],[a,15,15*mn],[a,30,30*mn],[i,1,Ii],[i,3,3*Ii],[i,6,6*Ii],[i,12,12*Ii],[n,1,Wi],[n,2,2*Wi],[r,1,qj],[t,1,mR],[t,3,3*mR],[e,1,rw]];function l(f,h,p){const g=h<f;g&&([f,h]=[h,f]);const v=p&&typeof p.range=="function"?p:u(f,h,p),w=v?v.range(f,+h+1):[];return g?w.reverse():w}function u(f,h,p){const g=Math.abs(h-f)/p,v=kj(([,,b])=>b).right(o,g);if(v===o.length)return e.every(t_(f/rw,h/rw,p));if(v===0)return jp.every(Math.max(t_(f,h,p),1));const[w,x]=o[g/o[v-1][2]<o[v][2]/g?v-1:v];return w.every(x)}return[l,u]}const[Mte,Ite]=eB(Ki,Xj,Jm,J4,Gj,Hj),[Dte,$te]=eB(Hi,Yj,Qm,Hf,Kj,Wj);function nw(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 iw(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 iu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Lte(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,f=au(i),h=ou(i),p=au(a),g=ou(a),v=au(o),w=ou(o),x=au(l),b=ou(l),S=au(u),A=ou(u),P={a:X,A:I,b:W,B:Q,c:null,d:wR,e:wR,f:sre,g:vre,G:xre,H:ire,I:are,j:ore,L:tB,m:lre,M:cre,p:L,q:K,Q:jR,s:PR,S:ure,u:fre,U:dre,V:hre,w:pre,W:mre,x:null,X:null,y:gre,Y:yre,Z:bre,"%":SR},C={a:ae,A:ue,b:xe,B:Ae,c:null,d:_R,e:_R,f:jre,g:Mre,G:Dre,H:wre,I:_re,j:Sre,L:nB,m:Pre,M:Are,p:oe,q:ge,Q:jR,s:PR,S:Nre,u:Ore,U:Ere,V:Cre,w:Tre,W:kre,x:null,X:null,y:Rre,Y:Ire,Z:$re,"%":SR},N={a:z,A:D,b:B,B:U,c:G,d:xR,e:xR,f:ere,g:yR,G:vR,H:bR,I:bR,j:Xte,L:Jte,m:Yte,M:Zte,p:M,q:Gte,Q:rre,s:nre,S:Qte,u:Ute,U:qte,V:Wte,w:Vte,W:Hte,x:Y,X:F,y:yR,Y:vR,Z:Kte,"%":tre};P.x=E(r,P),P.X=E(n,P),P.c=E(t,P),C.x=E(r,C),C.X=E(n,C),C.c=E(t,C);function E(ne,fe){return function(me){var re=[],We=-1,De=0,pt=ne.length,mt,Pt,Ur;for(me instanceof Date||(me=new Date(+me));++We<pt;)ne.charCodeAt(We)===37&&(re.push(ne.slice(De,We)),(Pt=gR[mt=ne.charAt(++We)])!=null?mt=ne.charAt(++We):Pt=mt==="e"?" ":"0",(Ur=fe[mt])&&(mt=Ur(me,Pt)),re.push(mt),De=We+1);return re.push(ne.slice(De,We)),re.join("")}}function T(ne,fe){return function(me){var re=iu(1900,void 0,1),We=k(re,ne,me+="",0),De,pt;if(We!=me.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(fe&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(De=iw(iu(re.y,0,1)),pt=De.getUTCDay(),De=pt>4||pt===0?Ap.ceil(De):Ap(De),De=Zm.offset(De,(re.V-1)*7),re.y=De.getUTCFullYear(),re.m=De.getUTCMonth(),re.d=De.getUTCDate()+(re.w+6)%7):(De=nw(iu(re.y,0,1)),pt=De.getDay(),De=pt>4||pt===0?Pp.ceil(De):Pp(De),De=Hf.offset(De,(re.V-1)*7),re.y=De.getFullYear(),re.m=De.getMonth(),re.d=De.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),pt="Z"in re?iw(iu(re.y,0,1)).getUTCDay():nw(iu(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(pt+5)%7:re.w+re.U*7-(pt+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,iw(re)):nw(re)}}function k(ne,fe,me,re){for(var We=0,De=fe.length,pt=me.length,mt,Pt;We<De;){if(re>=pt)return-1;if(mt=fe.charCodeAt(We++),mt===37){if(mt=fe.charAt(We++),Pt=N[mt in gR?fe.charAt(We++):mt],!Pt||(re=Pt(ne,me,re))<0)return-1}else if(mt!=me.charCodeAt(re++))return-1}return re}function M(ne,fe,me){var re=f.exec(fe.slice(me));return re?(ne.p=h.get(re[0].toLowerCase()),me+re[0].length):-1}function z(ne,fe,me){var re=v.exec(fe.slice(me));return re?(ne.w=w.get(re[0].toLowerCase()),me+re[0].length):-1}function D(ne,fe,me){var re=p.exec(fe.slice(me));return re?(ne.w=g.get(re[0].toLowerCase()),me+re[0].length):-1}function B(ne,fe,me){var re=S.exec(fe.slice(me));return re?(ne.m=A.get(re[0].toLowerCase()),me+re[0].length):-1}function U(ne,fe,me){var re=x.exec(fe.slice(me));return re?(ne.m=b.get(re[0].toLowerCase()),me+re[0].length):-1}function G(ne,fe,me){return k(ne,t,fe,me)}function Y(ne,fe,me){return k(ne,r,fe,me)}function F(ne,fe,me){return k(ne,n,fe,me)}function X(ne){return o[ne.getDay()]}function I(ne){return a[ne.getDay()]}function W(ne){return u[ne.getMonth()]}function Q(ne){return l[ne.getMonth()]}function L(ne){return i[+(ne.getHours()>=12)]}function K(ne){return 1+~~(ne.getMonth()/3)}function ae(ne){return o[ne.getUTCDay()]}function ue(ne){return a[ne.getUTCDay()]}function xe(ne){return u[ne.getUTCMonth()]}function Ae(ne){return l[ne.getUTCMonth()]}function oe(ne){return i[+(ne.getUTCHours()>=12)]}function ge(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var fe=E(ne+="",P);return fe.toString=function(){return ne},fe},parse:function(ne){var fe=T(ne+="",!1);return fe.toString=function(){return ne},fe},utcFormat:function(ne){var fe=E(ne+="",C);return fe.toString=function(){return ne},fe},utcParse:function(ne){var fe=T(ne+="",!0);return fe.toString=function(){return ne},fe}}}var gR={"-":"",_:" ",0:"0"},ir=/^\s*\d+/,Bte=/^%/,Fte=/[\\^$*+?|[\]().{}]/g;function ot(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function zte(e){return e.replace(Fte,"\\$&")}function au(e){return new RegExp("^(?:"+e.map(zte).join("|")+")","i")}function ou(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Vte(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ute(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function qte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Hte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function vR(e,t,r){var n=ir.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function yR(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Kte(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 Gte(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Yte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function xR(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Xte(e,t,r){var n=ir.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function bR(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Zte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Qte(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Jte(e,t,r){var n=ir.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ere(e,t,r){var n=ir.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function tre(e,t,r){var n=Bte.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function rre(e,t,r){var n=ir.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function nre(e,t,r){var n=ir.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function wR(e,t){return ot(e.getDate(),t,2)}function ire(e,t){return ot(e.getHours(),t,2)}function are(e,t){return ot(e.getHours()%12||12,t,2)}function ore(e,t){return ot(1+Hf.count(Hi(e),e),t,3)}function tB(e,t){return ot(e.getMilliseconds(),t,3)}function sre(e,t){return tB(e,t)+"000"}function lre(e,t){return ot(e.getMonth()+1,t,2)}function cre(e,t){return ot(e.getMinutes(),t,2)}function ure(e,t){return ot(e.getSeconds(),t,2)}function fre(e){var t=e.getDay();return t===0?7:t}function dre(e,t){return ot(Qm.count(Hi(e)-1,e),t,2)}function rB(e){var t=e.getDay();return t>=4||t===0?fl(e):fl.ceil(e)}function hre(e,t){return e=rB(e),ot(fl.count(Hi(e),e)+(Hi(e).getDay()===4),t,2)}function pre(e){return e.getDay()}function mre(e,t){return ot(Pp.count(Hi(e)-1,e),t,2)}function gre(e,t){return ot(e.getFullYear()%100,t,2)}function vre(e,t){return e=rB(e),ot(e.getFullYear()%100,t,2)}function yre(e,t){return ot(e.getFullYear()%1e4,t,4)}function xre(e,t){var r=e.getDay();return e=r>=4||r===0?fl(e):fl.ceil(e),ot(e.getFullYear()%1e4,t,4)}function bre(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ot(t/60|0,"0",2)+ot(t%60,"0",2)}function _R(e,t){return ot(e.getUTCDate(),t,2)}function wre(e,t){return ot(e.getUTCHours(),t,2)}function _re(e,t){return ot(e.getUTCHours()%12||12,t,2)}function Sre(e,t){return ot(1+Zm.count(Ki(e),e),t,3)}function nB(e,t){return ot(e.getUTCMilliseconds(),t,3)}function jre(e,t){return nB(e,t)+"000"}function Pre(e,t){return ot(e.getUTCMonth()+1,t,2)}function Are(e,t){return ot(e.getUTCMinutes(),t,2)}function Nre(e,t){return ot(e.getUTCSeconds(),t,2)}function Ore(e){var t=e.getUTCDay();return t===0?7:t}function Ere(e,t){return ot(Jm.count(Ki(e)-1,e),t,2)}function iB(e){var t=e.getUTCDay();return t>=4||t===0?dl(e):dl.ceil(e)}function Cre(e,t){return e=iB(e),ot(dl.count(Ki(e),e)+(Ki(e).getUTCDay()===4),t,2)}function Tre(e){return e.getUTCDay()}function kre(e,t){return ot(Ap.count(Ki(e)-1,e),t,2)}function Rre(e,t){return ot(e.getUTCFullYear()%100,t,2)}function Mre(e,t){return e=iB(e),ot(e.getUTCFullYear()%100,t,2)}function Ire(e,t){return ot(e.getUTCFullYear()%1e4,t,4)}function Dre(e,t){var r=e.getUTCDay();return e=r>=4||r===0?dl(e):dl.ceil(e),ot(e.getUTCFullYear()%1e4,t,4)}function $re(){return"+0000"}function SR(){return"%"}function jR(e){return+e}function PR(e){return Math.floor(+e/1e3)}var Is,aB,oB;Lre({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 Lre(e){return Is=Lte(e),aB=Is.format,Is.parse,oB=Is.utcFormat,Is.utcParse,Is}function Bre(e){return new Date(e)}function Fre(e){return e instanceof Date?+e:+new Date(+e)}function Zj(e,t,r,n,i,a,o,l,u,f){var h=$j(),p=h.invert,g=h.domain,v=f(".%L"),w=f(":%S"),x=f("%I:%M"),b=f("%I %p"),S=f("%a %d"),A=f("%b %d"),P=f("%B"),C=f("%Y");function N(E){return(u(E)<E?v:l(E)<E?w:o(E)<E?x:a(E)<E?b:n(E)<E?i(E)<E?S:A:r(E)<E?P:C)(E)}return h.invert=function(E){return new Date(p(E))},h.domain=function(E){return arguments.length?g(Array.from(E,Fre)):g().map(Bre)},h.ticks=function(E){var T=g();return e(T[0],T[T.length-1],E??10)},h.tickFormat=function(E,T){return T==null?N:f(T)},h.nice=function(E){var T=g();return(!E||typeof E.range!="function")&&(E=t(T[0],T[T.length-1],E??10)),E?g(H4(T,E)):h},h.copy=function(){return Wf(h,Zj(e,t,r,n,i,a,o,l,u,f))},h}function zre(){return jn.apply(Zj(Dte,$te,Hi,Yj,Qm,Hf,Kj,Wj,To,aB).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vre(){return jn.apply(Zj(Mte,Ite,Ki,Xj,Jm,Zm,Gj,Hj,To,oB).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function eg(){var e=0,t=1,r,n,i,a,o=Or,l=!1,u;function f(p){return p==null||isNaN(p=+p)?u:o(i===0?.5:(p=(a(p)-r)*i,l?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(p){return arguments.length?(l=!!p,f):l},f.interpolator=function(p){return arguments.length?(o=p,f):o};function h(p){return function(g){var v,w;return arguments.length?([v,w]=g,o=p(v,w),f):[o(0),o(1)]}}return f.range=h(Xl),f.rangeRound=h(Dj),f.unknown=function(p){return arguments.length?(u=p,f):u},function(p){return a=p,r=p(e),n=p(t),i=r===n?0:1/(n-r),f}}function Za(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sB(){var e=Xa(eg()(Or));return e.copy=function(){return Za(e,sB())},ra.apply(e,arguments)}function lB(){var e=Fj(eg()).domain([1,10]);return e.copy=function(){return Za(e,lB()).base(e.base())},ra.apply(e,arguments)}function cB(){var e=zj(eg());return e.copy=function(){return Za(e,cB()).constant(e.constant())},ra.apply(e,arguments)}function Qj(){var e=Vj(eg());return e.copy=function(){return Za(e,Qj()).exponent(e.exponent())},ra.apply(e,arguments)}function Ure(){return Qj.apply(null,arguments).exponent(.5)}function uB(){var e=[],t=Or;function r(n){if(n!=null&&!isNaN(n=+n))return t((Uf(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($a),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>Eee(e,a/n))},r.copy=function(){return uB(t).domain(e)},ra.apply(r,arguments)}function tg(){var e=0,t=.5,r=1,n=1,i,a,o,l,u,f=Or,h,p=!1,g;function v(x){return isNaN(x=+x)?g:(x=.5+((x=+h(x))-a)*(n*x<n*a?l:u),f(p?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([e,t,r]=x,i=h(e=+e),a=h(t=+t),o=h(r=+r),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,v):[e,t,r]},v.clamp=function(x){return arguments.length?(p=!!x,v):p},v.interpolator=function(x){return arguments.length?(f=x,v):f};function w(x){return function(b){var S,A,P;return arguments.length?([S,A,P]=b,f=tte(x,[S,A,P]),v):[f(0),f(.5),f(1)]}}return v.range=w(Xl),v.rangeRound=w(Dj),v.unknown=function(x){return arguments.length?(g=x,v):g},function(x){return h=x,i=x(e),a=x(t),o=x(r),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,v}}function fB(){var e=Xa(tg()(Or));return e.copy=function(){return Za(e,fB())},ra.apply(e,arguments)}function dB(){var e=Fj(tg()).domain([.1,1,10]);return e.copy=function(){return Za(e,dB()).base(e.base())},ra.apply(e,arguments)}function hB(){var e=zj(tg());return e.copy=function(){return Za(e,hB()).constant(e.constant())},ra.apply(e,arguments)}function Jj(){var e=Vj(tg());return e.copy=function(){return Za(e,Jj()).exponent(e.exponent())},ra.apply(e,arguments)}function qre(){return Jj.apply(null,arguments).exponent(.5)}const AR=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Uu,scaleDiverging:fB,scaleDivergingLog:dB,scaleDivergingPow:Jj,scaleDivergingSqrt:qre,scaleDivergingSymlog:hB,scaleIdentity:W4,scaleImplicit:r_,scaleLinear:Sp,scaleLog:K4,scaleOrdinal:Rj,scalePoint:ju,scalePow:Uj,scaleQuantile:X4,scaleQuantize:Z4,scaleRadial:Y4,scaleSequential:sB,scaleSequentialLog:lB,scaleSequentialPow:Qj,scaleSequentialQuantile:uB,scaleSequentialSqrt:Ure,scaleSequentialSymlog:cB,scaleSqrt:jte,scaleSymlog:G4,scaleThreshold:Q4,scaleTime:zre,scaleUtc:Vre,tickFormat:q4},Symbol.toStringTag,{value:"Module"}));var aw,NR;function rg(){if(NR)return aw;NR=1;var e=Hl();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var l=r[a],u=n(l);if(u!=null&&(f===void 0?u===u&&!e(u):i(u,f)))var f=u,h=l}return h}return aw=t,aw}var ow,OR;function pB(){if(OR)return ow;OR=1;function e(t,r){return t>r}return ow=e,ow}var sw,ER;function Wre(){if(ER)return sw;ER=1;var e=rg(),t=pB(),r=Gl();function n(i){return i&&i.length?e(i,r,t):void 0}return sw=n,sw}var Hre=Wre();const ng=ut(Hre);var lw,CR;function mB(){if(CR)return lw;CR=1;function e(t,r){return t<r}return lw=e,lw}var cw,TR;function Kre(){if(TR)return cw;TR=1;var e=rg(),t=mB(),r=Gl();function n(i){return i&&i.length?e(i,r,t):void 0}return cw=n,cw}var Gre=Kre();const ig=ut(Gre);var uw,kR;function Yre(){if(kR)return uw;kR=1;var e=pj(),t=yi(),r=S4(),n=Vr();function i(a,o){var l=n(a)?e:r;return l(a,t(o,3))}return uw=i,uw}var fw,RR;function Xre(){if(RR)return fw;RR=1;var e=w4(),t=Yre();function r(n,i){return e(t(n,i),1)}return fw=r,fw}var Zre=Xre();const Qre=ut(Zre);var dw,MR;function Jre(){if(MR)return dw;MR=1;var e=Nj();function t(r,n){return e(r,n)}return dw=t,dw}var ene=Jre();const ag=ut(ene);var Zl=1e9,tne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},tP,Ot=!0,_n="[DecimalError] ",$o=_n+"Invalid argument: ",eP=_n+"Exponent out of range: ",Ql=Math.floor,So=Math.pow,rne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Zr,nr=1e7,jt=7,gB=9007199254740991,Np=Ql(gB/jt),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,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*jt;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 Bi(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return vt(Bi(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return Ht(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,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Zr))throw Error(_n+"NaN");if(r.s<1)throw Error(_n+(r.s?"NaN":"-Infinity"));return r.eq(Zr)?new n(0):(Ot=!1,t=Bi(Gu(r,a),Gu(e,a),a),Ot=!0,vt(t,i))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xB(t,e):vB(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(_n+"NaN");return r.s?(Ot=!1,t=Bi(r,e,0,1).times(e),Ot=!0,r.minus(t)):vt(new n(r),i)};we.naturalExponential=we.exp=function(){return yB(this)};we.naturalLogarithm=we.ln=function(){return Gu(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?vB(t,e):xB(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($o+e);if(t=Ht(i)+1,n=i.d.length-1,r=n*jt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};we.squareRoot=we.sqrt=function(){var e,t,r,n,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(_n+"NaN")}for(e=Ht(l),Ot=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=ai(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ql((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(Bi(l,a,o+2)).times(.5),ai(a.d).slice(0,o)===(t=ai(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(vt(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return Ot=!0,vt(n,r)};we.times=we.mul=function(e){var t,r,n,i,a,o,l,u,f,h=this,p=h.constructor,g=h.d,v=(e=new p(e)).d;if(!h.s||!e.s)return new p(0);for(e.s*=h.s,r=h.e+e.e,u=g.length,f=v.length,u<f&&(a=g,g=v,v=a,o=u,u=f,f=o),a=[],o=u+f,n=o;n--;)a.push(0);for(n=f;--n>=0;){for(t=0,i=u+n;i>n;)l=a[i]+v[n]*g[i-n-1]+t,a[i--]=l%nr|0,t=l/nr|0;a[i]=(a[i]+t)%nr|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ot?vt(e,p.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(mi(e,0,Zl),t===void 0?t=n.rounding:mi(t,0,8),vt(r,e+Ht(r)+1,t))};we.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ho(n,!0):(mi(e,0,Zl),t===void 0?t=i.rounding:mi(t,0,8),n=vt(new i(n),e+1,t),r=Ho(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ho(i):(mi(e,0,Zl),t===void 0?t=a.rounding:mi(t,0,8),n=vt(new a(i),e+Ht(i)+1,t),r=Ho(n.abs(),!1,e+Ht(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return vt(new t(e),Ht(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,i,a,o,l=this,u=l.constructor,f=12,h=+(e=new u(e));if(!e.s)return new u(Zr);if(l=new u(l),!l.s){if(e.s<1)throw Error(_n+"Infinity");return l}if(l.eq(Zr))return l;if(n=u.precision,e.eq(Zr))return vt(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=h<0?-h:h)<=gB){for(i=new u(Zr),t=Math.ceil(n/jt+4),Ot=!1;r%2&&(i=i.times(l),DR(i.d,t)),r=Ql(r/2),r!==0;)l=l.times(l),DR(l.d,t);return Ot=!0,e.s<0?new u(Zr).div(i):vt(i,n)}}else if(a<0)throw Error(_n+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ot=!1,i=e.times(Gu(l,n+f)),Ot=!0,i=yB(i),i.s=a,i};we.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Ht(i),n=Ho(i,r<=a.toExpNeg||r>=a.toExpPos)):(mi(e,1,Zl),t===void 0?t=a.rounding:mi(t,0,8),i=vt(new a(i),e,t),r=Ht(i),n=Ho(i,e<=r||r<=a.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):(mi(e,1,Zl),t===void 0?t=n.rounding:mi(t,0,8)),vt(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=Ht(e),r=e.constructor;return Ho(e,t<=r.toExpNeg||t>=r.toExpPos)};function vB(e,t){var r,n,i,a,o,l,u,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),Ot?vt(t,p):t;if(u=e.d,f=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,l=f.length):(n=f,i=o,l=u.length),o=Math.ceil(p/jt),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=u.length,a=f.length,l-a<0&&(a=l,n=f,f=u,u=n),r=0;a;)r=(u[--a]=u[a]+f[a]+r)/nr|0,u[a]%=nr;for(r&&(u.unshift(r),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Ot?vt(t,p):t}function mi(e,t,r){if(e!==~~e||e<t||e>r)throw Error($o+e)}function ai(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=jt-n.length,r&&(a+=Ca(r)),a+=n;o=e[t],n=o+"",r=jt-n.length,r&&(a+=Ca(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Bi=function(){function e(n,i){var a,o=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+o,n[l]=a%nr|0,o=a/nr|0;return o&&n.unshift(o),n}function t(n,i,a,o){var l,u;if(a!=o)u=a>o?1:-1;else for(l=u=0;l<a;l++)if(n[l]!=i[l]){u=n[l]>i[l]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*nr+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var l,u,f,h,p,g,v,w,x,b,S,A,P,C,N,E,T,k,M=n.constructor,z=n.s==i.s?1:-1,D=n.d,B=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(_n+"Division by zero");for(u=n.e-i.e,T=B.length,N=D.length,v=new M(z),w=v.d=[],f=0;B[f]==(D[f]||0);)++f;if(B[f]>(D[f]||0)&&--u,a==null?A=a=M.precision:o?A=a+(Ht(n)-Ht(i))+1:A=a,A<0)return new M(0);if(A=A/jt+2|0,f=0,T==1)for(h=0,B=B[0],A++;(f<N||h)&&A--;f++)P=h*nr+(D[f]||0),w[f]=P/B|0,h=P%B|0;else{for(h=nr/(B[0]+1)|0,h>1&&(B=e(B,h),D=e(D,h),T=B.length,N=D.length),C=T,x=D.slice(0,T),b=x.length;b<T;)x[b++]=0;k=B.slice(),k.unshift(0),E=B[0],B[1]>=nr/2&&++E;do h=0,l=t(B,x,T,b),l<0?(S=x[0],T!=b&&(S=S*nr+(x[1]||0)),h=S/E|0,h>1?(h>=nr&&(h=nr-1),p=e(B,h),g=p.length,b=x.length,l=t(p,x,g,b),l==1&&(h--,r(p,T<g?k:B,g))):(h==0&&(l=h=1),p=B.slice()),g=p.length,g<b&&p.unshift(0),r(x,p,b),l==-1&&(b=x.length,l=t(B,x,T,b),l<1&&(h++,r(x,T<b?k:B,b))),b=x.length):l===0&&(h++,x=[0]),w[f++]=h,l&&x[0]?x[b++]=D[C]||0:(x=[D[C]],b=1);while((C++<N||x[0]!==void 0)&&A--)}return w[0]||w.shift(),v.e=u,vt(v,o?a+Ht(v)+1:a)}}();function yB(e,t){var r,n,i,a,o,l,u=0,f=0,h=e.constructor,p=h.precision;if(Ht(e)>16)throw Error(eP+Ht(e));if(!e.s)return new h(Zr);for(Ot=!1,l=p,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(n=Math.log(So(2,f))/Math.LN10*2+5|0,l+=n,r=i=a=new h(Zr),h.precision=l;;){if(i=vt(i.times(e),l),r=r.times(++u),o=a.plus(Bi(i,r,l)),ai(o.d).slice(0,l)===ai(a.d).slice(0,l)){for(;f--;)a=vt(a.times(a),l);return h.precision=p,t==null?(Ot=!0,vt(a,p)):a}a=o}}function Ht(e){for(var t=e.e*jt,r=e.d[0];r>=10;r/=10)t++;return t}function hw(e,t,r){if(t>e.LN10.sd())throw Ot=!0,r&&(e.precision=r),Error(_n+"LN10 precision limit exceeded");return vt(new e(e.LN10),t)}function Ca(e){for(var t="";e--;)t+="0";return t}function Gu(e,t){var r,n,i,a,o,l,u,f,h,p=1,g=10,v=e,w=v.d,x=v.constructor,b=x.precision;if(v.s<1)throw Error(_n+(v.s?"NaN":"-Infinity"));if(v.eq(Zr))return new x(0);if(t==null?(Ot=!1,f=b):f=t,v.eq(10))return t==null&&(Ot=!0),hw(x,f);if(f+=g,x.precision=f,r=ai(w),n=r.charAt(0),a=Ht(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=ai(v.d),n=r.charAt(0),p++;a=Ht(v),n>1?(v=new x("0."+r),a++):v=new x(n+"."+r.slice(1))}else return u=hw(x,f+2,b).times(a+""),v=Gu(new x(n+"."+r.slice(1)),f-g).plus(u),x.precision=b,t==null?(Ot=!0,vt(v,b)):v;for(l=o=v=Bi(v.minus(Zr),v.plus(Zr),f),h=vt(v.times(v),f),i=3;;){if(o=vt(o.times(h),f),u=l.plus(Bi(o,new x(i),f)),ai(u.d).slice(0,f)===ai(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(hw(x,f+2,b).times(a+""))),l=Bi(l,new x(p),f),x.precision=b,t==null?(Ot=!0,vt(l,b)):l;l=u,i+=2}}function IR(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ql(r/jt),e.d=[],n=(r+1)%jt,r<0&&(n+=jt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=jt;n<i;)e.d.push(+t.slice(n,n+=jt));t=t.slice(n),n=jt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ot&&(e.e>Np||e.e<-Np))throw Error(eP+r)}else e.s=0,e.e=0,e.d=[0];return e}function vt(e,t,r){var n,i,a,o,l,u,f,h,p=e.d;for(o=1,a=p[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=jt,i=t,f=p[h=0];else{if(h=Math.ceil((n+1)/jt),a=p.length,h>=a)return e;for(f=a=p[h],o=1;a>=10;a/=10)o++;n%=jt,i=n-jt+o}if(r!==void 0&&(a=So(10,o-i-1),l=f/a%10|0,u=t<0||p[h+1]!==void 0||f%a,u=r<4?(l||u)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||u||r==6&&(n>0?i>0?f/So(10,o-i):0:p[h-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return u?(a=Ht(e),p.length=1,t=t-a-1,p[0]=So(10,(jt-t%jt)%jt),e.e=Ql(-t/jt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=h,a=1,h--):(p.length=h+1,a=So(10,jt-n),p[h]=i>0?(f/So(10,o-i)%So(10,i)|0)*a:0),u)for(;;)if(h==0){(p[0]+=a)==nr&&(p[0]=1,++e.e);break}else{if(p[h]+=a,p[h]!=nr)break;p[h--]=0,a=1}for(n=p.length;p[--n]===0;)p.pop();if(Ot&&(e.e>Np||e.e<-Np))throw Error(eP+Ht(e));return e}function xB(e,t){var r,n,i,a,o,l,u,f,h,p,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Ot?vt(t,v):t;if(u=e.d,p=t.d,n=t.e,f=e.e,u=u.slice(),o=f-n,o){for(h=o<0,h?(r=u,o=-o,l=p.length):(r=p,n=f,l=u.length),i=Math.max(Math.ceil(v/jt),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,l=p.length,h=i<l,h&&(l=i),i=0;i<l;i++)if(u[i]!=p[i]){h=u[i]<p[i];break}o=0}for(h&&(r=u,u=p,p=r,t.s=-t.s),l=u.length,i=p.length-l;i>0;--i)u[l++]=0;for(i=p.length;i>o;){if(u[--i]<p[i]){for(a=i;a&&u[--a]===0;)u[a]=nr-1;--u[a],u[i]+=nr}u[i]-=p[i]}for(;u[--l]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,Ot?vt(t,v):t):new g(0)}function Ho(e,t,r){var n,i=Ht(e),a=ai(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Ca(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ca(-i-1)+a,r&&(n=r-o)>0&&(a+=Ca(n))):i>=o?(a+=Ca(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Ca(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Ca(n))),e.s<0?"-"+a:a}function DR(e,t){if(e.length>t)return e.length=t,!0}function bB(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error($o+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return IR(o,a.toString())}else if(typeof a!="string")throw Error($o+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,rne.test(a))IR(o,a);else throw Error($o+a)}if(i.prototype=we,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=bB,i.config=i.set=nne,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 i.config(e),i}function nne(e){if(!e||typeof e!="object")throw Error(_n+"Object expected");var t,r,n,i=["precision",1,Zl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Ql(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error($o+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error($o+r+": "+n);return this}var tP=bB(tne);Zr=new tP(1);const gt=tP;function ine(e){return lne(e)||sne(e)||one(e)||ane()}function ane(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function one(e,t){if(e){if(typeof e=="string")return o_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o_(e,t)}}function sne(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function lne(e){if(Array.isArray(e))return o_(e)}function o_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var cne=function(t){return t},wB={},_B=function(t){return t===wB},$R=function(t){return function r(){return arguments.length===0||arguments.length===1&&_B(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},une=function e(t,r){return t===1?r:$R(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==wB}).length;return o>=t?r.apply(void 0,i):e(t-o,$R(function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var h=i.map(function(p){return _B(p)?u.shift():p});return r.apply(void 0,ine(h).concat(u))}))})},og=function(t){return une(t.length,t)},s_=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},fne=og(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),dne=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return cne;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,u){return u(l)},a.apply(void 0,arguments))}},l_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},SB=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(l,u){return l===r[u]})||(r=a,n=t.apply(void 0,a)),n}};function hne(e){var t;return e===0?t=1:t=Math.floor(new gt(e).abs().log(10).toNumber())+1,t}function pne(e,t,r){for(var n=new gt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var mne=og(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),gne=og(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),vne=og(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const sg={rangeStep:pne,getDigitCount:hne,interpolateNumber:mne,uninterpolateNumber:gne,uninterpolateTruncation:vne};function c_(e){return bne(e)||xne(e)||jB(e)||yne()}function yne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xne(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function bne(e){if(Array.isArray(e))return u_(e)}function Yu(e,t){return Sne(e)||_ne(e,t)||jB(e,t)||wne()}function wne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jB(e,t){if(e){if(typeof e=="string")return u_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u_(e,t)}}function u_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _ne(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Sne(e){if(Array.isArray(e))return e}function PB(e){var t=Yu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function AB(e,t,r){if(e.lte(0))return new gt(0);var n=sg.getDigitCount(e.toNumber()),i=new gt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new gt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=l.mul(i);return t?u:new gt(Math.ceil(u))}function jne(e,t,r){var n=1,i=new gt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new gt(10).pow(sg.getDigitCount(e)-1),i=new gt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new gt(Math.floor(e)))}else e===0?i=new gt(Math.floor((t-1)/2)):r||(i=new gt(Math.floor(e)));var o=Math.floor((t-1)/2),l=dne(fne(function(u){return i.add(new gt(u-o).mul(n)).toNumber()}),s_);return l(0,t)}function NB(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new gt(0),tickMin:new gt(0),tickMax:new gt(0)};var a=AB(new gt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new gt(0):(o=new gt(e).add(t).div(2),o=o.sub(new gt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new gt(t).sub(o).div(a).toNumber()),f=l+u+1;return f>r?NB(e,t,r,n,i+1):(f<r&&(u=t>0?u+(r-f):u,l=t>0?l:l+(r-f)),{step:a,tickMin:o.sub(new gt(l).mul(a)),tickMax:o.add(new gt(u).mul(a))})}function Pne(e){var t=Yu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=PB([r,n]),u=Yu(l,2),f=u[0],h=u[1];if(f===-1/0||h===1/0){var p=h===1/0?[f].concat(c_(s_(0,i-1).map(function(){return 1/0}))):[].concat(c_(s_(0,i-1).map(function(){return-1/0})),[h]);return r>n?l_(p):p}if(f===h)return jne(f,i,a);var g=NB(f,h,o,a),v=g.step,w=g.tickMin,x=g.tickMax,b=sg.rangeStep(w,x.add(new gt(.1).mul(v)),v);return r>n?l_(b):b}function Ane(e,t){var r=Yu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=PB([n,i]),l=Yu(o,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[n,i];if(u===f)return[u];var h=Math.max(t,2),p=AB(new gt(f).sub(u).div(h-1),a,0),g=[].concat(c_(sg.rangeStep(new gt(u),new gt(f).sub(new gt(.99).mul(p)),p)),[f]);return n>i?l_(g):g}var Nne=SB(Pne),One=SB(Ane),Ene="Invariant failed";function Ko(e,t){throw new Error(Ene)}var Cne=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function hl(e){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(this,arguments)}function Tne(e,t){return Ine(e)||Mne(e,t)||Rne(e,t)||kne()}function kne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rne(e,t){if(e){if(typeof e=="string")return LR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LR(e,t)}}function LR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mne(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Ine(e){if(Array.isArray(e))return e}function Dne(e,t){if(e==null)return{};var r=$ne(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ne(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Lne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CB(n.key),n)}}function Fne(e,t,r){return t&&Bne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zne(e,t,r){return t=Ep(t),Vne(e,OB()?Reflect.construct(t,r||[],Ep(e).constructor):t.apply(e,r))}function Vne(e,t){if(t&&(hl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Une(e)}function Une(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OB=function(){return!!e})()}function Ep(e){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ep(e)}function qne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f_(e,t)}function f_(e,t){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},f_(e,t)}function EB(e,t,r){return t=CB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=Wne(e,"string");return hl(t)=="symbol"?t:t+""}function Wne(e,t){if(hl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lg=function(e){function t(){return Lne(this,t),zne(this,t,arguments)}return qne(t,e),Fne(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,l=n.dataKey,u=n.data,f=n.dataPointFormatter,h=n.xAxis,p=n.yAxis,g=Dne(n,Cne),v=Le(g,!1);this.props.direction==="x"&&h.type!=="number"&&Ko();var w=u.map(function(x){var b=f(x,l),S=b.x,A=b.y,P=b.value,C=b.errorVal;if(!C)return null;var N=[],E,T;if(Array.isArray(C)){var k=Tne(C,2);E=k[0],T=k[1]}else E=T=C;if(a==="vertical"){var M=h.scale,z=A+i,D=z+o,B=z-o,U=M(P-E),G=M(P+T);N.push({x1:G,y1:D,x2:G,y2:B}),N.push({x1:U,y1:z,x2:G,y2:z}),N.push({x1:U,y1:D,x2:U,y2:B})}else if(a==="horizontal"){var Y=p.scale,F=S+i,X=F-o,I=F+o,W=Y(P-E),Q=Y(P+T);N.push({x1:X,y1:Q,x2:I,y2:Q}),N.push({x1:F,y1:W,x2:F,y2:Q}),N.push({x1:X,y1:W,x2:I,y2:W})}return V.createElement(dt,Op({className:"recharts-errorBar",key:"bar-".concat(N.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},v),N.map(function(L){return V.createElement("line",Op({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return V.createElement(dt,{className:"recharts-errorBars"},w)}}])}(V.Component);EB(lg,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});EB(lg,"displayName","ErrorBar");function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function BR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BR(Object(r),!0).forEach(function(n){Hne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hne(e,t,r){return t=Kne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kne(e){var t=Gne(e,"string");return Xu(t)=="symbol"?t:t+""}function Gne(e,t){if(Xu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TB=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Yr(r,Da);if(!o)return null;var l=Da.defaultProps,u=l!==void 0?yo(yo({},l),o.props):{},f;return o.props&&o.props.payload?f=o.props&&o.props.payload:a==="children"?f=(n||[]).reduce(function(h,p){var g=p.item,v=p.props,w=v.sectors||v.data||[];return h.concat(w.map(function(x){return{type:o.props.iconType||g.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):f=(n||[]).map(function(h){var p=h.item,g=p.type.defaultProps,v=g!==void 0?yo(yo({},g),p.props):{},w=v.dataKey,x=v.name,b=v.legendType,S=v.hide;return{inactive:S,dataKey:w,type:u.iconType||b||"square",color:rP(p),value:x||w,payload:v}}),yo(yo(yo({},u),Da.getWithHeight(o,i)),{},{payload:f,item:o})};function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function FR(e){return Qne(e)||Zne(e)||Xne(e)||Yne()}function Yne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xne(e,t){if(e){if(typeof e=="string")return d_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d_(e,t)}}function Zne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qne(e){if(Array.isArray(e))return d_(e)}function d_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zR(Object(r),!0).forEach(function(n){rl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rl(e,t,r){return t=Jne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jne(e){var t=eie(e,"string");return Zu(t)=="symbol"?t:t+""}function eie(e,t){if(Zu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xr(e,t,r){return Ze(e)||Ze(t)?r:Qt(t)?Qr(e,t,r):Fe(t)?t(e):r}function Pu(e,t,r,n){var i=Qre(e,function(l){return xr(l,t)});if(r==="number"){var a=i.filter(function(l){return pe(l)||parseFloat(l)});return a.length?[ig(a),ng(a)]:[1/0,-1/0]}var o=n?i.filter(function(l){return!Ze(l)}):i;return o.map(function(l){return Qt(l)||l instanceof Date?l:""})}var tie=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,f=0;f<l;f++){var h=f>0?i[f-1].coordinate:i[l-1].coordinate,p=i[f].coordinate,g=f>=l-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(Ar(p-h)!==Ar(g-p)){var w=[];if(Ar(g-p)===Ar(u[1]-u[0])){v=g;var x=p+u[1]-u[0];w[0]=Math.min(x,(x+h)/2),w[1]=Math.max(x,(x+h)/2)}else{v=h;var b=g+u[1]-u[0];w[0]=Math.min(p,(b+p)/2),w[1]=Math.max(p,(b+p)/2)}var S=[Math.min(p,(v+p)/2),Math.max(p,(v+p)/2)];if(t>S[0]&&t<=S[1]||t>=w[0]&&t<=w[1]){o=i[f].index;break}}else{var A=Math.min(h,g),P=Math.max(h,g);if(t>(A+p)/2&&t<=(P+p)/2){o=i[f].index;break}}}else for(var C=0;C<l;C++)if(C===0&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C>0&&C<l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){o=n[C].index;break}return o},rP=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},rie=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,f=l.length;u<f;u++)for(var h=a[l[u]].stackGroups,p=Object.keys(h),g=0,v=p.length;g<v;g++){var w=h[p[g]],x=w.items,b=w.cateAxisId,S=x.filter(function(T){return Li(T.type).indexOf("Bar")>=0});if(S&&S.length){var A=S[0].type.defaultProps,P=A!==void 0?Lt(Lt({},A),S[0].props):S[0].props,C=P.barSize,N=P[b];o[N]||(o[N]=[]);var E=Ze(C)?r:C;o[N].push({item:S[0],stackList:S.slice(1),barSize:Ze(E)?void 0:Nr(E,n,0)})}}return o},nie=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var f=Nr(r,i,0,!0),h,p=[];if(o[0].barSize===+o[0].barSize){var g=!1,v=i/u,w=o.reduce(function(C,N){return C+N.barSize||0},0);w+=(u-1)*f,w>=i&&(w-=(u-1)*f,f=0),w>=i&&v>0&&(g=!0,v*=.9,w=u*v);var x=(i-w)/2>>0,b={offset:x-f,size:0};h=o.reduce(function(C,N){var E={item:N.item,position:{offset:b.offset+b.size+f,size:g?v:N.barSize}},T=[].concat(FR(C),[E]);return b=T[T.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){T.push({item:k,position:b})}),T},p)}else{var S=Nr(n,i,0,!0);i-2*S-(u-1)*f<=0&&(f=0);var A=(i-2*S-(u-1)*f)/u;A>1&&(A>>=0);var P=l===+l?Math.min(A,l):A;h=o.reduce(function(C,N,E){var T=[].concat(FR(C),[{item:N.item,position:{offset:S+(A+f)*E+(A-P)/2,size:P}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){T.push({item:k,position:T[T.length-1].position})}),T},p)}return h},iie=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,u=o-(l.left||0)-(l.right||0),f=TB({children:a,legendWidth:u});if(f){var h=i||{},p=h.width,g=h.height,v=f.align,w=f.verticalAlign,x=f.layout;if((x==="vertical"||x==="horizontal"&&w==="middle")&&v!=="center"&&pe(t[v]))return Lt(Lt({},t),{},rl({},v,t[v]+(p||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&w!=="middle"&&pe(t[w]))return Lt(Lt({},t),{},rl({},w,t[w]+(g||0)))}return t},aie=function(t,r,n){return Ze(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},kB=function(t,r,n,i,a){var o=r.props.children,l=gn(o,lg).filter(function(f){return aie(i,a,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,h){var p=xr(h,n);if(Ze(p))return f;var g=Array.isArray(p)?[ig(p),ng(p)]:[p,p],v=u.reduce(function(w,x){var b=xr(h,x,0),S=g[0]-Math.abs(Array.isArray(b)?b[0]:b),A=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(S,w[0]),Math.max(A,w[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},oie=function(t,r,n,i,a){var o=r.map(function(l){return kB(t,l,n,a,i)}).filter(function(l){return!Ze(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},RB=function(t,r,n,i,a){var o=r.map(function(u){var f=u.props.dataKey;return n==="number"&&f&&kB(t,u,f,i)||Pu(t,f,n,a)});if(n==="number")return o.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,f){for(var h=0,p=f.length;h<p;h++)l[f[h]]||(l[f[h]]=!0,u.push(f[h]));return u},[])},MB=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},IB=function(t,r,n,i){if(i)return t.map(function(u){return u.coordinate});var a,o,l=t.map(function(u){return u.coordinate===r&&(a=!0),u.coordinate===n&&(o=!0),u.coordinate});return a||l.push(r),o||l.push(n),l},Di=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(f=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Ar(l[0]-l[1])*2*f:f,r&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(p){var g=a?a.indexOf(p):p;return{coordinate:i(g)+f,value:p,offset:f}});return h.filter(function(p){return!Ff(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,g){return{coordinate:i(p)+f,value:p,index:g,offset:f}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+f,value:p,offset:f}}):i.domain().map(function(p,g){return{coordinate:i(p)+f,value:a?a[p]:p,index:g,offset:f}})},pw=new WeakMap,Ph=function(t,r){if(typeof r!="function")return t;pw.has(t)||pw.set(t,new WeakMap);var n=pw.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},DB=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Uu(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Sp(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ju(),realScaleType:"point"}:a==="category"?{scale:Uu(),realScaleType:"band"}:{scale:Sp(),realScaleType:"linear"};if(Uo(i)){var u="scale".concat(Vm(i));return{scale:(AR[u]||ju)(),realScaleType:AR[u]?u:"point"}}return Fe(i)?{scale:i}:{scale:ju(),realScaleType:"point"}},VR=1e-4,$B=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-VR,o=Math.max(i[0],i[1])+VR,l=t(r[0]),u=t(r[n-1]);(l<a||l>o||u<a||u>o)&&t.domain([r[0],r[n-1]])}},sie=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},lie=function(t,r){if(!r||r.length!==2||!pe(r[0])||!pe(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!pe(t[0])||t[0]<n)&&(a[0]=n),(!pe(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},cie=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,l=0;l<r;++l){var u=Ff(t[l][n][1])?t[l][n][0]:t[l][n][1];u>=0?(t[l][n][0]=a,t[l][n][1]=a+u,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+u,o=t[l][n][1])}},uie=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var l=Ff(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},fie={sign:cie,expand:QX,none:al,silhouette:JX,wiggle:eZ,positive:uie},die=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=fie[n],o=ZX().keys(i).value(function(l,u){return+xr(l,u,0)}).order(V1).offset(a);return o(t)},hie=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,u={},f=l.reduce(function(p,g){var v,w=(v=g.type)!==null&&v!==void 0&&v.defaultProps?Lt(Lt({},g.type.defaultProps),g.props):g.props,x=w.stackId,b=w.hide;if(b)return p;var S=w[n],A=p[S]||{hasStack:!1,stackGroups:{}};if(Qt(x)){var P=A.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};P.items.push(g),A.hasStack=!0,A.stackGroups[x]=P}else A.stackGroups[zf("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return Lt(Lt({},p),{},rl({},S,A))},u),h={};return Object.keys(f).reduce(function(p,g){var v=f[g];if(v.hasStack){var w={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,b){var S=v.stackGroups[b];return Lt(Lt({},x),{},rl({},b,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:die(t,S.items,a)}))},w)}return Lt(Lt({},p),{},rl({},g,v))},h)},LB=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=t.domain();if(!f.length)return null;var h=Nne(f,a,l);return t.domain([ig(h),ng(h)]),{niceTicks:h}}if(a&&i==="number"){var p=t.domain(),g=One(p,a,l);return{niceTicks:g}}return null},UR=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var u=xr(o,r.dataKey,r.domain[l]);return Ze(u)?null:r.scale(u)-a/2+i},pie=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},mie=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Qt(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},gie=function(t){return t.reduce(function(r,n){return[ig(n.concat([r[0]]).filter(pe)),ng(n.concat([r[1]]).filter(pe))]},[1/0,-1/0])},BB=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(f,h){var p=gie(h.slice(r,n+1));return[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},qR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,h_=function(t,r,n){if(Fe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(pe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(qR.test(t[0])){var a=+qR.exec(t[0])[1];i[0]=r[0]-a}else Fe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(pe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(WR.test(t[1])){var o=+WR.exec(t[1])[1];i[1]=r[1]+o}else Fe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Cp=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Ej(r,function(p){return p.coordinate}),o=1/0,l=1,u=a.length;l<u;l++){var f=a[l],h=a[l-1];o=Math.min((f.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},HR=function(t,r,n){return!t||!t.length||ag(t,Qr(n,"type.defaultProps.domain"))?r:t},FB=function(t,r){var n=t.type.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,l=n.formatter,u=n.tooltipType,f=n.chartType,h=n.hide;return Lt(Lt({},Le(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:rP(t),value:xr(r,i),type:u,payload:r,chartType:f,hide:h})};function Qu(e){"@babel/helpers - typeof";return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function KR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KR(Object(r),!0).forEach(function(n){zB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zB(e,t,r){return t=vie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vie(e){var t=yie(e,"string");return Qu(t)=="symbol"?t:t+""}function yie(e,t){if(Qu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xie(e,t){return Sie(e)||_ie(e,t)||wie(e,t)||bie()}function bie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wie(e,t){if(e){if(typeof e=="string")return GR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GR(e,t)}}function GR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _ie(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Sie(e){if(Array.isArray(e))return e}var Tp=Math.PI/180,jie=function(t){return t*180/Math.PI},wt=function(t,r,n,i){return{x:t+Math.cos(-Tp*i)*n,y:r+Math.sin(-Tp*i)*n}},VB=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},Pie=function(t,r,n,i,a){var o=t.width,l=t.height,u=t.startAngle,f=t.endAngle,h=Nr(t.cx,o,o/2),p=Nr(t.cy,l,l/2),g=VB(o,l,n),v=Nr(t.innerRadius,g,0),w=Nr(t.outerRadius,g,g*.8),x=Object.keys(r);return x.reduce(function(b,S){var A=r[S],P=A.domain,C=A.reversed,N;if(Ze(A.range))i==="angleAxis"?N=[u,f]:i==="radiusAxis"&&(N=[v,w]),C&&(N=[N[1],N[0]]);else{N=A.range;var E=N,T=xie(E,2);u=T[0],f=T[1]}var k=DB(A,a),M=k.realScaleType,z=k.scale;z.domain(P).range(N),$B(z);var D=LB(z,ki(ki({},A),{},{realScaleType:M})),B=ki(ki(ki({},A),D),{},{range:N,radius:w,realScaleType:M,scale:z,cx:h,cy:p,innerRadius:v,outerRadius:w,startAngle:u,endAngle:f});return ki(ki({},b),{},zB({},S,B))},{})},Aie=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},Nie=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,l=Aie({x:n,y:i},{x:a,y:o});if(l<=0)return{radius:l};var u=(n-a)/l,f=Math.acos(u);return i>o&&(f=2*Math.PI-f),{radius:l,angle:jie(f),angleInRadian:f}},Oie=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Eie=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},YR=function(t,r){var n=t.x,i=t.y,a=Nie({x:n,y:i},r),o=a.radius,l=a.angle,u=r.innerRadius,f=r.outerRadius;if(o<u||o>f)return!1;if(o===0)return!0;var h=Oie(r),p=h.startAngle,g=h.endAngle,v=l,w;if(p<=g){for(;v>g;)v-=360;for(;v<p;)v+=360;w=v>=p&&v<=g}else{for(;v>p;)v-=360;for(;v<g;)v+=360;w=v>=g&&v<=p}return w?ki(ki({},r),{},{radius:o,angle:Eie(v,r)}):null},UB=function(t){return!_.isValidElement(t)&&!Fe(t)&&typeof t!="boolean"?t.className:""};function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}var Cie=["offset"];function Tie(e){return Iie(e)||Mie(e)||Rie(e)||kie()}function kie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rie(e,t){if(e){if(typeof e=="string")return p_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(e,t)}}function Mie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Iie(e){if(Array.isArray(e))return p_(e)}function p_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Die(e,t){if(e==null)return{};var r=$ie(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function XR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XR(Object(r),!0).forEach(function(n){Lie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lie(e,t,r){return t=Bie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bie(e){var t=Fie(e,"string");return Ju(t)=="symbol"?t:t+""}function Fie(e,t){if(Ju(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ju(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ef(){return ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ef.apply(this,arguments)}var zie=function(t){var r=t.value,n=t.formatter,i=Ze(t.children)?r:t.children;return Fe(n)?n(i):i},Vie=function(t,r){var n=Ar(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Uie=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,u=a,f=u.cx,h=u.cy,p=u.innerRadius,g=u.outerRadius,v=u.startAngle,w=u.endAngle,x=u.clockWise,b=(p+g)/2,S=Vie(v,w),A=S>=0?1:-1,P,C;i==="insideStart"?(P=v+A*o,C=x):i==="insideEnd"?(P=w-A*o,C=!x):i==="end"&&(P=w+A*o,C=x),C=S<=0?C:!C;var N=wt(f,h,b,P),E=wt(f,h,b,P+(C?1:-1)*359),T="M".concat(N.x,",").concat(N.y,`
A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
`).concat(E.x,",").concat(E.y),k=Ze(t.id)?zf("recharts-radial-line-"):t.id;return V.createElement("text",ef({},n,{dominantBaseline:"central",className:He("recharts-radial-bar-label",l)}),V.createElement("defs",null,V.createElement("path",{id:k,d:T})),V.createElement("textPath",{xlinkHref:"#".concat(k)},r))},qie=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,u=a.innerRadius,f=a.outerRadius,h=a.startAngle,p=a.endAngle,g=(h+p)/2;if(i==="outside"){var v=wt(o,l,f+n,g),w=v.x,x=v.y;return{x:w,y:x,textAnchor:w>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(u+f)/2,S=wt(o,l,b,g),A=S.x,P=S.y;return{x:A,y:P,textAnchor:"middle",verticalAnchor:"middle"}},Wie=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,u=o.y,f=o.width,h=o.height,p=h>=0?1:-1,g=p*i,v=p>0?"end":"start",w=p>0?"start":"end",x=f>=0?1:-1,b=x*i,S=x>0?"end":"start",A=x>0?"start":"end";if(a==="top"){var P={x:l+f/2,y:u-p*i,textAnchor:"middle",verticalAnchor:v};return Xt(Xt({},P),n?{height:Math.max(u-n.y,0),width:f}:{})}if(a==="bottom"){var C={x:l+f/2,y:u+h+g,textAnchor:"middle",verticalAnchor:w};return Xt(Xt({},C),n?{height:Math.max(n.y+n.height-(u+h),0),width:f}:{})}if(a==="left"){var N={x:l-b,y:u+h/2,textAnchor:S,verticalAnchor:"middle"};return Xt(Xt({},N),n?{width:Math.max(N.x-n.x,0),height:h}:{})}if(a==="right"){var E={x:l+f+b,y:u+h/2,textAnchor:A,verticalAnchor:"middle"};return Xt(Xt({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:h}:{})}var T=n?{width:f,height:h}:{};return a==="insideLeft"?Xt({x:l+b,y:u+h/2,textAnchor:A,verticalAnchor:"middle"},T):a==="insideRight"?Xt({x:l+f-b,y:u+h/2,textAnchor:S,verticalAnchor:"middle"},T):a==="insideTop"?Xt({x:l+f/2,y:u+g,textAnchor:"middle",verticalAnchor:w},T):a==="insideBottom"?Xt({x:l+f/2,y:u+h-g,textAnchor:"middle",verticalAnchor:v},T):a==="insideTopLeft"?Xt({x:l+b,y:u+g,textAnchor:A,verticalAnchor:w},T):a==="insideTopRight"?Xt({x:l+f-b,y:u+g,textAnchor:S,verticalAnchor:w},T):a==="insideBottomLeft"?Xt({x:l+b,y:u+h-g,textAnchor:A,verticalAnchor:v},T):a==="insideBottomRight"?Xt({x:l+f-b,y:u+h-g,textAnchor:S,verticalAnchor:v},T):Kl(a)&&(pe(a.x)||Eo(a.x))&&(pe(a.y)||Eo(a.y))?Xt({x:l+Nr(a.x,f),y:u+Nr(a.y,h),textAnchor:"end",verticalAnchor:"end"},T):Xt({x:l+f/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},T)},Hie=function(t){return"cx"in t&&pe(t.cx)};function Zt(e){var t=e.offset,r=t===void 0?5:t,n=Die(e,Cie),i=Xt({offset:r},n),a=i.viewBox,o=i.position,l=i.value,u=i.children,f=i.content,h=i.className,p=h===void 0?"":h,g=i.textBreakAll;if(!a||Ze(l)&&Ze(u)&&!_.isValidElement(f)&&!Fe(f))return null;if(_.isValidElement(f))return _.cloneElement(f,i);var v;if(Fe(f)){if(v=_.createElement(f,i),_.isValidElement(v))return v}else v=zie(i);var w=Hie(a),x=Le(i,!0);if(w&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Uie(i,v,x);var b=w?qie(i):Wie(i);return V.createElement(Wo,ef({className:He("recharts-label",p)},x,b,{breakAll:g}),v)}Zt.displayName="Label";var qB=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,f=t.innerRadius,h=t.outerRadius,p=t.x,g=t.y,v=t.top,w=t.left,x=t.width,b=t.height,S=t.clockWise,A=t.labelViewBox;if(A)return A;if(pe(x)&&pe(b)){if(pe(p)&&pe(g))return{x:p,y:g,width:x,height:b};if(pe(v)&&pe(w))return{x:v,y:w,width:x,height:b}}return pe(p)&&pe(g)?{x:p,y:g,width:0,height:0}:pe(r)&&pe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:f||0,outerRadius:h||u||l||0,clockWise:S}:t.viewBox?t.viewBox:{}},Kie=function(t,r){return t?t===!0?V.createElement(Zt,{key:"label-implicit",viewBox:r}):Qt(t)?V.createElement(Zt,{key:"label-implicit",viewBox:r,value:t}):_.isValidElement(t)?t.type===Zt?_.cloneElement(t,{key:"label-implicit",viewBox:r}):V.createElement(Zt,{key:"label-implicit",content:t,viewBox:r}):Fe(t)?V.createElement(Zt,{key:"label-implicit",content:t,viewBox:r}):Kl(t)?V.createElement(Zt,ef({viewBox:r},t,{key:"label-implicit"})):null:null},Gie=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=qB(t),o=gn(i,Zt).map(function(u,f){return _.cloneElement(u,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return o;var l=Kie(t.label,r||a);return[l].concat(Tie(o))};Zt.parseViewBox=qB;Zt.renderCallByParent=Gie;var mw,ZR;function Yie(){if(ZR)return mw;ZR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return mw=e,mw}var Xie=Yie();const Zie=ut(Xie);function tf(e){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}var Qie=["valueAccessor"],Jie=["data","dataKey","clockWise","id","textBreakAll"];function eae(e){return iae(e)||nae(e)||rae(e)||tae()}function tae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rae(e,t){if(e){if(typeof e=="string")return m_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m_(e,t)}}function nae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iae(e){if(Array.isArray(e))return m_(e)}function m_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kp.apply(this,arguments)}function QR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QR(Object(r),!0).forEach(function(n){aae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aae(e,t,r){return t=oae(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oae(e){var t=sae(e,"string");return tf(t)=="symbol"?t:t+""}function sae(e,t){if(tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eM(e,t){if(e==null)return{};var r=lae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var cae=function(t){return Array.isArray(t.value)?Zie(t.value):t.value};function La(e){var t=e.valueAccessor,r=t===void 0?cae:t,n=eM(e,Qie),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,u=n.textBreakAll,f=eM(n,Jie);return!i||!i.length?null:V.createElement(dt,{className:"recharts-label-list"},i.map(function(h,p){var g=Ze(a)?r(h,p):xr(h&&h.payload,a),v=Ze(l)?{}:{id:"".concat(l,"-").concat(p)};return V.createElement(Zt,kp({},Le(h,!0),f,v,{parentViewBox:h.parentViewBox,value:g,textBreakAll:u,viewBox:Zt.parseViewBox(Ze(o)?h:JR(JR({},h),{},{clockWise:o})),key:"label-".concat(p),index:p}))}))}La.displayName="LabelList";function uae(e,t){return e?e===!0?V.createElement(La,{key:"labelList-implicit",data:t}):V.isValidElement(e)||Fe(e)?V.createElement(La,{key:"labelList-implicit",data:t,content:e}):Kl(e)?V.createElement(La,kp({data:t},e,{key:"labelList-implicit"})):null:null}function fae(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=gn(n,La).map(function(o,l){return _.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=uae(e.label,t);return[a].concat(eae(i))}La.renderCallByParent=fae;function rf(e){"@babel/helpers - typeof";return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g_.apply(this,arguments)}function tM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tM(Object(r),!0).forEach(function(n){dae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dae(e,t,r){return t=hae(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hae(e){var t=pae(e,"string");return rf(t)=="symbol"?t:t+""}function pae(e,t){if(rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mae=function(t,r){var n=Ar(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Ah=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,u=t.cornerRadius,f=t.cornerIsExternal,h=u*(l?1:-1)+i,p=Math.asin(u/h)/Tp,g=f?a:a+o*p,v=wt(r,n,h,g),w=wt(r,n,i,g),x=f?a-o*p:a,b=wt(r,n,h*Math.cos(p*Tp),x);return{center:v,circleTangency:w,lineTangency:b,theta:p}},WB=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,u=mae(o,l),f=o+u,h=wt(r,n,a,o),p=wt(r,n,a,f),g="M ".concat(h.x,",").concat(h.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(u)>180),",").concat(+(o>f),`,
`).concat(p.x,",").concat(p.y,`
`);if(i>0){var v=wt(r,n,i,o),w=wt(r,n,i,f);g+="L ".concat(w.x,",").concat(w.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(u)>180),",").concat(+(o<=f),`,
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},gae=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,p=Ar(h-f),g=Ah({cx:r,cy:n,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:u}),v=g.circleTangency,w=g.lineTangency,x=g.theta,b=Ah({cx:r,cy:n,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:u}),S=b.circleTangency,A=b.lineTangency,P=b.theta,C=u?Math.abs(f-h):Math.abs(f-h)-x-P;if(C<0)return l?"M ".concat(w.x,",").concat(w.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
`):WB({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:h});var N="M ".concat(w.x,",").concat(w.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(v.x,",").concat(v.y,`
A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(p<0),",").concat(S.x,",").concat(S.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,`
`);if(i>0){var E=Ah({cx:r,cy:n,radius:i,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),T=E.circleTangency,k=E.lineTangency,M=E.theta,z=Ah({cx:r,cy:n,radius:i,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),D=z.circleTangency,B=z.lineTangency,U=z.theta,G=u?Math.abs(f-h):Math.abs(f-h)-M-U;if(G<0&&o===0)return"".concat(N,"L").concat(r,",").concat(n,"Z");N+="L".concat(B.x,",").concat(B.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(D.x,",").concat(D.y,`
A`).concat(i,",").concat(i,",0,").concat(+(G>180),",").concat(+(p>0),",").concat(T.x,",").concat(T.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(k.x,",").concat(k.y,"Z")}else N+="L".concat(r,",").concat(n,"Z");return N},vae={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},HB=function(t){var r=rM(rM({},vae),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,f=r.cornerIsExternal,h=r.startAngle,p=r.endAngle,g=r.className;if(o<a||h===p)return null;var v=He("recharts-sector",g),w=o-a,x=Nr(l,w,0,!0),b;return x>0&&Math.abs(h-p)<360?b=gae({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(x,w/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:p}):b=WB({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),V.createElement("path",g_({},Le(r,!0),{className:v,d:b,role:"img"}))};function nf(e){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v_.apply(this,arguments)}function nM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(r),!0).forEach(function(n){yae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yae(e,t,r){return t=xae(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xae(e){var t=bae(e,"string");return nf(t)=="symbol"?t:t+""}function bae(e,t){if(nf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aM={curveBasisClosed:FX,curveBasisOpen:zX,curveBasis:BX,curveBumpX:PX,curveBumpY:AX,curveLinearClosed:VX,curveLinear:qm,curveMonotoneX:UX,curveMonotoneY:qX,curveNatural:WX,curveStep:HX,curveStepAfter:GX,curveStepBefore:KX},Nh=function(t){return t.x===+t.x&&t.y===+t.y},su=function(t){return t.x},lu=function(t){return t.y},wae=function(t,r){if(Fe(t))return t;var n="curve".concat(Vm(t));return(n==="curveMonotone"||n==="curveBump")&&r?aM["".concat(n).concat(r==="vertical"?"Y":"X")]:aM[n]||qm},_ae=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,u=t.connectNulls,f=u===void 0?!1:u,h=wae(n,l),p=f?a.filter(function(x){return Nh(x)}):a,g;if(Array.isArray(o)){var v=f?o.filter(function(x){return Nh(x)}):o,w=p.map(function(x,b){return iM(iM({},x),{},{base:v[b]})});return l==="vertical"?g=yh().y(lu).x1(su).x0(function(x){return x.base.x}):g=yh().x(su).y1(lu).y0(function(x){return x.base.y}),g.defined(Nh).curve(h),g(w)}return l==="vertical"&&pe(o)?g=yh().y(lu).x1(su).x0(o):pe(o)?g=yh().x(su).y1(lu).y0(o):g=q3().x(su).y(lu),g.defined(Nh).curve(h),g(p)},y_=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?_ae(t):i;return V.createElement("path",v_({},Le(t,!1),op(t),{className:He("recharts-curve",r),d:o,ref:a}))},gw={exports:{}},vw,oM;function Sae(){if(oM)return vw;oM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vw=e,vw}var yw,sM;function jae(){if(sM)return yw;sM=1;var e=Sae();function t(){}function r(){}return r.resetWarningCache=t,yw=function(){function n(o,l,u,f,h,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},yw}var lM;function Pae(){return lM||(lM=1,gw.exports=jae()()),gw.exports}var Aae=Pae();const lt=ut(Aae);var Nae=Object.getOwnPropertyNames,Oae=Object.getOwnPropertySymbols,Eae=Object.prototype.hasOwnProperty;function cM(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Oh(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),l=a.get(n);if(o&&l)return o===n&&l===r;a.set(r,n),a.set(n,r);var u=e(r,n,i);return a.delete(r),a.delete(n),u}}function uM(e){return Nae(e).concat(Oae(e))}var Cae=Object.hasOwn||function(e,t){return Eae.call(e,t)};function as(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Tae="__v",kae="__o",Rae="_owner",fM=Object.getOwnPropertyDescriptor,dM=Object.keys;function Mae(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Iae(e,t){return as(e.getTime(),t.getTime())}function Dae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function $ae(e,t){return e===t}function hM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,u=0;(o=a.next())&&!o.done;){for(var f=t.entries(),h=!1,p=0;(l=f.next())&&!l.done;){if(i[p]){p++;continue}var g=o.value,v=l.value;if(r.equals(g[0],v[0],u,p,e,t,r)&&r.equals(g[1],v[1],g[0],v[0],e,t,r)){h=i[p]=!0;break}p++}if(!h)return!1;u++}return!0}var Lae=as;function Bae(e,t,r){var n=dM(e),i=n.length;if(dM(t).length!==i)return!1;for(;i-- >0;)if(!KB(e,t,r,n[i]))return!1;return!0}function cu(e,t,r){var n=uM(e),i=n.length;if(uM(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!KB(e,t,r,a)||(o=fM(e,a),l=fM(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function Fae(e,t){return as(e.valueOf(),t.valueOf())}function zae(e,t){return e.source===t.source&&e.flags===t.flags}function pM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var u=t.values(),f=!1,h=0;(l=u.next())&&!l.done;){if(!i[h]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function Vae(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Uae(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function KB(e,t,r,n){return(n===Rae||n===kae||n===Tae)&&(e.$$typeof||t.$$typeof)?!0:Cae(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var qae="[object Arguments]",Wae="[object Boolean]",Hae="[object Date]",Kae="[object Error]",Gae="[object Map]",Yae="[object Number]",Xae="[object Object]",Zae="[object RegExp]",Qae="[object Set]",Jae="[object String]",eoe="[object URL]",toe=Array.isArray,mM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,gM=Object.assign,roe=Object.prototype.toString.call.bind(Object.prototype.toString);function noe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,f=e.areRegExpsEqual,h=e.areSetsEqual,p=e.areTypedArraysEqual,g=e.areUrlsEqual;return function(w,x,b){if(w===x)return!0;if(w==null||x==null)return!1;var S=typeof w;if(S!==typeof x)return!1;if(S!=="object")return S==="number"?o(w,x,b):S==="function"?i(w,x,b):!1;var A=w.constructor;if(A!==x.constructor)return!1;if(A===Object)return l(w,x,b);if(toe(w))return t(w,x,b);if(mM!=null&&mM(w))return p(w,x,b);if(A===Date)return r(w,x,b);if(A===RegExp)return f(w,x,b);if(A===Map)return a(w,x,b);if(A===Set)return h(w,x,b);var P=roe(w);return P===Hae?r(w,x,b):P===Zae?f(w,x,b):P===Gae?a(w,x,b):P===Qae?h(w,x,b):P===Xae?typeof w.then!="function"&&typeof x.then!="function"&&l(w,x,b):P===eoe?g(w,x,b):P===Kae?n(w,x,b):P===qae?l(w,x,b):P===Wae||P===Yae||P===Jae?u(w,x,b):!1}}function ioe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?cu:Mae,areDatesEqual:Iae,areErrorsEqual:Dae,areFunctionsEqual:$ae,areMapsEqual:n?cM(hM,cu):hM,areNumbersEqual:Lae,areObjectsEqual:n?cu:Bae,arePrimitiveWrappersEqual:Fae,areRegExpsEqual:zae,areSetsEqual:n?cM(pM,cu):pM,areTypedArraysEqual:n?cu:Vae,areUrlsEqual:Uae};if(r&&(i=gM({},i,r(i))),t){var a=Oh(i.areArraysEqual),o=Oh(i.areMapsEqual),l=Oh(i.areObjectsEqual),u=Oh(i.areSetsEqual);i=gM({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return i}function aoe(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function ooe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(u,f){var h=n(),p=h.cache,g=p===void 0?t?new WeakMap:void 0:p,v=h.meta;return r(u,f,{cache:g,equals:i,meta:v,strict:a})};if(t)return function(u,f){return r(u,f,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(u,f){return r(u,f,o)}}var soe=Qa();Qa({strict:!0});Qa({circular:!0});Qa({circular:!0,strict:!0});Qa({createInternalComparator:function(){return as}});Qa({strict:!0,createInternalComparator:function(){return as}});Qa({circular:!0,createInternalComparator:function(){return as}});Qa({circular:!0,createInternalComparator:function(){return as},strict:!0});function Qa(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=ioe(e),u=noe(l),f=n?n(u):aoe(u);return ooe({circular:r,comparator:u,createState:i,equals:f,strict:o})}function loe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function vM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):loe(i)};requestAnimationFrame(n)}function x_(e){"@babel/helpers - typeof";return x_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x_(e)}function coe(e){return hoe(e)||doe(e)||foe(e)||uoe()}function uoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function foe(e,t){if(e){if(typeof e=="string")return yM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yM(e,t)}}function yM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function doe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hoe(e){if(Array.isArray(e))return e}function poe(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,l=coe(o),u=l[0],f=l.slice(1);if(typeof u=="number"){vM(i.bind(null,f),u);return}i(u),vM(i.bind(null,f));return}x_(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function xM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(r),!0).forEach(function(n){GB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GB(e,t,r){return t=moe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function moe(e){var t=goe(e,"string");return af(t)==="symbol"?t:String(t)}function goe(e,t){if(af(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(af(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var voe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},yoe=function(t){return t},xoe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Au=function(t,r){return Object.keys(r).reduce(function(n,i){return bM(bM({},n),{},GB({},i,t(i,r[i])))},{})},wM=function(t,r,n){return t.map(function(i){return"".concat(xoe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function boe(e,t){return Soe(e)||_oe(e,t)||YB(e,t)||woe()}function woe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _oe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Soe(e){if(Array.isArray(e))return e}function joe(e){return Noe(e)||Aoe(e)||YB(e)||Poe()}function Poe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YB(e,t){if(e){if(typeof e=="string")return b_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b_(e,t)}}function Aoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Noe(e){if(Array.isArray(e))return b_(e)}function b_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Rp=1e-4,XB=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},ZB=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},_M=function(t,r){return function(n){var i=XB(t,r);return ZB(i,n)}},Ooe=function(t,r){return function(n){var i=XB(t,r),a=[].concat(joe(i.map(function(o,l){return o*l}).slice(1)),[0]);return ZB(a,n)}},SM=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var u=r[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var f=u[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),h=boe(f,4);i=h[0],a=h[1],o=h[2],l=h[3]}}}var p=_M(i,o),g=_M(a,l),v=Ooe(i,o),w=function(S){return S>1?1:S<0?0:S},x=function(S){for(var A=S>1?1:S,P=A,C=0;C<8;++C){var N=p(P)-A,E=v(P);if(Math.abs(N-A)<Rp||E<Rp)return g(P);P=w(P-N/E)}return g(P)};return x.isStepper=!1,x},Eoe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,u=function(h,p,g){var v=-(h-p)*n,w=g*a,x=g+(v-w)*l/1e3,b=g*l/1e3+h;return Math.abs(b-p)<Rp&&Math.abs(x)<Rp?[p,0]:[b,x]};return u.isStepper=!0,u.dt=l,u},Coe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return SM(i);case"spring":return Eoe();default:if(i.split("(")[0]==="cubic-bezier")return SM(i)}return typeof i=="function"?i:null};function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function jM(e){return Roe(e)||koe(e)||QB(e)||Toe()}function Toe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function koe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Roe(e){if(Array.isArray(e))return __(e)}function PM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(r),!0).forEach(function(n){w_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w_(e,t,r){return t=Moe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Moe(e){var t=Ioe(e,"string");return of(t)==="symbol"?t:String(t)}function Ioe(e,t){if(of(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(of(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Doe(e,t){return Boe(e)||Loe(e,t)||QB(e,t)||$oe()}function $oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QB(e,t){if(e){if(typeof e=="string")return __(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return __(e,t)}}function __(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Loe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Boe(e){if(Array.isArray(e))return e}var Mp=function(t,r,n){return t+(r-t)*n},S_=function(t){var r=t.from,n=t.to;return r!==n},Foe=function e(t,r,n){var i=Au(function(a,o){if(S_(o)){var l=t(o.from,o.to,o.velocity),u=Doe(l,2),f=u[0],h=u[1];return lr(lr({},o),{},{from:f,velocity:h})}return o},r);return n<1?Au(function(a,o){return S_(o)?lr(lr({},o),{},{velocity:Mp(o.velocity,i[a].velocity,n),from:Mp(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const zoe=function(e,t,r,n,i){var a=voe(e,t),o=a.reduce(function(b,S){return lr(lr({},b),{},w_({},S,[e[S],t[S]]))},{}),l=a.reduce(function(b,S){return lr(lr({},b),{},w_({},S,{from:e[S],velocity:0,to:t[S]}))},{}),u=-1,f,h,p=function(){return null},g=function(){return Au(function(S,A){return A.from},l)},v=function(){return!Object.values(l).filter(S_).length},w=function(S){f||(f=S);var A=S-f,P=A/r.dt;l=Foe(r,l,P),i(lr(lr(lr({},e),t),g())),f=S,v()||(u=requestAnimationFrame(p))},x=function(S){h||(h=S);var A=(S-h)/n,P=Au(function(N,E){return Mp.apply(void 0,jM(E).concat([r(A)]))},o);if(i(lr(lr(lr({},e),t),P)),A<1)u=requestAnimationFrame(p);else{var C=Au(function(N,E){return Mp.apply(void 0,jM(E).concat([r(1)]))},o);i(lr(lr(lr({},e),t),C))}};return p=r.isStepper?w:x,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(u)}}};function pl(e){"@babel/helpers - typeof";return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pl(e)}var Voe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Uoe(e,t){if(e==null)return{};var r=qoe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qoe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function xw(e){return Goe(e)||Koe(e)||Hoe(e)||Woe()}function Woe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hoe(e,t){if(e){if(typeof e=="string")return j_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j_(e,t)}}function Koe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Goe(e){if(Array.isArray(e))return j_(e)}function j_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AM(Object(r),!0).forEach(function(n){pu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pu(e,t,r){return t=JB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xoe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,JB(n.key),n)}}function Zoe(e,t,r){return t&&Xoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JB(e){var t=Qoe(e,"string");return pl(t)==="symbol"?t:String(t)}function Qoe(e,t){if(pl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Joe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P_(e,t)}function P_(e,t){return P_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},P_(e,t)}function ese(e){var t=tse();return function(){var n=Ip(e),i;if(t){var a=Ip(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return A_(this,i)}}function A_(e,t){if(t&&(pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N_(e)}function N_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tse(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ip(e){return Ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ip(e)}var Gi=function(e){Joe(r,e);var t=ese(r);function r(n,i){var a;Yoe(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,u=o.attributeName,f=o.from,h=o.to,p=o.steps,g=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(N_(a)),a.changeStyle=a.changeStyle.bind(N_(a)),!l||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:h}),A_(a);if(p&&p.length)a.state={style:p[0].style};else if(f){if(typeof g=="function")return a.state={style:f},A_(a);a.state={style:u?pu({},u,f):f}}else a.state={style:{}};return a}return Zoe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,u=a.attributeName,f=a.shouldReAnimate,h=a.to,p=a.from,g=this.state.style;if(l){if(!o){var v={style:u?pu({},u,h):h};this.state&&g&&(u&&g[u]!==h||!u&&g!==h)&&this.setState(v);return}if(!(soe(i.to,h)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=w||f?p:i.to;if(this.state&&g){var b={style:u?pu({},u,x):x};(u&&g[u]!==x||!u&&g!==x)&&this.setState(b)}this.runAnimation(In(In({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,u=i.duration,f=i.easing,h=i.begin,p=i.onAnimationEnd,g=i.onAnimationStart,v=zoe(o,l,Coe(f),u,this.changeStyle),w=function(){a.stopJSAnimation=v()};this.manager.start([g,h,w,u,p])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,f=o[0],h=f.style,p=f.duration,g=p===void 0?0:p,v=function(x,b,S){if(S===0)return x;var A=b.duration,P=b.easing,C=P===void 0?"ease":P,N=b.style,E=b.properties,T=b.onAnimationEnd,k=S>0?o[S-1]:b,M=E||Object.keys(N);if(typeof C=="function"||C==="spring")return[].concat(xw(x),[a.runJSAnimation.bind(a,{from:k.style,to:N,duration:A,easing:C}),A]);var z=wM(M,A,C),D=In(In(In({},k.style),N),{},{transition:z});return[].concat(xw(x),[D,A,T]).filter(yoe)};return this.manager.start([u].concat(xw(o.reduce(v,[h,Math.max(g,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=poe());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,f=i.easing,h=i.onAnimationStart,p=i.onAnimationEnd,g=i.steps,v=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var x=l?pu({},l,u):u,b=wM(Object.keys(x),o,f);w.start([h,a,In(In({},x),{},{transition:b}),o,p])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=Uoe(i,Voe),f=_.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var p=function(v){var w=v.props,x=w.style,b=x===void 0?{}:x,S=w.className,A=_.cloneElement(v,In(In({},u),{},{style:In(In({},b),h),className:S}));return A};return f===1?p(_.Children.only(a)):V.createElement("div",null,_.Children.map(a,function(g){return p(g)}))}}]),r}(_.PureComponent);Gi.displayName="Animate";Gi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Gi.propTypes={from:lt.oneOfType([lt.object,lt.string]),to:lt.oneOfType([lt.object,lt.string]),attributeName:lt.string,duration:lt.number,begin:lt.number,easing:lt.oneOfType([lt.string,lt.func]),steps:lt.arrayOf(lt.shape({duration:lt.number.isRequired,style:lt.object.isRequired,easing:lt.oneOfType([lt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),lt.func]),properties:lt.arrayOf("string"),onAnimationEnd:lt.func})),children:lt.oneOfType([lt.node,lt.func]),isActive:lt.bool,canBegin:lt.bool,onAnimationEnd:lt.func,shouldReAnimate:lt.bool,onAnimationStart:lt.func,onAnimationReStart:lt.func};function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(this,arguments)}function rse(e,t){return ose(e)||ase(e,t)||ise(e,t)||nse()}function nse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ise(e,t){if(e){if(typeof e=="string")return NM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NM(e,t)}}function NM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ase(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function ose(e){if(Array.isArray(e))return e}function OM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OM(Object(r),!0).forEach(function(n){sse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sse(e,t,r){return t=lse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lse(e){var t=cse(e,"string");return sf(t)=="symbol"?t:t+""}function cse(e,t){if(sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CM=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,u=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,h;if(o>0&&a instanceof Array){for(var p=[0,0,0,0],g=0,v=4;g<v;g++)p[g]=a[g]>o?o:a[g];h="M".concat(t,",").concat(r+l*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(t+u*p[0],",").concat(r)),h+="L ".concat(t+n-u*p[1],",").concat(r),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`,
`).concat(t+n,",").concat(r+l*p[1])),h+="L ".concat(t+n,",").concat(r+i-l*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`,
`).concat(t+n-u*p[2],",").concat(r+i)),h+="L ".concat(t+u*p[3],",").concat(r+i),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`,
`).concat(t,",").concat(r+i-l*p[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var w=Math.min(o,a);h="M ".concat(t,",").concat(r+l*w,`
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+u*w,",").concat(r,`
L `).concat(t+n-u*w,",").concat(r,`
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n,",").concat(r+l*w,`
L `).concat(t+n,",").concat(r+i-l*w,`
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n-u*w,",").concat(r+i,`
L `).concat(t+u*w,",").concat(r+i,`
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t,",").concat(r+i-l*w," Z")}else h="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return h},use=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,u=r.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),p=Math.min(o,o+u),g=Math.max(o,o+u);return n>=f&&n<=h&&i>=p&&i<=g}return!1},fse={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nP=function(t){var r=EM(EM({},fse),t),n=_.useRef(),i=_.useState(-1),a=rse(i,2),o=a[0],l=a[1];_.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var C=n.current.getTotalLength();C&&l(C)}catch{}},[]);var u=r.x,f=r.y,h=r.width,p=r.height,g=r.radius,v=r.className,w=r.animationEasing,x=r.animationDuration,b=r.animationBegin,S=r.isAnimationActive,A=r.isUpdateAnimationActive;if(u!==+u||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var P=He("recharts-rectangle",v);return A?V.createElement(Gi,{canBegin:o>0,from:{width:h,height:p,x:u,y:f},to:{width:h,height:p,x:u,y:f},duration:x,animationEasing:w,isActive:A},function(C){var N=C.width,E=C.height,T=C.x,k=C.y;return V.createElement(Gi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,isActive:S,easing:w},V.createElement("path",Dp({},Le(r,!0),{className:P,d:CM(T,k,N,E,g),ref:n})))}):V.createElement("path",Dp({},Le(r,!0),{className:P,d:CM(u,f,h,p,g)}))},dse=["points","className","baseLinePoints","connectNulls"];function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ws.apply(this,arguments)}function hse(e,t){if(e==null)return{};var r=pse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function TM(e){return yse(e)||vse(e)||gse(e)||mse()}function mse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gse(e,t){if(e){if(typeof e=="string")return O_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O_(e,t)}}function vse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yse(e){if(Array.isArray(e))return O_(e)}function O_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var kM=function(t){return t&&t.x===+t.x&&t.y===+t.y},xse=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){kM(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),kM(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Nu=function(t,r){var n=xse(t);r&&(n=[n.reduce(function(a,o){return[].concat(TM(a),TM(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,l,u){return"".concat(o).concat(u===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},bse=function(t,r,n){var i=Nu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Nu(r.reverse(),n).slice(1))},wse=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=hse(t,dse);if(!r||!r.length)return null;var l=He("recharts-polygon",n);if(i&&i.length){var u=o.stroke&&o.stroke!=="none",f=bse(r,i,a);return V.createElement("g",{className:l},V.createElement("path",Ws({},Le(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:f})),u?V.createElement("path",Ws({},Le(o,!0),{fill:"none",d:Nu(r,a)})):null,u?V.createElement("path",Ws({},Le(o,!0),{fill:"none",d:Nu(i,a)})):null)}var h=Nu(r,a);return V.createElement("path",Ws({},Le(o,!0),{fill:h.slice(-1)==="Z"?o.fill:"none",className:l,d:h}))};function E_(){return E_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E_.apply(this,arguments)}var iP=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=He("recharts-dot",a);return r===+r&&n===+n&&i===+i?V.createElement("circle",E_({},Le(t,!1),op(t),{className:o,cx:r,cy:n,r:i})):null};function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}var _se=["x","y","top","left","width","height","className"];function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C_.apply(this,arguments)}function RM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sse(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RM(Object(r),!0).forEach(function(n){jse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jse(e,t,r){return t=Pse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pse(e){var t=Ase(e,"string");return lf(t)=="symbol"?t:t+""}function Ase(e,t){if(lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nse(e,t){if(e==null)return{};var r=Ose(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ose(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ese=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Cse=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,f=u===void 0?0:u,h=t.width,p=h===void 0?0:h,g=t.height,v=g===void 0?0:g,w=t.className,x=Nse(t,_se),b=Sse({x:n,y:a,top:l,left:f,width:p,height:v},x);return!pe(n)||!pe(a)||!pe(p)||!pe(v)||!pe(l)||!pe(f)?null:V.createElement("path",C_({},Le(b,!0),{className:He("recharts-cross",w),d:Ese(n,a,p,v,l,f)}))},bw,MM;function Tse(){if(MM)return bw;MM=1;var e=rg(),t=pB(),r=yi();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return bw=n,bw}var kse=Tse();const Rse=ut(kse);var ww,IM;function Mse(){if(IM)return ww;IM=1;var e=rg(),t=yi(),r=mB();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return ww=n,ww}var Ise=Mse();const Dse=ut(Ise);var $se=["cx","cy","angle","ticks","axisLine"],Lse=["ticks","tick","angle","tickFormatter","stroke"];function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ou.apply(this,arguments)}function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(r),!0).forEach(function(n){cg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $M(e,t){if(e==null)return{};var r=Bse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tF(n.key),n)}}function zse(e,t,r){return t&&LM(e.prototype,t),r&&LM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vse(e,t,r){return t=$p(t),Use(e,eF()?Reflect.construct(t,r||[],$p(e).constructor):t.apply(e,r))}function Use(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qse(e)}function qse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eF=function(){return!!e})()}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$p(e)}function Wse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T_(e,t)}function T_(e,t){return T_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},T_(e,t)}function cg(e,t,r){return t=tF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tF(e){var t=Hse(e,"string");return ml(t)=="symbol"?t:t+""}function Hse(e,t){if(ml(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ug=function(e){function t(){return Fse(this,t),Vse(this,t,arguments)}return Wse(t,e),zse(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,l=a.cx,u=a.cy;return wt(l,u,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,l=n.ticks,u=Rse(l,function(h){return h.coordinate||0}),f=Dse(l,function(h){return h.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:f.coordinate||0,outerRadius:u.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,l=n.ticks,u=n.axisLine,f=$M(n,$se),h=l.reduce(function(w,x){return[Math.min(w[0],x.coordinate),Math.max(w[1],x.coordinate)]},[1/0,-1/0]),p=wt(i,a,h[0],o),g=wt(i,a,h[1],o),v=xo(xo(xo({},Le(f,!1)),{},{fill:"none"},Le(u,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return V.createElement("line",Ou({className:"recharts-polar-radius-axis-line"},v))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,l=i.angle,u=i.tickFormatter,f=i.stroke,h=$M(i,Lse),p=this.getTickTextAnchor(),g=Le(h,!1),v=Le(o,!1),w=a.map(function(x,b){var S=n.getTickValueCoord(x),A=xo(xo(xo(xo({textAnchor:p,transform:"rotate(".concat(90-l,", ").concat(S.x,", ").concat(S.y,")")},g),{},{stroke:"none",fill:f},v),{},{index:b},S),{},{payload:x});return V.createElement(dt,Ou({className:He("recharts-polar-radius-axis-tick",UB(o)),key:"tick-".concat(x.coordinate)},qo(n.props,x,b)),t.renderTickItem(o,A,u?u(x.value,b):x.value))});return V.createElement(dt,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:V.createElement(dt,{className:He("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Zt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return V.isValidElement(n)?o=V.cloneElement(n,i):Fe(n)?o=n(i):o=V.createElement(Wo,Ou({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(_.PureComponent);cg(ug,"displayName","PolarRadiusAxis");cg(ug,"axisType","radiusAxis");cg(ug,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function gl(e){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Po.apply(this,arguments)}function BM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(r),!0).forEach(function(n){fg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nF(n.key),n)}}function Gse(e,t,r){return t&&FM(e.prototype,t),r&&FM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yse(e,t,r){return t=Lp(t),Xse(e,rF()?Reflect.construct(t,r||[],Lp(e).constructor):t.apply(e,r))}function Xse(e,t){if(t&&(gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zse(e)}function Zse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rF=function(){return!!e})()}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lp(e)}function Qse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k_(e,t)}function k_(e,t){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},k_(e,t)}function fg(e,t,r){return t=nF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=Jse(e,"string");return gl(t)=="symbol"?t:t+""}function Jse(e,t){if(gl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ele=Math.PI/180,tle=1e-5,dg=function(e){function t(){return Kse(this,t),Yse(this,t,arguments)}return Qse(t,e),Gse(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,l=i.radius,u=i.orientation,f=i.tickSize,h=f||8,p=wt(a,o,l,n.coordinate),g=wt(a,o,l+(u==="inner"?-1:1)*h,n.coordinate);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*ele),o;return a>tle?o=i==="outer"?"start":"end":a<-1e-5?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,l=n.axisLine,u=n.axisLineType,f=bo(bo({},Le(this.props,!1)),{},{fill:"none"},Le(l,!1));if(u==="circle")return V.createElement(iP,Po({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:o}));var h=this.props.ticks,p=h.map(function(g){return wt(i,a,o,g.coordinate)});return V.createElement(wse,Po({className:"recharts-polar-angle-axis-line"},f,{points:p}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,l=i.tickLine,u=i.tickFormatter,f=i.stroke,h=Le(this.props,!1),p=Le(o,!1),g=bo(bo({},h),{},{fill:"none"},Le(l,!1)),v=a.map(function(w,x){var b=n.getTickLineCoord(w),S=n.getTickTextAnchor(w),A=bo(bo(bo({textAnchor:S},h),{},{stroke:"none",fill:f},p),{},{index:x,payload:w,x:b.x2,y:b.y2});return V.createElement(dt,Po({className:He("recharts-polar-angle-axis-tick",UB(o)),key:"tick-".concat(w.coordinate)},qo(n.props,w,x)),l&&V.createElement("line",Po({className:"recharts-polar-angle-axis-tick-line"},g,b)),o&&t.renderTickItem(o,A,u?u(w.value,x):w.value))});return V.createElement(dt,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:V.createElement(dt,{className:He("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return V.isValidElement(n)?o=V.cloneElement(n,i):Fe(n)?o=n(i):o=V.createElement(Wo,Po({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(_.PureComponent);fg(dg,"displayName","PolarAngleAxis");fg(dg,"axisType","angleAxis");fg(dg,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var _w,zM;function rle(){if(zM)return _w;zM=1;var e=h4(),t=e(Object.getPrototypeOf,Object);return _w=t,_w}var Sw,VM;function nle(){if(VM)return Sw;VM=1;var e=ea(),t=rle(),r=ta(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,u=o.call(Object);function f(h){if(!r(h)||e(h)!=n)return!1;var p=t(h);if(p===null)return!0;var g=l.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&o.call(g)==u}return Sw=f,Sw}var ile=nle();const ale=ut(ile);var jw,UM;function ole(){if(UM)return jw;UM=1;var e=ea(),t=ta(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return jw=n,jw}var sle=ole();const lle=ut(sle);function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}function cle(e,t){return hle(e)||dle(e,t)||fle(e,t)||ule()}function ule(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fle(e,t){if(e){if(typeof e=="string")return qM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qM(e,t)}}function qM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hle(e){if(Array.isArray(e))return e}function WM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function HM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WM(Object(r),!0).forEach(function(n){ple(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ple(e,t,r){return t=mle(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mle(e){var t=gle(e,"string");return cf(t)=="symbol"?t:t+""}function gle(e,t){if(cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KM=function(t,r,n,i,a){var o=n-i,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-o/2,",").concat(r+a),l+="L ".concat(t+n-o/2-i,",").concat(r+a),l+="L ".concat(t,",").concat(r," Z"),l},vle={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yle=function(t){var r=HM(HM({},vle),t),n=_.useRef(),i=_.useState(-1),a=cle(i,2),o=a[0],l=a[1];_.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var P=n.current.getTotalLength();P&&l(P)}catch{}},[]);var u=r.x,f=r.y,h=r.upperWidth,p=r.lowerWidth,g=r.height,v=r.className,w=r.animationEasing,x=r.animationDuration,b=r.animationBegin,S=r.isUpdateAnimationActive;if(u!==+u||f!==+f||h!==+h||p!==+p||g!==+g||h===0&&p===0||g===0)return null;var A=He("recharts-trapezoid",v);return S?V.createElement(Gi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:g,x:u,y:f},to:{upperWidth:h,lowerWidth:p,height:g,x:u,y:f},duration:x,animationEasing:w,isActive:S},function(P){var C=P.upperWidth,N=P.lowerWidth,E=P.height,T=P.x,k=P.y;return V.createElement(Gi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,easing:w},V.createElement("path",Bp({},Le(r,!0),{className:A,d:KM(T,k,C,N,E),ref:n})))}):V.createElement("g",null,V.createElement("path",Bp({},Le(r,!0),{className:A,d:KM(u,f,h,p,g)})))},xle=["option","shapeType","propTransformer","activeClassName","isActive"];function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function ble(e,t){if(e==null)return{};var r=wle(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(r),!0).forEach(function(n){_le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _le(e,t,r){return t=Sle(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sle(e){var t=jle(e,"string");return uf(t)=="symbol"?t:t+""}function jle(e,t){if(uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ple(e,t){return Fp(Fp({},t),e)}function Ale(e,t){return e==="symbols"}function YM(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return V.createElement(nP,r);case"trapezoid":return V.createElement(yle,r);case"sector":return V.createElement(HB,r);case"symbols":if(Ale(t))return V.createElement(wj,r);break;default:return null}}function Nle(e){return _.isValidElement(e)?e.props:e}function iF(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Ple:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=ble(e,xle),f;if(_.isValidElement(t))f=_.cloneElement(t,Fp(Fp({},u),Nle(t)));else if(Fe(t))f=t(u);else if(ale(t)&&!lle(t)){var h=i(t,u);f=V.createElement(YM,{shapeType:r,elementProps:h})}else{var p=u;f=V.createElement(YM,{shapeType:r,elementProps:p})}return l?V.createElement(dt,{className:o},f):f}function hg(e,t){return t!=null&&"trapezoids"in e.props}function pg(e,t){return t!=null&&"sectors"in e.props}function ff(e,t){return t!=null&&"points"in e.props}function Ole(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function Ele(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Cle(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Tle(e,t){var r;return hg(e,t)?r=Ole:pg(e,t)?r=Ele:ff(e,t)&&(r=Cle),r}function kle(e,t){var r;return hg(e,t)?r="trapezoids":pg(e,t)?r="sectors":ff(e,t)&&(r="points"),r}function Rle(e,t){if(hg(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(pg(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ff(e,t)?t.payload:{}}function Mle(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=kle(r,t),a=Rle(r,t),o=n.filter(function(u,f){var h=ag(a,u),p=r.props[i].filter(function(w){var x=Tle(r,t);return x(w,t)}),g=r.props[i].indexOf(p[p.length-1]),v=f===g;return h&&v}),l=n.indexOf(o[o.length-1]);return l}var Hh;function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hs.apply(this,arguments)}function XM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(r),!0).forEach(function(n){pn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ile(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oF(n.key),n)}}function Dle(e,t,r){return t&&ZM(e.prototype,t),r&&ZM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $le(e,t,r){return t=zp(t),Lle(e,aF()?Reflect.construct(t,r||[],zp(e).constructor):t.apply(e,r))}function Lle(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ble(e)}function Ble(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aF=function(){return!!e})()}function zp(e){return zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zp(e)}function Fle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},R_(e,t)}function pn(e,t,r){return t=oF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oF(e){var t=zle(e,"string");return vl(t)=="symbol"?t:t+""}function zle(e,t){if(vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var na=function(e){function t(r){var n;return Ile(this,t),n=$le(this,t,[r]),pn(n,"pieRef",null),pn(n,"sectorRefs",[]),pn(n,"id",zf("recharts-pie-")),pn(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Fe(i)&&i()}),pn(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Fe(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return Fle(t,e),Dle(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,l=a.labelLine,u=a.dataKey,f=a.valueKey,h=Le(this.props,!1),p=Le(o,!1),g=Le(l,!1),v=o&&o.offsetRadius||20,w=n.map(function(x,b){var S=(x.startAngle+x.endAngle)/2,A=wt(x.cx,x.cy,x.outerRadius+v,S),P=xt(xt(xt(xt({},h),x),{},{stroke:"none"},p),{},{index:b,textAnchor:t.getTextAnchor(A.x,x.cx)},A),C=xt(xt(xt(xt({},h),x),{},{fill:"none",stroke:x.fill},g),{},{index:b,points:[wt(x.cx,x.cy,x.outerRadius,S),A]}),N=u;return Ze(u)&&Ze(f)?N="value":Ze(u)&&(N=f),V.createElement(dt,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(b)},l&&t.renderLabelLineItem(l,C,"line"),t.renderLabelItem(o,P,xr(x,N)))});return V.createElement(dt,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,l=a.blendStroke,u=a.inactiveShape;return n.map(function(f,h){if((f==null?void 0:f.startAngle)===0&&(f==null?void 0:f.endAngle)===0&&n.length!==1)return null;var p=i.isActiveIndex(h),g=u&&i.hasActiveIndex()?u:null,v=p?o:g,w=xt(xt({},f),{},{stroke:l?f.fill:f.stroke,tabIndex:-1});return V.createElement(dt,Hs({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},qo(i.props,f,h),{key:"sector-".concat(f==null?void 0:f.startAngle,"-").concat(f==null?void 0:f.endAngle,"-").concat(f.midAngle,"-").concat(h)}),V.createElement(iF,Hs({option:v,isActive:p,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,f=i.animationEasing,h=i.animationId,p=this.state,g=p.prevSectors,v=p.prevIsAnimationActive;return V.createElement(Gi,{begin:l,duration:u,isActive:o,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(h,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var x=w.t,b=[],S=a&&a[0],A=S.startAngle;return a.forEach(function(P,C){var N=g&&g[C],E=C>0?Qr(P,"paddingAngle",0):0;if(N){var T=Ea(N.endAngle-N.startAngle,P.endAngle-P.startAngle),k=xt(xt({},P),{},{startAngle:A+E,endAngle:A+T(x)+E});b.push(k),A=k.endAngle}else{var M=P.endAngle,z=P.startAngle,D=Ea(0,M-z),B=D(x),U=xt(xt({},P),{},{startAngle:A+E,endAngle:A+B+E});b.push(U),A=U.endAngle}}),V.createElement(dt,null,n.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!ag(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,l=i.className,u=i.label,f=i.cx,h=i.cy,p=i.innerRadius,g=i.outerRadius,v=i.isAnimationActive,w=this.state.isAnimationFinished;if(a||!o||!o.length||!pe(f)||!pe(h)||!pe(p)||!pe(g))return null;var x=He("recharts-pie",l);return V.createElement(dt,{tabIndex:this.props.rootTabIndex,className:x,ref:function(S){n.pieRef=S}},this.renderSectors(),u&&this.renderLabels(o),Zt.renderCallByParent(this.props,null,!1),(!v||w)&&La.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(V.isValidElement(n))return V.cloneElement(n,i);if(Fe(n))return n(i);var o=He("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return V.createElement(y_,Hs({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(V.isValidElement(n))return V.cloneElement(n,i);var o=a;if(Fe(n)&&(o=n(i),V.isValidElement(o)))return o;var l=He("recharts-pie-label-text",typeof n!="boolean"&&!Fe(n)?n.className:"");return V.createElement(Wo,Hs({},i,{alignmentBaseline:"middle",className:l}),o)}}])}(_.PureComponent);Hh=na;pn(na,"displayName","Pie");pn(na,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Yl.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});pn(na,"parseDeltaAngle",function(e,t){var r=Ar(t-e),n=Math.min(Math.abs(t-e),360);return r*n});pn(na,"getRealPieData",function(e){var t=e.data,r=e.children,n=Le(e,!1),i=gn(r,Ym);return t&&t.length?t.map(function(a,o){return xt(xt(xt({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return xt(xt({},n),a.props)}):[]});pn(na,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=VB(i,a),l=n+Nr(e.cx,i,i/2),u=r+Nr(e.cy,a,a/2),f=Nr(e.innerRadius,o,0),h=Nr(e.outerRadius,o,o*.8),p=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:u,innerRadius:f,outerRadius:h,maxRadius:p}});pn(na,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?xt(xt({},t.type.defaultProps),t.props):t.props,i=Hh.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,l=n.endAngle,u=n.paddingAngle,f=n.dataKey,h=n.nameKey,p=n.valueKey,g=n.tooltipType,v=Math.abs(n.minAngle),w=Hh.parseCoordinateOfPie(n,r),x=Hh.parseDeltaAngle(o,l),b=Math.abs(x),S=f;Ze(f)&&Ze(p)?(zn(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),S="value"):Ze(f)&&(zn(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),S=p);var A=i.filter(function(k){return xr(k,S,0)!==0}).length,P=(b>=360?A:A-1)*u,C=b-A*v-P,N=i.reduce(function(k,M){var z=xr(M,S,0);return k+(pe(z)?z:0)},0),E;if(N>0){var T;E=i.map(function(k,M){var z=xr(k,S,0),D=xr(k,h,M),B=(pe(z)?z:0)/N,U;M?U=T.endAngle+Ar(x)*u*(z!==0?1:0):U=o;var G=U+Ar(x)*((z!==0?v:0)+B*C),Y=(U+G)/2,F=(w.innerRadius+w.outerRadius)/2,X=[{name:D,value:z,payload:k,dataKey:S,type:g}],I=wt(w.cx,w.cy,F,Y);return T=xt(xt(xt({percent:B,cornerRadius:a,name:D,tooltipPayload:X,midAngle:Y,middleRadius:F,tooltipPosition:I},k),w),{},{value:xr(k,S),startAngle:U,endAngle:G,payload:k,paddingAngle:Ar(x)*u}),T})}return xt(xt({},w),{},{sectors:E,data:i})});var Pw,QM;function Vle(){if(QM)return Pw;QM=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var l=-1,u=t(e((i-n)/(a||1)),0),f=Array(u);u--;)f[o?u:++l]=n,n+=a;return f}return Pw=r,Pw}var Aw,JM;function sF(){if(JM)return Aw;JM=1;var e=E4(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-1/0){var a=i<0?-1:1;return a*r}return i===i?i:0}return Aw=n,Aw}var Nw,eI;function Ule(){if(eI)return Nw;eI=1;var e=Vle(),t=Gm(),r=sF();function n(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),l=l===void 0?a<o?1:-1:r(l),e(a,o,l,i)}}return Nw=n,Nw}var Ow,tI;function qle(){if(tI)return Ow;tI=1;var e=Ule(),t=e();return Ow=t,Ow}var Wle=qle();const Vp=ut(Wle);function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}function rI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rI(Object(r),!0).forEach(function(n){lF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lF(e,t,r){return t=Hle(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hle(e){var t=Kle(e,"string");return df(t)=="symbol"?t:t+""}function Kle(e,t){if(df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gle=["Webkit","Moz","O","ms"],Yle=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Gle.reduce(function(a,o){return nI(nI({},a),{},lF({},o+n,r))},{});return i[t]=r,i};function yl(e){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Up.apply(this,arguments)}function iI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ew(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iI(Object(r),!0).forEach(function(n){Gr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uF(n.key),n)}}function Zle(e,t,r){return t&&aI(e.prototype,t),r&&aI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qle(e,t,r){return t=qp(t),Jle(e,cF()?Reflect.construct(t,r||[],qp(e).constructor):t.apply(e,r))}function Jle(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ece(e)}function ece(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cF=function(){return!!e})()}function qp(e){return qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qp(e)}function tce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M_(e,t)}function M_(e,t){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},M_(e,t)}function Gr(e,t,r){return t=uF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uF(e){var t=rce(e,"string");return yl(t)=="symbol"?t:t+""}function rce(e,t){if(yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nce=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var u=r.length,f=ju().domain(Vp(0,u)).range([a,a+o-l]),h=f.domain().map(function(p){return f(p)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:h}},oI=function(t){return t.changedTouches&&!!t.changedTouches.length},xl=function(e){function t(r){var n;return Xle(this,t),n=Qle(this,t,[r]),Gr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Gr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Gr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Gr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Gr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Gr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Gr(n,"handleSlideDragStart",function(i){var a=oI(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return tce(t,e),Zle(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,h=f.length-1,p=Math.min(i,a),g=Math.max(i,a),v=t.getIndexInRange(o,p),w=t.getIndexInRange(o,g);return{startIndex:v-v%u,endIndex:w===h?h:w-w%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=xr(a[n],l,n);return Fe(o)?o(u,n):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,f=u.x,h=u.width,p=u.travellerWidth,g=u.startIndex,v=u.endIndex,w=u.onChange,x=n.pageX-a;x>0?x=Math.min(x,f+h-p-l,f+h-p-o):x<0&&(x=Math.max(x,f-o,f-l));var b=this.getIndex({startX:o+x,endX:l+x});(b.startIndex!==g||b.endIndex!==v)&&w&&w(b),this.setState({startX:o+x,endX:l+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=oI(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,f=this.state[o],h=this.props,p=h.x,g=h.width,v=h.travellerWidth,w=h.onChange,x=h.gap,b=h.data,S={startX:this.state.startX,endX:this.state.endX},A=n.pageX-a;A>0?A=Math.min(A,p+g-v-f):A<0&&(A=Math.max(A,p-f)),S[o]=f+A;var P=this.getIndex(S),C=P.startIndex,N=P.endIndex,E=function(){var k=b.length-1;return o==="startX"&&(l>u?C%x===0:N%x===0)||l<u&&N===k||o==="endX"&&(l>u?N%x===0:C%x===0)||l>u&&N===k};this.setState(Gr(Gr({},o,f+A),"brushMoveStartX",n.pageX),function(){w&&E()&&w(P)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,f=o.endX,h=this.state[i],p=l.indexOf(h);if(p!==-1){var g=p+n;if(!(g===-1||g>=l.length)){var v=l[g];i==="startX"&&v>=f||i==="endX"&&v<=u||this.setState(Gr({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.fill,f=n.stroke;return V.createElement("rect",{stroke:f,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.data,f=n.children,h=n.padding,p=_.Children.only(f);return p?V.cloneElement(p,{x:i,y:a,width:o,height:l,margin:h,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,u=this.props,f=u.y,h=u.travellerWidth,p=u.height,g=u.traveller,v=u.ariaLabel,w=u.data,x=u.startIndex,b=u.endIndex,S=Math.max(n,this.props.x),A=Ew(Ew({},Le(this.props,!1)),{},{x:S,y:f,width:h,height:p}),P=v||"Min value: ".concat((a=w[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=w[b])===null||o===void 0?void 0:o.name);return V.createElement(dt,{tabIndex:0,role:"slider","aria-label":P,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),l.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,A))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,f=a.travellerWidth,h=Math.min(n,i)+f,p=Math.max(Math.abs(i-n)-f,0);return V.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:h,y:o,width:p,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,u=n.travellerWidth,f=n.stroke,h=this.state,p=h.startX,g=h.endX,v=5,w={pointerEvents:"none",fill:f};return V.createElement(dt,{className:"recharts-brush-texts"},V.createElement(Wo,Up({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-v,y:o+l/2},w),this.getTextOfTick(i)),V.createElement(Wo,Up({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+u+v,y:o+l/2},w),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,u=n.y,f=n.width,h=n.height,p=n.alwaysShowText,g=this.state,v=g.startX,w=g.endX,x=g.isTextActive,b=g.isSlideMoving,S=g.isTravellerMoving,A=g.isTravellerFocused;if(!i||!i.length||!pe(l)||!pe(u)||!pe(f)||!pe(h)||f<=0||h<=0)return null;var P=He("recharts-brush",a),C=V.Children.count(o)===1,N=Yle("userSelect","none");return V.createElement(dt,{className:P,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(x||b||S||A||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,u=n.stroke,f=Math.floor(a+l/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),V.createElement("line",{x1:i+1,y1:f,x2:i+o-1,y2:f,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:i+1,y1:f+2,x2:i+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return V.isValidElement(n)?a=V.cloneElement(n,i):Fe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,u=n.travellerWidth,f=n.updateId,h=n.startIndex,p=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return Ew({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?nce({data:a,width:o,x:l,travellerWidth:u,startIndex:h,endIndex:p}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var g=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);n[u]>i?l=u:o=u}return i>=n[l]?l:o}}])}(_.PureComponent);Gr(xl,"displayName","Brush");Gr(xl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Cw,sI;function ice(){if(sI)return Cw;sI=1;var e=Oj();function t(r,n){var i;return e(r,function(a,o,l){return i=n(a,o,l),!i}),!!i}return Cw=t,Cw}var Tw,lI;function ace(){if(lI)return Tw;lI=1;var e=o4(),t=yi(),r=ice(),n=Vr(),i=Gm();function a(o,l,u){var f=n(o)?e:r;return u&&i(o,l,u)&&(l=void 0),f(o,t(l,3))}return Tw=a,Tw}var oce=ace();const sce=ut(oce);var li=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},kw,cI;function lce(){if(cI)return kw;cI=1;var e=j4();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return kw=t,kw}var Rw,uI;function cce(){if(uI)return Rw;uI=1;var e=lce(),t=_4(),r=yi();function n(i,a){var o={};return a=r(a,3),t(i,function(l,u,f){e(o,u,a(l,u,f))}),o}return Rw=n,Rw}var uce=cce();const fce=ut(uce);var Mw,fI;function dce(){if(fI)return Mw;fI=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!r(t[n],n,t))return!1;return!0}return Mw=e,Mw}var Iw,dI;function hce(){if(dI)return Iw;dI=1;var e=Oj();function t(r,n){var i=!0;return e(r,function(a,o,l){return i=!!n(a,o,l),i}),i}return Iw=t,Iw}var Dw,hI;function pce(){if(hI)return Dw;hI=1;var e=dce(),t=hce(),r=yi(),n=Vr(),i=Gm();function a(o,l,u){var f=n(o)?e:t;return u&&i(o,l,u)&&(l=void 0),f(o,r(l,3))}return Dw=a,Dw}var mce=pce();const fF=ut(mce);var gce=["x","y"];function hf(e){"@babel/helpers - typeof";return hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hf(e)}function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I_.apply(this,arguments)}function pI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pI(Object(r),!0).forEach(function(n){vce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vce(e,t,r){return t=yce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yce(e){var t=xce(e,"string");return hf(t)=="symbol"?t:t+""}function xce(e,t){if(hf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bce(e,t){if(e==null)return{};var r=wce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _ce(e,t){var r=e.x,n=e.y,i=bce(e,gce),a="".concat(r),o=parseInt(a,10),l="".concat(n),u=parseInt(l,10),f="".concat(t.height||i.height),h=parseInt(f,10),p="".concat(t.width||i.width),g=parseInt(p,10);return uu(uu(uu(uu(uu({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:h,width:g,name:t.name,radius:t.radius})}function mI(e){return V.createElement(iF,I_({shapeType:"rectangle",propTransformer:_ce,activeClassName:"recharts-active-bar"},e))}var Sce=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||Ko(),r)}},jce=["value","background"],dF;function bl(e){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function Pce(e,t){if(e==null)return{};var r=Ace(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ace(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wp(){return Wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wp.apply(this,arguments)}function gI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gI(Object(r),!0).forEach(function(n){Ma(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pF(n.key),n)}}function Oce(e,t,r){return t&&vI(e.prototype,t),r&&vI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ece(e,t,r){return t=Hp(t),Cce(e,hF()?Reflect.construct(t,r||[],Hp(e).constructor):t.apply(e,r))}function Cce(e,t){if(t&&(bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tce(e)}function Tce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hF=function(){return!!e})()}function Hp(e){return Hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hp(e)}function kce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D_(e,t)}function D_(e,t){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},D_(e,t)}function Ma(e,t,r){return t=pF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pF(e){var t=Rce(e,"string");return bl(t)=="symbol"?t:t+""}function Rce(e,t){if(bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ja=function(e){function t(){var r;Nce(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Ece(this,t,[].concat(i)),Ma(r,"state",{isAnimationFinished:!1}),Ma(r,"id",zf("recharts-bar-")),Ma(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ma(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return kce(t,e),Oce(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,l=a.dataKey,u=a.activeIndex,f=a.activeBar,h=Le(this.props,!1);return n&&n.map(function(p,g){var v=g===u,w=v?f:o,x=qt(qt(qt({},h),p),{},{isActive:v,option:w,index:g,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return V.createElement(dt,Wp({className:"recharts-bar-rectangle"},qo(i.props,p,g),{key:"rectangle-".concat(p==null?void 0:p.x,"-").concat(p==null?void 0:p.y,"-").concat(p==null?void 0:p.value,"-").concat(g)}),V.createElement(mI,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,u=i.animationBegin,f=i.animationDuration,h=i.animationEasing,p=i.animationId,g=this.state.prevData;return V.createElement(Gi,{begin:u,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var w=v.t,x=a.map(function(b,S){var A=g&&g[S];if(A){var P=Ea(A.x,b.x),C=Ea(A.y,b.y),N=Ea(A.width,b.width),E=Ea(A.height,b.height);return qt(qt({},b),{},{x:P(w),y:C(w),width:N(w),height:E(w)})}if(o==="horizontal"){var T=Ea(0,b.height),k=T(w);return qt(qt({},b),{},{y:b.y+b.height-k,height:k})}var M=Ea(0,b.width),z=M(w);return qt(qt({},b),{},{width:z})});return V.createElement(dt,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!ag(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,u=Le(this.props.background,!1);return a.map(function(f,h){f.value;var p=f.background,g=Pce(f,jce);if(!p)return null;var v=qt(qt(qt(qt(qt({},g),{},{fill:"#eee"},p),u),qo(n.props,f,h)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:h,className:"recharts-bar-background-rectangle"});return V.createElement(mI,Wp({key:"background-bar-".concat(h),option:n.props.background,isActive:h===l},v))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,u=a.yAxis,f=a.layout,h=a.children,p=gn(h,lg);if(!p)return null;var g=f==="vertical"?o[0].height/2:o[0].width/2,v=function(b,S){var A=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:A,errorVal:xr(b,S)}},w={clipPath:n?"url(#clipPath-".concat(i,")"):null};return V.createElement(dt,w,p.map(function(x){return V.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.props.dataKey),data:o,xAxis:l,yAxis:u,layout:f,offset:g,dataPointFormatter:v})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,l=n.xAxis,u=n.yAxis,f=n.left,h=n.top,p=n.width,g=n.height,v=n.isAnimationActive,w=n.background,x=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,S=He("recharts-bar",o),A=l&&l.allowDataOverflow,P=u&&u.allowDataOverflow,C=A||P,N=Ze(x)?this.id:x;return V.createElement(dt,{className:S},A||P?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(N)},V.createElement("rect",{x:A?f:f-p/2,y:P?h:h-g/2,width:A?p:p*2,height:P?g:g*2}))):null,V.createElement(dt,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(N,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,N),(!v||b)&&La.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(_.PureComponent);dF=Ja;Ma(Ja,"displayName","Bar");Ma(Ja,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Yl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ma(Ja,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,f=e.stackedData,h=e.dataStartIndex,p=e.displayedData,g=e.offset,v=sie(n,r);if(!v)return null;var w=t.layout,x=r.type.defaultProps,b=x!==void 0?qt(qt({},x),r.props):r.props,S=b.dataKey,A=b.children,P=b.minPointSize,C=w==="horizontal"?o:a,N=f?C.scale.domain():null,E=pie({numericAxis:C}),T=gn(A,Ym),k=p.map(function(M,z){var D,B,U,G,Y,F;f?D=lie(f[h+z],N):(D=xr(M,S),Array.isArray(D)||(D=[E,D]));var X=Sce(P,dF.defaultProps.minPointSize)(D[1],z);if(w==="horizontal"){var I,W=[o.scale(D[0]),o.scale(D[1])],Q=W[0],L=W[1];B=UR({axis:a,ticks:l,bandSize:i,offset:v.offset,entry:M,index:z}),U=(I=L??Q)!==null&&I!==void 0?I:void 0,G=v.size;var K=Q-L;if(Y=Number.isNaN(K)?0:K,F={x:B,y:o.y,width:G,height:o.height},Math.abs(X)>0&&Math.abs(Y)<Math.abs(X)){var ae=Ar(Y||X)*(Math.abs(X)-Math.abs(Y));U-=ae,Y+=ae}}else{var ue=[a.scale(D[0]),a.scale(D[1])],xe=ue[0],Ae=ue[1];if(B=xe,U=UR({axis:o,ticks:u,bandSize:i,offset:v.offset,entry:M,index:z}),G=Ae-xe,Y=v.size,F={x:a.x,y:U,width:a.width,height:Y},Math.abs(X)>0&&Math.abs(G)<Math.abs(X)){var oe=Ar(G||X)*(Math.abs(X)-Math.abs(G));G+=oe}}return qt(qt(qt({},M),{},{x:B,y:U,width:G,height:Y,value:f?D:D[1],payload:M,background:F},T&&T[z]&&T[z].props),{},{tooltipPayload:[FB(r,M)],tooltipPosition:{x:B+G/2,y:U+Y/2}})});return qt({data:k,layout:w},g)});function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf(e)}function Mce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mF(n.key),n)}}function Ice(e,t,r){return t&&yI(e.prototype,t),r&&yI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ln(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xI(Object(r),!0).forEach(function(n){mg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mg(e,t,r){return t=mF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mF(e){var t=Dce(e,"string");return pf(t)=="symbol"?t:t+""}function Dce(e,t){if(pf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ce=function(t,r,n,i,a){var o=t.width,l=t.height,u=t.layout,f=t.children,h=Object.keys(r),p={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},g=!!Yr(f,Ja);return h.reduce(function(v,w){var x=r[w],b=x.orientation,S=x.domain,A=x.padding,P=A===void 0?{}:A,C=x.mirror,N=x.reversed,E="".concat(b).concat(C?"Mirror":""),T,k,M,z,D;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var B=S[1]-S[0],U=1/0,G=x.categoricalDomain.sort(XY);if(G.forEach(function(ue,xe){xe>0&&(U=Math.min((ue||0)-(G[xe-1]||0),U))}),Number.isFinite(U)){var Y=U/B,F=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(T=Y*F/2),x.padding==="no-gap"){var X=Nr(t.barCategoryGap,Y*F),I=Y*F/2;T=I-X-(I-X)/F*X}}}i==="xAxis"?k=[n.left+(P.left||0)+(T||0),n.left+n.width-(P.right||0)-(T||0)]:i==="yAxis"?k=u==="horizontal"?[n.top+n.height-(P.bottom||0),n.top+(P.top||0)]:[n.top+(P.top||0)+(T||0),n.top+n.height-(P.bottom||0)-(T||0)]:k=x.range,N&&(k=[k[1],k[0]]);var W=DB(x,a,g),Q=W.scale,L=W.realScaleType;Q.domain(S).range(k),$B(Q);var K=LB(Q,Ln(Ln({},x),{},{realScaleType:L}));i==="xAxis"?(D=b==="top"&&!C||b==="bottom"&&C,M=n.left,z=p[E]-D*x.height):i==="yAxis"&&(D=b==="left"&&!C||b==="right"&&C,M=p[E]-D*x.width,z=n.top);var ae=Ln(Ln(Ln({},x),K),{},{realScaleType:L,x:M,y:z,scale:Q,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return ae.bandSize=Cp(ae,K),!x.hide&&i==="xAxis"?p[E]+=(D?-1:1)*ae.height:x.hide||(p[E]+=(D?-1:1)*ae.width),Ln(Ln({},v),{},mg({},w,ae))},{})},gF=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Lce=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return gF({x:r,y:n},{x:i,y:a})},vF=function(){function e(t){Mce(this,e),this.scale=t}return Ice(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();mg(vF,"EPS",1e-4);var aP=function(t){var r=Object.keys(t).reduce(function(n,i){return Ln(Ln({},n),{},mg({},i,vF.create(t[i])))},{});return Ln(Ln({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return fce(i,function(u,f){return r[f].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return fF(i,function(a,o){return r[o].isInRange(a)})}})};function Bce(e){return(e%180+180)%180}var Fce=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Bce(i),o=a*Math.PI/180,l=Math.atan(n/r),u=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},$w,bI;function zce(){if(bI)return $w;bI=1;var e=yi(),t=Vf(),r=Hm();function n(i){return function(a,o,l){var u=Object(a);if(!t(a)){var f=e(o,3);a=r(a),o=function(p){return f(u[p],p,u)}}var h=i(a,o,l);return h>-1?u[f?a[h]:h]:void 0}}return $w=n,$w}var Lw,wI;function Vce(){if(wI)return Lw;wI=1;var e=sF();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Lw=t,Lw}var Bw,_I;function Uce(){if(_I)return Bw;_I=1;var e=v4(),t=yi(),r=Vce(),n=Math.max;function i(a,o,l){var u=a==null?0:a.length;if(!u)return-1;var f=l==null?0:r(l);return f<0&&(f=n(u+f,0)),e(a,t(o,3),f)}return Bw=i,Bw}var Fw,SI;function qce(){if(SI)return Fw;SI=1;var e=zce(),t=Uce(),r=e(t);return Fw=r,Fw}var Wce=qce();const Hce=ut(Wce);var Kce=R3();const Gce=ut(Kce);var Yce=Gce(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),oP=_.createContext(void 0),sP=_.createContext(void 0),yF=_.createContext(void 0),xF=_.createContext({}),bF=_.createContext(void 0),wF=_.createContext(0),_F=_.createContext(0),jI=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,u=t.width,f=t.height,h=Yce(a);return V.createElement(oP.Provider,{value:n},V.createElement(sP.Provider,{value:i},V.createElement(xF.Provider,{value:a},V.createElement(yF.Provider,{value:h},V.createElement(bF.Provider,{value:o},V.createElement(wF.Provider,{value:f},V.createElement(_F.Provider,{value:u},l)))))))},Xce=function(){return _.useContext(bF)},SF=function(t){var r=_.useContext(oP);r==null&&Ko();var n=r[t];return n==null&&Ko(),n},Zce=function(){var t=_.useContext(oP);return Ra(t)},Qce=function(){var t=_.useContext(sP),r=Hce(t,function(n){return fF(n.domain,Number.isFinite)});return r||Ra(t)},jF=function(t){var r=_.useContext(sP);r==null&&Ko();var n=r[t];return n==null&&Ko(),n},Jce=function(){var t=_.useContext(yF);return t},eue=function(){return _.useContext(xF)},lP=function(){return _.useContext(_F)},cP=function(){return _.useContext(wF)};function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function tue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,AF(n.key),n)}}function nue(e,t,r){return t&&rue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iue(e,t,r){return t=Kp(t),aue(e,PF()?Reflect.construct(t,r||[],Kp(e).constructor):t.apply(e,r))}function aue(e,t){if(t&&(wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oue(e)}function oue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PF=function(){return!!e})()}function Kp(e){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kp(e)}function sue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$_(e,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$_(e,t)}function PI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PI(Object(r),!0).forEach(function(n){uP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uP(e,t,r){return t=AF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AF(e){var t=lue(e,"string");return wl(t)=="symbol"?t:t+""}function lue(e,t){if(wl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cue(e,t){return hue(e)||due(e,t)||fue(e,t)||uue()}function uue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fue(e,t){if(e){if(typeof e=="string")return NI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NI(e,t)}}function NI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function due(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hue(e){if(Array.isArray(e))return e}function L_(){return L_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L_.apply(this,arguments)}var pue=function(t,r){var n;return V.isValidElement(t)?n=V.cloneElement(t,r):Fe(t)?n=t(r):n=V.createElement("line",L_({},r,{className:"recharts-reference-line-line"})),n},mue=function(t,r,n,i,a,o,l,u,f){var h=a.x,p=a.y,g=a.width,v=a.height;if(n){var w=f.y,x=t.y.apply(w,{position:o});if(li(f,"discard")&&!t.y.isInRange(x))return null;var b=[{x:h+g,y:x},{x:h,y:x}];return u==="left"?b.reverse():b}if(r){var S=f.x,A=t.x.apply(S,{position:o});if(li(f,"discard")&&!t.x.isInRange(A))return null;var P=[{x:A,y:p+v},{x:A,y:p}];return l==="top"?P.reverse():P}if(i){var C=f.segment,N=C.map(function(E){return t.apply(E,{position:o})});return li(f,"discard")&&sce(N,function(E){return!t.isInRange(E)})?null:N}return null};function gue(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,u=e.alwaysShow,f=Xce(),h=SF(i),p=jF(a),g=Jce();if(!f||!g)return null;zn(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=aP({x:h.scale,y:p.scale}),w=Qt(t),x=Qt(r),b=n&&n.length===2,S=mue(v,w,x,b,g,e.position,h.orientation,p.orientation,e);if(!S)return null;var A=cue(S,2),P=A[0],C=P.x,N=P.y,E=A[1],T=E.x,k=E.y,M=li(e,"hidden")?"url(#".concat(f,")"):void 0,z=AI(AI({clipPath:M},Le(e,!0)),{},{x1:C,y1:N,x2:T,y2:k});return V.createElement(dt,{className:He("recharts-reference-line",l)},pue(o,z),Zt.renderCallByParent(e,Lce({x1:C,y1:N,x2:T,y2:k})))}var fP=function(e){function t(){return tue(this,t),iue(this,t,arguments)}return sue(t,e),nue(t,[{key:"render",value:function(){return V.createElement(gue,this.props)}}])}(V.Component);uP(fP,"displayName","ReferenceLine");uP(fP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function B_(){return B_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B_.apply(this,arguments)}function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function OI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OI(Object(r),!0).forEach(function(n){gg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OF(n.key),n)}}function xue(e,t,r){return t&&yue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bue(e,t,r){return t=Gp(t),wue(e,NF()?Reflect.construct(t,r||[],Gp(e).constructor):t.apply(e,r))}function wue(e,t){if(t&&(_l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ue(e)}function _ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NF=function(){return!!e})()}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gp(e)}function Sue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F_(e,t)}function F_(e,t){return F_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},F_(e,t)}function gg(e,t,r){return t=OF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OF(e){var t=jue(e,"string");return _l(t)=="symbol"?t:t+""}function jue(e,t){if(_l(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_l(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pue=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=aP({x:i.scale,y:a.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return li(t,"discard")&&!o.isInRange(l)?null:l},vg=function(e){function t(){return vue(this,t),bue(this,t,arguments)}return Sue(t,e),xue(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,l=n.alwaysShow,u=n.clipPathId,f=Qt(i),h=Qt(a);if(zn(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!h)return null;var p=Pue(this.props);if(!p)return null;var g=p.x,v=p.y,w=this.props,x=w.shape,b=w.className,S=li(this.props,"hidden")?"url(#".concat(u,")"):void 0,A=EI(EI({clipPath:S},Le(this.props,!0)),{},{cx:g,cy:v});return V.createElement(dt,{className:He("recharts-reference-dot",b)},t.renderDot(x,A),Zt.renderCallByParent(this.props,{x:g-o,y:v-o,width:2*o,height:2*o}))}}])}(V.Component);gg(vg,"displayName","ReferenceDot");gg(vg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});gg(vg,"renderDot",function(e,t){var r;return V.isValidElement(e)?r=V.cloneElement(e,t):Fe(e)?r=e(t):r=V.createElement(iP,B_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z_.apply(this,arguments)}function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function CI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CI(Object(r),!0).forEach(function(n){yg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Aue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CF(n.key),n)}}function Oue(e,t,r){return t&&Nue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eue(e,t,r){return t=Yp(t),Cue(e,EF()?Reflect.construct(t,r||[],Yp(e).constructor):t.apply(e,r))}function Cue(e,t){if(t&&(Sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tue(e)}function Tue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EF=function(){return!!e})()}function Yp(e){return Yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yp(e)}function kue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V_(e,t)}function V_(e,t){return V_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},V_(e,t)}function yg(e,t,r){return t=CF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CF(e){var t=Rue(e,"string");return Sl(t)=="symbol"?t:t+""}function Rue(e,t){if(Sl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mue=function(t,r,n,i,a){var o=a.x1,l=a.x2,u=a.y1,f=a.y2,h=a.xAxis,p=a.yAxis;if(!h||!p)return null;var g=aP({x:h.scale,y:p.scale}),v={x:t?g.x.apply(o,{position:"start"}):g.x.rangeMin,y:n?g.y.apply(u,{position:"start"}):g.y.rangeMin},w={x:r?g.x.apply(l,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(f,{position:"end"}):g.y.rangeMax};return li(a,"discard")&&(!g.isInRange(v)||!g.isInRange(w))?null:gF(v,w)},xg=function(e){function t(){return Aue(this,t),Eue(this,t,arguments)}return kue(t,e),Oue(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,l=n.y2,u=n.className,f=n.alwaysShow,h=n.clipPathId;zn(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Qt(i),g=Qt(a),v=Qt(o),w=Qt(l),x=this.props.shape;if(!p&&!g&&!v&&!w&&!x)return null;var b=Mue(p,g,v,w,this.props);if(!b&&!x)return null;var S=li(this.props,"hidden")?"url(#".concat(h,")"):void 0;return V.createElement(dt,{className:He("recharts-reference-area",u)},t.renderRect(x,TI(TI({clipPath:S},Le(this.props,!0)),b)),Zt.renderCallByParent(this.props,b))}}])}(V.Component);yg(xg,"displayName","ReferenceArea");yg(xg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});yg(xg,"renderRect",function(e,t){var r;return V.isValidElement(e)?r=V.cloneElement(e,t):Fe(e)?r=e(t):r=V.createElement(nP,z_({},t,{className:"recharts-reference-area-rect"})),r});function TF(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function Iue(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Fce(n,r)}function Due(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:n?i:a,end:n?i+o:a+l}:{start:n?i+o:a+l,end:n?i:a}}function Xp(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function $ue(e,t){return TF(e,t+1)}function Lue(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,u=0,f=1,h=o,p=function(){var w=n==null?void 0:n[u];if(w===void 0)return{v:TF(n,f)};var x=u,b,S=function(){return b===void 0&&(b=r(w,x)),b},A=w.coordinate,P=u===0||Xp(e,A,S,h,l);P||(u=0,h=o,f+=1),P&&(h=A+e*(S()/2+i),u+=f)},g;f<=a.length;)if(g=p(),g)return g.v;return[]}function mf(e){"@babel/helpers - typeof";return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}function kI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kI(Object(r),!0).forEach(function(n){Bue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bue(e,t,r){return t=Fue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fue(e){var t=zue(e,"string");return mf(t)=="symbol"?t:t+""}function zue(e,t){if(mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vue(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,l=t.start,u=t.end,f=function(g){var v=a[g],w,x=function(){return w===void 0&&(w=r(v,g)),w};if(g===o-1){var b=e*(v.coordinate+e*x()/2-u);a[g]=v=pr(pr({},v),{},{tickCoord:b>0?v.coordinate-b*e:v.coordinate})}else a[g]=v=pr(pr({},v),{},{tickCoord:v.coordinate});var S=Xp(e,v.tickCoord,x,l,u);S&&(u=v.tickCoord-e*(x()/2+i),a[g]=pr(pr({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function Uue(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,u=t.start,f=t.end;if(a){var h=n[l-1],p=r(h,l-1),g=e*(h.coordinate+e*p/2-f);o[l-1]=h=pr(pr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate});var v=Xp(e,h.tickCoord,function(){return p},u,f);v&&(f=h.tickCoord-e*(p/2+i),o[l-1]=pr(pr({},h),{},{isShow:!0}))}for(var w=a?l-1:l,x=function(A){var P=o[A],C,N=function(){return C===void 0&&(C=r(P,A)),C};if(A===0){var E=e*(P.coordinate-e*N()/2-u);o[A]=P=pr(pr({},P),{},{tickCoord:E<0?P.coordinate-E*e:P.coordinate})}else o[A]=P=pr(pr({},P),{},{tickCoord:P.coordinate});var T=Xp(e,P.tickCoord,N,u,f);T&&(u=P.tickCoord+e*(N()/2+i),o[A]=pr(pr({},P),{},{isShow:!0}))},b=0;b<w;b++)x(b);return o}function dP(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,u=e.interval,f=e.tickFormatter,h=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(pe(u)||Yl.isSsr)return $ue(i,typeof u=="number"&&pe(u)?u:0);var g=[],v=l==="top"||l==="bottom"?"width":"height",w=h&&v==="width"?Su(h,{fontSize:t,letterSpacing:r}):{width:0,height:0},x=function(P,C){var N=Fe(f)?f(P.value,C):P.value;return v==="width"?Iue(Su(N,{fontSize:t,letterSpacing:r}),w,p):Su(N,{fontSize:t,letterSpacing:r})[v]},b=i.length>=2?Ar(i[1].coordinate-i[0].coordinate):1,S=Due(a,b,v);return u==="equidistantPreserveStart"?Lue(b,S,x,i,o):(u==="preserveStart"||u==="preserveStartEnd"?g=Uue(b,S,x,i,o,u==="preserveStartEnd"):g=Vue(b,S,x,i,o),g.filter(function(A){return A.isShow}))}var que=["viewBox"],Wue=["viewBox"],Hue=["ticks"];function jl(e){"@babel/helpers - typeof";return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(e)}function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ks.apply(this,arguments)}function RI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RI(Object(r),!0).forEach(function(n){hP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zw(e,t){if(e==null)return{};var r=Kue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Gue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RF(n.key),n)}}function Yue(e,t,r){return t&&MI(e.prototype,t),r&&MI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xue(e,t,r){return t=Zp(t),Zue(e,kF()?Reflect.construct(t,r||[],Zp(e).constructor):t.apply(e,r))}function Zue(e,t){if(t&&(jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Que(e)}function Que(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kF=function(){return!!e})()}function Zp(e){return Zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zp(e)}function Jue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U_(e,t)}function U_(e,t){return U_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},U_(e,t)}function hP(e,t,r){return t=RF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RF(e){var t=efe(e,"string");return jl(t)=="symbol"?t:t+""}function efe(e,t){if(jl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Jl=function(e){function t(r){var n;return Gue(this,t),n=Xue(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Jue(t,e),Yue(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=zw(n,que),l=this.props,u=l.viewBox,f=zw(l,Wue);return!el(a,u)||!el(o,f)||!el(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,l=i.width,u=i.height,f=i.orientation,h=i.tickSize,p=i.mirror,g=i.tickMargin,v,w,x,b,S,A,P=p?-1:1,C=n.tickSize||h,N=pe(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=w=n.coordinate,b=o+ +!p*u,x=b-P*C,A=x-P*g,S=N;break;case"left":x=b=n.coordinate,w=a+ +!p*l,v=w-P*C,S=v-P*g,A=N;break;case"right":x=b=n.coordinate,w=a+ +p*l,v=w+P*C,S=v+P*g,A=N;break;default:v=w=n.coordinate,b=o+ +p*u,x=b+P*C,A=x+P*g,S=N;break}return{line:{x1:v,y1:x,x2:w,y2:b},tick:{x:S,y:A}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.orientation,f=n.mirror,h=n.axisLine,p=Pr(Pr(Pr({},Le(this.props,!1)),Le(h,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var g=+(u==="top"&&!f||u==="bottom"&&f);p=Pr(Pr({},p),{},{x1:i,y1:a+g*l,x2:i+o,y2:a+g*l})}else{var v=+(u==="left"&&!f||u==="right"&&f);p=Pr(Pr({},p),{},{x1:i+v*o,y1:a,x2:i+v*o,y2:a+l})}return V.createElement("line",Ks({},p,{className:He("recharts-cartesian-axis-line",Qr(h,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,l=this.props,u=l.tickLine,f=l.stroke,h=l.tick,p=l.tickFormatter,g=l.unit,v=dP(Pr(Pr({},this.props),{},{ticks:n}),i,a),w=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),b=Le(this.props,!1),S=Le(h,!1),A=Pr(Pr({},b),{},{fill:"none"},Le(u,!1)),P=v.map(function(C,N){var E=o.getTickLineCoord(C),T=E.line,k=E.tick,M=Pr(Pr(Pr(Pr({textAnchor:w,verticalAnchor:x},b),{},{stroke:"none",fill:f},S),k),{},{index:N,payload:C,visibleTicksCount:v.length,tickFormatter:p});return V.createElement(dt,Ks({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},qo(o.props,C,N)),u&&V.createElement("line",Ks({},A,T,{className:He("recharts-cartesian-axis-tick-line",Qr(u,"className"))})),h&&t.renderTickItem(h,M,"".concat(Fe(p)?p(C.value,N):C.value).concat(g||"")))});return V.createElement("g",{className:"recharts-cartesian-axis-ticks"},P)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,u=i.ticksGenerator,f=i.className,h=i.hide;if(h)return null;var p=this.props,g=p.ticks,v=zw(p,Hue),w=g;return Fe(u)&&(w=g&&g.length>0?u(this.props):u(v)),o<=0||l<=0||!w||!w.length?null:V.createElement(dt,{className:He("recharts-cartesian-axis",f),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Zt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return V.isValidElement(n)?o=V.cloneElement(n,i):Fe(n)?o=n(i):o=V.createElement(Wo,Ks({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(_.Component);hP(Jl,"displayName","CartesianAxis");hP(Jl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var tfe=["x1","y1","x2","y2","key"],rfe=["offset"];function Go(e){"@babel/helpers - typeof";return Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Go(e)}function II(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?II(Object(r),!0).forEach(function(n){nfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):II(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nfe(e,t,r){return t=ife(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ife(e){var t=afe(e,"string");return Go(t)=="symbol"?t:t+""}function afe(e,t){if(Go(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Go(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ko.apply(this,arguments)}function DI(e,t){if(e==null)return{};var r=ofe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ofe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var sfe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,u=t.ry;return V.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function MF(e,t){var r;if(V.isValidElement(e))r=V.cloneElement(e,t);else if(Fe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=DI(t,tfe),f=Le(u,!1);f.offset;var h=DI(f,rfe);r=V.createElement("line",ko({},h,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function lfe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=vr(vr({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return MF(i,f)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function cfe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=vr(vr({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return MF(i,f)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function ufe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!t||!t.length)return null;var h=l.map(function(g){return Math.round(g+i-i)}).sort(function(g,v){return g-v});i!==h[0]&&h.unshift(0);var p=h.map(function(g,v){var w=!h[v+1],x=w?i+o-g:h[v+1]-g;if(x<=0)return null;var b=v%t.length;return V.createElement("rect",{key:"react-".concat(v),y:g,x:n,height:x,width:a,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function ffe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(function(g){return Math.round(g+a-a)}).sort(function(g,v){return g-v});a!==h[0]&&h.unshift(0);var p=h.map(function(g,v){var w=!h[v+1],x=w?a+l-g:h[v+1]-g;if(x<=0)return null;var b=v%n.length;return V.createElement("rect",{key:"react-".concat(v),x:g,y:o,width:x,height:u,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var dfe=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return IB(dP(vr(vr(vr({},Jl.defaultProps),n),{},{ticks:Di(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},hfe=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return IB(dP(vr(vr(vr({},Jl.defaultProps),n),{},{ticks:Di(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Ds={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function pP(e){var t,r,n,i,a,o,l=lP(),u=cP(),f=eue(),h=vr(vr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ds.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ds.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ds.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ds.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ds.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Ds.verticalFill,x:pe(e.x)?e.x:f.left,y:pe(e.y)?e.y:f.top,width:pe(e.width)?e.width:f.width,height:pe(e.height)?e.height:f.height}),p=h.x,g=h.y,v=h.width,w=h.height,x=h.syncWithTicks,b=h.horizontalValues,S=h.verticalValues,A=Zce(),P=Qce();if(!pe(v)||v<=0||!pe(w)||w<=0||!pe(p)||p!==+p||!pe(g)||g!==+g)return null;var C=h.verticalCoordinatesGenerator||dfe,N=h.horizontalCoordinatesGenerator||hfe,E=h.horizontalPoints,T=h.verticalPoints;if((!E||!E.length)&&Fe(N)){var k=b&&b.length,M=N({yAxis:P?vr(vr({},P),{},{ticks:k?b:P.ticks}):void 0,width:l,height:u,offset:f},k?!0:x);zn(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Go(M),"]")),Array.isArray(M)&&(E=M)}if((!T||!T.length)&&Fe(C)){var z=S&&S.length,D=C({xAxis:A?vr(vr({},A),{},{ticks:z?S:A.ticks}):void 0,width:l,height:u,offset:f},z?!0:x);zn(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Go(D),"]")),Array.isArray(D)&&(T=D)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(sfe,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),V.createElement(lfe,ko({},h,{offset:f,horizontalPoints:E,xAxis:A,yAxis:P})),V.createElement(cfe,ko({},h,{offset:f,verticalPoints:T,xAxis:A,yAxis:P})),V.createElement(ufe,ko({},h,{horizontalPoints:E})),V.createElement(ffe,ko({},h,{verticalPoints:T})))}pP.displayName="CartesianGrid";function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function pfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mfe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$F(n.key),n)}}function gfe(e,t,r){return t&&mfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vfe(e,t,r){return t=Qp(t),yfe(e,IF()?Reflect.construct(t,r||[],Qp(e).constructor):t.apply(e,r))}function yfe(e,t){if(t&&(Pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xfe(e)}function xfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IF=function(){return!!e})()}function Qp(e){return Qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qp(e)}function bfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q_(e,t)}function q_(e,t){return q_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},q_(e,t)}function DF(e,t,r){return t=$F(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $F(e){var t=wfe(e,"string");return Pl(t)=="symbol"?t:t+""}function wfe(e,t){if(Pl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function W_(){return W_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W_.apply(this,arguments)}function _fe(e){var t=e.xAxisId,r=lP(),n=cP(),i=SF(t);return i==null?null:V.createElement(Jl,W_({},i,{className:He("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Di(o,!0)}}))}var Kf=function(e){function t(){return pfe(this,t),vfe(this,t,arguments)}return bfe(t,e),gfe(t,[{key:"render",value:function(){return V.createElement(_fe,this.props)}}])}(V.Component);DF(Kf,"displayName","XAxis");DF(Kf,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Al(e){"@babel/helpers - typeof";return Al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Al(e)}function Sfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jfe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,FF(n.key),n)}}function Pfe(e,t,r){return t&&jfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Afe(e,t,r){return t=Jp(t),Nfe(e,LF()?Reflect.construct(t,r||[],Jp(e).constructor):t.apply(e,r))}function Nfe(e,t){if(t&&(Al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ofe(e)}function Ofe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LF=function(){return!!e})()}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jp(e)}function Efe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H_(e,t)}function H_(e,t){return H_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},H_(e,t)}function BF(e,t,r){return t=FF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FF(e){var t=Cfe(e,"string");return Al(t)=="symbol"?t:t+""}function Cfe(e,t){if(Al(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Al(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function K_(){return K_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K_.apply(this,arguments)}var Tfe=function(t){var r=t.yAxisId,n=lP(),i=cP(),a=jF(r);return a==null?null:V.createElement(Jl,K_({},a,{className:He("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Di(l,!0)}}))},Gf=function(e){function t(){return Sfe(this,t),Afe(this,t,arguments)}return Efe(t,e),Pfe(t,[{key:"render",value:function(){return V.createElement(Tfe,this.props)}}])}(V.Component);BF(Gf,"displayName","YAxis");BF(Gf,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function $I(e){return Ife(e)||Mfe(e)||Rfe(e)||kfe()}function kfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rfe(e,t){if(e){if(typeof e=="string")return G_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G_(e,t)}}function Mfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ife(e){if(Array.isArray(e))return G_(e)}function G_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Y_=function(t,r,n,i,a){var o=gn(t,fP),l=gn(t,vg),u=[].concat($I(o),$I(l)),f=gn(t,xg),h="".concat(i,"Id"),p=i[0],g=r;if(u.length&&(g=u.reduce(function(x,b){if(b.props[h]===n&&li(b.props,"extendDomain")&&pe(b.props[p])){var S=b.props[p];return[Math.min(x[0],S),Math.max(x[1],S)]}return x},g)),f.length){var v="".concat(p,"1"),w="".concat(p,"2");g=f.reduce(function(x,b){if(b.props[h]===n&&li(b.props,"extendDomain")&&pe(b.props[v])&&pe(b.props[w])){var S=b.props[v],A=b.props[w];return[Math.min(x[0],S,A),Math.max(x[1],S,A)]}return x},g)}return a&&a.length&&(g=a.reduce(function(x,b){return pe(b)?[Math.min(x[0],b),Math.max(x[1],b)]:x},g)),g},Vw={exports:{}},LI;function Dfe(){return LI||(LI=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,f,h){this.fn=u,this.context=f,this.once=h||!1}function a(u,f,h,p,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new i(h,p||u,g),w=r?r+f:f;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],v]:u._events[w].push(v):(u._events[w]=v,u._eventsCount++),u}function o(u,f){--u._eventsCount===0?u._events=new n:delete u._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],h,p;if(this._eventsCount===0)return f;for(p in h=this._events)t.call(h,p)&&f.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},l.prototype.listeners=function(f){var h=r?r+f:f,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,v=p.length,w=new Array(v);g<v;g++)w[g]=p[g].fn;return w},l.prototype.listenerCount=function(f){var h=r?r+f:f,p=this._events[h];return p?p.fn?1:p.length:0},l.prototype.emit=function(f,h,p,g,v,w){var x=r?r+f:f;if(!this._events[x])return!1;var b=this._events[x],S=arguments.length,A,P;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),S){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,h),!0;case 3:return b.fn.call(b.context,h,p),!0;case 4:return b.fn.call(b.context,h,p,g),!0;case 5:return b.fn.call(b.context,h,p,g,v),!0;case 6:return b.fn.call(b.context,h,p,g,v,w),!0}for(P=1,A=new Array(S-1);P<S;P++)A[P-1]=arguments[P];b.fn.apply(b.context,A)}else{var C=b.length,N;for(P=0;P<C;P++)switch(b[P].once&&this.removeListener(f,b[P].fn,void 0,!0),S){case 1:b[P].fn.call(b[P].context);break;case 2:b[P].fn.call(b[P].context,h);break;case 3:b[P].fn.call(b[P].context,h,p);break;case 4:b[P].fn.call(b[P].context,h,p,g);break;default:if(!A)for(N=1,A=new Array(S-1);N<S;N++)A[N-1]=arguments[N];b[P].fn.apply(b[P].context,A)}}return!0},l.prototype.on=function(f,h,p){return a(this,f,h,p,!1)},l.prototype.once=function(f,h,p){return a(this,f,h,p,!0)},l.prototype.removeListener=function(f,h,p,g){var v=r?r+f:f;if(!this._events[v])return this;if(!h)return o(this,v),this;var w=this._events[v];if(w.fn)w.fn===h&&(!g||w.once)&&(!p||w.context===p)&&o(this,v);else{for(var x=0,b=[],S=w.length;x<S;x++)(w[x].fn!==h||g&&!w[x].once||p&&w[x].context!==p)&&b.push(w[x]);b.length?this._events[v]=b.length===1?b[0]:b:o(this,v)}return this},l.prototype.removeAllListeners=function(f){var h;return f?(h=r?r+f:f,this._events[h]&&o(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l}(Vw)),Vw.exports}var $fe=Dfe();const Lfe=ut($fe);var Uw=new Lfe,qw="recharts.syncMouseEvents";function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(e)}function Bfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ffe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zF(n.key),n)}}function zfe(e,t,r){return t&&Ffe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ww(e,t,r){return t=zF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zF(e){var t=Vfe(e,"string");return gf(t)=="symbol"?t:t+""}function Vfe(e,t){if(gf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ufe=function(){function e(){Bfe(this,e),Ww(this,"activeIndex",0),Ww(this,"coordinateList",[]),Ww(this,"layout","horizontal")}return zfe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,l=o===void 0?null:o,u=r.layout,f=u===void 0?null:u,h=r.offset,p=h===void 0?null:h,g=r.mouseHandlerCallback,v=g===void 0?null:g;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=f??this.layout,this.offset=p??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,u=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,h=((n=window)===null||n===void 0?void 0:n.scrollY)||0,p=a+u+f,g=o+this.offset.top+l/2+h;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])}();function qfe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&pe(n)&&pe(i))return!0}return!1}function Wfe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function VF(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=wt(t,r,n,i),l=wt(t,r,n,a);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function Hfe(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,u=t.cy,f=t.innerRadius,h=t.outerRadius,p=t.angle,g=wt(l,u,f,p),v=wt(l,u,h,p);n=g.x,i=g.y,a=v.x,o=v.y}else return VF(t);return[{x:n,y:i},{x:a,y:o}]}function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}function BI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BI(Object(r),!0).forEach(function(n){Kfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kfe(e,t,r){return t=Gfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gfe(e){var t=Yfe(e,"string");return vf(t)=="symbol"?t:t+""}function Yfe(e,t){if(vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xfe(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,u=e.offset,f=e.activeTooltipIndex,h=e.tooltipAxisBandSize,p=e.layout,g=e.chartName,v=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!v||!a||!o||g!=="ScatterChart"&&i!=="axis")return null;var w,x=y_;if(g==="ScatterChart")w=o,x=Cse;else if(g==="BarChart")w=Wfe(p,o,u,h),x=nP;else if(p==="radial"){var b=VF(o),S=b.cx,A=b.cy,P=b.radius,C=b.startAngle,N=b.endAngle;w={cx:S,cy:A,startAngle:C,endAngle:N,innerRadius:P,outerRadius:P},x=HB}else w={points:Hfe(p,o,u)},x=y_;var E=Eh(Eh(Eh(Eh({stroke:"#ccc",pointerEvents:"none"},u),w),Le(v,!1)),{},{payload:l,payloadIndex:f,className:He("recharts-tooltip-cursor",v.className)});return _.isValidElement(v)?_.cloneElement(v,E):_.createElement(x,E)}var Zfe=["item"],Qfe=["children","className","width","height","style","compact","title","desc"];function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}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)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gs.apply(this,arguments)}function FI(e,t){return tde(e)||ede(e,t)||qF(e,t)||Jfe()}function Jfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ede(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(h){f=!0,i=h}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function tde(e){if(Array.isArray(e))return e}function zI(e,t){if(e==null)return{};var r=rde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ide(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,WF(n.key),n)}}function ade(e,t,r){return t&&ide(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ode(e,t,r){return t=em(t),sde(e,UF()?Reflect.construct(t,r||[],em(e).constructor):t.apply(e,r))}function sde(e,t){if(t&&(Nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lde(e)}function lde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UF=function(){return!!e})()}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},em(e)}function cde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X_(e,t)}function X_(e,t){return X_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},X_(e,t)}function Ol(e){return dde(e)||fde(e)||qF(e)||ude()}function ude(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qF(e,t){if(e){if(typeof e=="string")return Z_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z_(e,t)}}function fde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dde(e){if(Array.isArray(e))return Z_(e)}function Z_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(r),!0).forEach(function(n){Me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Me(e,t,r){return t=WF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WF(e){var t=hde(e,"string");return Nl(t)=="symbol"?t:t+""}function hde(e,t){if(Nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pde={xAxis:["bottom","top"],yAxis:["left","right"]},mde={width:"100%",height:"100%"},HF={x:0,y:0};function Ch(e){return e}var gde=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},vde=function(t,r,n,i){var a=r.find(function(h){return h&&h.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return ie(ie(ie({},i),wt(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,f=i.angle;return ie(ie(ie({},i),wt(i.cx,i.cy,u,f)),{},{angle:f,radius:u})}return HF},bg=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(l,u){var f=u.props.data;return f&&f.length?[].concat(Ol(l),Ol(f)):l},[]);return o.length>0?o:t&&t.length&&pe(i)&&pe(a)?t.slice(i,a+1):[]};function KF(e){return e==="number"?[0,"auto"]:void 0}var Q_=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=bg(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(u,f){var h,p=(h=f.props.data)!==null&&h!==void 0?h:r;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(o.dataKey&&!o.allowDuplicatedCategory){var v=p===void 0?l:p;g=R1(v,o.dataKey,i)}else g=p&&p[n]||l[n];return g?[].concat(Ol(u),[FB(f,g)]):u},[])},UI=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=gde(a,n),l=t.orderedTooltipTicks,u=t.tooltipAxis,f=t.tooltipTicks,h=tie(o,l,f,u);if(h>=0&&f){var p=f[h]&&f[h].value,g=Q_(t,r,h,p),v=vde(n,l,h,a);return{activeTooltipIndex:h,activeLabel:p,activePayload:g,activeCoordinate:v}}return null},yde=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,h=t.layout,p=t.children,g=t.stackOffset,v=MB(h,a);return n.reduce(function(w,x){var b,S=x.type.defaultProps!==void 0?ie(ie({},x.type.defaultProps),x.props):x.props,A=S.type,P=S.dataKey,C=S.allowDataOverflow,N=S.allowDuplicatedCategory,E=S.scale,T=S.ticks,k=S.includeHidden,M=S[o];if(w[M])return w;var z=bg(t.data,{graphicalItems:i.filter(function(K){var ae,ue=o in K.props?K.props[o]:(ae=K.type.defaultProps)===null||ae===void 0?void 0:ae[o];return ue===M}),dataStartIndex:u,dataEndIndex:f}),D=z.length,B,U,G;qfe(S.domain,C,A)&&(B=h_(S.domain,null,C),v&&(A==="number"||E!=="auto")&&(G=Pu(z,P,"category")));var Y=KF(A);if(!B||B.length===0){var F,X=(F=S.domain)!==null&&F!==void 0?F:Y;if(P){if(B=Pu(z,P,A),A==="category"&&v){var I=YY(B);N&&I?(U=B,B=Vp(0,D)):N||(B=HR(X,B,x).reduce(function(K,ae){return K.indexOf(ae)>=0?K:[].concat(Ol(K),[ae])},[]))}else if(A==="category")N?B=B.filter(function(K){return K!==""&&!Ze(K)}):B=HR(X,B,x).reduce(function(K,ae){return K.indexOf(ae)>=0||ae===""||Ze(ae)?K:[].concat(Ol(K),[ae])},[]);else if(A==="number"){var W=oie(z,i.filter(function(K){var ae,ue,xe=o in K.props?K.props[o]:(ae=K.type.defaultProps)===null||ae===void 0?void 0:ae[o],Ae="hide"in K.props?K.props.hide:(ue=K.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return xe===M&&(k||!Ae)}),P,a,h);W&&(B=W)}v&&(A==="number"||E!=="auto")&&(G=Pu(z,P,"category"))}else v?B=Vp(0,D):l&&l[M]&&l[M].hasStack&&A==="number"?B=g==="expand"?[0,1]:BB(l[M].stackGroups,u,f):B=RB(z,i.filter(function(K){var ae=o in K.props?K.props[o]:K.type.defaultProps[o],ue="hide"in K.props?K.props.hide:K.type.defaultProps.hide;return ae===M&&(k||!ue)}),A,h,!0);if(A==="number")B=Y_(p,B,M,a,T),X&&(B=h_(X,B,C));else if(A==="category"&&X){var Q=X,L=B.every(function(K){return Q.indexOf(K)>=0});L&&(B=Q)}}return ie(ie({},w),{},Me({},M,ie(ie({},S),{},{axisType:a,domain:B,categoricalDomain:G,duplicateDomain:U,originalDomain:(b=S.domain)!==null&&b!==void 0?b:Y,isCategorical:v,layout:h})))},{})},xde=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,h=t.layout,p=t.children,g=bg(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:f}),v=g.length,w=MB(h,a),x=-1;return n.reduce(function(b,S){var A=S.type.defaultProps!==void 0?ie(ie({},S.type.defaultProps),S.props):S.props,P=A[o],C=KF("number");if(!b[P]){x++;var N;return w?N=Vp(0,v):l&&l[P]&&l[P].hasStack?(N=BB(l[P].stackGroups,u,f),N=Y_(p,N,P,a)):(N=h_(C,RB(g,n.filter(function(E){var T,k,M=o in E.props?E.props[o]:(T=E.type.defaultProps)===null||T===void 0?void 0:T[o],z="hide"in E.props?E.props.hide:(k=E.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===P&&!z}),"number",h),i.defaultProps.allowDataOverflow),N=Y_(p,N,P,a)),ie(ie({},b),{},Me({},P,ie(ie({axisType:a},i.defaultProps),{},{hide:!0,orientation:Qr(pde,"".concat(a,".").concat(x%2),null),domain:N,originalDomain:C,isCategorical:w,layout:h})))}return b},{})},bde=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,u=r.dataStartIndex,f=r.dataEndIndex,h=t.children,p="".concat(i,"Id"),g=gn(h,a),v={};return g&&g.length?v=yde(t,{axes:g,graphicalItems:o,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(v=xde(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),v},wde=function(t){var r=Ra(t),n=Di(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ej(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Cp(r,n)}},qI=function(t){var r=t.children,n=t.defaultShowTooltip,i=Yr(r,xl),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},_de=function(t){return!t||!t.length?!1:t.some(function(r){var n=Li(r&&r.type);return n&&n.indexOf("Bar")>=0})},WI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Sde=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,f=n.width,h=n.height,p=n.children,g=n.margin||{},v=Yr(p,xl),w=Yr(p,Da),x=Object.keys(u).reduce(function(N,E){var T=u[E],k=T.orientation;return!T.mirror&&!T.hide?ie(ie({},N),{},Me({},k,N[k]+T.width)):N},{left:g.left||0,right:g.right||0}),b=Object.keys(o).reduce(function(N,E){var T=o[E],k=T.orientation;return!T.mirror&&!T.hide?ie(ie({},N),{},Me({},k,Qr(N,"".concat(k))+T.height)):N},{top:g.top||0,bottom:g.bottom||0}),S=ie(ie({},b),x),A=S.bottom;v&&(S.bottom+=v.props.height||xl.defaultProps.height),w&&r&&(S=iie(S,i,n,r));var P=f-S.left-S.right,C=h-S.top-S.bottom;return ie(ie({brushBottom:A},S),{},{width:Math.max(P,0),height:Math.max(C,0)})},jde=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},GF=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,f=t.legendContent,h=t.formatAxisMap,p=t.defaultProps,g=function(S,A){var P=A.graphicalItems,C=A.stackGroups,N=A.offset,E=A.updateId,T=A.dataStartIndex,k=A.dataEndIndex,M=S.barSize,z=S.layout,D=S.barGap,B=S.barCategoryGap,U=S.maxBarSize,G=WI(z),Y=G.numericAxisName,F=G.cateAxisName,X=_de(P),I=[];return P.forEach(function(W,Q){var L=bg(S.data,{graphicalItems:[W],dataStartIndex:T,dataEndIndex:k}),K=W.type.defaultProps!==void 0?ie(ie({},W.type.defaultProps),W.props):W.props,ae=K.dataKey,ue=K.maxBarSize,xe=K["".concat(Y,"Id")],Ae=K["".concat(F,"Id")],oe={},ge=u.reduce(function(Tr,An){var ls=A["".concat(An.axisType,"Map")],fc=K["".concat(An.axisType,"Id")];ls&&ls[fc]||An.axisType==="zAxis"||Ko();var dc=ls[fc];return ie(ie({},Tr),{},Me(Me({},An.axisType,dc),"".concat(An.axisType,"Ticks"),Di(dc)))},oe),ne=ge[F],fe=ge["".concat(F,"Ticks")],me=C&&C[xe]&&C[xe].hasStack&&mie(W,C[xe].stackGroups),re=Li(W.type).indexOf("Bar")>=0,We=Cp(ne,fe),De=[],pt=X&&rie({barSize:M,stackGroups:C,totalSize:jde(ge,F)});if(re){var mt,Pt,Ur=Ze(ue)?U:ue,_r=(mt=(Pt=Cp(ne,fe,!0))!==null&&Pt!==void 0?Pt:Ur)!==null&&mt!==void 0?mt:0;De=nie({barGap:D,barCategoryGap:B,bandSize:_r!==We?_r:We,sizeList:pt[Ae],maxBarSize:Ur}),_r!==We&&(De=De.map(function(Tr){return ie(ie({},Tr),{},{position:ie(ie({},Tr.position),{},{offset:Tr.position.offset-_r/2})})}))}var Zn=W&&W.type&&W.type.getComposedData;Zn&&I.push({props:ie(ie({},Zn(ie(ie({},ge),{},{displayedData:L,props:S,dataKey:ae,item:W,bandSize:We,barPosition:De,offset:N,stackedData:me,layout:z,dataStartIndex:T,dataEndIndex:k}))),{},Me(Me(Me({key:W.key||"item-".concat(Q)},Y,ge[Y]),F,ge[F]),"animationId",E)),childIndex:sX(W,S.children),item:W})}),I},v=function(S,A){var P=S.props,C=S.dataStartIndex,N=S.dataEndIndex,E=S.updateId;if(!sT({props:P}))return null;var T=P.children,k=P.layout,M=P.stackOffset,z=P.data,D=P.reverseStackOrder,B=WI(k),U=B.numericAxisName,G=B.cateAxisName,Y=gn(T,n),F=hie(z,Y,"".concat(U,"Id"),"".concat(G,"Id"),M,D),X=u.reduce(function(K,ae){var ue="".concat(ae.axisType,"Map");return ie(ie({},K),{},Me({},ue,bde(P,ie(ie({},ae),{},{graphicalItems:Y,stackGroups:ae.axisType===U&&F,dataStartIndex:C,dataEndIndex:N}))))},{}),I=Sde(ie(ie({},X),{},{props:P,graphicalItems:Y}),A==null?void 0:A.legendBBox);Object.keys(X).forEach(function(K){X[K]=h(P,X[K],I,K.replace("Map",""),r)});var W=X["".concat(G,"Map")],Q=wde(W),L=g(P,ie(ie({},X),{},{dataStartIndex:C,dataEndIndex:N,updateId:E,graphicalItems:Y,stackGroups:F,offset:I}));return ie(ie({formattedGraphicalItems:L,graphicalItems:Y,offset:I,stackGroups:F},Q),X)},w=function(b){function S(A){var P,C,N;return nde(this,S),N=ode(this,S,[A]),Me(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Me(N,"accessibilityManager",new Ufe),Me(N,"handleLegendBBoxUpdate",function(E){if(E){var T=N.state,k=T.dataStartIndex,M=T.dataEndIndex,z=T.updateId;N.setState(ie({legendBBox:E},v({props:N.props,dataStartIndex:k,dataEndIndex:M,updateId:z},ie(ie({},N.state),{},{legendBBox:E}))))}}),Me(N,"handleReceiveSyncEvent",function(E,T,k){if(N.props.syncId===E){if(k===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(T)}}),Me(N,"handleBrushChange",function(E){var T=E.startIndex,k=E.endIndex;if(T!==N.state.dataStartIndex||k!==N.state.dataEndIndex){var M=N.state.updateId;N.setState(function(){return ie({dataStartIndex:T,dataEndIndex:k},v({props:N.props,dataStartIndex:T,dataEndIndex:k,updateId:M},N.state))}),N.triggerSyncEvent({dataStartIndex:T,dataEndIndex:k})}}),Me(N,"handleMouseEnter",function(E){var T=N.getMouseInfo(E);if(T){var k=ie(ie({},T),{},{isTooltipActive:!0});N.setState(k),N.triggerSyncEvent(k);var M=N.props.onMouseEnter;Fe(M)&&M(k,E)}}),Me(N,"triggeredAfterMouseMove",function(E){var T=N.getMouseInfo(E),k=T?ie(ie({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(k),N.triggerSyncEvent(k);var M=N.props.onMouseMove;Fe(M)&&M(k,E)}),Me(N,"handleItemMouseEnter",function(E){N.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Me(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Me(N,"handleMouseMove",function(E){E.persist(),N.throttleTriggeredAfterMouseMove(E)}),Me(N,"handleMouseLeave",function(E){N.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};N.setState(T),N.triggerSyncEvent(T);var k=N.props.onMouseLeave;Fe(k)&&k(T,E)}),Me(N,"handleOuterEvent",function(E){var T=oX(E),k=Qr(N.props,"".concat(T));if(T&&Fe(k)){var M,z;/.*touch.*/i.test(T)?z=N.getMouseInfo(E.changedTouches[0]):z=N.getMouseInfo(E),k((M=z)!==null&&M!==void 0?M:{},E)}}),Me(N,"handleClick",function(E){var T=N.getMouseInfo(E);if(T){var k=ie(ie({},T),{},{isTooltipActive:!0});N.setState(k),N.triggerSyncEvent(k);var M=N.props.onClick;Fe(M)&&M(k,E)}}),Me(N,"handleMouseDown",function(E){var T=N.props.onMouseDown;if(Fe(T)){var k=N.getMouseInfo(E);T(k,E)}}),Me(N,"handleMouseUp",function(E){var T=N.props.onMouseUp;if(Fe(T)){var k=N.getMouseInfo(E);T(k,E)}}),Me(N,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Me(N,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseDown(E.changedTouches[0])}),Me(N,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseUp(E.changedTouches[0])}),Me(N,"handleDoubleClick",function(E){var T=N.props.onDoubleClick;if(Fe(T)){var k=N.getMouseInfo(E);T(k,E)}}),Me(N,"handleContextMenu",function(E){var T=N.props.onContextMenu;if(Fe(T)){var k=N.getMouseInfo(E);T(k,E)}}),Me(N,"triggerSyncEvent",function(E){N.props.syncId!==void 0&&Uw.emit(qw,N.props.syncId,E,N.eventEmitterSymbol)}),Me(N,"applySyncEvent",function(E){var T=N.props,k=T.layout,M=T.syncMethod,z=N.state.updateId,D=E.dataStartIndex,B=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)N.setState(ie({dataStartIndex:D,dataEndIndex:B},v({props:N.props,dataStartIndex:D,dataEndIndex:B,updateId:z},N.state)));else if(E.activeTooltipIndex!==void 0){var U=E.chartX,G=E.chartY,Y=E.activeTooltipIndex,F=N.state,X=F.offset,I=F.tooltipTicks;if(!X)return;if(typeof M=="function")Y=M(I,E);else if(M==="value"){Y=-1;for(var W=0;W<I.length;W++)if(I[W].value===E.activeLabel){Y=W;break}}var Q=ie(ie({},X),{},{x:X.left,y:X.top}),L=Math.min(U,Q.x+Q.width),K=Math.min(G,Q.y+Q.height),ae=I[Y]&&I[Y].value,ue=Q_(N.state,N.props.data,Y),xe=I[Y]?{x:k==="horizontal"?I[Y].coordinate:L,y:k==="horizontal"?K:I[Y].coordinate}:HF;N.setState(ie(ie({},E),{},{activeLabel:ae,activeCoordinate:xe,activePayload:ue,activeTooltipIndex:Y}))}else N.setState(E)}),Me(N,"renderCursor",function(E){var T,k=N.state,M=k.isTooltipActive,z=k.activeCoordinate,D=k.activePayload,B=k.offset,U=k.activeTooltipIndex,G=k.tooltipAxisBandSize,Y=N.getTooltipEventType(),F=(T=E.props.active)!==null&&T!==void 0?T:M,X=N.props.layout,I=E.key||"_recharts-cursor";return V.createElement(Xfe,{key:I,activeCoordinate:z,activePayload:D,activeTooltipIndex:U,chartName:r,element:E,isActive:F,layout:X,offset:B,tooltipAxisBandSize:G,tooltipEventType:Y})}),Me(N,"renderPolarAxis",function(E,T,k){var M=Qr(E,"type.axisType"),z=Qr(N.state,"".concat(M,"Map")),D=E.type.defaultProps,B=D!==void 0?ie(ie({},D),E.props):E.props,U=z&&z[B["".concat(M,"Id")]];return _.cloneElement(E,ie(ie({},U),{},{className:He(M,U.className),key:E.key||"".concat(T,"-").concat(k),ticks:Di(U,!0)}))}),Me(N,"renderPolarGrid",function(E){var T=E.props,k=T.radialLines,M=T.polarAngles,z=T.polarRadius,D=N.state,B=D.radiusAxisMap,U=D.angleAxisMap,G=Ra(B),Y=Ra(U),F=Y.cx,X=Y.cy,I=Y.innerRadius,W=Y.outerRadius;return _.cloneElement(E,{polarAngles:Array.isArray(M)?M:Di(Y,!0).map(function(Q){return Q.coordinate}),polarRadius:Array.isArray(z)?z:Di(G,!0).map(function(Q){return Q.coordinate}),cx:F,cy:X,innerRadius:I,outerRadius:W,key:E.key||"polar-grid",radialLines:k})}),Me(N,"renderLegend",function(){var E=N.state.formattedGraphicalItems,T=N.props,k=T.children,M=T.width,z=T.height,D=N.props.margin||{},B=M-(D.left||0)-(D.right||0),U=TB({children:k,formattedGraphicalItems:E,legendWidth:B,legendContent:f});if(!U)return null;var G=U.item,Y=zI(U,Zfe);return _.cloneElement(G,ie(ie({},Y),{},{chartWidth:M,chartHeight:z,margin:D,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Me(N,"renderTooltip",function(){var E,T=N.props,k=T.children,M=T.accessibilityLayer,z=Yr(k,hn);if(!z)return null;var D=N.state,B=D.isTooltipActive,U=D.activeCoordinate,G=D.activePayload,Y=D.activeLabel,F=D.offset,X=(E=z.props.active)!==null&&E!==void 0?E:B;return _.cloneElement(z,{viewBox:ie(ie({},F),{},{x:F.left,y:F.top}),active:X,label:Y,payload:X?G:[],coordinate:U,accessibilityLayer:M})}),Me(N,"renderBrush",function(E){var T=N.props,k=T.margin,M=T.data,z=N.state,D=z.offset,B=z.dataStartIndex,U=z.dataEndIndex,G=z.updateId;return _.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Ph(N.handleBrushChange,E.props.onChange),data:M,x:pe(E.props.x)?E.props.x:D.left,y:pe(E.props.y)?E.props.y:D.top+D.height+D.brushBottom-(k.bottom||0),width:pe(E.props.width)?E.props.width:D.width,startIndex:B,endIndex:U,updateId:"brush-".concat(G)})}),Me(N,"renderReferenceElement",function(E,T,k){if(!E)return null;var M=N,z=M.clipPathId,D=N.state,B=D.xAxisMap,U=D.yAxisMap,G=D.offset,Y=E.type.defaultProps||{},F=E.props,X=F.xAxisId,I=X===void 0?Y.xAxisId:X,W=F.yAxisId,Q=W===void 0?Y.yAxisId:W;return _.cloneElement(E,{key:E.key||"".concat(T,"-").concat(k),xAxis:B[I],yAxis:U[Q],viewBox:{x:G.left,y:G.top,width:G.width,height:G.height},clipPathId:z})}),Me(N,"renderActivePoints",function(E){var T=E.item,k=E.activePoint,M=E.basePoint,z=E.childIndex,D=E.isRange,B=[],U=T.props.key,G=T.item.type.defaultProps!==void 0?ie(ie({},T.item.type.defaultProps),T.item.props):T.item.props,Y=G.activeDot,F=G.dataKey,X=ie(ie({index:z,dataKey:F,cx:k.x,cy:k.y,r:4,fill:rP(T.item),strokeWidth:2,stroke:"#fff",payload:k.payload,value:k.value},Le(Y,!1)),op(Y));return B.push(S.renderActiveDot(Y,X,"".concat(U,"-activePoint-").concat(z))),M?B.push(S.renderActiveDot(Y,ie(ie({},X),{},{cx:M.x,cy:M.y}),"".concat(U,"-basePoint-").concat(z))):D&&B.push(null),B}),Me(N,"renderGraphicChild",function(E,T,k){var M=N.filterFormatItem(E,T,k);if(!M)return null;var z=N.getTooltipEventType(),D=N.state,B=D.isTooltipActive,U=D.tooltipAxis,G=D.activeTooltipIndex,Y=D.activeLabel,F=N.props.children,X=Yr(F,hn),I=M.props,W=I.points,Q=I.isRange,L=I.baseLine,K=M.item.type.defaultProps!==void 0?ie(ie({},M.item.type.defaultProps),M.item.props):M.item.props,ae=K.activeDot,ue=K.hide,xe=K.activeBar,Ae=K.activeShape,oe=!!(!ue&&B&&X&&(ae||xe||Ae)),ge={};z!=="axis"&&X&&X.props.trigger==="click"?ge={onClick:Ph(N.handleItemMouseEnter,E.props.onClick)}:z!=="axis"&&(ge={onMouseLeave:Ph(N.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Ph(N.handleItemMouseEnter,E.props.onMouseEnter)});var ne=_.cloneElement(E,ie(ie({},M.props),ge));function fe(An){return typeof U.dataKey=="function"?U.dataKey(An.payload):null}if(oe)if(G>=0){var me,re;if(U.dataKey&&!U.allowDuplicatedCategory){var We=typeof U.dataKey=="function"?fe:"payload.".concat(U.dataKey.toString());me=R1(W,We,Y),re=Q&&L&&R1(L,We,Y)}else me=W==null?void 0:W[G],re=Q&&L&&L[G];if(Ae||xe){var De=E.props.activeIndex!==void 0?E.props.activeIndex:G;return[_.cloneElement(E,ie(ie(ie({},M.props),ge),{},{activeIndex:De})),null,null]}if(!Ze(me))return[ne].concat(Ol(N.renderActivePoints({item:M,activePoint:me,basePoint:re,childIndex:G,isRange:Q})))}else{var pt,mt=(pt=N.getItemByXY(N.state.activeCoordinate))!==null&&pt!==void 0?pt:{graphicalItem:ne},Pt=mt.graphicalItem,Ur=Pt.item,_r=Ur===void 0?E:Ur,Zn=Pt.childIndex,Tr=ie(ie(ie({},M.props),ge),{},{activeIndex:Zn});return[_.cloneElement(_r,Tr),null,null]}return Q?[ne,null,null]:[ne,null]}),Me(N,"renderCustomized",function(E,T,k){return _.cloneElement(E,ie(ie({key:"recharts-customized-".concat(k)},N.props),N.state))}),Me(N,"renderMap",{CartesianGrid:{handler:Ch,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:Ch},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:Ch},YAxis:{handler:Ch},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((P=A.id)!==null&&P!==void 0?P:zf("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=C4(N.triggeredAfterMouseMove,(C=A.throttleDelay)!==null&&C!==void 0?C:1e3/60),N.state={},N}return cde(S,b),ade(S,[{key:"componentDidMount",value:function(){var P,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var P=this.props,C=P.children,N=P.data,E=P.height,T=P.layout,k=Yr(C,hn);if(k){var M=k.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,D=Q_(this.state,N,M,z),B=this.state.tooltipTicks[M].coordinate,U=(this.state.offset.top+E)/2,G=T==="horizontal",Y=G?{x:B,y:U}:{y:B,x:U},F=this.state.formattedGraphicalItems.find(function(I){var W=I.item;return W.type.name==="Scatter"});F&&(Y=ie(ie({},Y),F.props.points[M].tooltipPosition),D=F.props.points[M].tooltipPayload);var X={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:z,activePayload:D,activeCoordinate:Y};this.setState(X),this.renderCursor(k),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(P,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==P.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==P.margin){var N,E;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(P){I1([Yr(P.children,hn)],[Yr(this.props.children,hn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var P=Yr(this.props.children,hn);if(P&&typeof P.props.shared=="boolean"){var C=P.props.shared?"axis":"item";return l.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(P){if(!this.container)return null;var C=this.container,N=C.getBoundingClientRect(),E=KJ(N),T={chartX:Math.round(P.pageX-E.left),chartY:Math.round(P.pageY-E.top)},k=N.width/C.offsetWidth||1,M=this.inRange(T.chartX,T.chartY,k);if(!M)return null;var z=this.state,D=z.xAxisMap,B=z.yAxisMap,U=this.getTooltipEventType(),G=UI(this.state,this.props.data,this.props.layout,M);if(U!=="axis"&&D&&B){var Y=Ra(D).scale,F=Ra(B).scale,X=Y&&Y.invert?Y.invert(T.chartX):null,I=F&&F.invert?F.invert(T.chartY):null;return ie(ie({},T),{},{xValue:X,yValue:I},G)}return G?ie(ie({},T),G):null}},{key:"inRange",value:function(P,C){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,T=P/N,k=C/N;if(E==="horizontal"||E==="vertical"){var M=this.state.offset,z=T>=M.left&&T<=M.left+M.width&&k>=M.top&&k<=M.top+M.height;return z?{x:T,y:k}:null}var D=this.state,B=D.angleAxisMap,U=D.radiusAxisMap;if(B&&U){var G=Ra(B);return YR({x:T,y:k},G)}return null}},{key:"parseEventsOfWrapper",value:function(){var P=this.props.children,C=this.getTooltipEventType(),N=Yr(P,hn),E={};N&&C==="axis"&&(N.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=op(this.props,this.handleOuterEvent);return ie(ie({},T),E)}},{key:"addListener",value:function(){Uw.on(qw,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Uw.removeListener(qw,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(P,C,N){for(var E=this.state.formattedGraphicalItems,T=0,k=E.length;T<k;T++){var M=E[T];if(M.item===P||M.props.key===P.key||C===Li(M.item.type)&&N===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var P=this.clipPathId,C=this.state.offset,N=C.left,E=C.top,T=C.height,k=C.width;return V.createElement("defs",null,V.createElement("clipPath",{id:P},V.createElement("rect",{x:N,y:E,height:T,width:k})))}},{key:"getXScales",value:function(){var P=this.state.xAxisMap;return P?Object.entries(P).reduce(function(C,N){var E=FI(N,2),T=E[0],k=E[1];return ie(ie({},C),{},Me({},T,k.scale))},{}):null}},{key:"getYScales",value:function(){var P=this.state.yAxisMap;return P?Object.entries(P).reduce(function(C,N){var E=FI(N,2),T=E[0],k=E[1];return ie(ie({},C),{},Me({},T,k.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(P){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[P])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(P){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[P])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(P){var C=this.state,N=C.formattedGraphicalItems,E=C.activeItem;if(N&&N.length)for(var T=0,k=N.length;T<k;T++){var M=N[T],z=M.props,D=M.item,B=D.type.defaultProps!==void 0?ie(ie({},D.type.defaultProps),D.props):D.props,U=Li(D.type);if(U==="Bar"){var G=(z.data||[]).find(function(I){return use(P,I)});if(G)return{graphicalItem:M,payload:G}}else if(U==="RadialBar"){var Y=(z.data||[]).find(function(I){return YR(P,I)});if(Y)return{graphicalItem:M,payload:Y}}else if(hg(M,E)||pg(M,E)||ff(M,E)){var F=Mle({graphicalItem:M,activeTooltipItem:E,itemData:B.data}),X=B.activeIndex===void 0?F:B.activeIndex;return{graphicalItem:ie(ie({},M),{},{childIndex:X}),payload:ff(M,E)?B.data[F]:M.props.data[F]}}}return null}},{key:"render",value:function(){var P=this;if(!sT(this))return null;var C=this.props,N=C.children,E=C.className,T=C.width,k=C.height,M=C.style,z=C.compact,D=C.title,B=C.desc,U=zI(C,Qfe),G=Le(U,!1);if(z)return V.createElement(jI,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement($1,Gs({},G,{width:T,height:k,title:D,desc:B}),this.renderClipPath(),cT(N,this.renderMap)));if(this.props.accessibilityLayer){var Y,F;G.tabIndex=(Y=this.props.tabIndex)!==null&&Y!==void 0?Y:0,G.role=(F=this.props.role)!==null&&F!==void 0?F:"application",G.onKeyDown=function(I){P.accessibilityManager.keyboardEvent(I)},G.onFocus=function(){P.accessibilityManager.focus()}}var X=this.parseEventsOfWrapper();return V.createElement(jI,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement("div",Gs({className:He("recharts-wrapper",E),style:ie({position:"relative",cursor:"default",width:T,height:k},M)},X,{ref:function(W){P.container=W}}),V.createElement($1,Gs({},G,{width:T,height:k,title:D,desc:B,style:mde}),this.renderClipPath(),cT(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(_.Component);Me(w,"displayName",r),Me(w,"defaultProps",ie({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Me(w,"getDerivedStateFromProps",function(b,S){var A=b.dataKey,P=b.data,C=b.children,N=b.width,E=b.height,T=b.layout,k=b.stackOffset,M=b.margin,z=S.dataStartIndex,D=S.dataEndIndex;if(S.updateId===void 0){var B=qI(b);return ie(ie(ie({},B),{},{updateId:0},v(ie(ie({props:b},B),{},{updateId:0}),S)),{},{prevDataKey:A,prevData:P,prevWidth:N,prevHeight:E,prevLayout:T,prevStackOffset:k,prevMargin:M,prevChildren:C})}if(A!==S.prevDataKey||P!==S.prevData||N!==S.prevWidth||E!==S.prevHeight||T!==S.prevLayout||k!==S.prevStackOffset||!el(M,S.prevMargin)){var U=qI(b),G={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},Y=ie(ie({},UI(S,P,T)),{},{updateId:S.updateId+1}),F=ie(ie(ie({},U),G),Y);return ie(ie(ie({},F),v(ie({props:b},F),S)),{},{prevDataKey:A,prevData:P,prevWidth:N,prevHeight:E,prevLayout:T,prevStackOffset:k,prevMargin:M,prevChildren:C})}if(!I1(C,S.prevChildren)){var X,I,W,Q,L=Yr(C,xl),K=L&&(X=(I=L.props)===null||I===void 0?void 0:I.startIndex)!==null&&X!==void 0?X:z,ae=L&&(W=(Q=L.props)===null||Q===void 0?void 0:Q.endIndex)!==null&&W!==void 0?W:D,ue=K!==z||ae!==D,xe=!Ze(P),Ae=xe&&!ue?S.updateId:S.updateId+1;return ie(ie({updateId:Ae},v(ie(ie({props:b},S),{},{updateId:Ae,dataStartIndex:K,dataEndIndex:ae}),S)),{},{prevChildren:C,dataStartIndex:K,dataEndIndex:ae})}return null}),Me(w,"renderActiveDot",function(b,S,A){var P;return _.isValidElement(b)?P=_.cloneElement(b,S):Fe(b)?P=b(S):P=V.createElement(iP,S),V.createElement(dt,{className:"recharts-active-dot",key:A},P)});var x=_.forwardRef(function(S,A){return V.createElement(w,Gs({},S,{ref:A}))});return x.displayName=w.displayName,x},YF=GF({chartName:"BarChart",GraphicalChild:Ja,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Kf},{axisType:"yAxis",AxisComp:Gf}],formatAxisMap:$ce}),Pde=GF({chartName:"PieChart",GraphicalChild:na,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:dg},{axisType:"radiusAxis",AxisComp:ug}],formatAxisMap:Pie,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const mP=()=>{const{residenceData:e,loading:t,error:r}=lj(),n=_.useRef(null);if(t)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(Je,{className:"p-6 flex items-center justify-center h-4",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})})]});if(r)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-red-500 to-red-600"}),d.jsx(Je,{className:"p-6 text-center",children:d.jsx("p",{className:"text-red-400",children:r})})]});if(!e.length)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-gray-600 to-gray-700"}),d.jsx(Je,{className:"p-6 text-center",children:d.jsx("p",{className:"text-gray-400",children:"No data available"})})]});const i=["#9B2335","#DC2626","#EA580C","#D97706","#CA8A04","#65A30D","#16A34A","#059669","#0891B2","#0284C7"];return d.jsxs(Qe,{ref:n,className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(bn,{className:"border-b border-gray-800",children:[d.jsx(wn,{className:"text-lg font-medium text-white",children:"Italian Migration: Residence Distribution"}),d.jsx(ts,{className:"text-gray-400",children:"Distribution of Italian migrants across different towns or cities"})]}),d.jsx(Je,{className:"p-6",children:d.jsx(Tj,{width:"100%",height:400,children:d.jsxs(Pde,{children:[d.jsx(na,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:130,innerRadius:70,paddingAngle:3,labelLine:!1,label:({name:a,value:o})=>`${a} (${o})`,children:e.map((a,o)=>d.jsx(Ym,{fill:i[o%i.length],className:"rounded-full"},`cell-${o}`))}),d.jsx(hn,{contentStyle:{backgroundColor:"#1F2937",borderRadius:"8px",color:"#fff",fontSize:"0.875rem",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",border:"1px solid #374151"},formatter:(a,o)=>[`${a} migrants`,o]}),d.jsx(Da,{verticalAlign:"bottom",iconType:"circle",align:"center",wrapperStyle:{fontSize:"0.875rem",color:"#9CA3AF",marginTop:"1rem"}})]})})})]})};function Ade(e,t=globalThis==null?void 0:globalThis.document){const r=pi(e);_.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Nde="DismissableLayer",J_="dismissableLayer.update",Ode="dismissableLayer.pointerDownOutside",Ede="dismissableLayer.focusOutside",HI,XF=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wg=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...u}=e,f=_.useContext(XF),[h,p]=_.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=_.useState({}),w=at(t,T=>p(T)),x=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=x.indexOf(b),A=h?x.indexOf(h):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,C=A>=S,N=kde(T=>{const k=T.target,M=[...f.branches].some(z=>z.contains(k));!C||M||(i==null||i(T),o==null||o(T),T.defaultPrevented||l==null||l())},g),E=Rde(T=>{const k=T.target;[...f.branches].some(z=>z.contains(k))||(a==null||a(T),o==null||o(T),T.defaultPrevented||l==null||l())},g);return Ade(T=>{A===f.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),_.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(HI=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),KI(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=HI)}},[h,g,r,f]),_.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),KI())},[h,f]),_.useEffect(()=>{const T=()=>v({});return document.addEventListener(J_,T),()=>document.removeEventListener(J_,T)},[]),d.jsx(Ie.div,{...u,ref:w,style:{pointerEvents:P?C?"auto":"none":void 0,...e.style},onFocusCapture:Pe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Pe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Pe(e.onPointerDownCapture,N.onPointerDownCapture)})});wg.displayName=Nde;var Cde="DismissableLayerBranch",Tde=_.forwardRef((e,t)=>{const r=_.useContext(XF),n=_.useRef(null),i=at(t,n);return _.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(Ie.div,{...e,ref:i})});Tde.displayName=Cde;function kde(e,t=globalThis==null?void 0:globalThis.document){const r=pi(e),n=_.useRef(!1),i=_.useRef(()=>{});return _.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){ZF(Ode,r,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Rde(e,t=globalThis==null?void 0:globalThis.document){const r=pi(e),n=_.useRef(!1);return _.useEffect(()=>{const i=a=>{a.target&&!n.current&&ZF(Ede,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function KI(){const e=new CustomEvent(J_);document.dispatchEvent(e)}function ZF(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?VL(i,a):i.dispatchEvent(a)}var Hw=0;function gP(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??GI()),document.body.insertAdjacentElement("beforeend",e[1]??GI()),Hw++,()=>{Hw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hw--}},[])}function GI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Kw="focusScope.autoFocusOnMount",Gw="focusScope.autoFocusOnUnmount",YI={bubbles:!1,cancelable:!0},Mde="FocusScope",_g=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,u]=_.useState(null),f=pi(i),h=pi(a),p=_.useRef(null),g=at(t,x=>u(x)),v=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(n){let x=function(P){if(v.paused||!l)return;const C=P.target;l.contains(C)?p.current=C:Na(p.current,{select:!0})},b=function(P){if(v.paused||!l)return;const C=P.relatedTarget;C!==null&&(l.contains(C)||Na(p.current,{select:!0}))},S=function(P){if(document.activeElement===document.body)for(const N of P)N.removedNodes.length>0&&Na(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",b);const A=new MutationObserver(S);return l&&A.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",b),A.disconnect()}}},[n,l,v.paused]),_.useEffect(()=>{if(l){ZI.add(v);const x=document.activeElement;if(!l.contains(x)){const S=new CustomEvent(Kw,YI);l.addEventListener(Kw,f),l.dispatchEvent(S),S.defaultPrevented||(Ide(Fde(QF(l)),{select:!0}),document.activeElement===x&&Na(l))}return()=>{l.removeEventListener(Kw,f),setTimeout(()=>{const S=new CustomEvent(Gw,YI);l.addEventListener(Gw,h),l.dispatchEvent(S),S.defaultPrevented||Na(x??document.body,{select:!0}),l.removeEventListener(Gw,h),ZI.remove(v)},0)}}},[l,f,h,v]);const w=_.useCallback(x=>{if(!r&&!n||v.paused)return;const b=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,S=document.activeElement;if(b&&S){const A=x.currentTarget,[P,C]=Dde(A);P&&C?!x.shiftKey&&S===C?(x.preventDefault(),r&&Na(P,{select:!0})):x.shiftKey&&S===P&&(x.preventDefault(),r&&Na(C,{select:!0})):S===A&&x.preventDefault()}},[r,n,v.paused]);return d.jsx(Ie.div,{tabIndex:-1,...o,ref:g,onKeyDown:w})});_g.displayName=Mde;function Ide(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Na(n,{select:t}),document.activeElement!==r)return}function Dde(e){const t=QF(e),r=XI(t,e),n=XI(t.reverse(),e);return[r,n]}function QF(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function XI(e,t){for(const r of e)if(!$de(r,{upTo:t}))return r}function $de(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Lde(e){return e instanceof HTMLInputElement&&"select"in e}function Na(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Lde(e)&&t&&e.select()}}var ZI=Bde();function Bde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=QI(e,t),e.unshift(t)},remove(t){var r;e=QI(e,t),(r=e[0])==null||r.resume()}}}function QI(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Fde(e){return e.filter(t=>t.tagName!=="A")}const zde=["top","right","bottom","left"],Va=Math.min,Xr=Math.max,tm=Math.round,Th=Math.floor,ci=e=>({x:e,y:e}),Vde={left:"right",right:"left",bottom:"top",top:"bottom"},Ude={start:"end",end:"start"};function eS(e,t,r){return Xr(e,Va(t,r))}function Yi(e,t){return typeof e=="function"?e(t):e}function Xi(e){return e.split("-")[0]}function ec(e){return e.split("-")[1]}function vP(e){return e==="x"?"y":"x"}function yP(e){return e==="y"?"height":"width"}function Fi(e){return["top","bottom"].includes(Xi(e))?"y":"x"}function xP(e){return vP(Fi(e))}function qde(e,t,r){r===void 0&&(r=!1);const n=ec(e),i=xP(e),a=yP(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=rm(o)),[o,rm(o)]}function Wde(e){const t=rm(e);return[tS(e),t,tS(t)]}function tS(e){return e.replace(/start|end/g,t=>Ude[t])}function Hde(e,t,r){const n=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?a:o;default:return[]}}function Kde(e,t,r,n){const i=ec(e);let a=Hde(Xi(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(tS)))),a}function rm(e){return e.replace(/left|right|bottom|top/g,t=>Vde[t])}function Gde(e){return{top:0,right:0,bottom:0,left:0,...e}}function JF(e){return typeof e!="number"?Gde(e):{top:e,right:e,bottom:e,left:e}}function nm(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function JI(e,t,r){let{reference:n,floating:i}=e;const a=Fi(t),o=xP(t),l=yP(o),u=Xi(t),f=a==="y",h=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,g=n[l]/2-i[l]/2;let v;switch(u){case"top":v={x:h,y:n.y-i.height};break;case"bottom":v={x:h,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-i.width,y:p};break;default:v={x:n.x,y:n.y}}switch(ec(t)){case"start":v[o]-=g*(r&&f?-1:1);break;case"end":v[o]+=g*(r&&f?-1:1);break}return v}const Yde=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=JI(f,n,u),g=n,v={},w=0;for(let x=0;x<l.length;x++){const{name:b,fn:S}=l[x],{x:A,y:P,data:C,reset:N}=await S({x:h,y:p,initialPlacement:n,placement:g,strategy:i,middlewareData:v,rects:f,platform:o,elements:{reference:e,floating:t}});h=A??h,p=P??p,v={...v,[b]:{...v[b],...C}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(f=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=JI(f,g,u)),x=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:v}};async function yf(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Yi(t,e),w=JF(v),b=l[g?p==="floating"?"reference":"floating":p],S=nm(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:u})),A=p==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},N=nm(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:P,strategy:u}):A);return{top:(S.top-N.top+w.top)/C.y,bottom:(N.bottom-S.bottom+w.bottom)/C.y,left:(S.left-N.left+w.left)/C.x,right:(N.right-S.right+w.right)/C.x}}const Xde=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:o,elements:l,middlewareData:u}=t,{element:f,padding:h=0}=Yi(e,t)||{};if(f==null)return{};const p=JF(h),g={x:r,y:n},v=xP(i),w=yP(v),x=await o.getDimensions(f),b=v==="y",S=b?"top":"left",A=b?"bottom":"right",P=b?"clientHeight":"clientWidth",C=a.reference[w]+a.reference[v]-g[v]-a.floating[w],N=g[v]-a.reference[v],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let T=E?E[P]:0;(!T||!await(o.isElement==null?void 0:o.isElement(E)))&&(T=l.floating[P]||a.floating[w]);const k=C/2-N/2,M=T/2-x[w]/2-1,z=Va(p[S],M),D=Va(p[A],M),B=z,U=T-x[w]-D,G=T/2-x[w]/2+k,Y=eS(B,G,U),F=!u.arrow&&ec(i)!=null&&G!==Y&&a.reference[w]/2-(G<B?z:D)-x[w]/2<0,X=F?G<B?G-B:G-U:0;return{[v]:g[v]+X,data:{[v]:Y,centerOffset:G-Y-X,...F&&{alignmentOffset:X}},reset:F}}}),Zde=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...b}=Yi(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const S=Xi(i),A=Fi(l),P=Xi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(f.floating)),N=g||(P||!x?[rm(l)]:Wde(l)),E=w!=="none";!g&&E&&N.push(...Kde(l,x,w,C));const T=[l,...N],k=await yf(t,b),M=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(h&&M.push(k[S]),p){const Y=qde(i,o,C);M.push(k[Y[0]],k[Y[1]])}if(z=[...z,{placement:i,overflows:M}],!M.every(Y=>Y<=0)){var D,B;const Y=(((D=a.flip)==null?void 0:D.index)||0)+1,F=T[Y];if(F){var U;const I=p==="alignment"?A!==Fi(F):!1,W=((U=z[0])==null?void 0:U.overflows[0])>0;if(!I||W)return{data:{index:Y,overflows:z},reset:{placement:F}}}let X=(B=z.filter(I=>I.overflows[0]<=0).sort((I,W)=>I.overflows[1]-W.overflows[1])[0])==null?void 0:B.placement;if(!X)switch(v){case"bestFit":{var G;const I=(G=z.filter(W=>{if(E){const Q=Fi(W.placement);return Q===A||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,L)=>Q+L,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:G[0];I&&(X=I);break}case"initialPlacement":X=l;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function eD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tD(e){return zde.some(t=>e[t]>=0)}const Qde=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=Yi(e,t);switch(n){case"referenceHidden":{const a=await yf(t,{...i,elementContext:"reference"}),o=eD(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:tD(o)}}}case"escaped":{const a=await yf(t,{...i,altBoundary:!0}),o=eD(a,r.floating);return{data:{escapedOffsets:o,escaped:tD(o)}}}default:return{}}}}};async function Jde(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Xi(r),l=ec(r),u=Fi(r)==="y",f=["left","top"].includes(o)?-1:1,h=a&&u?-1:1,p=Yi(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof w=="number"&&(v=l==="end"?w*-1:w),u?{x:v*h,y:g*f}:{x:g*f,y:v*h}}const ehe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:l}=t,u=await Jde(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},the=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x:S,y:A}=b;return{x:S,y:A}}},...u}=Yi(e,t),f={x:r,y:n},h=await yf(t,u),p=Fi(Xi(i)),g=vP(p);let v=f[g],w=f[p];if(a){const b=g==="y"?"top":"left",S=g==="y"?"bottom":"right",A=v+h[b],P=v-h[S];v=eS(A,v,P)}if(o){const b=p==="y"?"top":"left",S=p==="y"?"bottom":"right",A=w+h[b],P=w-h[S];w=eS(A,w,P)}const x=l.fn({...t,[g]:v,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[g]:a,[p]:o}}}}}},rhe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Yi(e,t),h={x:r,y:n},p=Fi(i),g=vP(p);let v=h[g],w=h[p];const x=Yi(l,t),b=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const P=g==="y"?"height":"width",C=a.reference[g]-a.floating[P]+b.mainAxis,N=a.reference[g]+a.reference[P]-b.mainAxis;v<C?v=C:v>N&&(v=N)}if(f){var S,A;const P=g==="y"?"width":"height",C=["top","left"].includes(Xi(i)),N=a.reference[p]-a.floating[P]+(C&&((S=o.offset)==null?void 0:S[p])||0)+(C?0:b.crossAxis),E=a.reference[p]+a.reference[P]+(C?0:((A=o.offset)==null?void 0:A[p])||0)-(C?b.crossAxis:0);w<N?w=N:w>E&&(w=E)}return{[g]:v,[p]:w}}}},nhe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:u=()=>{},...f}=Yi(e,t),h=await yf(t,f),p=Xi(i),g=ec(i),v=Fi(i)==="y",{width:w,height:x}=a.floating;let b,S;p==="top"||p==="bottom"?(b=p,S=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(S=p,b=g==="end"?"top":"bottom");const A=x-h.top-h.bottom,P=w-h.left-h.right,C=Va(x-h[b],A),N=Va(w-h[S],P),E=!t.middlewareData.shift;let T=C,k=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=P),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=A),E&&!g){const z=Xr(h.left,0),D=Xr(h.right,0),B=Xr(h.top,0),U=Xr(h.bottom,0);v?k=w-2*(z!==0||D!==0?z+D:Xr(h.left,h.right)):T=x-2*(B!==0||U!==0?B+U:Xr(h.top,h.bottom))}await u({...t,availableWidth:k,availableHeight:T});const M=await o.getDimensions(l.floating);return w!==M.width||x!==M.height?{reset:{rects:!0}}:{}}}};function Sg(){return typeof window<"u"}function tc(e){return e5(e)?(e.nodeName||"").toLowerCase():"#document"}function Jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xi(e){var t;return(t=(e5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function e5(e){return Sg()?e instanceof Node||e instanceof Jr(e).Node:!1}function Vn(e){return Sg()?e instanceof Element||e instanceof Jr(e).Element:!1}function gi(e){return Sg()?e instanceof HTMLElement||e instanceof Jr(e).HTMLElement:!1}function rD(e){return!Sg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jr(e).ShadowRoot}function Yf(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function ihe(e){return["table","td","th"].includes(tc(e))}function jg(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function bP(e){const t=wP(),r=Vn(e)?Un(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ahe(e){let t=Ua(e);for(;gi(t)&&!El(t);){if(bP(t))return t;if(jg(t))return null;t=Ua(t)}return null}function wP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function El(e){return["html","body","#document"].includes(tc(e))}function Un(e){return Jr(e).getComputedStyle(e)}function Pg(e){return Vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ua(e){if(tc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rD(e)&&e.host||xi(e);return rD(t)?t.host:t}function t5(e){const t=Ua(e);return El(t)?e.ownerDocument?e.ownerDocument.body:e.body:gi(t)&&Yf(t)?t:t5(t)}function xf(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=t5(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jr(i);if(a){const l=rS(o);return t.concat(o,o.visualViewport||[],Yf(i)?i:[],l&&r?xf(l):[])}return t.concat(i,xf(i,[],r))}function rS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r5(e){const t=Un(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=gi(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=tm(r)!==a||tm(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function _P(e){return Vn(e)?e:e.contextElement}function nl(e){const t=_P(e);if(!gi(t))return ci(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=r5(t);let o=(a?tm(r.width):r.width)/n,l=(a?tm(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const ohe=ci(0);function n5(e){const t=Jr(e);return!wP()||!t.visualViewport?ohe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function she(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jr(e)?!1:t}function Yo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=_P(e);let o=ci(1);t&&(n?Vn(n)&&(o=nl(n)):o=nl(e));const l=she(a,r,n)?n5(a):ci(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,p=i.height/o.y;if(a){const g=Jr(a),v=n&&Vn(n)?Jr(n):n;let w=g,x=rS(w);for(;x&&n&&v!==w;){const b=nl(x),S=x.getBoundingClientRect(),A=Un(x),P=S.left+(x.clientLeft+parseFloat(A.paddingLeft))*b.x,C=S.top+(x.clientTop+parseFloat(A.paddingTop))*b.y;u*=b.x,f*=b.y,h*=b.x,p*=b.y,u+=P,f+=C,w=Jr(x),x=rS(w)}}return nm({width:h,height:p,x:u,y:f})}function SP(e,t){const r=Pg(e).scrollLeft;return t?t.left+r:Yo(xi(e)).left+r}function i5(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:SP(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function lhe(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=xi(n),l=t?jg(t.floating):!1;if(n===o||l&&a)return r;let u={scrollLeft:0,scrollTop:0},f=ci(1);const h=ci(0),p=gi(n);if((p||!p&&!a)&&((tc(n)!=="body"||Yf(o))&&(u=Pg(n)),gi(n))){const v=Yo(n);f=nl(n),h.x=v.x+n.clientLeft,h.y=v.y+n.clientTop}const g=o&&!p&&!a?i5(o,u,!0):ci(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:r.y*f.y-u.scrollTop*f.y+h.y+g.y}}function che(e){return Array.from(e.getClientRects())}function uhe(e){const t=xi(e),r=Pg(e),n=e.ownerDocument.body,i=Xr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Xr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+SP(e);const l=-r.scrollTop;return Un(n).direction==="rtl"&&(o+=Xr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:l}}function fhe(e,t){const r=Jr(e),n=xi(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,l=0,u=0;if(i){a=i.width,o=i.height;const f=wP();(!f||f&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:l,y:u}}function dhe(e,t){const r=Yo(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=gi(e)?nl(e):ci(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,u=i*a.x,f=n*a.y;return{width:o,height:l,x:u,y:f}}function nD(e,t,r){let n;if(t==="viewport")n=fhe(e,r);else if(t==="document")n=uhe(xi(e));else if(Vn(t))n=dhe(t,r);else{const i=n5(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nm(n)}function a5(e,t){const r=Ua(e);return r===t||!Vn(r)||El(r)?!1:Un(r).position==="fixed"||a5(r,t)}function hhe(e,t){const r=t.get(e);if(r)return r;let n=xf(e,[],!1).filter(l=>Vn(l)&&tc(l)!=="body"),i=null;const a=Un(e).position==="fixed";let o=a?Ua(e):e;for(;Vn(o)&&!El(o);){const l=Un(o),u=bP(o);!u&&l.position==="fixed"&&(i=null),(a?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Yf(o)&&!u&&a5(e,o))?n=n.filter(h=>h!==o):i=l,o=Ua(o)}return t.set(e,n),n}function phe(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?jg(t)?[]:hhe(t,this._c):[].concat(r),n],l=o[0],u=o.reduce((f,h)=>{const p=nD(t,h,i);return f.top=Xr(p.top,f.top),f.right=Va(p.right,f.right),f.bottom=Va(p.bottom,f.bottom),f.left=Xr(p.left,f.left),f},nD(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function mhe(e){const{width:t,height:r}=r5(e);return{width:t,height:r}}function ghe(e,t,r){const n=gi(t),i=xi(t),a=r==="fixed",o=Yo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=ci(0);function f(){u.x=SP(i)}if(n||!n&&!a)if((tc(t)!=="body"||Yf(i))&&(l=Pg(t)),n){const v=Yo(t,!0,a,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else i&&f();a&&!n&&i&&f();const h=i&&!n&&!a?i5(i,l):ci(0),p=o.left+l.scrollLeft-u.x-h.x,g=o.top+l.scrollTop-u.y-h.y;return{x:p,y:g,width:o.width,height:o.height}}function Yw(e){return Un(e).position==="static"}function iD(e,t){if(!gi(e)||Un(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return xi(e)===r&&(r=r.ownerDocument.body),r}function o5(e,t){const r=Jr(e);if(jg(e))return r;if(!gi(e)){let i=Ua(e);for(;i&&!El(i);){if(Vn(i)&&!Yw(i))return i;i=Ua(i)}return r}let n=iD(e,t);for(;n&&ihe(n)&&Yw(n);)n=iD(n,t);return n&&El(n)&&Yw(n)&&!bP(n)?r:n||ahe(e)||r}const vhe=async function(e){const t=this.getOffsetParent||o5,r=this.getDimensions,n=await r(e.floating);return{reference:ghe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function yhe(e){return Un(e).direction==="rtl"}const xhe={convertOffsetParentRelativeRectToViewportRelativeRect:lhe,getDocumentElement:xi,getClippingRect:phe,getOffsetParent:o5,getElementRects:vhe,getClientRects:che,getDimensions:mhe,getScale:nl,isElement:Vn,isRTL:yhe};function s5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bhe(e,t){let r=null,n;const i=xi(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:v}=f;if(l||t(),!g||!v)return;const w=Th(p),x=Th(i.clientWidth-(h+g)),b=Th(i.clientHeight-(p+v)),S=Th(h),P={rootMargin:-w+"px "+-x+"px "+-b+"px "+-S+"px",threshold:Xr(0,Va(1,u))||1};let C=!0;function N(E){const T=E[0].intersectionRatio;if(T!==u){if(!C)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!s5(f,e.getBoundingClientRect())&&o(),C=!1}try{r=new IntersectionObserver(N,{...P,root:i.ownerDocument})}catch{r=new IntersectionObserver(N,P)}r.observe(e)}return o(!0),a}function whe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,f=_P(e),h=i||a?[...f?xf(f):[],...xf(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const p=f&&l?bhe(f,r):null;let g=-1,v=null;o&&(v=new ResizeObserver(S=>{let[A]=S;A&&A.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var P;(P=v)==null||P.observe(t)})),r()}),f&&!u&&v.observe(f),v.observe(t));let w,x=u?Yo(e):null;u&&b();function b(){const S=Yo(e);x&&!s5(x,S)&&r(),x=S,w=requestAnimationFrame(b)}return r(),()=>{var S;h.forEach(A=>{i&&A.removeEventListener("scroll",r),a&&A.removeEventListener("resize",r)}),p==null||p(),(S=v)==null||S.disconnect(),v=null,u&&cancelAnimationFrame(w)}}const _he=ehe,She=the,jhe=Zde,Phe=nhe,Ahe=Qde,aD=Xde,Nhe=rhe,Ohe=(e,t,r)=>{const n=new Map,i={platform:xhe,...r},a={...i.platform,_c:n};return Yde(e,t,{...i,platform:a})};var Kh=typeof document<"u"?_.useLayoutEffect:_.useEffect;function im(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,i;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(!im(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!im(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function l5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oD(e,t){const r=l5(e);return Math.round(t*r)/r}function Xw(e){const t=_.useRef(e);return Kh(()=>{t.current=e}),t}function Ehe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[h,p]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=_.useState(n);im(g,n)||v(n);const[w,x]=_.useState(null),[b,S]=_.useState(null),A=_.useCallback(I=>{I!==E.current&&(E.current=I,x(I))},[]),P=_.useCallback(I=>{I!==T.current&&(T.current=I,S(I))},[]),C=a||w,N=o||b,E=_.useRef(null),T=_.useRef(null),k=_.useRef(h),M=u!=null,z=Xw(u),D=Xw(i),B=Xw(f),U=_.useCallback(()=>{if(!E.current||!T.current)return;const I={placement:t,strategy:r,middleware:g};D.current&&(I.platform=D.current),Ohe(E.current,T.current,I).then(W=>{const Q={...W,isPositioned:B.current!==!1};G.current&&!im(k.current,Q)&&(k.current=Q,Rf.flushSync(()=>{p(Q)}))})},[g,t,r,D,B]);Kh(()=>{f===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[f]);const G=_.useRef(!1);Kh(()=>(G.current=!0,()=>{G.current=!1}),[]),Kh(()=>{if(C&&(E.current=C),N&&(T.current=N),C&&N){if(z.current)return z.current(C,N,U);U()}},[C,N,U,z,M]);const Y=_.useMemo(()=>({reference:E,floating:T,setReference:A,setFloating:P}),[A,P]),F=_.useMemo(()=>({reference:C,floating:N}),[C,N]),X=_.useMemo(()=>{const I={position:r,left:0,top:0};if(!F.floating)return I;const W=oD(F.floating,h.x),Q=oD(F.floating,h.y);return l?{...I,transform:"translate("+W+"px, "+Q+"px)",...l5(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:W,top:Q}},[r,l,F.floating,h.x,h.y]);return _.useMemo(()=>({...h,update:U,refs:Y,elements:F,floatingStyles:X}),[h,U,Y,F,X])}const Che=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?aD({element:n.current,padding:i}).fn(r):{}:n?aD({element:n,padding:i}).fn(r):{}}}},The=(e,t)=>({..._he(e),options:[e,t]}),khe=(e,t)=>({...She(e),options:[e,t]}),Rhe=(e,t)=>({...Nhe(e),options:[e,t]}),Mhe=(e,t)=>({...jhe(e),options:[e,t]}),Ihe=(e,t)=>({...Phe(e),options:[e,t]}),Dhe=(e,t)=>({...Ahe(e),options:[e,t]}),$he=(e,t)=>({...Che(e),options:[e,t]});var Lhe="Arrow",c5=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return d.jsx(Ie.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});c5.displayName=Lhe;var Bhe=c5;function jP(e){const[t,r]=_.useState(void 0);return wr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var PP="Popper",[u5,Ag]=Sn(PP),[Fhe,f5]=u5(PP),d5=e=>{const{__scopePopper:t,children:r}=e,[n,i]=_.useState(null);return d.jsx(Fhe,{scope:t,anchor:n,onAnchorChange:i,children:r})};d5.displayName=PP;var h5="PopperAnchor",p5=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=f5(h5,r),o=_.useRef(null),l=at(t,o);return _.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:d.jsx(Ie.div,{...i,ref:l})});p5.displayName=h5;var AP="PopperContent",[zhe,Vhe]=u5(AP),m5=_.forwardRef((e,t)=>{var oe,ge,ne,fe,me,re;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:w,...x}=e,b=f5(AP,r),[S,A]=_.useState(null),P=at(t,We=>A(We)),[C,N]=_.useState(null),E=jP(C),T=(E==null?void 0:E.width)??0,k=(E==null?void 0:E.height)??0,M=n+(a!=="center"?"-"+a:""),z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},D=Array.isArray(f)?f:[f],B=D.length>0,U={padding:z,boundary:D.filter(qhe),altBoundary:B},{refs:G,floatingStyles:Y,placement:F,isPositioned:X,middlewareData:I}=Ehe({strategy:"fixed",placement:M,whileElementsMounted:(...We)=>whe(...We,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[The({mainAxis:i+k,alignmentAxis:o}),u&&khe({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Rhe():void 0,...U}),u&&Mhe({...U}),Ihe({...U,apply:({elements:We,rects:De,availableWidth:pt,availableHeight:mt})=>{const{width:Pt,height:Ur}=De.reference,_r=We.floating.style;_r.setProperty("--radix-popper-available-width",`${pt}px`),_r.setProperty("--radix-popper-available-height",`${mt}px`),_r.setProperty("--radix-popper-anchor-width",`${Pt}px`),_r.setProperty("--radix-popper-anchor-height",`${Ur}px`)}}),C&&$he({element:C,padding:l}),Whe({arrowWidth:T,arrowHeight:k}),g&&Dhe({strategy:"referenceHidden",...U})]}),[W,Q]=y5(F),L=pi(w);wr(()=>{X&&(L==null||L())},[X,L]);const K=(oe=I.arrow)==null?void 0:oe.x,ae=(ge=I.arrow)==null?void 0:ge.y,ue=((ne=I.arrow)==null?void 0:ne.centerOffset)!==0,[xe,Ae]=_.useState();return wr(()=>{S&&Ae(window.getComputedStyle(S).zIndex)},[S]),d.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:X?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(fe=I.transformOrigin)==null?void 0:fe.x,(me=I.transformOrigin)==null?void 0:me.y].join(" "),...((re=I.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(zhe,{scope:r,placedSide:W,onArrowChange:N,arrowX:K,arrowY:ae,shouldHideArrow:ue,children:d.jsx(Ie.div,{"data-side":W,"data-align":Q,...x,ref:P,style:{...x.style,animation:X?void 0:"none"}})})})});m5.displayName=AP;var g5="PopperArrow",Uhe={top:"bottom",right:"left",bottom:"top",left:"right"},v5=_.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Vhe(g5,n),o=Uhe[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Bhe,{...i,ref:r,style:{...i.style,display:"block"}})})});v5.displayName=g5;function qhe(e){return e!==null}var Whe=e=>({name:"transformOrigin",options:e,fn(t){var b,S,A;const{placement:r,rects:n,middlewareData:i}=t,o=((b=i.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[f,h]=y5(r),p={start:"0%",center:"50%",end:"100%"}[h],g=(((S=i.arrow)==null?void 0:S.x)??0)+l/2,v=(((A=i.arrow)==null?void 0:A.y)??0)+u/2;let w="",x="";return f==="bottom"?(w=o?p:`${g}px`,x=`${-u}px`):f==="top"?(w=o?p:`${g}px`,x=`${n.floating.height+u}px`):f==="right"?(w=`${-u}px`,x=o?p:`${v}px`):f==="left"&&(w=`${n.floating.width+u}px`,x=o?p:`${v}px`),{data:{x:w,y:x}}}});function y5(e){const[t,r="center"]=e.split("-");return[t,r]}var x5=d5,b5=p5,w5=m5,_5=v5,Hhe="Portal",Ng=_.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[i,a]=_.useState(!1);wr(()=>a(!0),[]);const o=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?r7.createPortal(d.jsx(Ie.div,{...n,ref:t}),o):null});Ng.displayName=Hhe;var Khe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$s=new WeakMap,kh=new WeakMap,Rh={},Zw=0,S5=function(e){return e&&(e.host||S5(e.parentNode))},Ghe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=S5(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Yhe=function(e,t,r,n){var i=Ghe(t,Array.isArray(e)?e:[e]);Rh[r]||(Rh[r]=new WeakMap);var a=Rh[r],o=[],l=new Set,u=new Set(i),f=function(p){!p||l.has(p)||(l.add(p),f(p.parentNode))};i.forEach(f);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))h(g);else try{var v=g.getAttribute(n),w=v!==null&&v!=="false",x=($s.get(g)||0)+1,b=(a.get(g)||0)+1;$s.set(g,x),a.set(g,b),o.push(g),x===1&&w&&kh.set(g,!0),b===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return h(t),l.clear(),Zw++,function(){o.forEach(function(p){var g=$s.get(p)-1,v=a.get(p)-1;$s.set(p,g),a.set(p,v),g||(kh.has(p)||p.removeAttribute(n),kh.delete(p)),v||p.removeAttribute(r)}),Zw--,Zw||($s=new WeakMap,$s=new WeakMap,kh=new WeakMap,Rh={})}},NP=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Khe(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),Yhe(n,i,r,"aria-hidden")):function(){return null}},ii=function(){return ii=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ii.apply(this,arguments)};function j5(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Xhe(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Gh="right-scroll-bar-position",Yh="width-before-scroll-bar",Zhe="with-scroll-bars-hidden",Qhe="--removed-body-scroll-bar-size";function Qw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jhe(e,t){var r=_.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var epe=typeof window<"u"?_.useLayoutEffect:_.useEffect,sD=new WeakMap;function tpe(e,t){var r=Jhe(null,function(n){return e.forEach(function(i){return Qw(i,n)})});return epe(function(){var n=sD.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;i.forEach(function(l){a.has(l)||Qw(l,null)}),a.forEach(function(l){i.has(l)||Qw(l,o)})}sD.set(r,e)},[e]),r}function rpe(e){return e}function npe(e,t){t===void 0&&(t=rpe);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var u=function(){var h=o;o=[],h.forEach(a)},f=function(){return Promise.resolve().then(u)};f(),r={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),r}}}};return i}function ipe(e){e===void 0&&(e={});var t=npe(null);return t.options=ii({async:!0,ssr:!1},e),t}var P5=function(e){var t=e.sideCar,r=j5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return _.createElement(n,ii({},r))};P5.isSideCarExport=!0;function ape(e,t){return e.useMedium(t),P5}var A5=ipe(),Jw=function(){},Og=_.forwardRef(function(e,t){var r=_.useRef(null),n=_.useState({onScrollCapture:Jw,onWheelCapture:Jw,onTouchMoveCapture:Jw}),i=n[0],a=n[1],o=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,x=e.inert,b=e.allowPinchZoom,S=e.as,A=S===void 0?"div":S,P=e.gapMode,C=j5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,E=tpe([r,t]),T=ii(ii({},C),i);return _.createElement(_.Fragment,null,h&&_.createElement(N,{sideCar:A5,removeScrollBar:f,shards:p,noRelative:v,noIsolation:w,inert:x,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:P}),o?_.cloneElement(_.Children.only(l),ii(ii({},T),{ref:E})):_.createElement(A,ii({},T,{className:u,ref:E}),l))});Og.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Og.classNames={fullWidth:Yh,zeroRight:Gh};var ope=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function spe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ope();return t&&e.setAttribute("nonce",t),e}function lpe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cpe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var upe=function(){var e=0,t=null;return{add:function(r){e==0&&(t=spe())&&(lpe(t,r),cpe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fpe=function(){var e=upe();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},N5=function(){var e=fpe(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},dpe={left:0,top:0,right:0,gap:0},e1=function(e){return parseInt(e||"",10)||0},hpe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[e1(r),e1(n),e1(i)]},ppe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dpe;var t=hpe(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},mpe=N5(),il="data-scroll-locked",gpe=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(Zhe,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(il,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(a,`px;
padding-right: `).concat(o,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Gh,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Yh,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Gh," .").concat(Gh,` {
right: 0 `).concat(n,`;
}
.`).concat(Yh," .").concat(Yh,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(il,`] {
`).concat(Qhe,": ").concat(l,`px;
}
`)},lD=function(){var e=parseInt(document.body.getAttribute(il)||"0",10);return isFinite(e)?e:0},vpe=function(){_.useEffect(function(){return document.body.setAttribute(il,(lD()+1).toString()),function(){var e=lD()-1;e<=0?document.body.removeAttribute(il):document.body.setAttribute(il,e.toString())}},[])},ype=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;vpe();var a=_.useMemo(function(){return ppe(i)},[i]);return _.createElement(mpe,{styles:gpe(a,!t,i,r?"":"!important")})},nS=!1;if(typeof window<"u")try{var Mh=Object.defineProperty({},"passive",{get:function(){return nS=!0,!0}});window.addEventListener("test",Mh,Mh),window.removeEventListener("test",Mh,Mh)}catch{nS=!1}var Ls=nS?{passive:!1}:!1,xpe=function(e){return e.tagName==="TEXTAREA"},O5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xpe(e)&&r[t]==="visible")},bpe=function(e){return O5(e,"overflowY")},wpe=function(e){return O5(e,"overflowX")},cD=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=E5(e,n);if(i){var a=C5(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},_pe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Spe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},E5=function(e,t){return e==="v"?bpe(t):wpe(t)},C5=function(e,t){return e==="v"?_pe(t):Spe(t)},jpe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ppe=function(e,t,r,n,i){var a=jpe(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,u=t.contains(l),f=!1,h=o>0,p=0,g=0;do{var v=C5(e,l),w=v[0],x=v[1],b=v[2],S=x-b-a*w;(w||S)&&E5(e,l)&&(p+=S,g+=w),l=l.parentNode.host||l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(h&&Math.abs(p)<1||!h&&Math.abs(g)<1)&&(f=!0),f},Ih=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uD=function(e){return[e.deltaX,e.deltaY]},fD=function(e){return e&&"current"in e?e.current:e},Ape=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Npe=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Ope=0,Bs=[];function Epe(e){var t=_.useRef([]),r=_.useRef([0,0]),n=_.useRef(),i=_.useState(Ope++)[0],a=_.useState(N5)[0],o=_.useRef(e);_.useEffect(function(){o.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Xhe([e.lockRef.current],(e.shards||[]).map(fD),!0).filter(Boolean);return x.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=_.useCallback(function(x,b){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var S=Ih(x),A=r.current,P="deltaX"in x?x.deltaX:A[0]-S[0],C="deltaY"in x?x.deltaY:A[1]-S[1],N,E=x.target,T=Math.abs(P)>Math.abs(C)?"h":"v";if("touches"in x&&T==="h"&&E.type==="range")return!1;var k=cD(T,E);if(!k)return!0;if(k?N=T:(N=T==="v"?"h":"v",k=cD(T,E)),!k)return!1;if(!n.current&&"changedTouches"in x&&(P||C)&&(n.current=N),!N)return!0;var M=n.current||N;return Ppe(M,b,x,M==="h"?P:C)},[]),u=_.useCallback(function(x){var b=x;if(!(!Bs.length||Bs[Bs.length-1]!==a)){var S="deltaY"in b?uD(b):Ih(b),A=t.current.filter(function(N){return N.name===b.type&&(N.target===b.target||b.target===N.shadowParent)&&Ape(N.delta,S)})[0];if(A&&A.should){b.cancelable&&b.preventDefault();return}if(!A){var P=(o.current.shards||[]).map(fD).filter(Boolean).filter(function(N){return N.contains(b.target)}),C=P.length>0?l(b,P[0]):!o.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),f=_.useCallback(function(x,b,S,A){var P={name:x,delta:b,target:S,should:A,shadowParent:Cpe(S)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(C){return C!==P})},1)},[]),h=_.useCallback(function(x){r.current=Ih(x),n.current=void 0},[]),p=_.useCallback(function(x){f(x.type,uD(x),x.target,l(x,e.lockRef.current))},[]),g=_.useCallback(function(x){f(x.type,Ih(x),x.target,l(x,e.lockRef.current))},[]);_.useEffect(function(){return Bs.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ls),document.addEventListener("touchmove",u,Ls),document.addEventListener("touchstart",h,Ls),function(){Bs=Bs.filter(function(x){return x!==a}),document.removeEventListener("wheel",u,Ls),document.removeEventListener("touchmove",u,Ls),document.removeEventListener("touchstart",h,Ls)}},[]);var v=e.removeScrollBar,w=e.inert;return _.createElement(_.Fragment,null,w?_.createElement(a,{styles:Npe(i)}):null,v?_.createElement(ype,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cpe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tpe=ape(A5,Epe);var Eg=_.forwardRef(function(e,t){return _.createElement(Og,ii({},e,{ref:t,sideCar:Tpe}))});Eg.classNames=Og.classNames;var iS=["Enter"," "],kpe=["ArrowDown","PageUp","Home"],T5=["ArrowUp","PageDown","End"],Rpe=[...kpe,...T5],Mpe={ltr:[...iS,"ArrowRight"],rtl:[...iS,"ArrowLeft"]},Ipe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Xf="Menu",[bf,Dpe,$pe]=nj(Xf),[os,k5]=Sn(Xf,[$pe,Ag,Wl]),Cg=Ag(),R5=Wl(),[Lpe,ss]=os(Xf),[Bpe,Zf]=os(Xf),M5=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:o=!0}=e,l=Cg(t),[u,f]=_.useState(null),h=_.useRef(!1),p=pi(a),g=$f(i);return _.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),d.jsx(x5,{...l,children:d.jsx(Lpe,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:f,children:d.jsx(Bpe,{scope:t,onClose:_.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:g,modal:o,children:n})})})};M5.displayName=Xf;var Fpe="MenuAnchor",OP=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=Cg(r);return d.jsx(b5,{...i,...n,ref:t})});OP.displayName=Fpe;var EP="MenuPortal",[zpe,I5]=os(EP,{forceMount:void 0}),D5=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=ss(EP,t);return d.jsx(zpe,{scope:t,forceMount:r,children:d.jsx(Gn,{present:r||a.open,children:d.jsx(Ng,{asChild:!0,container:i,children:n})})})};D5.displayName=EP;var vn="MenuContent",[Vpe,CP]=os(vn),$5=_.forwardRef((e,t)=>{const r=I5(vn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=ss(vn,e.__scopeMenu),o=Zf(vn,e.__scopeMenu);return d.jsx(bf.Provider,{scope:e.__scopeMenu,children:d.jsx(Gn,{present:n||a.open,children:d.jsx(bf.Slot,{scope:e.__scopeMenu,children:o.modal?d.jsx(Upe,{...i,ref:t}):d.jsx(qpe,{...i,ref:t})})})})}),Upe=_.forwardRef((e,t)=>{const r=ss(vn,e.__scopeMenu),n=_.useRef(null),i=at(t,n);return _.useEffect(()=>{const a=n.current;if(a)return NP(a)},[]),d.jsx(TP,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Pe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),qpe=_.forwardRef((e,t)=>{const r=ss(vn,e.__scopeMenu);return d.jsx(TP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Wpe=zo("MenuContent.ScrollLock"),TP=_.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:w,...x}=e,b=ss(vn,r),S=Zf(vn,r),A=Cg(r),P=R5(r),C=Dpe(r),[N,E]=_.useState(null),T=_.useRef(null),k=at(t,T,b.onContentChange),M=_.useRef(0),z=_.useRef(""),D=_.useRef(0),B=_.useRef(null),U=_.useRef("right"),G=_.useRef(0),Y=w?Eg:_.Fragment,F=w?{as:Wpe,allowPinchZoom:!0}:void 0,X=W=>{var oe,ge;const Q=z.current+W,L=C().filter(ne=>!ne.disabled),K=document.activeElement,ae=(oe=L.find(ne=>ne.ref.current===K))==null?void 0:oe.textValue,ue=L.map(ne=>ne.textValue),xe=nme(ue,Q,ae),Ae=(ge=L.find(ne=>ne.textValue===xe))==null?void 0:ge.ref.current;(function ne(fe){z.current=fe,window.clearTimeout(M.current),fe!==""&&(M.current=window.setTimeout(()=>ne(""),1e3))})(Q),Ae&&setTimeout(()=>Ae.focus())};_.useEffect(()=>()=>window.clearTimeout(M.current),[]),gP();const I=_.useCallback(W=>{var L,K;return U.current===((L=B.current)==null?void 0:L.side)&&ame(W,(K=B.current)==null?void 0:K.area)},[]);return d.jsx(Vpe,{scope:r,searchRef:z,onItemEnter:_.useCallback(W=>{I(W)&&W.preventDefault()},[I]),onItemLeave:_.useCallback(W=>{var Q;I(W)||((Q=T.current)==null||Q.focus(),E(null))},[I]),onTriggerLeave:_.useCallback(W=>{I(W)&&W.preventDefault()},[I]),pointerGraceTimerRef:D,onPointerGraceIntentChange:_.useCallback(W=>{B.current=W},[]),children:d.jsx(Y,{...F,children:d.jsx(_g,{asChild:!0,trapped:i,onMountAutoFocus:Pe(a,W=>{var Q;W.preventDefault(),(Q=T.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:d.jsx(wg,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:d.jsx(ij,{asChild:!0,...P,dir:S.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:E,onEntryFocus:Pe(u,W=>{S.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(w5,{role:"menu","aria-orientation":"vertical","data-state":J5(b.open),"data-radix-menu-content":"",dir:S.dir,...A,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:Pe(x.onKeyDown,W=>{const L=W.target.closest("[data-radix-menu-content]")===W.currentTarget,K=W.ctrlKey||W.altKey||W.metaKey,ae=W.key.length===1;L&&(W.key==="Tab"&&W.preventDefault(),!K&&ae&&X(W.key));const ue=T.current;if(W.target!==ue||!Rpe.includes(W.key))return;W.preventDefault();const Ae=C().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);T5.includes(W.key)&&Ae.reverse(),tme(Ae)}),onBlur:Pe(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(M.current),z.current="")}),onPointerMove:Pe(e.onPointerMove,wf(W=>{const Q=W.target,L=G.current!==W.clientX;if(W.currentTarget.contains(Q)&&L){const K=W.clientX>G.current?"right":"left";U.current=K,G.current=W.clientX}}))})})})})})})});$5.displayName=vn;var Hpe="MenuGroup",kP=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Ie.div,{role:"group",...n,ref:t})});kP.displayName=Hpe;var Kpe="MenuLabel",L5=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Ie.div,{...n,ref:t})});L5.displayName=Kpe;var am="MenuItem",dD="menu.itemSelect",Tg=_.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,a=_.useRef(null),o=Zf(am,e.__scopeMenu),l=CP(am,e.__scopeMenu),u=at(t,a),f=_.useRef(!1),h=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(dD,{bubbles:!0,cancelable:!0});p.addEventListener(dD,v=>n==null?void 0:n(v),{once:!0}),VL(p,g),g.defaultPrevented?f.current=!1:o.onClose()}};return d.jsx(B5,{...i,ref:u,disabled:r,onClick:Pe(e.onClick,h),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),f.current=!0},onPointerUp:Pe(e.onPointerUp,p=>{var g;f.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:Pe(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||iS.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Tg.displayName=am;var B5=_.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...a}=e,o=CP(am,r),l=R5(r),u=_.useRef(null),f=at(t,u),[h,p]=_.useState(!1),[g,v]=_.useState("");return _.useEffect(()=>{const w=u.current;w&&v((w.textContent??"").trim())},[a.children]),d.jsx(bf.ItemSlot,{scope:r,disabled:n,textValue:i??g,children:d.jsx(aj,{asChild:!0,...l,focusable:!n,children:d.jsx(Ie.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:f,onPointerMove:Pe(e.onPointerMove,wf(w=>{n?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Pe(e.onPointerLeave,wf(w=>o.onItemLeave(w))),onFocus:Pe(e.onFocus,()=>p(!0)),onBlur:Pe(e.onBlur,()=>p(!1))})})})}),Gpe="MenuCheckboxItem",F5=_.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return d.jsx(W5,{scope:e.__scopeMenu,checked:r,children:d.jsx(Tg,{role:"menuitemcheckbox","aria-checked":om(r)?"mixed":r,...i,ref:t,"data-state":MP(r),onSelect:Pe(i.onSelect,()=>n==null?void 0:n(om(r)?!0:!r),{checkForDefaultPrevented:!1})})})});F5.displayName=Gpe;var z5="MenuRadioGroup",[Ype,Xpe]=os(z5,{value:void 0,onValueChange:()=>{}}),V5=_.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,a=pi(n);return d.jsx(Ype,{scope:e.__scopeMenu,value:r,onValueChange:a,children:d.jsx(kP,{...i,ref:t})})});V5.displayName=z5;var U5="MenuRadioItem",q5=_.forwardRef((e,t)=>{const{value:r,...n}=e,i=Xpe(U5,e.__scopeMenu),a=r===i.value;return d.jsx(W5,{scope:e.__scopeMenu,checked:a,children:d.jsx(Tg,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":MP(a),onSelect:Pe(n.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})})});q5.displayName=U5;var RP="MenuItemIndicator",[W5,Zpe]=os(RP,{checked:!1}),H5=_.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,a=Zpe(RP,r);return d.jsx(Gn,{present:n||om(a.checked)||a.checked===!0,children:d.jsx(Ie.span,{...i,ref:t,"data-state":MP(a.checked)})})});H5.displayName=RP;var Qpe="MenuSeparator",K5=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Ie.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});K5.displayName=Qpe;var Jpe="MenuArrow",G5=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=Cg(r);return d.jsx(_5,{...i,...n,ref:t})});G5.displayName=Jpe;var eme="MenuSub",[X1e,Y5]=os(eme),mu="MenuSubTrigger",X5=_.forwardRef((e,t)=>{const r=ss(mu,e.__scopeMenu),n=Zf(mu,e.__scopeMenu),i=Y5(mu,e.__scopeMenu),a=CP(mu,e.__scopeMenu),o=_.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,f={__scopeMenu:e.__scopeMenu},h=_.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return _.useEffect(()=>h,[h]),_.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),d.jsx(OP,{asChild:!0,...f,children:d.jsx(B5,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":J5(r.open),...e,ref:Nm(t,i.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Pe(e.onPointerMove,wf(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:Pe(e.onPointerLeave,wf(p=>{var v,w;h();const g=(v=r.content)==null?void 0:v.getBoundingClientRect();if(g){const x=(w=r.content)==null?void 0:w.dataset.side,b=x==="right",S=b?-5:5,A=g[b?"left":"right"],P=g[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:A,y:g.top},{x:P,y:g.top},{x:P,y:g.bottom},{x:A,y:g.bottom}],side:x}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Pe(e.onKeyDown,p=>{var v;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||Mpe[n.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})});X5.displayName=mu;var Z5="MenuSubContent",Q5=_.forwardRef((e,t)=>{const r=I5(vn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=ss(vn,e.__scopeMenu),o=Zf(vn,e.__scopeMenu),l=Y5(Z5,e.__scopeMenu),u=_.useRef(null),f=at(t,u);return d.jsx(bf.Provider,{scope:e.__scopeMenu,children:d.jsx(Gn,{present:n||a.open,children:d.jsx(bf.Slot,{scope:e.__scopeMenu,children:d.jsx(TP,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var p;o.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Pe(e.onFocusOutside,h=>{h.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Pe(e.onEscapeKeyDown,h=>{o.onClose(),h.preventDefault()}),onKeyDown:Pe(e.onKeyDown,h=>{var v;const p=h.currentTarget.contains(h.target),g=Ipe[o.dir].includes(h.key);p&&g&&(a.onOpenChange(!1),(v=l.trigger)==null||v.focus(),h.preventDefault())})})})})})});Q5.displayName=Z5;function J5(e){return e?"open":"closed"}function om(e){return e==="indeterminate"}function MP(e){return om(e)?"indeterminate":e?"checked":"unchecked"}function tme(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function rme(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function nme(e,t,r){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=rme(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==r));const u=o.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return u!==r?u:void 0}function ime(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],u=t[o],f=l.x,h=l.y,p=u.x,g=u.y;h>n!=g>n&&r<(p-f)*(n-h)/(g-h)+f&&(i=!i)}return i}function ame(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return ime(r,t)}function wf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ome=M5,sme=OP,lme=D5,cme=$5,ume=kP,fme=L5,dme=Tg,hme=F5,pme=V5,mme=q5,gme=H5,vme=K5,yme=G5,xme=X5,bme=Q5,kg="DropdownMenu",[wme,Z1e]=Sn(kg,[k5]),Cr=k5(),[_me,e6]=wme(kg),t6=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=Cr(t),f=_.useRef(null),[h,p]=za({prop:i,defaultProp:a??!1,onChange:o,caller:kg});return d.jsx(_me,{scope:t,triggerId:oi(),triggerRef:f,contentId:oi(),open:h,onOpenChange:p,onOpenToggle:_.useCallback(()=>p(g=>!g),[p]),modal:l,children:d.jsx(ome,{...u,open:h,onOpenChange:p,dir:n,modal:l,children:r})})};t6.displayName=kg;var r6="DropdownMenuTrigger",n6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,a=e6(r6,r),o=Cr(r);return d.jsx(sme,{asChild:!0,...o,children:d.jsx(Ie.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:Nm(t,a.triggerRef),onPointerDown:Pe(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:Pe(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});n6.displayName=r6;var Sme="DropdownMenuPortal",i6=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Cr(t);return d.jsx(lme,{...n,...r})};i6.displayName=Sme;var a6="DropdownMenuContent",o6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=e6(a6,r),a=Cr(r),o=_.useRef(!1);return d.jsx(cme,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...n,ref:t,onCloseAutoFocus:Pe(e.onCloseAutoFocus,l=>{var u;o.current||(u=i.triggerRef.current)==null||u.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Pe(e.onInteractOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;(!i.modal||h)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});o6.displayName=a6;var jme="DropdownMenuGroup",Pme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(ume,{...i,...n,ref:t})});Pme.displayName=jme;var Ame="DropdownMenuLabel",Nme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(fme,{...i,...n,ref:t})});Nme.displayName=Ame;var Ome="DropdownMenuItem",s6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(dme,{...i,...n,ref:t})});s6.displayName=Ome;var Eme="DropdownMenuCheckboxItem",Cme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(hme,{...i,...n,ref:t})});Cme.displayName=Eme;var Tme="DropdownMenuRadioGroup",kme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(pme,{...i,...n,ref:t})});kme.displayName=Tme;var Rme="DropdownMenuRadioItem",Mme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(mme,{...i,...n,ref:t})});Mme.displayName=Rme;var Ime="DropdownMenuItemIndicator",Dme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(gme,{...i,...n,ref:t})});Dme.displayName=Ime;var $me="DropdownMenuSeparator",Lme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(vme,{...i,...n,ref:t})});Lme.displayName=$me;var Bme="DropdownMenuArrow",Fme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(yme,{...i,...n,ref:t})});Fme.displayName=Bme;var zme="DropdownMenuSubTrigger",Vme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(xme,{...i,...n,ref:t})});Vme.displayName=zme;var Ume="DropdownMenuSubContent",qme=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Cr(r);return d.jsx(bme,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qme.displayName=Ume;var Wme=t6,Hme=n6,Kme=i6,Gme=o6,Yme=s6;function Xme({...e}){return d.jsx(Wme,{"data-slot":"dropdown-menu",...e})}function Zme({...e}){return d.jsx(Hme,{"data-slot":"dropdown-menu-trigger",...e})}function Qme({className:e,sideOffset:t=4,...r}){return d.jsx(Kme,{children:d.jsx(Gme,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ke("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function t1({className:e,inset:t,variant:r="default",...n}){return d.jsx(Yme,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:Ke("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}var Rg="Dialog",[l6,Q1e]=Sn(Rg),[Jme,Xn]=l6(Rg),c6=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=_.useRef(null),u=_.useRef(null),[f,h]=za({prop:n,defaultProp:i??!1,onChange:a,caller:Rg});return d.jsx(Jme,{scope:t,triggerRef:l,contentRef:u,contentId:oi(),titleId:oi(),descriptionId:oi(),open:f,onOpenChange:h,onOpenToggle:_.useCallback(()=>h(p=>!p),[h]),modal:o,children:r})};c6.displayName=Rg;var u6="DialogTrigger",f6=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Xn(u6,r),a=at(t,i.triggerRef);return d.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$P(i.open),...n,ref:a,onClick:Pe(e.onClick,i.onOpenToggle)})});f6.displayName=u6;var IP="DialogPortal",[ege,d6]=l6(IP,{forceMount:void 0}),h6=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=Xn(IP,t);return d.jsx(ege,{scope:t,forceMount:r,children:_.Children.map(n,o=>d.jsx(Gn,{present:r||a.open,children:d.jsx(Ng,{asChild:!0,container:i,children:o})}))})};h6.displayName=IP;var sm="DialogOverlay",p6=_.forwardRef((e,t)=>{const r=d6(sm,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Xn(sm,e.__scopeDialog);return a.modal?d.jsx(Gn,{present:n||a.open,children:d.jsx(rge,{...i,ref:t})}):null});p6.displayName=sm;var tge=zo("DialogOverlay.RemoveScroll"),rge=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Xn(sm,r);return d.jsx(Eg,{as:tge,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(Ie.div,{"data-state":$P(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Xo="DialogContent",m6=_.forwardRef((e,t)=>{const r=d6(Xo,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Xn(Xo,e.__scopeDialog);return d.jsx(Gn,{present:n||a.open,children:a.modal?d.jsx(nge,{...i,ref:t}):d.jsx(ige,{...i,ref:t})})});m6.displayName=Xo;var nge=_.forwardRef((e,t)=>{const r=Xn(Xo,e.__scopeDialog),n=_.useRef(null),i=at(t,r.contentRef,n);return _.useEffect(()=>{const a=n.current;if(a)return NP(a)},[]),d.jsx(g6,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pe(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Pe(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:Pe(e.onFocusOutside,a=>a.preventDefault())})}),ige=_.forwardRef((e,t)=>{const r=Xn(Xo,e.__scopeDialog),n=_.useRef(!1),i=_.useRef(!1);return d.jsx(g6,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((f=r.triggerRef.current)==null?void 0:f.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),g6=_.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Xn(Xo,r),u=_.useRef(null),f=at(t,u);return gP(),d.jsxs(d.Fragment,{children:[d.jsx(_g,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(wg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":$P(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(age,{titleId:l.titleId}),d.jsx(sge,{contentRef:u,descriptionId:l.descriptionId})]})]})}),DP="DialogTitle",v6=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Xn(DP,r);return d.jsx(Ie.h2,{id:i.titleId,...n,ref:t})});v6.displayName=DP;var y6="DialogDescription",x6=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Xn(y6,r);return d.jsx(Ie.p,{id:i.descriptionId,...n,ref:t})});x6.displayName=y6;var b6="DialogClose",w6=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Xn(b6,r);return d.jsx(Ie.button,{type:"button",...n,ref:t,onClick:Pe(e.onClick,()=>i.onOpenChange(!1))})});w6.displayName=b6;function $P(e){return e?"open":"closed"}var _6="DialogTitleWarning",[J1e,S6]=EG(_6,{contentName:Xo,titleName:DP,docsSlug:"dialog"}),age=({titleId:e})=>{const t=S6(_6),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},oge="DialogDescriptionWarning",sge=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${S6(oge).contentName}}.`;return _.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},j6=c6,P6=f6,A6=h6,N6=p6,O6=m6,E6=v6,C6=x6,LP=w6;const rc=j6;rc.displayName=j6.displayName;const T6=P6;T6.displayName=P6.displayName;const k6=({...e})=>d.jsx(A6,{...e});k6.displayName=A6.displayName;const lge=LP;lge.displayName=LP.displayName;const R6=_.forwardRef(({className:e,...t},r)=>d.jsx(N6,{ref:r,"data-slot":"dialog-overlay",className:Ke("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t}));R6.displayName=N6.displayName;const nc=_.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(k6,{children:[d.jsx(R6,{}),d.jsxs(O6,{ref:n,"data-slot":"dialog-content",className:Ke("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,d.jsxs(LP,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Fl,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));nc.displayName=O6.displayName;const ic=_.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,"data-slot":"dialog-header",className:Ke("flex flex-col gap-2 text-center sm:text-left",e),...t}));ic.displayName="DialogHeader";const Qf=_.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,"data-slot":"dialog-footer",className:Ke("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t}));Qf.displayName="DialogFooter";const ac=_.forwardRef(({className:e,...t},r)=>d.jsx(E6,{ref:r,"data-slot":"dialog-title",className:Ke("text-lg leading-none font-semibold",e),...t}));ac.displayName=E6.displayName;const oc=_.forwardRef(({className:e,...t},r)=>d.jsx(C6,{ref:r,"data-slot":"dialog-description",className:Ke("text-muted-foreground text-sm",e),...t}));oc.displayName=C6.displayName;function M6({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(rc,{open:e,onOpenChange:t,children:d.jsxs(nc,{className:"sm:max-w-md",children:[d.jsxs(ic,{children:[d.jsx(ac,{className:"text-xl font-serif text-yellow-600",children:"Confirm Logout"}),d.jsx(oc,{children:"Are you sure you want to log out of your account?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"You will be redirected to the login page. Make sure all unsaved changes are saved before logging out."})}),d.jsxs(Qf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Te,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(_1,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(_1,{className:"mr-2 size-4"})," Confirm"]})]})]})})}function zi({title:e}){const[t,r]=_.useState(!1),[n,i]=_.useState(!1),a=async()=>{try{i(!0),await ht.logout(),alert("Logged out successfully"),setTimeout(()=>{window.location.href="/login"},1e3)}catch{alert("Logout failed. Please try again.")}finally{i(!1),r(!1)}};return d.jsxs("header",{className:"h-16 border-b border-gray-800 bg-gray-900 flex items-center justify-between px-6 shadow-lg relative",children:[d.jsx("div",{className:"h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60 absolute top-0 left-0 w-full"}),d.jsx("h2",{className:"text-xl font-medium text-white",children:e}),d.jsx("div",{className:"flex items-center space-x-4",children:d.jsxs(Xme,{children:[d.jsx(Zme,{asChild:!0,children:d.jsx(Te,{variant:"ghost",size:"icon",className:"rounded-full text-gray-300 hover:text-white hover:bg-gray-800",children:d.jsx(gr,{className:"size-5"})})}),d.jsxs(Qme,{align:"end",className:"bg-gray-800 border-gray-700",children:[d.jsx(t1,{className:"text-gray-300 hover:text-white hover:bg-gray-700 focus:bg-gray-700 focus:text-white",children:"Profile"}),d.jsx(t1,{className:"text-gray-300 hover:text-white hover:bg-gray-700 focus:bg-gray-700 focus:text-white",children:"Settings"}),d.jsx(t1,{onClick:()=>r(!0),className:"text-red-400 hover:text-red-300 hover:bg-red-900/20 focus:bg-red-900/20 focus:text-red-300",children:"Logout"})]})]})}),d.jsx(M6,{open:t,onOpenChange:r,onConfirm:a,isSubmitting:n})]})}var cge="Separator",hD="horizontal",uge=["horizontal","vertical"],I6=_.forwardRef((e,t)=>{const{decorative:r,orientation:n=hD,...i}=e,a=fge(n)?n:hD,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(Ie.div,{"data-orientation":a,...l,...i,ref:t})});I6.displayName=cge;function fge(e){return uge.includes(e)}var dge=I6;function hge({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(dge,{"data-slot":"separator-root",decorative:r,orientation:t,className:Ke("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}function Vi(){const[e,t]=_.useState(!1),[r,n]=_.useState(!1),[i,a]=_.useState(!1),[o,l]=_.useState(null);_.useEffect(()=>{async function h(){try{const p=await ht.fetchCurrentUser();l(p)}catch{}}h()},[]);const u=async()=>{try{a(!0),await ht.logout(),alert("Logged out successfully"),setTimeout(()=>{window.location.href="/login"},1e3)}catch{alert("Logout failed. Please try again.")}finally{a(!1),n(!1)}},f=h=>h==="/admin/"?location.pathname==="/admin"||location.pathname==="/admin/":location.pathname===h;return d.jsxs(d.Fragment,{children:[d.jsx(M6,{open:r,onOpenChange:n,onConfirm:u,isSubmitting:i}),d.jsx("button",{className:"md:hidden fixed top-4 left-4 z-50 bg-gray-800 text-white rounded-md p-2 shadow-lg border border-gray-700 hover:bg-gray-700 transition-colors",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?d.jsx(Fl,{className:"size-5"}):d.jsx(IW,{className:"size-5"})}),e&&d.jsx("div",{className:"md:hidden fixed inset-0 bg-black/70 z-40",onClick:()=>t(!1)}),d.jsxs("aside",{className:`bg-gray-900 border-r border-gray-800 shadow-2xl fixed h-full z-50 flex flex-col w-64
${e?"left-0":"-left-full md:left-0"}
transition-all duration-300
`,children:[d.jsx("div",{className:"h-1.5 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60 mx-2 mt-2 rounded-full shadow-lg flex-shrink-0"}),d.jsx("div",{className:"p-4 flex items-center justify-center border-b border-gray-800 flex-shrink-0",children:d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:"size-10 rounded-xl bg-[#9B2335] flex items-center justify-center mr-3 shadow-xl border border-gray-700",children:d.jsx(OL,{className:"size-5 text-white"})}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx("h1",{className:"text-lg font-bold text-white",children:"Italian Migrants"}),d.jsx("p",{className:"text-xs text-[#9B2335]",children:"Admin Portal"})]})]})}),d.jsxs("nav",{className:"flex-1 py-4 scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-transparent",children:[d.jsxs("ul",{className:"space-y-2 px-3",children:[d.jsx("li",{children:d.jsx(ct,{to:"/admin/",children:d.jsxs(Te,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(Pm,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Dashboard"})]})})}),d.jsx("li",{children:d.jsx(ct,{to:"/admin/migrants",children:d.jsxs(Te,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/migrants")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(QS,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Migrants"})]})})}),d.jsx("li",{children:d.jsx(ct,{to:"/admin/reports",children:d.jsxs(Te,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/reports")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(SL,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Reports"})]})})})]}),d.jsx(hge,{className:"my-6 bg-gray-800 mx-3"}),d.jsxs("ul",{className:"space-y-2 px-3",children:[d.jsx("li",{children:d.jsx(ct,{to:"/admin/users/create",children:d.jsxs(Te,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/users/create")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(ZS,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Create User"})]})})}),d.jsx("li",{children:d.jsx(ct,{to:"/admin/settings",children:d.jsxs(Te,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/settings")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(zW,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Settings"})]})})})]})]}),d.jsxs("div",{className:"p-4 border-t border-gray-800 flex-shrink-0",children:[o&&d.jsx("div",{className:"mb-3 p-3 bg-gray-800 rounded-lg",children:d.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[d.jsx("div",{className:"size-8 rounded-full bg-[#9B2335] flex items-center justify-center",children:d.jsx("span",{className:"text-xs font-bold text-white",children:o.name.charAt(0).toUpperCase()})}),d.jsxs("div",{className:"text-sm",children:[d.jsx("p",{className:"font-medium text-white truncate",children:o.name}),d.jsx("p",{className:"text-gray-400 text-xs truncate",children:o.email})]})]})}),d.jsxs(Te,{variant:"ghost",className:"w-full justify-start text-red-400 hover:bg-red-900/20 hover:text-red-300 rounded-lg transition-all duration-300",onClick:()=>n(!0),children:[d.jsx(_1,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Logout"})]})]})]})]})}const D6=_.createContext({});function pge(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const BP=typeof window<"u",mge=BP?_.useLayoutEffect:_.useEffect,FP=_.createContext(null);function zP(e,t){e.indexOf(t)===-1&&e.push(t)}function VP(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Zi=(e,t,r)=>r>t?t:r<e?e:r;let UP=()=>{};const Qi={},$6=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function L6(e){return typeof e=="object"&&e!==null}const B6=e=>/^0[^.\s]+$/u.test(e);function qP(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,gge=(e,t)=>r=>t(e(r)),Jf=(...e)=>e.reduce(gge),_f=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class WP{constructor(){this.subscriptions=[]}add(t){return zP(this.subscriptions,t),()=>VP(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ui=e=>e*1e3,fi=e=>e/1e3;function F6(e,t){return t?e*(1e3/t):0}const z6=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,vge=1e-7,yge=12;function xge(e,t,r,n,i){let a,o,l=0;do o=t+(r-t)/2,a=z6(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>vge&&++l<yge);return o}function ed(e,t,r,n){if(e===t&&r===n)return yn;const i=a=>xge(a,0,1,e,r);return a=>a===0||a===1?a:z6(i(a),t,n)}const V6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U6=e=>t=>1-e(1-t),q6=ed(.33,1.53,.69,.99),HP=U6(q6),W6=V6(HP),H6=e=>(e*=2)<1?.5*HP(e):.5*(2-Math.pow(2,-10*(e-1))),KP=e=>1-Math.sin(Math.acos(e)),K6=U6(KP),G6=V6(KP),bge=ed(.42,0,1,1),wge=ed(0,0,.58,1),Y6=ed(.42,0,.58,1),_ge=e=>Array.isArray(e)&&typeof e[0]!="number",X6=e=>Array.isArray(e)&&typeof e[0]=="number",Sge={linear:yn,easeIn:bge,easeInOut:Y6,easeOut:wge,circIn:KP,circInOut:G6,circOut:K6,backIn:HP,backInOut:W6,backOut:q6,anticipate:H6},jge=e=>typeof e=="string",pD=e=>{if(X6(e)){UP(e.length===4);const[t,r,n,i]=e;return ed(t,r,n,i)}else if(jge(e))return Sge[e];return e},Dh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],mD={value:null};function Pge(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},u=0;function f(p){o.has(p)&&(h.schedule(p),e()),u++,p(l)}const h={schedule:(p,g=!1,v=!1)=>{const x=v&&i?r:n;return g&&o.add(p),x.has(p)||x.add(p),p},cancel:p=>{n.delete(p),o.delete(p)},process:p=>{if(l=p,i){a=!0;return}i=!0,[r,n]=[n,r],r.forEach(f),t&&mD.value&&mD.value.frameloop[t].push(u),u=0,r.clear(),i=!1,a&&(a=!1,h.process(p))}};return h}const Age=40;function Z6(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=Dh.reduce((P,C)=>(P[C]=Pge(a,t?C:void 0),P),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:v,postRender:w}=o,x=()=>{const P=Qi.useManualTiming?i.timestamp:performance.now();r=!1,Qi.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(P-i.timestamp,Age),1)),i.timestamp=P,i.isProcessing=!0,l.process(i),u.process(i),f.process(i),h.process(i),p.process(i),g.process(i),v.process(i),w.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(x))},b=()=>{r=!0,n=!0,i.isProcessing||e(x)};return{schedule:Dh.reduce((P,C)=>{const N=o[C];return P[C]=(E,T=!1,k=!1)=>(r||b(),N.schedule(E,T,k)),P},{}),cancel:P=>{for(let C=0;C<Dh.length;C++)o[Dh[C]].cancel(P)},state:i,steps:o}}const{schedule:Mt,cancel:qa,state:cr,steps:r1}=Z6(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let Xh;function Nge(){Xh=void 0}const Br={now:()=>(Xh===void 0&&Br.set(cr.isProcessing||Qi.useManualTiming?cr.timestamp:performance.now()),Xh),set:e=>{Xh=e,queueMicrotask(Nge)}},Q6=e=>t=>typeof t=="string"&&t.startsWith(e),GP=Q6("--"),Oge=Q6("var(--"),YP=e=>Oge(e)?Ege.test(e.split("/*")[0].trim()):!1,Ege=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,sc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Sf={...sc,transform:e=>Zi(0,1,e)},$h={...sc,default:1},Eu=e=>Math.round(e*1e5)/1e5,XP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cge(e){return e==null}const Tge=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ZP=(e,t)=>r=>!!(typeof r=="string"&&Tge.test(r)&&r.startsWith(e)||t&&!Cge(r)&&Object.prototype.hasOwnProperty.call(r,t)),J6=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,l]=n.match(XP);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},kge=e=>Zi(0,255,e),n1={...sc,transform:e=>Math.round(kge(e))},Ro={test:ZP("rgb","red"),parse:J6("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+n1.transform(e)+", "+n1.transform(t)+", "+n1.transform(r)+", "+Eu(Sf.transform(n))+")"};function Rge(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const aS={test:ZP("#"),parse:Rge,transform:Ro.transform},td=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oa=td("deg"),di=td("%"),$e=td("px"),Mge=td("vh"),Ige=td("vw"),gD={...di,parse:e=>di.parse(e)/100,transform:e=>di.transform(e*100)},Ys={test:ZP("hsl","hue"),parse:J6("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+di.transform(Eu(t))+", "+di.transform(Eu(r))+", "+Eu(Sf.transform(n))+")"},mr={test:e=>Ro.test(e)||aS.test(e)||Ys.test(e),parse:e=>Ro.test(e)?Ro.parse(e):Ys.test(e)?Ys.parse(e):aS.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ro.transform(e):Ys.transform(e)},Dge=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $ge(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(XP))==null?void 0:t.length)||0)+(((r=e.match(Dge))==null?void 0:r.length)||0)>0}const ez="number",tz="color",Lge="var",Bge="var(",vD="${}",Fge=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jf(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(Fge,u=>(mr.test(u)?(n.color.push(a),i.push(tz),r.push(mr.parse(u))):u.startsWith(Bge)?(n.var.push(a),i.push(Lge),r.push(u)):(n.number.push(a),i.push(ez),r.push(parseFloat(u))),++a,vD)).split(vD);return{values:r,split:l,indexes:n,types:i}}function rz(e){return jf(e).values}function nz(e){const{split:t,types:r}=jf(e),n=t.length;return i=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],i[o]!==void 0){const l=r[o];l===ez?a+=Eu(i[o]):l===tz?a+=mr.transform(i[o]):a+=i[o]}return a}}const zge=e=>typeof e=="number"?0:e;function Vge(e){const t=rz(e);return nz(e)(t.map(zge))}const Wa={test:$ge,parse:rz,createTransformer:nz,getAnimatableNone:Vge};function i1(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Uge({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,u=2*r-l;i=i1(u,l,e+1/3),a=i1(u,l,e),o=i1(u,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function lm(e,t){return r=>r>0?t:e}const Rt=(e,t,r)=>e+(t-e)*r,a1=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},qge=[aS,Ro,Ys],Wge=e=>qge.find(t=>t.test(e));function yD(e){const t=Wge(e);if(!t)return!1;let r=t.parse(e);return t===Ys&&(r=Uge(r)),r}const xD=(e,t)=>{const r=yD(e),n=yD(t);if(!r||!n)return lm(e,t);const i={...r};return a=>(i.red=a1(r.red,n.red,a),i.green=a1(r.green,n.green,a),i.blue=a1(r.blue,n.blue,a),i.alpha=Rt(r.alpha,n.alpha,a),Ro.transform(i))},oS=new Set(["none","hidden"]);function Hge(e,t){return oS.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Kge(e,t){return r=>Rt(e,t,r)}function QP(e){return typeof e=="number"?Kge:typeof e=="string"?YP(e)?lm:mr.test(e)?xD:Xge:Array.isArray(e)?iz:typeof e=="object"?mr.test(e)?xD:Gge:lm}function iz(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>QP(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function Gge(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=QP(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function Yge(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]],l=e.values[o]??0;r[i]=l,n[a]++}return r}const Xge=(e,t)=>{const r=Wa.createTransformer(t),n=jf(e),i=jf(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?oS.has(e)&&!i.values.length||oS.has(t)&&!n.values.length?Hge(e,t):Jf(iz(Yge(n,i),i.values),r):lm(e,t)};function az(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Rt(e,t,r):QP(e)(e,t)}const Zge=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Mt.update(t,r),stop:()=>qa(t),now:()=>cr.isProcessing?cr.timestamp:Br.now()}},oz=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=e(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},cm=2e4;function JP(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<cm;)t+=r,n=e.next(t);return t>=cm?1/0:t}function Qge(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(JP(n),cm);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:fi(i)}}const Jge=5;function sz(e,t,r){const n=Math.max(t-Jge,0);return F6(r-e(n),t-n)}const Dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bD=.001;function eve({duration:e=Dt.duration,bounce:t=Dt.bounce,velocity:r=Dt.velocity,mass:n=Dt.mass}){let i,a,o=1-t;o=Zi(Dt.minDamping,Dt.maxDamping,o),e=Zi(Dt.minDuration,Dt.maxDuration,fi(e)),o<1?(i=f=>{const h=f*o,p=h*e,g=h-r,v=sS(f,o),w=Math.exp(-p);return bD-g/v*w},a=f=>{const p=f*o*e,g=p*r+r,v=Math.pow(o,2)*Math.pow(f,2)*e,w=Math.exp(-p),x=sS(Math.pow(f,2),o);return(-i(f)+bD>0?-1:1)*((g-v)*w)/x}):(i=f=>{const h=Math.exp(-f*e),p=(f-r)*e+1;return-.001+h*p},a=f=>{const h=Math.exp(-f*e),p=(r-f)*(e*e);return h*p});const l=5/e,u=rve(i,a,l);if(e=ui(e),isNaN(u))return{stiffness:Dt.stiffness,damping:Dt.damping,duration:e};{const f=Math.pow(u,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:e}}}const tve=12;function rve(e,t,r){let n=r;for(let i=1;i<tve;i++)n=n-e(n)/t(n);return n}function sS(e,t){return e*Math.sqrt(1-t*t)}const nve=["duration","bounce"],ive=["stiffness","damping","mass"];function wD(e,t){return t.some(r=>e[r]!==void 0)}function ave(e){let t={velocity:Dt.velocity,stiffness:Dt.stiffness,damping:Dt.damping,mass:Dt.mass,isResolvedFromDuration:!1,...e};if(!wD(e,ive)&&wD(e,nve))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*Zi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Dt.mass,stiffness:i,damping:a}}else{const r=eve(e);t={...t,...r,mass:Dt.mass},t.isResolvedFromDuration=!0}return t}function um(e=Dt.visualDuration,t=Dt.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:f,mass:h,duration:p,velocity:g,isResolvedFromDuration:v}=ave({...r,velocity:-fi(r.velocity||0)}),w=g||0,x=f/(2*Math.sqrt(u*h)),b=o-a,S=fi(Math.sqrt(u/h)),A=Math.abs(b)<5;n||(n=A?Dt.restSpeed.granular:Dt.restSpeed.default),i||(i=A?Dt.restDelta.granular:Dt.restDelta.default);let P;if(x<1){const N=sS(S,x);P=E=>{const T=Math.exp(-x*S*E);return o-T*((w+x*S*b)/N*Math.sin(N*E)+b*Math.cos(N*E))}}else if(x===1)P=N=>o-Math.exp(-S*N)*(b+(w+S*b)*N);else{const N=S*Math.sqrt(x*x-1);P=E=>{const T=Math.exp(-x*S*E),k=Math.min(N*E,300);return o-T*((w+x*S*b)*Math.sinh(k)+N*b*Math.cosh(k))/N}}const C={calculatedDuration:v&&p||null,next:N=>{const E=P(N);if(v)l.done=N>=p;else{let T=N===0?w:0;x<1&&(T=N===0?ui(w):sz(P,N,E));const k=Math.abs(T)<=n,M=Math.abs(o-E)<=i;l.done=k&&M}return l.value=l.done?o:E,l},toString:()=>{const N=Math.min(JP(C),cm),E=oz(T=>C.next(N*T).value,N,30);return N+"ms "+E},toTransition:()=>{}};return C}um.applyToOptions=e=>{const t=Qge(e,100,um);return e.ease=t.ease,e.duration=ui(t.duration),e.type="keyframes",e};function lS({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:u,restDelta:f=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},v=k=>l!==void 0&&k<l||u!==void 0&&k>u,w=k=>l===void 0?u:u===void 0||Math.abs(l-k)<Math.abs(u-k)?l:u;let x=r*t;const b=p+x,S=o===void 0?b:o(b);S!==b&&(x=S-p);const A=k=>-x*Math.exp(-k/n),P=k=>S+A(k),C=k=>{const M=A(k),z=P(k);g.done=Math.abs(M)<=f,g.value=g.done?S:z};let N,E;const T=k=>{v(g.value)&&(N=k,E=um({keyframes:[g.value,w(g.value)],velocity:sz(P,k,g.value),damping:i,stiffness:a,restDelta:f,restSpeed:h}))};return T(0),{calculatedDuration:null,next:k=>{let M=!1;return!E&&N===void 0&&(M=!0,C(k),T(k)),N!==void 0&&k>=N?E.next(k-N):(!M&&C(k),g)}}}function ove(e,t,r){const n=[],i=r||Qi.mix||az,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||yn:t;l=Jf(u,l)}n.push(l)}return n}function sve(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(UP(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=ove(t,n,i),u=l.length,f=h=>{if(o&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=_f(e[p],e[p+1],h);return l[p](g)};return r?h=>f(Zi(e[0],e[a-1],h)):f}function lve(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=_f(0,t,n);e.push(Rt(r,1,i))}}function cve(e){const t=[0];return lve(t,e.length-1),t}function uve(e,t){return e.map(r=>r*t)}function fve(e,t){return e.map(()=>t||Y6).splice(0,e.length-1)}function Cu({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=_ge(n)?n.map(pD):pD(n),a={done:!1,value:t[0]},o=uve(r&&r.length===t.length?r:cve(t),e),l=sve(o,t,{ease:Array.isArray(i)?i:fve(t,i)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const dve=e=>e!==null;function eA(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(dve),l=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!l||n===void 0?a[l]:n}const hve={decay:lS,inertia:lS,tween:Cu,keyframes:Cu,spring:um};function lz(e){typeof e.type=="string"&&(e.type=hve[e.type])}class tA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const pve=e=>e/100;class rA extends tA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(r=!0)=>{var n,i;if(r){const{motionValue:a}=this.options;a&&a.updatedAt!==Br.now()&&this.tick(Br.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;lz(t);const{type:r=Cu,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const u=r||Cu;u!==Cu&&typeof l[0]!="number"&&(this.mixKeyframes=Jf(pve,az(l[0],l[1])),l=[0,100]);const f=u({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=JP(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=f}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return n.next(0);const{delay:f=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:v,type:w,onUpdate:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const S=this.currentTime-f*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let P=this.currentTime,C=n;if(p){const k=Math.min(this.currentTime,i)/l;let M=Math.floor(k),z=k%1;!z&&k>=1&&(z=1),z===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(g==="reverse"?(z=1-z,v&&(z-=v/l)):g==="mirror"&&(C=o)),P=Zi(0,1,z)*l}const N=A?{done:!1,value:h[0]}:C.next(P);a&&(N.value=a(N.value));let{done:E}=N;!A&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return T&&w!==lS&&(N.value=eA(h,this.options,b,this.speed)),x&&x(N.value),T&&this.finish(),N}then(t,r){return this.finished.then(t,r)}get duration(){return fi(this.calculatedDuration)}get time(){return fi(this.currentTime)}set time(t){var r;t=ui(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Br.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=fi(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Zge,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Br.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function mve(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Mo=e=>e*180/Math.PI,cS=e=>{const t=Mo(Math.atan2(e[1],e[0]));return uS(t)},gve={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cS,rotateZ:cS,skewX:e=>Mo(Math.atan(e[1])),skewY:e=>Mo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},uS=e=>(e=e%360,e<0&&(e+=360),e),_D=cS,SD=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jD=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vve={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:SD,scaleY:jD,scale:e=>(SD(e)+jD(e))/2,rotateX:e=>uS(Mo(Math.atan2(e[6],e[5]))),rotateY:e=>uS(Mo(Math.atan2(-e[2],e[0]))),rotateZ:_D,rotate:_D,skewX:e=>Mo(Math.atan(e[4])),skewY:e=>Mo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fS(e){return e.includes("scale")?1:0}function dS(e,t){if(!e||e==="none")return fS(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=vve,i=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=gve,i=l}if(!i)return fS(t);const a=n[t],o=i[1].split(",").map(xve);return typeof a=="function"?a(o):o[a]}const yve=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return dS(r,t)};function xve(e){return parseFloat(e.trim())}const lc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cc=new Set(lc),PD=e=>e===sc||e===$e,bve=new Set(["x","y","z"]),wve=lc.filter(e=>!bve.has(e));function _ve(e){const t=[];return wve.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Lo={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>dS(t,"x"),y:(e,{transform:t})=>dS(t,"y")};Lo.translateX=Lo.x;Lo.translateY=Lo.y;const Bo=new Set;let hS=!1,pS=!1,mS=!1;function cz(){if(pS){const e=Array.from(Bo).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=_ve(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([a,o])=>{var l;(l=n.getValue(a))==null||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pS=!1,hS=!1,Bo.forEach(e=>e.complete(mS)),Bo.clear()}function uz(){Bo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pS=!0)})}function Sve(){mS=!0,uz(),cz(),mS=!1}class nA{constructor(t,r,n,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Bo.add(this),hS||(hS=!0,Mt.read(uz),Mt.resolveKeyframes(cz))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const l=n.readValue(r,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}mve(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bo.delete(this)}cancel(){this.state==="scheduled"&&(Bo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const jve=e=>e.startsWith("--");function Pve(e,t,r){jve(t)?e.style.setProperty(t,r):e.style[t]=r}const Ave=qP(()=>window.ScrollTimeline!==void 0),Nve={};function Ove(e,t){const r=qP(e);return()=>Nve[t]??r()}const fz=Ove(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gu=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,AD={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gu([0,.65,.55,1]),circOut:gu([.55,0,1,.45]),backIn:gu([.31,.01,.66,-.59]),backOut:gu([.33,1.53,.69,.99])};function dz(e,t){if(e)return typeof e=="function"?fz()?oz(e,t):"ease-out":X6(e)?gu(e):Array.isArray(e)?e.map(r=>dz(r,t)||AD.easeOut):AD[e]}function Eve(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:u}={},f=void 0){const h={[t]:r};u&&(h.offset=u);const p=dz(l,i);Array.isArray(p)&&(h.easing=p);const g={delay:n,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(h,g)}function hz(e){return typeof e=="function"&&"applyToOptions"in e}function Cve({type:e,...t}){return hz(e)&&fz()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Tve extends tA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,UP(typeof t.type!="string");const f=Cve(t);this.animation=Eve(r,n,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=eA(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):Pve(r,n,h),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return fi(Number(t))}get time(){return fi(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ui(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ave()?(this.animation.timeline=t,yn):r(this)}}const pz={anticipate:H6,backInOut:W6,circInOut:G6};function kve(e){return e in pz}function Rve(e){typeof e.ease=="string"&&kve(e.ease)&&(e.ease=pz[e.ease])}const ND=10;class Mve extends Tve{constructor(t){Rve(t),lz(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:i,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new rA({...o,autoplay:!1}),u=ui(this.finishedTime??this.time);r.setWithVelocity(l.sample(u-ND).value,l.sample(u).value,ND),l.stop()}}const OD=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Wa.test(e)||e==="0")&&!e.startsWith("url("));function Ive(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Dve(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=OD(i,t),l=OD(a,t);return!o||!l?!1:Ive(e)||(r==="spring"||hz(r))&&n}function mz(e){return L6(e)&&"offsetHeight"in e}const $ve=new Set(["opacity","clipPath","filter","transform"]),Lve=qP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Bve(e){var f;const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!mz((f=t==null?void 0:t.owner)==null?void 0:f.current))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Lve()&&r&&$ve.has(r)&&(r!=="transform"||!u)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}const Fve=40;class zve extends tA{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:u,motionValue:f,element:h,...p}){var w;super(),this.stop=()=>{var x,b;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Br.now();const g={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:a,repeatType:o,name:u,motionValue:f,element:h,...p},v=(h==null?void 0:h.KeyframeResolver)||nA;this.keyframeResolver=new v(l,(x,b,S)=>this.onKeyframesResolved(x,b,g,!S),u,f,h),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,r,n,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:u,isHandoff:f,onUpdate:h}=n;this.resolvedAt=Br.now(),Dve(t,a,o,l)||((Qi.instantAnimations||!u)&&(h==null||h(eA(t,n,r))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Fve?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},v=!f&&Bve(g)?new Mve({...g,element:g.motionValue.owner.current}):new rA(g);v.finished.then(()=>this.notifyFinished()).catch(yn),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sve()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Vve=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Uve(e){const t=Vve.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function gz(e,t,r=1){const[n,i]=Uve(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return $6(o)?parseFloat(o):o}return YP(i)?gz(i,t,r+1):i}function iA(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const vz=new Set(["width","height","top","left","right","bottom",...lc]),qve={test:e=>e==="auto",parse:e=>e},yz=e=>t=>t.test(e),xz=[sc,$e,di,Oa,Ige,Mge,qve],ED=e=>xz.find(yz(e));function Wve(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||B6(e):!0}const Hve=new Set(["brightness","contrast","saturate","opacity"]);function Kve(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(XP)||[];if(!n)return e;const i=r.replace(n,"");let a=Hve.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const Gve=/\b([a-z-]*)\(.*?\)/gu,gS={...Wa,getAnimatableNone:e=>{const t=e.match(Gve);return t?t.map(Kve).join(" "):e}},CD={...sc,transform:Math.round},Yve={rotate:Oa,rotateX:Oa,rotateY:Oa,rotateZ:Oa,scale:$h,scaleX:$h,scaleY:$h,scaleZ:$h,skew:Oa,skewX:Oa,skewY:Oa,distance:$e,translateX:$e,translateY:$e,translateZ:$e,x:$e,y:$e,z:$e,perspective:$e,transformPerspective:$e,opacity:Sf,originX:gD,originY:gD,originZ:$e},aA={borderWidth:$e,borderTopWidth:$e,borderRightWidth:$e,borderBottomWidth:$e,borderLeftWidth:$e,borderRadius:$e,radius:$e,borderTopLeftRadius:$e,borderTopRightRadius:$e,borderBottomRightRadius:$e,borderBottomLeftRadius:$e,width:$e,maxWidth:$e,height:$e,maxHeight:$e,top:$e,right:$e,bottom:$e,left:$e,padding:$e,paddingTop:$e,paddingRight:$e,paddingBottom:$e,paddingLeft:$e,margin:$e,marginTop:$e,marginRight:$e,marginBottom:$e,marginLeft:$e,backgroundPositionX:$e,backgroundPositionY:$e,...Yve,zIndex:CD,fillOpacity:Sf,strokeOpacity:Sf,numOctaves:CD},Xve={...aA,color:mr,backgroundColor:mr,outlineColor:mr,fill:mr,stroke:mr,borderColor:mr,borderTopColor:mr,borderRightColor:mr,borderBottomColor:mr,borderLeftColor:mr,filter:gS,WebkitFilter:gS},bz=e=>Xve[e];function wz(e,t){let r=bz(e);return r!==gS&&(r=Wa),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Zve=new Set(["auto","none","0"]);function Qve(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!Zve.has(a)&&jf(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=wz(r,i)}class Jve extends nA{constructor(t,r,n,i,a){super(t,r,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),YP(f))){const h=gz(f,r.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!vz.has(n)||t.length!==2)return;const[i,a]=t,o=ED(i),l=ED(a);if(o!==l)if(PD(o)&&PD(l))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else Lo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||Wve(t[i]))&&n.push(i);n.length&&Qve(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=Lo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,f])=>{t.getValue(u).set(f)}),this.resolveNoneKeyframes()}}function eye(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=(r==null?void 0:r[e])??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const TD=30,tye=e=>!isNaN(parseFloat(e));class rye{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var o,l;const a=Br.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty();i&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Br.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tye(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new WP);const n=this.events[t].add(r);return t==="change"?()=>{n(),Mt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>TD)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,TD);return F6(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cl(e,t){return new rye(e,t)}const _z=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:oA}=Z6(queueMicrotask,!1),Dn={x:!1,y:!1};function Sz(){return Dn.x||Dn.y}function nye(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function jz(e,t){const r=eye(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function kD(e){return!(e.pointerType==="touch"||Sz())}function iye(e,t,r={}){const[n,i,a]=jz(e,r),o=l=>{if(!kD(l))return;const{target:u}=l,f=t(u,l);if(typeof f!="function"||!u)return;const h=p=>{kD(p)&&(f(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,i)};return n.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}const Pz=(e,t)=>t?e===t?!0:Pz(e,t.parentElement):!1,sA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,aye=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oye(e){return aye.has(e.tagName)||e.tabIndex!==-1}const Zh=new WeakSet;function RD(e){return t=>{t.key==="Enter"&&e(t)}}function o1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sye=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=RD(()=>{if(Zh.has(r))return;o1(r,"down");const i=RD(()=>{o1(r,"up")}),a=()=>o1(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function MD(e){return sA(e)&&!Sz()}function lye(e,t,r={}){const[n,i,a]=jz(e,r),o=l=>{const u=l.currentTarget;if(!MD(l))return;Zh.add(u);const f=t(u,l),h=(v,w)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Zh.has(u)&&Zh.delete(u),MD(v)&&typeof f=="function"&&f(v,{success:w})},p=v=>{h(v,u===window||u===document||r.useGlobalTarget||Pz(u,v.target))},g=v=>{h(v,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",g,i)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),mz(l)&&(l.addEventListener("focus",f=>sye(f,i)),!oye(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Az(e){return L6(e)&&"ownerSVGElement"in e}function cye(e){return Az(e)&&e.tagName==="svg"}const br=e=>!!(e&&e.getVelocity),uye=[...xz,mr,Wa],fye=e=>uye.find(yz(e)),Nz=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function dye(e=!0){const t=_.useContext(FP);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=_.useId();_.useEffect(()=>{if(e)return i(a)},[e]);const o=_.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const Oz=_.createContext({strict:!1}),ID={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Tl={};for(const e in ID)Tl[e]={isEnabled:t=>ID[e].some(r=>!!t[r])};function hye(e){for(const t in e)Tl[t]={...Tl[t],...e[t]}}const pye=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pye.has(e)}let Ez=e=>!fm(e);function mye(e){e&&(Ez=t=>t.startsWith("on")?!fm(t):e(t))}try{mye(require("@emotion/is-prop-valid").default)}catch{}function gye(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ez(i)||r===!0&&fm(i)||!t&&!fm(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function vye(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Mg=_.createContext({});function Ig(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pf(e){return typeof e=="string"||Array.isArray(e)}const lA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cA=["initial",...lA];function Dg(e){return Ig(e.animate)||cA.some(t=>Pf(e[t]))}function Cz(e){return!!(Dg(e)||e.variants)}function yye(e,t){if(Dg(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Pf(r)?r:void 0,animate:Pf(n)?n:void 0}}return e.inherit!==!1?t:{}}function xye(e){const{initial:t,animate:r}=yye(e,_.useContext(Mg));return _.useMemo(()=>({initial:t,animate:r}),[DD(t),DD(r)])}function DD(e){return Array.isArray(e)?e.join(" "):e}const bye=Symbol.for("motionComponentSymbol");function Xs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wye(e,t,r){return _.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Xs(r)&&(r.current=n))},[t])}const uA=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_ye="framerAppearId",Tz="data-"+uA(_ye),kz=_.createContext({});function Sye(e,t,r,n,i){var x,b;const{visualElement:a}=_.useContext(Mg),o=_.useContext(Oz),l=_.useContext(FP),u=_.useContext(Nz).reducedMotion,f=_.useRef(null);n=n||o.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const h=f.current,p=_.useContext(kz);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&jye(f.current,r,i,p);const g=_.useRef(!1);_.useInsertionEffect(()=>{h&&g.current&&h.update(r,l)});const v=r[Tz],w=_.useRef(!!v&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,v))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,v)));return mge(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),oA.render(h.render),w.current&&h.animationState&&h.animationState.animateChanges())}),_.useEffect(()=>{h&&(!w.current&&h.animationState&&h.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),w.current=!1))}),h}function jye(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Rz(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Xs(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:h,layoutScroll:u,layoutRoot:f})}function Rz(e){if(e)return e.options.allowProjection!==!1?e.projection:Rz(e.parent)}function Pye({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&hye(e);function a(l,u){let f;const h={..._.useContext(Nz),...l,layoutId:Aye(l)},{isStatic:p}=h,g=xye(l),v=n(l,p);if(!p&&BP){Nye();const w=Oye(h);f=w.MeasureLayout,g.visualElement=Sye(i,v,h,t,w.ProjectionNode)}return d.jsxs(Mg.Provider,{value:g,children:[f&&g.visualElement?d.jsx(f,{visualElement:g.visualElement,...h}):null,r(i,l,wye(v,g.visualElement,u),v,p,g.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=_.forwardRef(a);return o[bye]=i,o}function Aye({layoutId:e}){const t=_.useContext(D6).id;return t&&e!==void 0?t+"-"+e:e}function Nye(e,t){_.useContext(Oz).strict}function Oye(e){const{drag:t,layout:r}=Tl;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const Af={};function Eye(e){for(const t in e)Af[t]=e[t],GP(t)&&(Af[t].isCSSVariable=!0)}function Mz(e,{layout:t,layoutId:r}){return cc.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Af[e]||e==="opacity")}const Cye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tye=lc.length;function kye(e,t,r){let n="",i=!0;for(let a=0;a<Tye;a++){const o=lc[a],l=e[o];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(o.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||r){const f=_z(l,aA[o]);if(!u){i=!1;const h=Cye[o]||o;n+=`${h}(${f}) `}r&&(t[o]=f)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function fA(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const u in t){const f=t[u];if(cc.has(u)){o=!0;continue}else if(GP(u)){i[u]=f;continue}else{const h=_z(f,aA[u]);u.startsWith("origin")?(l=!0,a[u]=h):n[u]=h}}if(t.transform||(o||r?n.transform=kye(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=a;n.transformOrigin=`${u} ${f} ${h}`}}const dA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Iz(e,t,r){for(const n in t)!br(t[n])&&!Mz(n,r)&&(e[n]=t[n])}function Rye({transformTemplate:e},t){return _.useMemo(()=>{const r=dA();return fA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Mye(e,t){const r=e.style||{},n={};return Iz(n,r,e),Object.assign(n,Rye(e,t)),n}function Iye(e,t){const r={},n=Mye(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const Dye={offset:"stroke-dashoffset",array:"stroke-dasharray"},$ye={offset:"strokeDashoffset",array:"strokeDasharray"};function Lye(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?Dye:$ye;e[a.offset]=$e.transform(-n);const o=$e.transform(t),l=$e.transform(r);e[a.array]=`${o} ${l}`}function Dz(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},u,f,h){if(fA(e,l,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),i!==void 0&&Lye(p,i,a,o,!1)}const $z=()=>({...dA(),attrs:{}}),Lz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bye(e,t,r,n){const i=_.useMemo(()=>{const a=$z();return Dz(a,t,Lz(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Iz(a,e.style,e),i.style={...a,...i.style}}return i}const Fye=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function hA(e){return typeof e!="string"||e.includes("-")?!1:!!(Fye.indexOf(e)>-1||/[A-Z]/u.test(e))}function zye(e=!1){return(r,n,i,{latestValues:a},o)=>{const u=(hA(r)?Bye:Iye)(n,a,o,r),f=gye(n,typeof r=="string",e),h=r!==_.Fragment?{...f,...u,ref:i}:{},{children:p}=n,g=_.useMemo(()=>br(p)?p.get():p,[p]);return _.createElement(r,{...h,children:g})}}function $D(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function pA(e,t,r,n){if(typeof t=="function"){const[i,a]=$D(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=$D(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function Qh(e){return br(e)?e.get():e}function Vye({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:Uye(r,n,i,e),renderState:t()}}const Bz=e=>(t,r)=>{const n=_.useContext(Mg),i=_.useContext(FP),a=()=>Vye(e,t,n,i);return r?a():pge(a)};function Uye(e,t,r,n){const i={},a=n(e,{});for(const g in a)i[g]=Qh(a[g]);let{initial:o,animate:l}=e;const u=Dg(e),f=Cz(e);t&&f&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let h=r?r.initial===!1:!1;h=h||o===!1;const p=h?l:o;if(p&&typeof p!="boolean"&&!Ig(p)){const g=Array.isArray(p)?p:[p];for(let v=0;v<g.length;v++){const w=pA(e,g[v]);if(w){const{transitionEnd:x,transition:b,...S}=w;for(const A in S){let P=S[A];if(Array.isArray(P)){const C=h?P.length-1:0;P=P[C]}P!==null&&(i[A]=P)}for(const A in x)i[A]=x[A]}}}return i}function mA(e,t,r){var a;const{style:n}=e,i={};for(const o in n)(br(n[o])||t.style&&br(t.style[o])||Mz(o,e)||((a=r==null?void 0:r.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=n[o]);return i}const qye={useVisualState:Bz({scrapeMotionValuesFromProps:mA,createRenderState:dA})};function Fz(e,t,r){const n=mA(e,t,r);for(const i in e)if(br(e[i])||br(t[i])){const a=lc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}const Wye={useVisualState:Bz({scrapeMotionValuesFromProps:Fz,createRenderState:$z})};function Hye(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...hA(n)?Wye:qye,preloadedFeatures:e,useRender:zye(i),createVisualElement:t,Component:n};return Pye(o)}}function Nf(e,t,r){const n=e.getProps();return pA(n,t,r!==void 0?r:n.custom,e)}const vS=e=>Array.isArray(e);function Kye(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Cl(r))}function Gye(e){return vS(e)?e[e.length-1]||0:e}function Yye(e,t){const r=Nf(e,t);let{transitionEnd:n={},transition:i={},...a}=r||{};a={...a,...n};for(const o in a){const l=Gye(a[o]);Kye(e,o,l)}}function Xye(e){return!!(br(e)&&e.add)}function yS(e,t){const r=e.getValue("willChange");if(Xye(r))return r.add(t);if(!r&&Qi.WillChange){const n=new Qi.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function zz(e){return e.props[Tz]}const Zye=e=>e!==null;function Qye(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(Zye),a=t&&r!=="loop"&&t%2===1?0:i.length-1;return i[a]}const Jye={type:"spring",stiffness:500,damping:25,restSpeed:10},e0e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),t0e={type:"keyframes",duration:.8},r0e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},n0e=(e,{keyframes:t})=>t.length>2?t0e:cc.has(e)?e.startsWith("scale")?e0e(t[1]):Jye:r0e;function i0e({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:u,elapsed:f,...h}){return!!Object.keys(h).length}const gA=(e,t,r,n={},i,a)=>o=>{const l=iA(n,e)||{},u=l.delay||n.delay||0;let{elapsed:f=0}=n;f=f-ui(u);const h={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:g=>{t.set(g),l.onUpdate&&l.onUpdate(g)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};i0e(l)||Object.assign(h,n0e(e,h)),h.duration&&(h.duration=ui(h.duration)),h.repeatDelay&&(h.repeatDelay=ui(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(p=!0)),(Qi.instantAnimations||Qi.skipAnimations)&&(p=!0,h.duration=0,h.delay=0),h.allowFlatten=!l.type&&!l.ease,p&&!a&&t.get()!==void 0){const g=Qye(h.keyframes,l);if(g!==void 0){Mt.update(()=>{h.onUpdate(g),h.onComplete()});return}}return l.isSync?new rA(h):new zve(h)};function a0e({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Vz(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;n&&(a=n);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const p=e.getValue(h,e.latestValues[h]??null),g=l[h];if(g===void 0||f&&a0e(f,h))continue;const v={delay:r,...iA(a||{},h)},w=p.get();if(w!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===w&&!v.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const S=zz(e);if(S){const A=window.MotionHandoffAnimation(S,h,Mt);A!==null&&(v.startTime=A,x=!0)}}yS(e,h),p.start(gA(h,p,g,e.shouldReduceMotion&&vz.has(h)?{type:!1}:v,e,x));const b=p.animation;b&&u.push(b)}return o&&Promise.all(u).then(()=>{Mt.update(()=>{o&&Yye(e,o)})}),u}function xS(e,t,r={}){var u;const n=Nf(e,t,r.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(Vz(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:g}=i;return o0e(e,t,h+f,p,g,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[f,h]=l==="beforeChildren"?[a,o]:[o,a];return f().then(()=>h())}else return Promise.all([a(),o(r.delay)])}function o0e(e,t,r=0,n=0,i=1,a){const o=[],l=(e.variantChildren.size-1)*n,u=i===1?(f=0)=>f*n:(f=0)=>l-f*n;return Array.from(e.variantChildren).sort(s0e).forEach((f,h)=>{f.notify("AnimationStart",t),o.push(xS(f,t,{...a,delay:r+u(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(o)}function s0e(e,t){return e.sortNodePosition(t)}function l0e(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>xS(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=xS(e,t,r);else{const i=typeof t=="function"?Nf(e,t,r.custom):t;n=Promise.all(Vz(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function Uz(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const c0e=cA.length;function qz(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?qz(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<c0e;r++){const n=cA[r],i=e.props[n];(Pf(i)||i===!1)&&(t[n]=i)}return t}const u0e=[...lA].reverse(),f0e=lA.length;function d0e(e){return t=>Promise.all(t.map(({animation:r,options:n})=>l0e(e,r,n)))}function h0e(e){let t=d0e(e),r=LD(),n=!0;const i=u=>(f,h)=>{var g;const p=Nf(e,h,u==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(p){const{transition:v,transitionEnd:w,...x}=p;f={...f,...x,...w}}return f};function a(u){t=u(e)}function o(u){const{props:f}=e,h=qz(e.parent)||{},p=[],g=new Set;let v={},w=1/0;for(let b=0;b<f0e;b++){const S=u0e[b],A=r[S],P=f[S]!==void 0?f[S]:h[S],C=Pf(P),N=S===u?A.isActive:null;N===!1&&(w=b);let E=P===h[S]&&P!==f[S]&&C;if(E&&n&&e.manuallyAnimateOnMount&&(E=!1),A.protectedKeys={...v},!A.isActive&&N===null||!P&&!A.prevProp||Ig(P)||typeof P=="boolean")continue;const T=p0e(A.prevProp,P);let k=T||S===u&&A.isActive&&!E&&C||b>w&&C,M=!1;const z=Array.isArray(P)?P:[P];let D=z.reduce(i(S),{});N===!1&&(D={});const{prevResolvedValues:B={}}=A,U={...B,...D},G=X=>{k=!0,g.has(X)&&(M=!0,g.delete(X)),A.needsAnimating[X]=!0;const I=e.getValue(X);I&&(I.liveStyle=!1)};for(const X in U){const I=D[X],W=B[X];if(v.hasOwnProperty(X))continue;let Q=!1;vS(I)&&vS(W)?Q=!Uz(I,W):Q=I!==W,Q?I!=null?G(X):g.add(X):I!==void 0&&g.has(X)?G(X):A.protectedKeys[X]=!0}A.prevProp=P,A.prevResolvedValues=D,A.isActive&&(v={...v,...D}),n&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&T)||M)&&p.push(...z.map(X=>({animation:X,options:{type:S}})))}if(g.size){const b={};if(typeof f.initial!="boolean"){const S=Nf(e,Array.isArray(f.initial)?f.initial[0]:f.initial);S&&S.transition&&(b.transition=S.transition)}g.forEach(S=>{const A=e.getBaseTarget(S),P=e.getValue(S);P&&(P.liveStyle=!0),b[S]=A??null}),p.push({animation:b})}let x=!!p.length;return n&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(p):Promise.resolve()}function l(u,f){var p;if(r[u].isActive===f)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(u,f)}),r[u].isActive=f;const h=o(u);for(const g in r)r[g].protectedKeys={};return h}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>r,reset:()=>{r=LD(),n=!0}}}function p0e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Uz(t,e):!1}function wo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LD(){return{animate:wo(!0),whileInView:wo(),whileHover:wo(),whileTap:wo(),whileDrag:wo(),whileFocus:wo(),exit:wo()}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class m0e extends eo{constructor(t){super(t),t.animationState||(t.animationState=h0e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ig(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let g0e=0;class v0e extends eo{constructor(){super(...arguments),this.id=g0e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const y0e={animation:{Feature:m0e},exit:{Feature:v0e}};function Of(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function rd(e){return{point:{x:e.pageX,y:e.pageY}}}const x0e=e=>t=>sA(t)&&e(t,rd(t));function Tu(e,t,r,n){return Of(e,t,x0e(r),n)}function Wz({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function b0e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function w0e(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}const Hz=1e-4,_0e=1-Hz,S0e=1+Hz,Kz=.01,j0e=0-Kz,P0e=0+Kz;function Er(e){return e.max-e.min}function A0e(e,t,r){return Math.abs(e-t)<=r}function BD(e,t,r,n=.5){e.origin=n,e.originPoint=Rt(t.min,t.max,e.origin),e.scale=Er(r)/Er(t),e.translate=Rt(r.min,r.max,e.origin)-e.originPoint,(e.scale>=_0e&&e.scale<=S0e||isNaN(e.scale))&&(e.scale=1),(e.translate>=j0e&&e.translate<=P0e||isNaN(e.translate))&&(e.translate=0)}function ku(e,t,r,n){BD(e.x,t.x,r.x,n?n.originX:void 0),BD(e.y,t.y,r.y,n?n.originY:void 0)}function FD(e,t,r){e.min=r.min+t.min,e.max=e.min+Er(t)}function N0e(e,t,r){FD(e.x,t.x,r.x),FD(e.y,t.y,r.y)}function zD(e,t,r){e.min=t.min-r.min,e.max=e.min+Er(t)}function Ru(e,t,r){zD(e.x,t.x,r.x),zD(e.y,t.y,r.y)}const VD=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zs=()=>({x:VD(),y:VD()}),UD=()=>({min:0,max:0}),zt=()=>({x:UD(),y:UD()});function dn(e){return[e("x"),e("y")]}function s1(e){return e===void 0||e===1}function bS({scale:e,scaleX:t,scaleY:r}){return!s1(e)||!s1(t)||!s1(r)}function jo(e){return bS(e)||Gz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Gz(e){return qD(e.x)||qD(e.y)}function qD(e){return e&&e!=="0%"}function dm(e,t,r){const n=e-r,i=t*n;return r+i}function WD(e,t,r,n,i){return i!==void 0&&(e=dm(e,i,n)),dm(e,r,n)+t}function wS(e,t=0,r=1,n,i){e.min=WD(e.min,t,r,n,i),e.max=WD(e.max,t,r,n,i)}function Yz(e,{x:t,y:r}){wS(e.x,t.translate,t.scale,t.originPoint),wS(e.y,r.translate,r.scale,r.originPoint)}const HD=.999999999999,KD=1.0000000000001;function O0e(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=r[l],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Js(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Yz(e,o)),n&&jo(a.latestValues)&&Js(e,a.latestValues))}t.x<KD&&t.x>HD&&(t.x=1),t.y<KD&&t.y>HD&&(t.y=1)}function Qs(e,t){e.min=e.min+t,e.max=e.max+t}function GD(e,t,r,n,i=.5){const a=Rt(e.min,e.max,i);wS(e,t,r,a,n)}function Js(e,t){GD(e.x,t.x,t.scaleX,t.scale,t.originX),GD(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xz(e,t){return Wz(w0e(e.getBoundingClientRect(),t))}function E0e(e,t,r){const n=Xz(e,r),{scroll:i}=t;return i&&(Qs(n.x,i.offset.x),Qs(n.y,i.offset.y)),n}const Zz=({current:e})=>e?e.ownerDocument.defaultView:null,YD=(e,t)=>Math.abs(e-t);function C0e(e,t){const r=YD(e.x,t.x),n=YD(e.y,t.y);return Math.sqrt(r**2+n**2)}class Qz{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=c1(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=C0e(p.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:w}=p,{timestamp:x}=cr;this.history.push({...w,timestamp:x});const{onStart:b,onMove:S}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=l1(g,this.transformPagePoint),Mt.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=c1(p.type==="pointercancel"?this.lastMoveEventInfo:l1(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(p,b),w&&w(p,b)},!sA(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=rd(t),l=l1(o,this.transformPagePoint),{point:u}=l,{timestamp:f}=cr;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=r;h&&h(t,c1(l,this.history)),this.removeListeners=Jf(Tu(this.contextWindow,"pointermove",this.handlePointerMove),Tu(this.contextWindow,"pointerup",this.handlePointerUp),Tu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qa(this.updatePoint)}}function l1(e,t){return t?{point:t(e.point)}:e}function XD(e,t){return{x:e.x-t.x,y:e.y-t.y}}function c1({point:e},t){return{point:e,delta:XD(e,Jz(t)),offset:XD(e,T0e(t)),velocity:k0e(t,.1)}}function T0e(e){return e[0]}function Jz(e){return e[e.length-1]}function k0e(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Jz(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>ui(t)));)r--;if(!n)return{x:0,y:0};const a=fi(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function R0e(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Rt(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Rt(r,e,n.max):Math.min(e,r)),e}function ZD(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function M0e(e,{top:t,left:r,bottom:n,right:i}){return{x:ZD(e.x,r,i),y:ZD(e.y,t,n)}}function QD(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function I0e(e,t){return{x:QD(e.x,t.x),y:QD(e.y,t.y)}}function D0e(e,t){let r=.5;const n=Er(e),i=Er(t);return i>n?r=_f(t.min,t.max-n,e.min):n>i&&(r=_f(e.min,e.max-i,t.min)),Zi(0,1,r)}function $0e(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const _S=.35;function L0e(e=_S){return e===!1?e=0:e===!0&&(e=_S),{x:JD(e,"left","right"),y:JD(e,"top","bottom")}}function JD(e,t,r){return{min:e$(e,t),max:e$(e,r)}}function e$(e,t){return typeof e=="number"?e:e[t]||0}const B0e=new WeakMap;class F0e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(rd(h).point)},a=(h,p)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nye(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(b=>{let S=this.getAxisMotionValue(b).get()||0;if(di.test(S)){const{projection:A}=this.visualElement;if(A&&A.layout){const P=A.layout.layoutBox[b];P&&(S=Er(P)*(parseFloat(S)/100))}}this.originPoint[b]=S}),w&&Mt.postRender(()=>w(h,p)),yS(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(h,p)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:x}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:b}=p;if(v&&this.currentDirection===null){this.currentDirection=z0e(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),x&&x(h,p)},l=(h,p)=>this.stop(h,p),u=()=>dn(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new Qz(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:Zz(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Mt.postRender(()=>a(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!Lh(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=R0e(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Xs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=M0e(n.layoutBox,t):this.constraints=!1,this.elastic=L0e(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&dn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$0e(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Xs(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=E0e(n,i.root,this.visualElement.getTransformPagePoint());let o=I0e(i.layout.layoutBox,a);if(r){const l=r(b0e(o));this.hasMutatedConstraints=!!l,l&&(o=Wz(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=dn(h=>{if(!Lh(h,r,this.currentDirection))return;let p=u&&u[h]||{};o&&(p={min:0,max:0});const g=i?200:1e6,v=i?40:1e7,w={type:"inertia",velocity:n?t[h]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...a,...p};return this.startAxisValueAnimation(h,w)});return Promise.all(f).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return yS(this.visualElement,t),n.start(gA(t,n,0,r,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){dn(r=>{const{drag:n}=this.getProps();if(!Lh(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[r];a.set(t[r]-Rt(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Xs(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dn(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();i[o]=D0e({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),dn(o=>{if(!Lh(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:f}=this.constraints[o];l.set(Rt(u,f,i[o]))})}addListeners(){if(!this.visualElement.current)return;B0e.set(this.visualElement,this);const t=this.visualElement.current,r=Tu(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(u)}),n=()=>{const{dragConstraints:u}=this.getProps();Xs(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Mt.read(n);const o=Of(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(dn(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())});return()=>{o(),r(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=_S,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function Lh(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function z0e(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class V0e extends eo{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new F0e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const t$=e=>(t,r)=>{e&&Mt.postRender(()=>e(t,r))};class U0e extends eo{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new Qz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:t$(t),onStart:t$(r),onMove:n,onEnd:(a,o)=>{delete this.session,i&&Mt.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Tu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Jh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function r$(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if($e.test(e))e=parseFloat(e);else return e;const r=r$(e,t.target.x),n=r$(e,t.target.y);return`${r}% ${n}%`}},q0e={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Wa.parse(e);if(i.length>5)return n;const a=Wa.createTransformer(e),o=typeof i[0]!="number"?1:0,l=r.x.scale*t.x,u=r.y.scale*t.y;i[0+o]/=l,i[1+o]/=u;const f=Rt(l,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}};class W0e extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:a}=t;Eye(H0e),a&&(r.group&&r.group.add(a),n&&n.register&&i&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Jh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,i||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Mt.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),oA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function eV(e){const[t,r]=dye(),n=_.useContext(D6);return d.jsx(W0e,{...e,layoutGroup:n,switchLayoutGroup:_.useContext(kz),isPresent:t,safeToRemove:r})}const H0e={borderRadius:{...fu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fu,borderTopRightRadius:fu,borderBottomLeftRadius:fu,borderBottomRightRadius:fu,boxShadow:q0e};function K0e(e,t,r){const n=br(e)?e:Cl(e);return n.start(gA("",n,t,r)),n.animation}const G0e=(e,t)=>e.depth-t.depth;class Y0e{constructor(){this.children=[],this.isDirty=!1}add(t){zP(this.children,t),this.isDirty=!0}remove(t){VP(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G0e),this.isDirty=!1,this.children.forEach(t)}}function X0e(e,t){const r=Br.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(qa(n),e(a-t))};return Mt.setup(n,!0),()=>qa(n)}const tV=["TopLeft","TopRight","BottomLeft","BottomRight"],Z0e=tV.length,n$=e=>typeof e=="string"?parseFloat(e):e,i$=e=>typeof e=="number"||$e.test(e);function Q0e(e,t,r,n,i,a){i?(e.opacity=Rt(0,r.opacity??1,J0e(n)),e.opacityExit=Rt(t.opacity??1,0,exe(n))):a&&(e.opacity=Rt(t.opacity??1,r.opacity??1,n));for(let o=0;o<Z0e;o++){const l=`border${tV[o]}Radius`;let u=a$(t,l),f=a$(r,l);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||i$(u)===i$(f)?(e[l]=Math.max(Rt(n$(u),n$(f),n),0),(di.test(f)||di.test(u))&&(e[l]+="%")):e[l]=f}(t.rotate||r.rotate)&&(e.rotate=Rt(t.rotate||0,r.rotate||0,n))}function a$(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const J0e=rV(0,.5,K6),exe=rV(.5,.95,yn);function rV(e,t,r){return n=>n<e?0:n>t?1:r(_f(e,t,n))}function o$(e,t){e.min=t.min,e.max=t.max}function fn(e,t){o$(e.x,t.x),o$(e.y,t.y)}function s$(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function l$(e,t,r,n,i){return e-=t,e=dm(e,1/r,n),i!==void 0&&(e=dm(e,1/i,n)),e}function txe(e,t=0,r=1,n=.5,i,a=e,o=e){if(di.test(t)&&(t=parseFloat(t),t=Rt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Rt(a.min,a.max,n);e===a&&(l-=t),e.min=l$(e.min,t,r,l,i),e.max=l$(e.max,t,r,l,i)}function c$(e,t,[r,n,i],a,o){txe(e,t[r],t[n],t[i],t.scale,a,o)}const rxe=["x","scaleX","originX"],nxe=["y","scaleY","originY"];function u$(e,t,r,n){c$(e.x,t,rxe,r?r.x:void 0,n?n.x:void 0),c$(e.y,t,nxe,r?r.y:void 0,n?n.y:void 0)}function f$(e){return e.translate===0&&e.scale===1}function nV(e){return f$(e.x)&&f$(e.y)}function d$(e,t){return e.min===t.min&&e.max===t.max}function ixe(e,t){return d$(e.x,t.x)&&d$(e.y,t.y)}function h$(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iV(e,t){return h$(e.x,t.x)&&h$(e.y,t.y)}function p$(e){return Er(e.x)/Er(e.y)}function m$(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class axe{constructor(){this.members=[]}add(t){zP(this.members,t),t.scheduleRender()}remove(t){if(VP(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function oxe(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:g,skewX:v,skewY:w}=r;f&&(n=`perspective(${f}px) ${n}`),h&&(n+=`rotate(${h}deg) `),p&&(n+=`rotateX(${p}deg) `),g&&(n+=`rotateY(${g}deg) `),v&&(n+=`skewX(${v}deg) `),w&&(n+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(n+=`scale(${l}, ${u})`),n||"none"}const u1=["","X","Y","Z"],sxe={visibility:"hidden"},lxe=1e3;let cxe=0;function f1(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function aV(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=zz(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Mt,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&aV(n)}function oV({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=cxe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(dxe),this.nodes.forEach(vxe),this.nodes.forEach(yxe),this.nodes.forEach(hxe)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Y0e)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new WP),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const u=this.eventHandlers.get(o);u&&u.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Az(o)&&!cye(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let h;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=X0e(p,250),Jh.hasAnimatedSinceResize&&(Jh.hasAnimatedSinceResize=!1,this.nodes.forEach(v$))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||f.getDefaultTransition()||Sxe,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=f.getProps(),S=!this.targetLayout||!iV(this.targetLayout,v),A=!p&&g;if(this.options.layoutRoot||this.resumeFrom||A||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,A);const P={...iA(w,"layout"),onPlay:x,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else p||v$(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xxe),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aV(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(g$);return}this.isUpdating||this.nodes.forEach(mxe),this.isUpdating=!1,this.nodes.forEach(gxe),this.nodes.forEach(uxe),this.nodes.forEach(fxe),this.clearAllSnapshots();const l=Br.now();cr.delta=Zi(0,1e3/60,l-cr.timestamp),cr.timestamp=l,cr.isProcessing=!0,r1.update.process(cr),r1.preRender.process(cr),r1.render.process(cr),cr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pxe),this.sharedNodes.forEach(bxe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Mt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Er(this.snapshot.measuredBox.x)&&!Er(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=zt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const u=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!nV(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;o&&this.instance&&(l||jo(this.latestValues)||h)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return o&&(u=this.removeTransform(u)),jxe(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return zt();const l=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(Pxe))){const{scroll:h}=this.root;h&&(Qs(l.x,h.offset.x),Qs(l.y,h.offset.y))}return l}removeElementScroll(o){var u;const l=zt();if(fn(l,o),(u=this.scroll)!=null&&u.wasRoot)return l;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:p,options:g}=h;h!==this.root&&p&&g.layoutScroll&&(p.wasRoot&&fn(l,o),Qs(l.x,p.offset.x),Qs(l.y,p.offset.y))}return l}applyTransform(o,l=!1){const u=zt();fn(u,o);for(let f=0;f<this.path.length;f++){const h=this.path[f];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Js(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),jo(h.latestValues)&&Js(u,h.latestValues)}return jo(this.latestValues)&&Js(u,this.latestValues),u}removeTransform(o){const l=zt();fn(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!jo(f.latestValues))continue;bS(f.latestValues)&&f.updateSnapshot();const h=zt(),p=f.measurePageBox();fn(h,p),u$(l,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return jo(this.latestValues)&&u$(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!(!this.layout||!(h||p))){if(this.resolvedRelativeTargetAt=cr.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),Ru(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),fn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),N0e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fn(this.target,this.layout.layoutBox),Yz(this.target,this.targetDelta)):fn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),Ru(this.relativeTargetOrigin,this.target,v.target),fn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||bS(this.parent.latestValues)||Gz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var w;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===cr.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;fn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;O0e(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=zt());const{target:v}=o;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(s$(this.prevProjectionDelta.x,this.projectionDelta.x),s$(this.prevProjectionDelta.y,this.projectionDelta.y)),ku(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!m$(this.projectionDelta.x,this.prevProjectionDelta.x)||!m$(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zs(),this.projectionDelta=Zs(),this.projectionDeltaWithTransform=Zs()}setAnimationOrigin(o,l=!1){const u=this.snapshot,f=u?u.latestValues:{},h={...this.latestValues},p=Zs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=zt(),v=u?u.source:void 0,w=this.layout?this.layout.source:void 0,x=v!==w,b=this.getStack(),S=!b||b.members.length<=1,A=!!(x&&!S&&this.options.crossfade===!0&&!this.path.some(_xe));this.animationProgress=0;let P;this.mixTargetDelta=C=>{const N=C/1e3;y$(p.x,o.x,N),y$(p.y,o.y,N),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ru(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wxe(this.relativeTarget,this.relativeTargetOrigin,g,N),P&&ixe(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=zt()),fn(P,this.relativeTarget)),x&&(this.animationValues=h,Q0e(h,f,this.latestValues,N,A,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,u,f;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(!1),(f=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||f.stop(!1),this.pendingAnimation&&(qa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mt.update(()=>{Jh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cl(0)),this.currentAnimation=K0e(this.motionValue,[0,1e3],{...o,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(lxe),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:f,latestValues:h}=o;if(!(!l||!u||!f)){if(this!==o&&this.layout&&f&&sV(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||zt();const p=Er(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+p;const g=Er(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+g}fn(l,u),Js(l,h),ku(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new axe),this.sharedNodes.get(o).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const f={};u.z&&f1("z",o,f,this.animationValues);for(let h=0;h<u1.length;h++)f1(`rotate${u1[h]}`,o,f,this.animationValues),f1(`skew${u1[h]}`,o,f,this.animationValues);o.render();for(const h in f)o.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return sxe;const l={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Qh(o==null?void 0:o.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Qh(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!jo(this.latestValues)&&(v.transform=u?u({},""):"none",this.hasProjected=!1),v}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=oxe(this.projectionDeltaWithTransform,this.treeScale,h),u&&(l.transform=u(h,l.transform));const{x:p,y:g}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,f.animationValues?l.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const v in Af){if(h[v]===void 0)continue;const{correct:w,applyTo:x,isCSSVariable:b}=Af[v],S=l.transform==="none"?h[v]:w(h[v],f);if(x){const A=x.length;for(let P=0;P<A;P++)l[x[P]]=S}else b?this.options.visualElement.renderState.vars[v]=S:l[v]=S}return this.options.layoutId&&(l.pointerEvents=f===this?Qh(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop(!1)}),this.root.nodes.forEach(g$),this.root.sharedNodes.clear()}}}function uxe(e){e.updateLayout()}function fxe(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?dn(p=>{const g=o?t.measuredBox[p]:t.layoutBox[p],v=Er(g);g.min=n[p].min,g.max=g.min+v}):sV(a,t.layoutBox,n)&&dn(p=>{const g=o?t.measuredBox[p]:t.layoutBox[p],v=Er(n[p]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const l=Zs();ku(l,n,t.layoutBox);const u=Zs();o?ku(u,e.applyTransform(i,!0),t.measuredBox):ku(u,n,t.layoutBox);const f=!nV(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:g,layout:v}=p;if(g&&v){const w=zt();Ru(w,t.layoutBox,g.layoutBox);const x=zt();Ru(x,n,v.layoutBox),iV(w,x)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=w,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function dxe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hxe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pxe(e){e.clearSnapshot()}function g$(e){e.clearMeasurements()}function mxe(e){e.isLayoutDirty=!1}function gxe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function v$(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vxe(e){e.resolveTargetDelta()}function yxe(e){e.calcProjection()}function xxe(e){e.resetSkewAndRotation()}function bxe(e){e.removeLeadSnapshot()}function y$(e,t,r){e.translate=Rt(t.translate,0,r),e.scale=Rt(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function x$(e,t,r,n){e.min=Rt(t.min,r.min,n),e.max=Rt(t.max,r.max,n)}function wxe(e,t,r,n){x$(e.x,t.x,r.x,n),x$(e.y,t.y,r.y,n)}function _xe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Sxe={duration:.45,ease:[.4,0,.1,1]},b$=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),w$=b$("applewebkit/")&&!b$("chrome/")?Math.round:yn;function _$(e){e.min=w$(e.min),e.max=w$(e.max)}function jxe(e){_$(e.x),_$(e.y)}function sV(e,t,r){return e==="position"||e==="preserve-aspect"&&!A0e(p$(t),p$(r),.2)}function Pxe(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Axe=oV({attachResizeListener:(e,t)=>Of(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),d1={current:void 0},lV=oV({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!d1.current){const e=new Axe({});e.mount(window),e.setOptions({layoutScroll:!0}),d1.current=e}return d1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nxe={pan:{Feature:U0e},drag:{Feature:V0e,ProjectionNode:lV,MeasureLayout:eV}};function S$(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,a=n[i];a&&Mt.postRender(()=>a(t,rd(t)))}class Oxe extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=iye(t,(r,n)=>(S$(this.node,n,"Start"),i=>S$(this.node,i,"End"))))}unmount(){}}class Exe extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Jf(Of(this.node.current,"focus",()=>this.onFocus()),Of(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function j$(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),a=n[i];a&&Mt.postRender(()=>a(t,rd(t)))}class Cxe extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=lye(t,(r,n)=>(j$(this.node,n,"Start"),(i,{success:a})=>j$(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const SS=new WeakMap,h1=new WeakMap,Txe=e=>{const t=SS.get(e.target);t&&t(e)},kxe=e=>{e.forEach(Txe)};function Rxe({root:e,...t}){const r=e||document;h1.has(r)||h1.set(r,{});const n=h1.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(kxe,{root:e,...t})),n[i]}function Mxe(e,t,r){const n=Rxe(t);return SS.set(e,r),n.observe(e),()=>{SS.delete(e),n.unobserve(e)}}const Ixe={some:0,all:1};class Dxe extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:Ixe[i]},l=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=f?h:p;g&&g(u)};return Mxe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some($xe(t,r))&&this.startObserver()}unmount(){}}function $xe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Lxe={inView:{Feature:Dxe},tap:{Feature:Cxe},focus:{Feature:Exe},hover:{Feature:Oxe}},Bxe={layout:{ProjectionNode:lV,MeasureLayout:eV}},jS={current:null},cV={current:!1};function Fxe(){if(cV.current=!0,!!BP)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jS.current=e.matches;e.addListener(t),t()}else jS.current=!1}const zxe=new WeakMap;function Vxe(e,t,r){for(const n in t){const i=t[n],a=r[n];if(br(i))e.addValue(n,i);else if(br(a))e.addValue(n,Cl(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(n);e.addValue(n,Cl(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const P$=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uxe{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Br.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Mt.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Dg(r),this.isVariantNode=Cz(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(r,{},this);for(const g in p){const v=p[g];u[g]!==void 0&&br(v)&&v.set(u[g],!1)}}mount(t){this.current=t,zxe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),cV.current||Fxe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jS.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qa(this.notifyUpdate),qa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=cc.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Mt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Tl){const r=Tl[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<P$.length;n++){const i=P$[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Vxe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Cl(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&($6(n)||B6(n))?n=parseFloat(n):!fye(n)&&Wa.test(r)&&(n=wz(t,r)),this.setBaseTarget(t,br(n)?n.get():n)),br(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=pA(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!br(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new WP),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class uV extends Uxe{constructor(){super(...arguments),this.KeyframeResolver=Jve}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;br(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function fV(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const a in r)e.style.setProperty(a,r[a])}function qxe(e){return window.getComputedStyle(e)}class Wxe extends uV{constructor(){super(...arguments),this.type="html",this.renderInstance=fV}readValueFromInstance(t,r){var n;if(cc.has(r))return(n=this.projection)!=null&&n.isProjecting?fS(r):yve(t,r);{const i=qxe(t),a=(GP(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Xz(t,r)}build(t,r,n){fA(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return mA(t,r,n)}}const dV=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hxe(e,t,r,n){fV(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(dV.has(i)?i:uA(i),t.attrs[i])}class Kxe extends uV{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(cc.has(r)){const n=bz(r);return n&&n.default||0}return r=dV.has(r)?r:uA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Fz(t,r,n)}build(t,r,n){Dz(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){Hxe(t,r,n,i)}mount(t){this.isSVGTag=Lz(t.tagName),super.mount(t)}}const Gxe=(e,t)=>hA(e)?new Kxe(t):new Wxe(t,{allowProjection:e!==_.Fragment}),Yxe=Hye({...y0e,...Lxe,...Nxe,...Bxe},Gxe),PS=vye(Yxe);function Xxe(){const[e,t]=_.useState([]),[r,n]=_.useState(!0);_.useEffect(()=>{(async()=>{try{const u=await ht.getRecentActivityLogs();t(u)}catch(u){console.error("Error fetching activity logs:",u)}finally{n(!1)}})()},[]);const i=l=>{const u=l.description.toLowerCase();return u.includes("add")?"add":u.includes("update")?"update":u.includes("delete")?"delete":u.includes("report")?"report":"import"},a=l=>{switch(l){case"add":return d.jsx(GS,{className:"h-5 w-5"});case"update":return d.jsx(YS,{className:"h-5 w-5"});case"delete":return d.jsx(QS,{className:"h-5 w-5"});case"report":return d.jsx(aW,{className:"h-5 w-5"});default:return d.jsx(CE,{className:"h-5 w-5"})}},o=l=>{switch(l){case"add":return"bg-green-900/20 text-green-400 border border-green-800/30";case"update":return"bg-blue-900/20 text-blue-400 border border-blue-800/30";case"delete":return"bg-red-900/20 text-red-400 border border-red-800/30";case"report":return"bg-purple-900/20 text-purple-400 border border-purple-800/30";default:return"bg-[#9B2335]/20 text-[#9B2335] border border-[#9B2335]/30"}};return d.jsxs(PS.div,{className:"bg-gray-900 rounded-lg shadow-2xlborder border-gray-800 overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx("div",{className:"px-6 py-2 border-b border-gray-800",children:d.jsx("h2",{className:"text-lg font-medium text-white",children:"Recent Activity"})}),d.jsx("div",{className:"p-6",children:r?d.jsxs("div",{className:"flex items-center justify-center py-8",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"}),d.jsx("p",{className:"text-gray-400 ml-3",children:"Loading activity..."})]}):e.length===0?d.jsxs("div",{className:"text-center py-8",children:[d.jsx(CE,{className:"mx-auto h-12 w-12 text-gray-600 mb-4"}),d.jsx("p",{className:"text-gray-400",children:"No recent activity found."}),d.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Activity will appear here when users interact with the system."})]}):d.jsx("div",{className:"space-y-6",children:e.map((l,u)=>{const f=i(l);return d.jsxs(PS.div,{className:"flex items-start group hover:bg-gray-800/30 p-3 rounded-lg transition-colors duration-200",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:.5+u*.1},children:[d.jsx("div",{className:`p-2 rounded-full mr-4 shadow-lg ${o(f)}`,children:a(f)}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"font-medium text-white group-hover:text-gray-100 transition-colors",children:l.description}),d.jsxs("div",{className:"flex items-center mt-1 text-sm text-gray-400",children:[d.jsx("span",{className:"font-medium text-[#9B2335]",children:l.causer_name}),d.jsx("span",{className:"mx-2",children:"•"}),d.jsx("span",{children:new Date(l.created_at).toLocaleString()})]})]}),d.jsx("div",{className:"ml-4 opacity-0 group-hover:opacity-100 transition-opacity",children:d.jsx("div",{className:"w-2 h-2 bg-[#9B2335] rounded-full"})})]},u)})})})]})}const hV=()=>{const{migrationData:e,loading:t,error:r}=lj();return t?d.jsx("p",{children:"Loading..."}):r?d.jsx("p",{children:r}):e.length?d.jsxs("div",{className:"w-full h-full",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-500 mb-2",children:"Italian Migration to Northern Territory (1900-1950)"}),d.jsx(Tj,{width:"100%",height:"90%",children:d.jsxs(YF,{data:e,barCategoryGap:"30%",children:[d.jsx(pP,{strokeDasharray:"3 3",stroke:"#E5E7EB"}),d.jsx(Kf,{dataKey:"year",tick:{fontSize:12,fill:"#6B7280"},axisLine:!1,tickLine:!1}),d.jsx(Gf,{tick:{fontSize:12,fill:"#6B7280"},axisLine:!1,tickLine:!1,tickCount:5,children:d.jsx(Zt,{value:"Migrants",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"#374151",fontSize:12},offset:-10})}),d.jsx(hn,{cursor:{fill:"rgba(203, 213, 225, 0.2)"},contentStyle:{backgroundColor:"#1F2937",borderRadius:"6px",color:"#fff",fontSize:"0.875rem"},labelStyle:{color:"#F43F5E"},formatter:n=>[`${n} migrants`,""]}),d.jsx("defs",{children:d.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#BE123C"}),d.jsx("stop",{offset:"100%",stopColor:"#F43F5E"})]})}),d.jsx(Ja,{dataKey:"count",fill:"url(#barGradient)",radius:[4,4,0,0],barSize:24})]})})]}):d.jsx("p",{children:"No data available"})};function Zxe(){var o,l;const[e,t]=_.useState(null),[r,n]=_.useState(!0),[i,a]=_.useState(null);return _.useEffect(()=>{(async()=>{try{n(!0);const f=await ht.getDashboardStats();f.success?t(f.data):a("Failed to load dashboard data")}catch(f){a("An error occurred while fetching dashboard data"),console.error(f)}finally{n(!1)}})()},[]),r?d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Dashboard"}),d.jsx("main",{className:"p-6",children:d.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4 mb-8",children:[...Array(4)].map((u,f)=>d.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg shadow-lg p-6 animate-pulse",children:[d.jsx("div",{className:"h-4 bg-gray-700 rounded w-1/2 mb-4"}),d.jsx("div",{className:"h-8 bg-gray-700 rounded w-1/4 mb-4"}),d.jsx("div",{className:"h-4 bg-gray-700 rounded w-3/4"})]},f))})})]})]}):i?d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Dashboard"}),d.jsx("main",{className:"p-6",children:d.jsx("div",{className:"bg-red-900/20 border border-red-800 text-red-400 px-4 py-3 rounded-md mb-8",children:i})})]})]}):d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Dashboard"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"mb-8",children:[d.jsx("h1",{className:"text-3xl font-serif font-bold text-white mb-2",children:"Welcome, Admin"}),d.jsx("p",{className:"text-gray-400",children:"Here's an overview of your Italian Migrants Database"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4 mb-8",children:[d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(Je,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Total Records"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:(e==null?void 0:e.total_migrants)||0})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-[#9B2335]/20 border border-[#9B2335]/30 flex items-center justify-center",children:d.jsx(ZW,{className:"h-6 w-6 text-[#9B2335]"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Growth Rate"}),d.jsx("span",{className:"font-medium text-[#9B2335]",children:"+24% YoY"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-[#9B2335] h-1.5 rounded-full",style:{width:"24%"}})})]})]})}),d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(Je,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Recent Addition"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:(e==null?void 0:e.recent_additions)||0})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/20 border border-blue-500/30 flex items-center justify-center",children:d.jsx(YW,{className:"h-6 w-6 text-blue-400"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Change"}),d.jsx("span",{className:"font-medium text-blue-400",children:"-1.2 years"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full",style:{width:"65%"}})})]})]})}),d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(Je,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Peak Migration Year"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:((o=e==null?void 0:e.peak_migration_year)==null?void 0:o.year)??"N/A"})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-amber-500/20 border border-amber-500/30 flex items-center justify-center",children:d.jsx(Vs,{className:"h-6 w-6 text-amber-400"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Migrants that year"}),d.jsx("span",{className:"font-medium text-amber-400",children:"120"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-amber-500 h-1.5 rounded-full",style:{width:"85%"}})})]})]})}),d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(Je,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Most Common Origin"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:((l=e==null?void 0:e.most_common_origin)==null?void 0:l.place)||"N/A"})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-purple-500/20 border border-purple-500/30 flex items-center justify-center",children:d.jsxs("svg",{className:"h-6 w-6 text-purple-400",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M12 3C14.5013 5.76254 15.9228 9.29498 16 13C16.0772 16.705 14.6557 20.2375 12.1544 23C9.65304 20.2375 8.23152 16.705 8.15432 13C8.07712 9.29498 9.49864 5.76254 12 3V3Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Percentage"}),d.jsx("span",{className:"font-medium text-purple-400",children:"35%"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-purple-500 h-1.5 rounded-full",style:{width:"35%"}})})]})]})})]}),d.jsxs("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3 mb-8",children:[d.jsxs(Qe,{className:"col-span-full lg:col-span-2 bg-gray-900 border-gray-800 shadow-xl",children:[d.jsxs(bn,{className:"pb-2 border-b border-gray-800",children:[d.jsx(wn,{className:"text-lg font-medium text-white",children:"Yearly Migration Trends"}),d.jsx(ts,{className:"text-gray-400",children:"Number of migrants by year of arrival (1900-1950)"})]}),d.jsx(Je,{className:"flex-1 h-[300px]",children:d.jsx(hV,{})})]}),d.jsx(mP,{})]}),d.jsx("div",{className:"mb-8",children:d.jsxs(sj,{defaultValue:"recent",children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsxs(C3,{className:"bg-gray-800 border-gray-700",children:[d.jsx(Us,{value:"recent",className:"data-[state=active]:bg-[#9B2335] data-[state=active]:text-white",children:"Recent Activity"}),d.jsx(Us,{value:"pending",className:"data-[state=active]:bg-[#9B2335] data-[state=active]:text-white",children:"Pending Reviews"})]}),d.jsx(ct,{to:"/admin/migrants",children:d.jsx(Te,{variant:"outline",size:"sm",className:"text-sm border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white",children:"View All Records"})})]}),d.jsx(Oo,{value:"recent",className:"m-0",children:d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsx(Je,{className:"p-0",children:d.jsx(Xxe,{})})})}),d.jsx(Oo,{value:"pending",className:"m-0",children:d.jsx(Qe,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsx(Je,{className:"p-6",children:d.jsxs("div",{className:"text-center py-8 text-gray-400",children:[d.jsx(SL,{className:"mx-auto size-12 mb-4 text-gray-600"}),d.jsx("h3",{className:"text-lg font-medium mb-2 text-white",children:"No Pending Reviews"}),d.jsx("p",{children:"All migrant records have been reviewed."})]})})})})]})})]})]})]})}const Qxe=(e=10)=>{const[t,r]=_.useState([]),[n,i]=_.useState(!1),[a,o]=_.useState(1),[l,u]=_.useState(1),[f,h]=_.useState(""),[p,g]=_.useState(""),[v,w]=_.useState({arrival_order:"desc"}),[x,b]=_.useState(!1),[S,A]=_.useState([]),P=async()=>{i(!0);try{const B={};f&&f.trim()!==""&&(B.full_name=f.trim()),console.log("Search Occupation value:",p),p&&p.trim()!==""&&(B.occupation=p.trim(),console.log("Added occupation filter:",p.trim())),v.arrival_from&&(B.arrival_from=v.arrival_from),v.arrival_to&&(B.arrival_to=v.arrival_to),v.sort_by==="arrival_date"?(B.sort_by="date_of_arrival_nt",B.sort_order=v.arrival_order||"desc",v.alphabetical_order&&(B.secondary_sort_by="full_name",B.secondary_sort_order=v.alphabetical_order)):v.alphabetical_order&&(B.sort_by="full_name",B.sort_order=v.alphabetical_order),console.log("Sending filters:",B);const U=await ht.getMigrants(a,e,B);r(U.data||[]),u(U.last_page||1),o(U.current_page||1)}catch(B){console.error("Failed to fetch migrants",B)}finally{i(!1)}};_.useEffect(()=>{P()},[a]),_.useEffect(()=>{x&&(P(),b(!1))},[x]),_.useEffect(()=>{A([])},[a,x]);const C=()=>{var U,G,Y,F,X;console.log("handleSearch called with searchOccupation:",p);const B=f.trim()!==""||p.trim()!==""||((U=v.arrival_from)==null?void 0:U.trim())||((G=v.arrival_to)==null?void 0:G.trim())||((Y=v.alphabetical_order)==null?void 0:Y.trim())||((F=v.sort_by)==null?void 0:F.trim())||((X=v.arrival_order)==null?void 0:X.trim());if(p.trim()!==""){console.log("Occupation search triggered with:",p),o(1),b(!0);return}v.sort_by==="arrival_date"||B?(o(1),b(!0)):N()},N=()=>{h(""),g(""),w({arrival_order:"desc"}),o(1),b(!0)},E=()=>{b(!0)},T=B=>{const U=typeof B=="number"?B:typeof B=="string"?parseInt(B):null;U===null||isNaN(U)||A(G=>G.includes(U)?G.filter(Y=>Y!==U):[...G,U])},k=()=>{S.length===t.length?A([]):A(t.map(B=>B.person_id).filter(B=>typeof B=="number"))},M=t.length>0&&S.length===t.filter(B=>typeof B.person_id=="number"||typeof B.person_id=="string"&&!isNaN(parseInt(B.person_id))).length;return{migrants:t,loading:n,currentPage:a,totalPages:l,searchFullName:f,searchOccupation:p,filters:v,selectedMigrants:S,setCurrentPage:o,setSearchFullName:h,setSearchOccupation:g,setFilters:w,handleSearch:C,resetFilters:N,refetchMigrants:E,toggleSelectMigrant:T,toggleSelectAll:k,isAllSelected:M,clearSelection:()=>{A([])},handleBulkDelete:()=>{A([]),b(!0)}}},Jxe=e=>{Fn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-green-50 rounded-full p-2",children:d.jsx(GS,{className:"h-5 w-5 text-green-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Migrant Created"}),d.jsx("div",{className:"mt-1 text-sm text-slate-500",children:"New migrant record has been successfully added to the database."}),d.jsx("div",{className:"mt-2 flex space-x-3",children:d.jsx("button",{onClick:()=>{Fn.dismiss(t.id),e&&e()},className:"inline-flex text-xs font-medium text-green-700 hover:text-green-800",children:"View Migrants"})})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Fn.dismiss(t.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Fl,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},hm=e=>Fn.error(e,{style:{background:"#EF4444",color:"#fff",padding:"16px",borderRadius:"10px"},icon:d.jsx(pW,{className:"text-white"}),duration:3e3,position:"top-right"}),ebe=e=>{Fn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-red-50 rounded-full p-2",children:d.jsx(Fo,{className:"h-5 w-5 text-red-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Item Deleted"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsx("span",{className:"font-medium",children:e})," has been deleted."]})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Fn.dismiss(t.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Fl,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},tbe=e=>{Fn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-red-50 rounded-full p-2",children:d.jsx(Fo,{className:"h-5 w-5 text-red-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Items Deleted"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsxs("span",{className:"font-medium",children:[e," items"]})," have been deleted from your workspace."]}),d.jsx("div",{className:"mt-2 flex",children:d.jsx("button",{onClick:()=>Fn.dismiss(t.id),className:"inline-flex text-xs font-medium text-slate-500 hover:text-slate-700",children:"Dismiss"})})]})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},rbe=(e,t)=>{Fn(r=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-blue-50 rounded-full p-2",children:d.jsx(WW,{className:"h-5 w-5 text-blue-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Item Updated"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsx("span",{className:"font-medium",children:e})," has been updated successfully."]}),d.jsxs("div",{className:"mt-2 flex items-center space-x-4",children:[d.jsx("div",{className:"flex items-center",children:d.jsxs("div",{className:"text-xs text-slate-500 flex items-center",children:[d.jsx(PL,{className:"inline-block h-3 w-3 mr-1"}),"Just now"]})}),t&&d.jsx("button",{onClick:()=>{Fn.dismiss(r.id),t&&t()},className:"inline-flex text-xs font-medium text-blue-700 hover:text-blue-800",children:"View Changes"})]})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Fn.dismiss(r.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Fl,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})};function nbe({open:e,onOpenChange:t,bulkDelete:r,selectedCount:n,ids:i,onDeleteSuccess:a}){const[o,l]=_.useState(!1),u=async()=>{if(!i.length){t(!1);return}l(!0);try{await new Promise(f=>setTimeout(f,1e3)),r?(await Promise.all(i.map(f=>ht.deleteMigrant(f))),tbe(n)):(await ht.deleteMigrant(i[0]),ebe("Migrant record")),a==null||a(),t(!1)}catch(f){console.error("Failed to delete record(s):",f),hm("Failed to delete record(s). Please try again.")}finally{l(!1)}};return d.jsx(rc,{open:e,onOpenChange:t,children:d.jsxs(nc,{className:"sm:max-w-md",children:[d.jsxs(ic,{children:[d.jsx(ac,{className:"text-xl font-serif text-red-600",children:"Confirm Deletion"}),d.jsx(oc,{children:r?`Are you sure you want to delete ${n} selected records?`:"Are you sure you want to delete this migrant record?"})]}),d.jsx("div",{className:"py-4",children:d.jsxs("p",{className:"text-neutral-600",children:["This action cannot be undone. This will permanently delete the",r?" selected records":" record"," from the database."]})}),d.jsxs(Qf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Te,{variant:"outline",onClick:()=>t(!1),disabled:o,children:"Cancel"}),d.jsxs(Te,{variant:"destructive",onClick:u,disabled:o,children:[d.jsx(Fo,{className:"mr-2 size-4"}),o?"Deleting...":`Delete ${r?"Selected":"Record"}`]})]})]})})}function ibe({className:e,...t}){return d.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:d.jsx("table",{"data-slot":"table",className:Ke("w-full caption-bottom text-sm",e),...t})})}function abe({className:e,...t}){return d.jsx("thead",{"data-slot":"table-header",className:Ke("[&_tr]:border-b",e),...t})}function obe({className:e,...t}){return d.jsx("tbody",{"data-slot":"table-body",className:Ke("[&_tr:last-child]:border-0",e),...t})}function A$({className:e,...t}){return d.jsx("tr",{"data-slot":"table-row",className:Ke("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Pa({className:e,...t}){return d.jsx("th",{"data-slot":"table-head",className:Ke("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Aa({className:e,...t}){return d.jsx("td",{"data-slot":"table-cell",className:Ke("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function vA(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $g="Checkbox",[sbe,t_e]=Sn($g),[lbe,yA]=sbe($g);function cbe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:o,name:l,onCheckedChange:u,required:f,value:h="on",internal_do_not_use_render:p}=e,[g,v]=za({prop:r,defaultProp:i??!1,onChange:u,caller:$g}),[w,x]=_.useState(null),[b,S]=_.useState(null),A=_.useRef(!1),P=w?!!o||!!w.closest("form"):!0,C={checked:g,disabled:a,setChecked:v,control:w,setControl:x,name:l,form:o,value:h,hasConsumerStoppedPropagationRef:A,required:f,defaultChecked:Ba(i)?!1:i,isFormControl:P,bubbleInput:b,setBubbleInput:S};return d.jsx(lbe,{scope:t,...C,children:ube(p)?p(C):n})}var pV="CheckboxTrigger",mV=_.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:o,disabled:l,checked:u,required:f,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:w}=yA(pV,e),x=at(i,h),b=_.useRef(u);return _.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const A=()=>p(b.current);return S.addEventListener("reset",A),()=>S.removeEventListener("reset",A)}},[a,p]),d.jsx(Ie.button,{type:"button",role:"checkbox","aria-checked":Ba(u)?"mixed":u,"aria-required":f,"data-state":wV(u),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:x,onKeyDown:Pe(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Pe(r,S=>{p(A=>Ba(A)?!0:!A),w&&v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})});mV.displayName=pV;var gV=_.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:o,disabled:l,value:u,onCheckedChange:f,form:h,...p}=e;return d.jsx(cbe,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:l,required:o,onCheckedChange:f,name:n,form:h,value:u,internal_do_not_use_render:({isFormControl:g})=>d.jsxs(d.Fragment,{children:[d.jsx(mV,{...p,ref:t,__scopeCheckbox:r}),g&&d.jsx(bV,{__scopeCheckbox:r})]})})});gV.displayName=$g;var vV="CheckboxIndicator",yV=_.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=yA(vV,r);return d.jsx(Gn,{present:n||Ba(a.checked)||a.checked===!0,children:d.jsx(Ie.span,{"data-state":wV(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});yV.displayName=vV;var xV="CheckboxBubbleInput",bV=_.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:l,disabled:u,name:f,value:h,form:p,bubbleInput:g,setBubbleInput:v}=yA(xV,e),w=at(r,v),x=vA(a),b=jP(n);_.useEffect(()=>{const A=g;if(!A)return;const P=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(P,"checked").set,E=!i.current;if(x!==a&&N){const T=new Event("click",{bubbles:E});A.indeterminate=Ba(a),N.call(A,Ba(a)?!1:a),A.dispatchEvent(T)}},[g,x,a,i]);const S=_.useRef(Ba(a)?!1:a);return d.jsx(Ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:l,disabled:u,name:f,value:h,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bV.displayName=xV;function ube(e){return typeof e=="function"}function Ba(e){return e==="indeterminate"}function wV(e){return Ba(e)?"indeterminate":e?"checked":"unchecked"}function N$({className:e,...t}){return d.jsx(gV,{"data-slot":"checkbox",className:Ke("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(yV,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(HS,{className:"size-3.5"})})})}function O$(e,[t,r]){return Math.min(r,Math.max(t,e))}var _V=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fbe="VisuallyHidden",dbe=_.forwardRef((e,t)=>d.jsx(Ie.span,{...e,ref:t,style:{..._V,...e.style}}));dbe.displayName=fbe;var hbe=[" ","Enter","ArrowUp","ArrowDown"],pbe=[" ","Enter"],Zo="Select",[Lg,Bg,mbe]=nj(Zo),[uc,r_e]=Sn(Zo,[mbe,Ag]),Fg=Ag(),[gbe,to]=uc(Zo),[vbe,ybe]=uc(Zo),SV=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:u,dir:f,name:h,autoComplete:p,disabled:g,required:v,form:w}=e,x=Fg(t),[b,S]=_.useState(null),[A,P]=_.useState(null),[C,N]=_.useState(!1),E=$f(f),[T,k]=za({prop:n,defaultProp:i??!1,onChange:a,caller:Zo}),[M,z]=za({prop:o,defaultProp:l,onChange:u,caller:Zo}),D=_.useRef(null),B=b?w||!!b.closest("form"):!0,[U,G]=_.useState(new Set),Y=Array.from(U).map(F=>F.props.value).join(";");return d.jsx(x5,{...x,children:d.jsxs(gbe,{required:v,scope:t,trigger:b,onTriggerChange:S,valueNode:A,onValueNodeChange:P,valueNodeHasChildren:C,onValueNodeHasChildrenChange:N,contentId:oi(),value:M,onValueChange:z,open:T,onOpenChange:k,dir:E,triggerPointerDownPosRef:D,disabled:g,children:[d.jsx(Lg.Provider,{scope:t,children:d.jsx(vbe,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(F=>{G(X=>new Set(X).add(F))},[]),onNativeOptionRemove:_.useCallback(F=>{G(X=>{const I=new Set(X);return I.delete(F),I})},[]),children:r})}),B?d.jsxs(WV,{"aria-hidden":!0,required:v,tabIndex:-1,name:h,autoComplete:p,value:M,onChange:F=>z(F.target.value),disabled:g,form:w,children:[M===void 0?d.jsx("option",{value:""}):null,Array.from(U)]},Y):null]})})};SV.displayName=Zo;var jV="SelectTrigger",PV=_.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Fg(r),o=to(jV,r),l=o.disabled||n,u=at(t,o.onTriggerChange),f=Bg(r),h=_.useRef("touch"),[p,g,v]=KV(x=>{const b=f().filter(P=>!P.disabled),S=b.find(P=>P.value===o.value),A=GV(b,x,S);A!==void 0&&o.onValueChange(A.value)}),w=x=>{l||(o.onOpenChange(!0),v()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return d.jsx(b5,{asChild:!0,...a,children:d.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":HV(o.value)?"":void 0,...i,ref:u,onClick:Pe(i.onClick,x=>{x.currentTarget.focus(),h.current!=="mouse"&&w(x)}),onPointerDown:Pe(i.onPointerDown,x=>{h.current=x.pointerType;const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:Pe(i.onKeyDown,x=>{const b=p.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&g(x.key),!(b&&x.key===" ")&&hbe.includes(x.key)&&(w(),x.preventDefault())})})})});PV.displayName=jV;var AV="SelectValue",NV=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:o="",...l}=e,u=to(AV,r),{onValueNodeHasChildrenChange:f}=u,h=a!==void 0,p=at(t,u.onValueNodeChange);return wr(()=>{f(h)},[f,h]),d.jsx(Ie.span,{...l,ref:p,style:{pointerEvents:"none"},children:HV(u.value)?d.jsx(d.Fragment,{children:o}):a})});NV.displayName=AV;var xbe="SelectIcon",OV=_.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return d.jsx(Ie.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});OV.displayName=xbe;var bbe="SelectPortal",EV=e=>d.jsx(Ng,{asChild:!0,...e});EV.displayName=bbe;var Qo="SelectContent",CV=_.forwardRef((e,t)=>{const r=to(Qo,e.__scopeSelect),[n,i]=_.useState();if(wr(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Rf.createPortal(d.jsx(TV,{scope:e.__scopeSelect,children:d.jsx(Lg.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(kV,{...e,ref:t})});CV.displayName=Qo;var $n=10,[TV,ro]=uc(Qo),wbe="SelectContentImpl",_be=zo("SelectContent.RemoveScroll"),kV=_.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:u,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:x,avoidCollisions:b,...S}=e,A=to(Qo,r),[P,C]=_.useState(null),[N,E]=_.useState(null),T=at(t,oe=>C(oe)),[k,M]=_.useState(null),[z,D]=_.useState(null),B=Bg(r),[U,G]=_.useState(!1),Y=_.useRef(!1);_.useEffect(()=>{if(P)return NP(P)},[P]),gP();const F=_.useCallback(oe=>{const[ge,...ne]=B().map(re=>re.ref.current),[fe]=ne.slice(-1),me=document.activeElement;for(const re of oe)if(re===me||(re==null||re.scrollIntoView({block:"nearest"}),re===ge&&N&&(N.scrollTop=0),re===fe&&N&&(N.scrollTop=N.scrollHeight),re==null||re.focus(),document.activeElement!==me))return},[B,N]),X=_.useCallback(()=>F([k,P]),[F,k,P]);_.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:I,triggerPointerDownPosRef:W}=A;_.useEffect(()=>{if(P){let oe={x:0,y:0};const ge=fe=>{var me,re;oe={x:Math.abs(Math.round(fe.pageX)-(((me=W.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((re=W.current)==null?void 0:re.y)??0))}},ne=fe=>{oe.x<=10&&oe.y<=10?fe.preventDefault():P.contains(fe.target)||I(!1),document.removeEventListener("pointermove",ge),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",ne,{capture:!0})}}},[P,I,W]),_.useEffect(()=>{const oe=()=>I(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[I]);const[Q,L]=KV(oe=>{const ge=B().filter(me=>!me.disabled),ne=ge.find(me=>me.ref.current===document.activeElement),fe=GV(ge,oe,ne);fe&&setTimeout(()=>fe.ref.current.focus())}),K=_.useCallback((oe,ge,ne)=>{const fe=!Y.current&&!ne;(A.value!==void 0&&A.value===ge||fe)&&(M(oe),fe&&(Y.current=!0))},[A.value]),ae=_.useCallback(()=>P==null?void 0:P.focus(),[P]),ue=_.useCallback((oe,ge,ne)=>{const fe=!Y.current&&!ne;(A.value!==void 0&&A.value===ge||fe)&&D(oe)},[A.value]),xe=n==="popper"?AS:RV,Ae=xe===AS?{side:l,sideOffset:u,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:x,avoidCollisions:b}:{};return d.jsx(TV,{scope:r,content:P,viewport:N,onViewportChange:E,itemRefCallback:K,selectedItem:k,onItemLeave:ae,itemTextRefCallback:ue,focusSelectedItem:X,selectedItemText:z,position:n,isPositioned:U,searchRef:Q,children:d.jsx(Eg,{as:_be,allowPinchZoom:!0,children:d.jsx(_g,{asChild:!0,trapped:A.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Pe(i,oe=>{var ge;(ge=A.trigger)==null||ge.focus({preventScroll:!0}),oe.preventDefault()}),children:d.jsx(wg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:d.jsx(xe,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:oe=>oe.preventDefault(),...S,...Ae,onPlaced:()=>G(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Pe(S.onKeyDown,oe=>{const ge=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!ge&&oe.key.length===1&&L(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let fe=B().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const me=oe.target,re=fe.indexOf(me);fe=fe.slice(re+1)}setTimeout(()=>F(fe)),oe.preventDefault()}})})})})})})});kV.displayName=wbe;var Sbe="SelectItemAlignedPosition",RV=_.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=to(Qo,r),o=ro(Qo,r),[l,u]=_.useState(null),[f,h]=_.useState(null),p=at(t,T=>h(T)),g=Bg(r),v=_.useRef(!1),w=_.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:S,focusSelectedItem:A}=o,P=_.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&x&&b&&S){const T=a.trigger.getBoundingClientRect(),k=f.getBoundingClientRect(),M=a.valueNode.getBoundingClientRect(),z=S.getBoundingClientRect();if(a.dir!=="rtl"){const me=z.left-k.left,re=M.left-me,We=T.left-re,De=T.width+We,pt=Math.max(De,k.width),mt=window.innerWidth-$n,Pt=O$(re,[$n,Math.max($n,mt-pt)]);l.style.minWidth=De+"px",l.style.left=Pt+"px"}else{const me=k.right-z.right,re=window.innerWidth-M.right-me,We=window.innerWidth-T.right-re,De=T.width+We,pt=Math.max(De,k.width),mt=window.innerWidth-$n,Pt=O$(re,[$n,Math.max($n,mt-pt)]);l.style.minWidth=De+"px",l.style.right=Pt+"px"}const D=g(),B=window.innerHeight-$n*2,U=x.scrollHeight,G=window.getComputedStyle(f),Y=parseInt(G.borderTopWidth,10),F=parseInt(G.paddingTop,10),X=parseInt(G.borderBottomWidth,10),I=parseInt(G.paddingBottom,10),W=Y+F+U+I+X,Q=Math.min(b.offsetHeight*5,W),L=window.getComputedStyle(x),K=parseInt(L.paddingTop,10),ae=parseInt(L.paddingBottom,10),ue=T.top+T.height/2-$n,xe=B-ue,Ae=b.offsetHeight/2,oe=b.offsetTop+Ae,ge=Y+F+oe,ne=W-ge;if(ge<=ue){const me=D.length>0&&b===D[D.length-1].ref.current;l.style.bottom="0px";const re=f.clientHeight-x.offsetTop-x.offsetHeight,We=Math.max(xe,Ae+(me?ae:0)+re+X),De=ge+We;l.style.height=De+"px"}else{const me=D.length>0&&b===D[0].ref.current;l.style.top="0px";const We=Math.max(ue,Y+x.offsetTop+(me?K:0)+Ae)+ne;l.style.height=We+"px",x.scrollTop=ge-ue+x.offsetTop}l.style.margin=`${$n}px 0`,l.style.minHeight=Q+"px",l.style.maxHeight=B+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[g,a.trigger,a.valueNode,l,f,x,b,S,a.dir,n]);wr(()=>P(),[P]);const[C,N]=_.useState();wr(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const E=_.useCallback(T=>{T&&w.current===!0&&(P(),A==null||A(),w.current=!1)},[P,A]);return d.jsx(Pbe,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:d.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(Ie.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});RV.displayName=Sbe;var jbe="SelectPopperPosition",AS=_.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=$n,...a}=e,o=Fg(r);return d.jsx(w5,{...o,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});AS.displayName=jbe;var[Pbe,xA]=uc(Qo,{}),NS="SelectViewport",MV=_.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=ro(NS,r),o=xA(NS,r),l=at(t,a.onViewportChange),u=_.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Lg.Slot,{scope:r,children:d.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Pe(i.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=o;if(g!=null&&g.current&&p){const v=Math.abs(u.current-h.scrollTop);if(v>0){const w=window.innerHeight-$n*2,x=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),S=Math.max(x,b);if(S<w){const A=S+v,P=Math.min(w,A),C=A-P;p.style.height=P+"px",p.style.bottom==="0px"&&(h.scrollTop=C>0?C:0,p.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})});MV.displayName=NS;var IV="SelectGroup",[Abe,Nbe]=uc(IV),Obe=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=oi();return d.jsx(Abe,{scope:r,id:i,children:d.jsx(Ie.div,{role:"group","aria-labelledby":i,...n,ref:t})})});Obe.displayName=IV;var DV="SelectLabel",Ebe=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Nbe(DV,r);return d.jsx(Ie.div,{id:i.id,...n,ref:t})});Ebe.displayName=DV;var pm="SelectItem",[Cbe,$V]=uc(pm),LV=_.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...o}=e,l=to(pm,r),u=ro(pm,r),f=l.value===n,[h,p]=_.useState(a??""),[g,v]=_.useState(!1),w=at(t,A=>{var P;return(P=u.itemRefCallback)==null?void 0:P.call(u,A,n,i)}),x=oi(),b=_.useRef("touch"),S=()=>{i||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Cbe,{scope:r,value:n,disabled:i,textId:x,isSelected:f,onItemTextChange:_.useCallback(A=>{p(P=>P||((A==null?void 0:A.textContent)??"").trim())},[]),children:d.jsx(Lg.ItemSlot,{scope:r,value:n,disabled:i,textValue:h,children:d.jsx(Ie.div,{role:"option","aria-labelledby":x,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:Pe(o.onFocus,()=>v(!0)),onBlur:Pe(o.onBlur,()=>v(!1)),onClick:Pe(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:Pe(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:Pe(o.onPointerDown,A=>{b.current=A.pointerType}),onPointerMove:Pe(o.onPointerMove,A=>{var P;b.current=A.pointerType,i?(P=u.onItemLeave)==null||P.call(u):b.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(o.onPointerLeave,A=>{var P;A.currentTarget===document.activeElement&&((P=u.onItemLeave)==null||P.call(u))}),onKeyDown:Pe(o.onKeyDown,A=>{var C;((C=u.searchRef)==null?void 0:C.current)!==""&&A.key===" "||(pbe.includes(A.key)&&S(),A.key===" "&&A.preventDefault())})})})})});LV.displayName=pm;var vu="SelectItemText",BV=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,o=to(vu,r),l=ro(vu,r),u=$V(vu,r),f=ybe(vu,r),[h,p]=_.useState(null),g=at(t,S=>p(S),u.onItemTextChange,S=>{var A;return(A=l.itemTextRefCallback)==null?void 0:A.call(l,S,u.value,u.disabled)}),v=h==null?void 0:h.textContent,w=_.useMemo(()=>d.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=f;return wr(()=>(x(w),()=>b(w)),[x,b,w]),d.jsxs(d.Fragment,{children:[d.jsx(Ie.span,{id:u.textId,...a,ref:g}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Rf.createPortal(a.children,o.valueNode):null]})});BV.displayName=vu;var FV="SelectItemIndicator",zV=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return $V(FV,r).isSelected?d.jsx(Ie.span,{"aria-hidden":!0,...n,ref:t}):null});zV.displayName=FV;var OS="SelectScrollUpButton",VV=_.forwardRef((e,t)=>{const r=ro(OS,e.__scopeSelect),n=xA(OS,e.__scopeSelect),[i,a]=_.useState(!1),o=at(t,n.onScrollButtonChange);return wr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=u.scrollTop>0;a(f)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?d.jsx(qV,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});VV.displayName=OS;var ES="SelectScrollDownButton",UV=_.forwardRef((e,t)=>{const r=ro(ES,e.__scopeSelect),n=xA(ES,e.__scopeSelect),[i,a]=_.useState(!1),o=at(t,n.onScrollButtonChange);return wr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<f;a(h)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?d.jsx(qV,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});UV.displayName=ES;var qV=_.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=ro("SelectScrollButton",r),o=_.useRef(null),l=Bg(r),u=_.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return _.useEffect(()=>()=>u(),[u]),wr(()=>{var h;const f=l().find(p=>p.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),d.jsx(Ie.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Pe(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:Pe(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:Pe(i.onPointerLeave,()=>{u()})})}),Tbe="SelectSeparator",kbe=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Ie.div,{"aria-hidden":!0,...n,ref:t})});kbe.displayName=Tbe;var CS="SelectArrow",Rbe=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Fg(r),a=to(CS,r),o=ro(CS,r);return a.open&&o.position==="popper"?d.jsx(_5,{...i,...n,ref:t}):null});Rbe.displayName=CS;var Mbe="SelectBubbleInput",WV=_.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=_.useRef(null),a=at(n,i),o=vA(t);return _.useEffect(()=>{const l=i.current;if(!l)return;const u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(o!==t&&h){const p=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(p)}},[o,t]),d.jsx(Ie.select,{...r,style:{..._V,...r.style},ref:a,defaultValue:t})});WV.displayName=Mbe;function HV(e){return e===""||e===void 0}function KV(e){const t=pi(e),r=_.useRef(""),n=_.useRef(0),i=_.useCallback(o=>{const l=r.current+o;t(l),function u(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>u(""),1e3))}(l)},[t]),a=_.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function GV(e,t,r){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=Ibe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==r));const u=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==r?u:void 0}function Ibe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Dbe=SV,$be=PV,Lbe=NV,Bbe=OV,Fbe=EV,zbe=CV,Vbe=MV,Ube=LV,qbe=BV,Wbe=zV,Hbe=VV,Kbe=UV;function Gbe({...e}){return d.jsx(Dbe,{"data-slot":"select",...e})}function Ybe({...e}){return d.jsx(Lbe,{"data-slot":"select-value",...e})}function Xbe({className:e,size:t="default",children:r,...n}){return d.jsxs($be,{"data-slot":"select-trigger","data-size":t,className:Ke("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(Bbe,{asChild:!0,children:d.jsx(KS,{className:"size-4 opacity-50"})})]})}function Zbe({className:e,children:t,position:r="popper",...n}){return d.jsx(Fbe,{children:d.jsxs(zbe,{"data-slot":"select-content",className:Ke("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(Qbe,{}),d.jsx(Vbe,{className:Ke("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(Jbe,{})]})})}function p1({className:e,children:t,...r}){return d.jsxs(Ube,{"data-slot":"select-item",className:Ke("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(Wbe,{children:d.jsx(HS,{className:"size-4"})})}),d.jsx(qbe,{children:t})]})}function Qbe({className:e,...t}){return d.jsx(Hbe,{"data-slot":"select-scroll-up-button",className:Ke("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(jL,{className:"size-4"})})}function Jbe({className:e,...t}){return d.jsx(Kbe,{"data-slot":"select-scroll-down-button",className:Ke("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(KS,{className:"size-4"})})}var bA="Radio",[ewe,YV]=Sn(bA),[twe,rwe]=ewe(bA),XV=_.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:a,disabled:o,value:l="on",onCheck:u,form:f,...h}=e,[p,g]=_.useState(null),v=at(t,b=>g(b)),w=_.useRef(!1),x=p?f||!!p.closest("form"):!0;return d.jsxs(twe,{scope:r,checked:i,disabled:o,children:[d.jsx(Ie.button,{type:"button",role:"radio","aria-checked":i,"data-state":e9(i),"data-disabled":o?"":void 0,disabled:o,value:l,...h,ref:v,onClick:Pe(e.onClick,b=>{i||u==null||u(),x&&(w.current=b.isPropagationStopped(),w.current||b.stopPropagation())})}),x&&d.jsx(JV,{control:p,bubbles:!w.current,name:n,value:l,checked:i,required:a,disabled:o,form:f,style:{transform:"translateX(-100%)"}})]})});XV.displayName=bA;var ZV="RadioIndicator",QV=_.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...i}=e,a=rwe(ZV,r);return d.jsx(Gn,{present:n||a.checked,children:d.jsx(Ie.span,{"data-state":e9(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})})});QV.displayName=ZV;var nwe="RadioBubbleInput",JV=_.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const o=_.useRef(null),l=at(o,a),u=vA(r),f=jP(t);return _.useEffect(()=>{const h=o.current;if(!h)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&v){const w=new Event("click",{bubbles:n});v.call(h,r),h.dispatchEvent(w)}},[u,r,n]),d.jsx(Ie.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});JV.displayName=nwe;function e9(e){return e?"checked":"unchecked"}var iwe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zg="RadioGroup",[awe,n_e]=Sn(zg,[Wl,YV]),t9=Wl(),r9=YV(),[owe,swe]=awe(zg),n9=_.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:a,required:o=!1,disabled:l=!1,orientation:u,dir:f,loop:h=!0,onValueChange:p,...g}=e,v=t9(r),w=$f(f),[x,b]=za({prop:a,defaultProp:i??null,onChange:p,caller:zg});return d.jsx(owe,{scope:r,name:n,required:o,disabled:l,value:x,onValueChange:b,children:d.jsx(ij,{asChild:!0,...v,orientation:u,dir:w,loop:h,children:d.jsx(Ie.div,{role:"radiogroup","aria-required":o,"aria-orientation":u,"data-disabled":l?"":void 0,dir:w,...g,ref:t})})})});n9.displayName=zg;var i9="RadioGroupItem",a9=_.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...i}=e,a=swe(i9,r),o=a.disabled||n,l=t9(r),u=r9(r),f=_.useRef(null),h=at(t,f),p=a.value===i.value,g=_.useRef(!1);return _.useEffect(()=>{const v=x=>{iwe.includes(x.key)&&(g.current=!0)},w=()=>g.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(aj,{asChild:!0,...l,focusable:!o,active:p,children:d.jsx(XV,{disabled:o,required:a.required,checked:p,...u,...i,name:a.name,ref:h,onCheck:()=>a.onValueChange(i.value),onKeyDown:Pe(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Pe(i.onFocus,()=>{var v;g.current&&((v=f.current)==null||v.click())})})})});a9.displayName=i9;var lwe="RadioGroupIndicator",o9=_.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,i=r9(r);return d.jsx(QV,{...i,...n,ref:t})});o9.displayName=lwe;var cwe=n9,uwe=a9,fwe=o9;function E$({className:e,...t}){return d.jsx(cwe,{"data-slot":"radio-group",className:Ke("grid gap-3",e),...t})}function Bh({className:e,...t}){return d.jsx(uwe,{"data-slot":"radio-group-item",className:Ke("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(fwe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(gW,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const s9=()=>{const e=Hn(),[t,r]=_.useState(!1),[n,i]=_.useState([]),[a,o]=_.useState(!1),[l,u]=_.useState(!1),f=()=>{u(!1),M()},h=F=>{e(`/admin/migrants/edit/${F}?mode=edit`)},[p,g]=_.useState(!1),{migrants:v,loading:w,currentPage:x,totalPages:b,searchFullName:S,searchOccupation:A,filters:P,selectedMigrants:C,setCurrentPage:N,setSearchFullName:E,setSearchOccupation:T,setFilters:k,handleSearch:M,resetFilters:z,toggleSelectMigrant:D,toggleSelectAll:B,isAllSelected:U,handleBulkDelete:G,refetchMigrants:Y}=Qxe(p?1e3:10);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx(bn,{className:"pb-3 border-b border-gray-800",children:d.jsxs(wn,{className:"text-md font-medium flex justify-between items-center text-white",children:["Search & Filters",d.jsxs(rc,{open:l,onOpenChange:u,children:[d.jsx(T6,{asChild:!0,children:d.jsxs(Te,{size:"icon",className:"border-gray-700 text-gray-300 hover:bg-gray-900 hover:text-white bg-gray-800",children:[d.jsx(PW,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Advanced filters"})]})}),d.jsxs(nc,{className:"sm:max-w-[425px] bg-gray-900 border-gray-800",children:[d.jsxs(ic,{children:[d.jsx(ac,{className:"text-white",children:"Advanced Filters"}),d.jsx(oc,{className:"text-gray-400",children:"Set sorting options and filters for the migrants list."})]}),d.jsxs("div",{className:"grid gap-4 py-4",children:[d.jsxs("div",{className:"grid gap-2",children:[d.jsx($t,{htmlFor:"sort-by",className:"text-gray-300",children:"Sort By"}),d.jsxs(Gbe,{value:P.sort_by,onValueChange:F=>k({...P,sort_by:F}),children:[d.jsx(Xbe,{id:"sort-by",className:"bg-gray-800 border-gray-700 text-white",children:d.jsx(Ybe,{placeholder:"Select field"})}),d.jsxs(Zbe,{className:"bg-gray-800 border-gray-700",children:[d.jsx(p1,{value:"full_name",className:"text-white hover:bg-gray-700",children:"Full Name"}),d.jsx(p1,{value:"occupation",className:"text-white hover:bg-gray-700",children:"Occupation"}),d.jsx(p1,{value:"arrival_date",className:"text-white hover:bg-gray-700",children:"Arrival Date"})]})]})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx($t,{className:"text-gray-300",children:"Alphabetical Order"}),d.jsxs(E$,{value:P.alphabetical_order,onValueChange:F=>k({...P,alphabetical_order:F}),className:"flex gap-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Bh,{value:"asc",id:"asc",className:"border-gray-600 text-[#9B2335]"}),d.jsx($t,{htmlFor:"asc",className:"text-gray-300",children:"A-Z"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Bh,{value:"desc",id:"desc",className:"border-gray-600 text-[#9B2335]"}),d.jsx($t,{htmlFor:"desc",className:"text-gray-300",children:"Z-A"})]})]})]}),P.sort_by==="arrival_date"&&d.jsxs("div",{className:"grid gap-2",children:[d.jsx($t,{className:"text-gray-300",children:"Arrival Date Order"}),d.jsxs(E$,{value:P.arrival_order==="desc"?"newest":"oldest",onValueChange:F=>k(X=>({...X,sort_by:"arrival_date",arrival_order:F==="newest"?"desc":"asc"})),className:"flex gap-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Bh,{value:"newest",id:"newest",className:"border-gray-600 text-[#9B2335]"}),d.jsx($t,{htmlFor:"newest",className:"text-gray-300",children:"Newest First"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Bh,{value:"oldest",id:"oldest",className:"border-gray-600 text-[#9B2335]"}),d.jsx($t,{htmlFor:"oldest",className:"text-gray-300",children:"Oldest First"})]})]})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx($t,{htmlFor:"arrival-from",className:"text-gray-300",children:"Arrival Date Range"}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Vs,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{id:"arrival-from",type:"date",placeholder:"From",value:P.arrival_from,onChange:F=>k({...P,arrival_from:F.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsx("span",{className:"text-gray-400",children:"to"}),d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Vs,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{type:"date",placeholder:"To",value:P.arrival_to,onChange:F=>k({...P,arrival_to:F.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]})]})]})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(Te,{variant:"outline",onClick:()=>u(!1),className:"border-gray-700 text-gray-300 hover:bg-gray-800 bg-gray-800",children:"Cancel"}),d.jsx(Te,{onClick:f,className:"bg-[#9B2335] hover:bg-[#9B2335]/80",children:"Apply Filters"})]})]})]})]})}),d.jsx(Je,{className:"p-6",children:d.jsxs("div",{className:"flex flex-wrap gap-4",children:[d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(np,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{type:"text",placeholder:"Search Full Name",value:S,onChange:F=>E(F.target.value),onKeyDown:F=>F.key==="Enter"&&M(),className:"pl-8 bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(np,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{type:"text",placeholder:"Search Occupation",value:A,onChange:F=>T(F.target.value),onKeyDown:F=>F.key==="Enter"&&M(),onBlur:()=>A.trim()!==""&&M(),className:"pl-8 bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(Vs,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{type:"date",placeholder:"Arrival From",value:P.arrival_from||"",onChange:F=>k({...P,arrival_from:F.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(Vs,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(kt,{type:"date",placeholder:"Arrival To",value:P.arrival_to||"",onChange:F=>k({...P,arrival_to:F.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Te,{onClick:M,className:"whitespace-nowrap bg-[#9B2335] hover:bg-[#9B2335]/90",children:"Apply Filters"}),d.jsxs(Te,{variant:"outline",onClick:z,className:"whitespace-nowrap border-gray-700 text-gray-300 hover:bg-gray-800 bg-gray-900",children:[d.jsx(Fl,{className:"mr-1 h-4 w-4"})," Reset"]})]})]})})]}),C.length>0&&d.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[d.jsxs("span",{className:"text-sm font-medium text-gray-400",children:[C.length," migrants selected"]}),d.jsxs(Te,{variant:"destructive",size:"sm",className:"ml-auto bg-red-600 hover:bg-red-700",onClick:()=>{o(!0),i(C.map(F=>F.toString())),r(!0)},children:[d.jsx(Fo,{className:"mr-1 h-4 w-4"})," Delete Selected"]})]}),d.jsx(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl py-0",children:d.jsx(Je,{className:"p-0",children:w?d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})}):d.jsx("div",{className:"overflow-x-auto",children:d.jsxs(ibe,{children:[d.jsx(abe,{children:d.jsxs(A$,{className:"bg-gray-800/50 hover:bg-gray-800/50 border-b border-gray-800",children:[d.jsx(Pa,{className:"w-[50px] text-center text-gray-300",children:d.jsx(N$,{checked:U,onCheckedChange:B,className:"border-gray-600 data-[state=checked]:bg-[#9B2335] data-[state=checked]:border-[#9B2335]"})}),d.jsx(Pa,{className:"text-gray-300",children:"ID"}),d.jsx(Pa,{className:"text-gray-300",children:"Full Name"}),d.jsx(Pa,{className:"text-gray-300",children:"Date of Birth"}),d.jsx(Pa,{className:"text-gray-300",children:"Place of Birth"}),d.jsx(Pa,{className:"text-gray-300",children:"Occupation"}),d.jsx(Pa,{className:"text-gray-300",children:"Date of Arrival NT"}),d.jsx(Pa,{className:"text-right text-gray-300",children:"Actions"})]})}),d.jsx(obe,{children:v.map(F=>{var W;const X=F.person_id!==void 0&&typeof F.person_id=="number"&&C.includes(F.person_id),I=F.person_id!==void 0&&typeof F.person_id=="number"&&!isNaN(F.person_id);return d.jsxs(A$,{className:`border-b border-gray-800 hover:bg-gray-800/30 ${X?"bg-[#9B2335]/10":""}`,children:[d.jsx(Aa,{className:"text-center",children:d.jsx(N$,{checked:X,onCheckedChange:()=>D(F.person_id),disabled:!I,className:"border-gray-600 data-[state=checked]:bg-[#9B2335] data-[state=checked]:border-[#9B2335]"})}),d.jsx(Aa,{className:"font-medium text-white",children:F.person_id??"—"}),d.jsx(Aa,{className:"text-gray-300",children:F.full_name??"—"}),d.jsx(Aa,{className:"text-gray-300",children:Ri(F.date_of_birth??"—")}),d.jsx(Aa,{className:"text-gray-300",children:F.place_of_birth??"—"}),d.jsx(Aa,{className:"text-gray-300",children:F.occupation??"—"}),d.jsx(Aa,{className:"text-gray-300",children:Ri(((W=F.migration)==null?void 0:W.date_of_arrival_nt)??"—")}),d.jsx(Aa,{className:"text-right",children:d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsxs(Te,{variant:"ghost",size:"sm",className:"h-8 px-2 text-blue-400 hover:text-blue-300 hover:bg-blue-900/20",onClick:()=>h(F.person_id),children:[d.jsx($W,{className:"w-4 h-4 mr-1"})," Edit"]}),d.jsxs(Te,{variant:"ghost",size:"sm",className:"h-8 px-2 text-red-400 hover:text-red-300 hover:bg-red-900/20",onClick:()=>{F.person_id&&(o(!1),i([F.person_id.toString()]),r(!0))},children:[d.jsx(Fo,{className:"w-4 h-4 mr-1"})," Delete"]})]})})]},F.person_id)})})]})})})}),d.jsxs("div",{className:"flex justify-center items-center gap-3 py-2",children:[d.jsx(Te,{variant:"outline",size:"sm",onClick:()=>N(F=>Math.max(F-1,1)),disabled:x===1||p,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white disabled:opacity-50 bg-gray-900",children:"Previous"}),d.jsx("span",{className:"text-sm font-medium text-white",children:p?"Showing all records":`Page ${x} of ${b}`}),d.jsx(Te,{variant:"outline",size:"sm",onClick:()=>N(F=>Math.min(F+1,b)),disabled:x===b||p,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white disabled:opacity-50 bg-gray-900",children:"Next"}),d.jsx(Te,{variant:p?"default":"outline",size:"sm",onClick:()=>{g(!p),p||N(1),Y()},className:`${p?"bg-[#9B2335] hover:bg-[#9B2335]/90":"border-gray-700 bg-gray-900"} text-white hover:bg-gray-800 hover:text-white shadow-sm`,children:p?"Show Paged":"Show All"})]}),d.jsx(nbe,{open:t,onOpenChange:r,bulkDelete:a,selectedCount:n.length,ids:n,onDeleteSuccess:G})]})};function dwe(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64",children:[d.jsx(zi,{title:"Migrants Management"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 gap-4",children:[d.jsx("h1",{className:"text-2xl text-white md:text-3xl font-serif font-bold text-neutral-800",children:"Migrants Database"}),d.jsx(ct,{to:"/admin/migrants/add",children:d.jsxs(Te,{className:"bg-gradient-to-r from-green-700 to-green-600 hover:from-green-800 hover:to-green-700 shadow-md",children:[d.jsx(GS,{className:"mr-2 size-4"})," Add New Migrant"]})})]}),d.jsx(s9,{})]})]})]})}function hwe({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:Ke("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const pwe=e=>{const t=new FormData,{person:r,migration:n,naturalization:i,residence:a,family:o,internment:l,photos:u,captions:f,mainPhotoIndex:h,existingPhotos:p,removedPhotoIds:g,isEditMode:v}=e;if(Object.entries(r).forEach(([x,b])=>{b!=null&&b!==""&&t.append(x,String(b))}),Object.values(n).some(x=>x)&&Object.entries(n).forEach(([x,b])=>{b!=null&&b!==""&&t.append(`migration[${x}]`,String(b))}),Object.values(i).some(x=>x)&&Object.entries(i).forEach(([x,b])=>{b!=null&&b!==""&&t.append(`naturalization[${x}]`,String(b))}),Object.values(a).some(x=>x)&&Object.entries(a).forEach(([x,b])=>{b!=null&&b!==""&&t.append(`residence[${x}]`,String(b))}),Object.values(o).some(x=>x)&&Object.entries(o).forEach(([x,b])=>{b!=null&&b!==""&&t.append(`family[${x}]`,String(b))}),Object.values(l).some(x=>x)&&Object.entries(l).forEach(([x,b])=>{b!=null&&b!==""&&t.append(`internment[${x}]`,String(b))}),u.forEach(x=>{t.append("photos[]",x)}),f.slice(p.length).forEach((x,b)=>{t.append(`captions[${b}]`,x||"")}),v)if(g.length>0&&g.forEach((x,b)=>{t.append(`remove_photos[${b}]`,x.toString())}),p.forEach((x,b)=>{t.append(`existing_photos[${b}][id]`,x.id.toString()),t.append(`existing_photos[${b}][caption]`,f[b]||"")}),h!==null)if(t.append("set_as_profile","1"),h<p.length){const x=p[h];t.append("profile_photo_id",x.id.toString())}else{const x=h-p.length;t.append("main_photo_index",x.toString())}else t.append("set_as_profile","0");else h!==null?(t.append("set_as_profile","1"),t.append("main_photo_index",h.toString())):t.append("set_as_profile","0");return t};var it;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),o={};for(const l of a)o[l]=i[l];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(it||(it={}));var C$;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(C$||(C$={}));const Oe=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ta=e=>{switch(typeof e){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(e)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(e)?Oe.array:e===null?Oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Oe.promise:typeof Map<"u"&&e instanceof Map?Oe.map:typeof Set<"u"&&e instanceof Set?Oe.set:typeof Date<"u"&&e instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},he=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let l=n,u=0;for(;u<o.path.length;){const f=o.path[u];u===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(r(o))):l[f]=l[f]||{_errors:[]},l=l[f],u++}}};return i(this),n}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const TS=(e,t)=>{let r;switch(e.code){case he.invalid_type:e.received===Oe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:r=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case he.invalid_union:r="Invalid input";break;case he.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case he.invalid_enum_value:r=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:r="Invalid function arguments";break;case he.invalid_return_type:r="Invalid function return type";break;case he.invalid_date:r="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case he.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case he.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case he.custom:r="Invalid input";break;case he.invalid_intersection_types:r="Intersection results could not be merged";break;case he.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:r="Number must be finite";break;default:r=t.defaultError,it.assertNever(e)}return{message:r}};let mwe=TS;function gwe(){return mwe}const vwe=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let l="";const u=n.filter(f=>!!f).slice().reverse();for(const f of u)l=f(o,{data:t,defaultError:l}).message;return{...i,path:a,message:l}};function ye(e,t){const r=gwe(),n=vwe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===TS?void 0:TS].filter(i=>!!i)});e.common.issues.push(n)}class tn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return qe;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return tn.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return qe;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const qe=Object.freeze({status:"aborted"}),yu=e=>({status:"dirty",value:e}),Pn=e=>({status:"valid",value:e}),T$=e=>e.status==="aborted",k$=e=>e.status==="dirty",kl=e=>e.status==="valid",mm=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var gm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},l9=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},xu,bu;class Ha{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const R$=(e,t)=>{if(kl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new en(e.common.issues);return this._error=r,this._error}}};function Xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,l)=>{const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??n??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:u??r??l.defaultError}},description:i}}class rt{get description(){return this._def.description}_getType(t){return Ta(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ta(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tn,ctx:{common:t.parent.common,data:t.data,parsedType:Ta(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(mm(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)},i=this._parseSync({data:t,path:n.path,parent:n});return R$(n,i)}"~validate"(t){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return kl(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(i=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>kl(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(mm(i)?i:Promise.resolve(i));return R$(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),l=()=>a.addIssue({code:he.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Il({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Fa.create(this,this._def)}nullable(){return Dl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return hi.create(this)}promise(){return bm.create(this,this._def)}or(t){return ym.create([this,t],this._def)}and(t){return xm.create(this,t,this._def)}transform(t){return new Il({...Xe(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new MS({...Xe(this._def),innerType:this,defaultValue:r,typeName:ze.ZodDefault})}brand(){return new Fwe({typeName:ze.ZodBranded,type:this,...Xe(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new IS({...Xe(this._def),innerType:this,catchValue:r,typeName:ze.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return wA.create(this,t)}readonly(){return DS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ywe=/^c[^\s-]{8,}$/i,xwe=/^[0-9a-z]+$/,bwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wwe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_we=/^[a-z0-9_-]{21}$/i,Swe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jwe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Pwe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Awe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let m1;const Nwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Owe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ewe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Cwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Twe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,c9="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Rwe=new RegExp(`^${c9}$`);function u9(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Mwe(e){return new RegExp(`^${u9(e)}$`)}function Iwe(e){let t=`${c9}T${u9(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Dwe(e,t){return!!((t==="v4"||!t)&&Nwe.test(e)||(t==="v6"||!t)&&Ewe.test(e))}function $we(e,t){if(!Swe.test(e))return!1;try{const[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function Lwe(e,t){return!!((t==="v4"||!t)&&Owe.test(e)||(t==="v6"||!t)&&Cwe.test(e))}class Ia extends rt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Oe.string){const a=this._getOrReturnCtx(t);return ye(a,{code:he.invalid_type,expected:Oe.string,received:a.parsedType}),qe}const n=new tn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(i=this._getOrReturnCtx(t,i),o?ye(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&ye(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Pwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"email",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")m1||(m1=new RegExp(Awe,"u")),m1.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"emoji",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")wwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"uuid",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")_we.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"nanoid",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")ywe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")xwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid2",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")bwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ulid",code:he.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ye(i,{validation:"url",code:he.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"regex",code:he.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Iwe(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Rwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Mwe(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:he.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?jwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"duration",code:he.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Dwe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ip",code:he.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?$we(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"jwt",code:he.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Lwe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cidr",code:he.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Twe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64",code:he.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?kwe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64url",code:he.invalid_string,message:a.message}),n.dirty()):it.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:he.invalid_string,...Ce.errToObj(n)})}_addCheck(t){return new Ia({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ce.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ce.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ce.errToObj(r)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new Ia({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ia({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ia({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Ia.create=e=>new Ia({checks:[],typeName:ze.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});function Bwe(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class Rl extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Oe.number){const a=this._getOrReturnCtx(t);return ye(a,{code:he.invalid_type,expected:Oe.number,received:a.parsedType}),qe}let n;const i=new tn;for(const a of this._def.checks)a.kind==="int"?it.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ye(n,{code:he.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Bwe(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ye(n,{code:he.not_finite,message:a.message}),i.dirty()):it.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,i){return new Rl({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(i)}]})}_addCheck(t){return new Rl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Rl.create=e=>new Rl({checks:[],typeName:ze.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class Ef extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Oe.bigint)return this._getInvalidInput(t);let n;const i=new tn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ye(n,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):it.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ye(r,{code:he.invalid_type,expected:Oe.bigint,received:r.parsedType}),qe}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,i){return new Ef({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(i)}]})}_addCheck(t){return new Ef({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Ef.create=e=>new Ef({checks:[],typeName:ze.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});class M$ extends rt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Oe.boolean){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.boolean,received:n.parsedType}),qe}return Pn(t.data)}}M$.create=e=>new M$({typeName:ze.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class vm extends rt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Oe.date){const a=this._getOrReturnCtx(t);return ye(a,{code:he.invalid_type,expected:Oe.date,received:a.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ye(a,{code:he.invalid_date}),qe}const n=new tn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:he.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:he.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):it.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vm({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}vm.create=e=>new vm({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ze.ZodDate,...Xe(e)});class I$ extends rt{_parse(t){if(this._getType(t)!==Oe.symbol){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.symbol,received:n.parsedType}),qe}return Pn(t.data)}}I$.create=e=>new I$({typeName:ze.ZodSymbol,...Xe(e)});class D$ extends rt{_parse(t){if(this._getType(t)!==Oe.undefined){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.undefined,received:n.parsedType}),qe}return Pn(t.data)}}D$.create=e=>new D$({typeName:ze.ZodUndefined,...Xe(e)});class $$ extends rt{_parse(t){if(this._getType(t)!==Oe.null){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.null,received:n.parsedType}),qe}return Pn(t.data)}}$$.create=e=>new $$({typeName:ze.ZodNull,...Xe(e)});class L$ extends rt{constructor(){super(...arguments),this._any=!0}_parse(t){return Pn(t.data)}}L$.create=e=>new L$({typeName:ze.ZodAny,...Xe(e)});class B$ extends rt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Pn(t.data)}}B$.create=e=>new B$({typeName:ze.ZodUnknown,...Xe(e)});class Ka extends rt{_parse(t){const r=this._getOrReturnCtx(t);return ye(r,{code:he.invalid_type,expected:Oe.never,received:r.parsedType}),qe}}Ka.create=e=>new Ka({typeName:ze.ZodNever,...Xe(e)});class F$ extends rt{_parse(t){if(this._getType(t)!==Oe.undefined){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.void,received:n.parsedType}),qe}return Pn(t.data)}}F$.create=e=>new F$({typeName:ze.ZodVoid,...Xe(e)});class hi extends rt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==Oe.array)return ye(r,{code:he.invalid_type,expected:Oe.array,received:r.parsedType}),qe;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,l=r.data.length<i.exactLength.value;(o||l)&&(ye(r,{code:o?he.too_big:he.too_small,minimum:l?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(ye(r,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(ye(r,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>i.type._parseAsync(new Ha(r,o,r.path,l)))).then(o=>tn.mergeArray(n,o));const a=[...r.data].map((o,l)=>i.type._parseSync(new Ha(r,o,r.path,l)));return tn.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new hi({...this._def,minLength:{value:t,message:Ce.toString(r)}})}max(t,r){return new hi({...this._def,maxLength:{value:t,message:Ce.toString(r)}})}length(t,r){return new hi({...this._def,exactLength:{value:t,message:Ce.toString(r)}})}nonempty(t){return this.min(1,t)}}hi.create=(e,t)=>new hi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...Xe(t)});function zs(e){if(e instanceof Wt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Fa.create(zs(n))}return new Wt({...e._def,shape:()=>t})}else return e instanceof hi?new hi({...e._def,type:zs(e.element)}):e instanceof Fa?Fa.create(zs(e.unwrap())):e instanceof Dl?Dl.create(zs(e.unwrap())):e instanceof Jo?Jo.create(e.items.map(t=>zs(t))):e}class Wt extends rt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=it.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Oe.object){const f=this._getOrReturnCtx(t);return ye(f,{code:he.invalid_type,expected:Oe.object,received:f.parsedType}),qe}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ka&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||l.push(f);const u=[];for(const f of o){const h=a[f],p=i.data[f];u.push({key:{status:"valid",value:f},value:h._parse(new Ha(i,p,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Ka){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of l)u.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(f==="strict")l.length>0&&(ye(i,{code:he.unrecognized_keys,keys:l}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const h of l){const p=i.data[h];u.push({key:{status:"valid",value:h},value:f._parse(new Ha(i,p,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of u){const p=await h.key,g=await h.value;f.push({key:p,value:g,alwaysSet:h.alwaysSet})}return f}).then(f=>tn.mergeObjectSync(n,f)):tn.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,o;const i=((o=(a=this._def).errorMap)==null?void 0:o.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Ce.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Wt({...this._def,unknownKeys:"strip"})}passthrough(){return new Wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Wt({...this._def,catchall:t})}pick(t){const r={};for(const n of it.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Wt({...this._def,shape:()=>r})}omit(t){const r={};for(const n of it.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new Wt({...this._def,shape:()=>r})}deepPartial(){return zs(this)}partial(t){const r={};for(const n of it.objectKeys(this.shape)){const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new Wt({...this._def,shape:()=>r})}required(t){const r={};for(const n of it.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Fa;)a=a._def.innerType;r[n]=a}return new Wt({...this._def,shape:()=>r})}keyof(){return f9(it.objectKeys(this.shape))}}Wt.create=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strip",catchall:Ka.create(),typeName:ze.ZodObject,...Xe(t)});Wt.strictCreate=(e,t)=>new Wt({shape:()=>e,unknownKeys:"strict",catchall:Ka.create(),typeName:ze.ZodObject,...Xe(t)});Wt.lazycreate=(e,t)=>new Wt({shape:e,unknownKeys:"strip",catchall:Ka.create(),typeName:ze.ZodObject,...Xe(t)});class ym extends rt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new en(l.ctx.common.issues));return ye(r,{code:he.invalid_union,unionErrors:o}),qe}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of n){const f={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(u=>new en(u));return ye(r,{code:he.invalid_union,unionErrors:l}),qe}}get options(){return this._def.options}}ym.create=(e,t)=>new ym({options:e,typeName:ze.ZodUnion,...Xe(t)});function kS(e,t){const r=Ta(e),n=Ta(t);if(e===t)return{valid:!0,data:e};if(r===Oe.object&&n===Oe.object){const i=it.objectKeys(t),a=it.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const u=kS(e[l],t[l]);if(!u.valid)return{valid:!1};o[l]=u.data}return{valid:!0,data:o}}else if(r===Oe.array&&n===Oe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],u=kS(o,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===Oe.date&&n===Oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xm extends rt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(T$(a)||T$(o))return qe;const l=kS(a.value,o.value);return l.valid?((k$(a)||k$(o))&&r.dirty(),{status:r.value,value:l.data}):(ye(n,{code:he.invalid_intersection_types}),qe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}xm.create=(e,t,r)=>new xm({left:e,right:t,typeName:ze.ZodIntersection,...Xe(r)});class Jo extends rt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.array)return ye(n,{code:he.invalid_type,expected:Oe.array,received:n.parsedType}),qe;if(n.data.length<this._def.items.length)return ye(n,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),qe;!this._def.rest&&n.data.length>this._def.items.length&&(ye(n,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Ha(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>tn.mergeArray(r,o)):tn.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new Jo({...this._def,rest:t})}}Jo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jo({items:e,typeName:ze.ZodTuple,rest:null,...Xe(t)})};class z$ extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.map)return ye(n,{code:he.invalid_type,expected:Oe.map,received:n.parsedType}),qe;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([l,u],f)=>({key:i._parse(new Ha(n,l,n.path,[f,"key"])),value:a._parse(new Ha(n,u,n.path,[f,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of o){const f=await u.key,h=await u.value;if(f.status==="aborted"||h.status==="aborted")return qe;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),l.set(f.value,h.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const u of o){const f=u.key,h=u.value;if(f.status==="aborted"||h.status==="aborted")return qe;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),l.set(f.value,h.value)}return{status:r.value,value:l}}}}z$.create=(e,t,r)=>new z$({valueType:t,keyType:e,typeName:ze.ZodMap,...Xe(r)});class Cf extends rt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.set)return ye(n,{code:he.invalid_type,expected:Oe.set,received:n.parsedType}),qe;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(ye(n,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(ye(n,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(u){const f=new Set;for(const h of u){if(h.status==="aborted")return qe;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}const l=[...n.data.values()].map((u,f)=>a._parse(new Ha(n,u,n.path,f)));return n.common.async?Promise.all(l).then(u=>o(u)):o(l)}min(t,r){return new Cf({...this._def,minSize:{value:t,message:Ce.toString(r)}})}max(t,r){return new Cf({...this._def,maxSize:{value:t,message:Ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Cf.create=(e,t)=>new Cf({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...Xe(t)});class V$ extends rt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}V$.create=(e,t)=>new V$({getter:e,typeName:ze.ZodLazy,...Xe(t)});class RS extends rt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ye(r,{received:r.data,code:he.invalid_literal,expected:this._def.value}),qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}RS.create=(e,t)=>new RS({value:e,typeName:ze.ZodLiteral,...Xe(t)});function f9(e,t){return new Ml({values:e,typeName:ze.ZodEnum,...Xe(t)})}class Ml extends rt{constructor(){super(...arguments),xu.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ye(r,{expected:it.joinValues(n),received:r.parsedType,code:he.invalid_type}),qe}if(gm(this,xu,"f")||l9(this,xu,new Set(this._def.values),"f"),!gm(this,xu,"f").has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ye(r,{received:r.data,code:he.invalid_enum_value,options:n}),qe}return Pn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Ml.create(t,{...this._def,...r})}exclude(t,r=this._def){return Ml.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}xu=new WeakMap;Ml.create=f9;class U$ extends rt{constructor(){super(...arguments),bu.set(this,void 0)}_parse(t){const r=it.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Oe.string&&n.parsedType!==Oe.number){const i=it.objectValues(r);return ye(n,{expected:it.joinValues(i),received:n.parsedType,code:he.invalid_type}),qe}if(gm(this,bu,"f")||l9(this,bu,new Set(it.getValidEnumValues(this._def.values)),"f"),!gm(this,bu,"f").has(t.data)){const i=it.objectValues(r);return ye(n,{received:n.data,code:he.invalid_enum_value,options:i}),qe}return Pn(t.data)}get enum(){return this._def.values}}bu=new WeakMap;U$.create=(e,t)=>new U$({values:e,typeName:ze.ZodNativeEnum,...Xe(t)});class bm extends rt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Oe.promise&&r.common.async===!1)return ye(r,{code:he.invalid_type,expected:Oe.promise,received:r.parsedType}),qe;const n=r.parsedType===Oe.promise?r.data:Promise.resolve(r.data);return Pn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}bm.create=(e,t)=>new bm({type:e,typeName:ze.ZodPromise,...Xe(t)});class Il extends rt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ye(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return qe;const u=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return u.status==="aborted"?qe:u.status==="dirty"||r.value==="dirty"?yu(u.value):u});{if(r.value==="aborted")return qe;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?qe:l.status==="dirty"||r.value==="dirty"?yu(l.value):l}}if(i.type==="refinement"){const o=l=>{const u=i.refinement(l,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?qe:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?qe:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!kl(o))return o;const l=i.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>kl(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:r.value,value:l})):o);it.assertNever(i)}}Il.create=(e,t,r)=>new Il({schema:e,typeName:ze.ZodEffects,effect:t,...Xe(r)});Il.createWithPreprocess=(e,t,r)=>new Il({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...Xe(r)});class Fa extends rt{_parse(t){return this._getType(t)===Oe.undefined?Pn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fa.create=(e,t)=>new Fa({innerType:e,typeName:ze.ZodOptional,...Xe(t)});class Dl extends rt{_parse(t){return this._getType(t)===Oe.null?Pn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:ze.ZodNullable,...Xe(t)});class MS extends rt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Oe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}MS.create=(e,t)=>new MS({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class IS extends rt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return mm(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new en(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new en(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}IS.create=(e,t)=>new IS({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class q$ extends rt{_parse(t){if(this._getType(t)!==Oe.nan){const n=this._getOrReturnCtx(t);return ye(n,{code:he.invalid_type,expected:Oe.nan,received:n.parsedType}),qe}return{status:"valid",value:t.data}}}q$.create=e=>new q$({typeName:ze.ZodNaN,...Xe(e)});class Fwe extends rt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class wA extends rt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?qe:a.status==="dirty"?(r.dirty(),yu(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?qe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new wA({in:t,out:r,typeName:ze.ZodPipeline})}}class DS extends rt{_parse(t){const r=this._def.innerType._parse(t),n=i=>(kl(i)&&(i.value=Object.freeze(i.value)),i);return mm(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}DS.create=(e,t)=>new DS({innerType:e,typeName:ze.ZodReadonly,...Xe(t)});var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const et=Ia.create,zwe=Rl.create;Ka.create;hi.create;const ia=Wt.create;ym.create;xm.create;Jo.create;const W$=RS.create;Ml.create;bm.create;Fa.create;Dl.create;const d9=ia({surname:et().min(1,"Surname is required"),christian_name:et().min(1,"Christian name is required"),date_of_birth:et().optional(),place_of_birth:et().optional(),date_of_death:et().optional(),occupation:et().optional(),additional_notes:et().optional(),reference:et().optional(),id_card_no:et().optional(),person_id:zwe()}),h9=ia({date_of_arrival_aus:et().optional(),date_of_arrival_nt:et().optional(),arrival_period:et().optional(),data_source:et().optional()}),p9=ia({date_of_naturalisation:et().optional(),no_of_cert:et().optional(),issued_at:et().optional()}),m9=ia({town_or_city:et().optional(),home_at_death:et().optional()}),g9=ia({names_of_parents:et().optional(),names_of_children:et().optional()}),v9=ia({corps_issued:et().optional(),interned_in:et().optional(),sent_to:et().optional(),internee_occupation:et().optional(),internee_address:et().optional(),cav:et().optional()}),Vwe=ia({person:d9,migration:h9,naturalization:p9,residence:m9,family:g9,internment:v9}),H$=()=>({surname:"",christian_name:"",date_of_birth:"",place_of_birth:"",date_of_death:"",occupation:"",additional_notes:"",reference:"",id_card_no:"",person_id:0}),K$=()=>({date_of_arrival_aus:"",date_of_arrival_nt:"",arrival_period:"",data_source:""}),G$=()=>({date_of_naturalisation:"",no_of_cert:"",issued_at:""}),Y$=()=>({town_or_city:"",home_at_death:""}),X$=()=>({names_of_parents:"",names_of_children:""}),Z$=()=>({corps_issued:"",interned_in:"",sent_to:"",internee_occupation:"",internee_address:"",cav:""}),Uwe=()=>{const[e,t]=_.useState(H$()),[r,n]=_.useState(K$()),[i,a]=_.useState(G$()),[o,l]=_.useState(Y$()),[u,f]=_.useState(X$()),[h,p]=_.useState(Z$()),[g,v]=_.useState({}),[w,x]=_.useState(!1),b=_.useCallback(()=>{try{const E={person:e,migration:r,naturalization:i,residence:o,family:u,internment:h};return Vwe.parse(E),v({}),x(!0),!0}catch(E){if(E instanceof en){const T={};return E.errors.forEach(k=>{const M=k.path.join(".");T[M]=k.message}),v(T),x(!1),!1}return x(!1),!1}},[e,r,i,o,u,h]),S=_.useCallback(E=>{try{const T={person:d9,migration:h9,naturalization:p9,residence:m9,family:g9,internment:v9},k={person:e,migration:r,naturalization:i,residence:o,family:u,internment:h};return T[E].parse(k[E]),v(M=>{const z={...M};return Object.keys(z).forEach(D=>{D.startsWith(E)&&delete z[D]}),z}),!0}catch(T){if(T instanceof en){const k={};return T.errors.forEach(M=>{const z=`${E}.${M.path.join(".")}`;k[z]=M.message}),v(M=>({...M,...k})),!1}return!1}},[e,r,i,o,u,h]),A=_.useCallback(E=>g[E]||null,[g]),P=_.useCallback(E=>!!g[E],[g]),C=_.useCallback(()=>{t(H$()),n(K$()),a(G$()),l(Y$()),f(X$()),p(Z$()),v({}),x(!1)},[]),N=_.useCallback(E=>{const T=k=>{if(!k)return"";try{return new Date(k).toISOString().split("T")[0]}catch{return""}};t({surname:E.surname||"",christian_name:E.christian_name||"",date_of_birth:T(E.date_of_birth),place_of_birth:E.place_of_birth||"",date_of_death:T(E.date_of_death),occupation:E.occupation||"",additional_notes:E.additional_notes||"",reference:E.reference||"",id_card_no:E.id_card_no||"",person_id:E.person_id||0}),E.migration&&n({date_of_arrival_aus:T(E.migration.date_of_arrival_aus),date_of_arrival_nt:T(E.migration.date_of_arrival_nt),arrival_period:E.migration.arrival_period||"",data_source:E.migration.data_source||""}),E.naturalization&&a({date_of_naturalisation:T(E.naturalization.date_of_naturalisation),no_of_cert:E.naturalization.no_of_cert||"",issued_at:E.naturalization.issued_at||""}),E.residence&&l({town_or_city:E.residence.town_or_city||"",home_at_death:E.residence.home_at_death||""}),E.family&&f({names_of_parents:E.family.names_of_parents||"",names_of_children:E.family.names_of_children||""}),E.internment&&p({corps_issued:E.internment.corps_issued||"",interned_in:E.internment.interned_in||"",sent_to:E.internment.sent_to||"",internee_occupation:E.internment.internee_occupation||"",internee_address:E.internment.internee_address||"",cav:E.internment.cav||""}),v({}),x(!1)},[]);return{formData:{person:e,migration:r,naturalization:i,residence:o,family:u,internment:h},setters:{setPerson:t,setMigration:n,setNaturalization:a,setResidence:l,setFamily:f,setInternment:p},validation:{validateForm:b,validateSection:S,validationErrors:g,isFormValid:w,getFieldError:A,hasFieldError:P,clearErrors:()=>{v({}),x(!1)}},resetForm:C,populateFormData:N}},qwe=()=>{const[e,t]=_.useState([]),[r,n]=_.useState([]),[i,a]=_.useState([]),[o,l]=_.useState(null),[u,f]=_.useState([]),[h,p]=_.useState([]),g=_.useCallback(P=>{if(P.target.files&&P.target.files.length>0){const C=Array.from(P.target.files);t(E=>[...E,...C]);const N=C.map(E=>URL.createObjectURL(E));n(E=>[...E,...N]),a(E=>{const T=[...E];return C.forEach(()=>T.push("")),T}),o===null&&l(0)}P.target.value=""},[o]),v=_.useCallback((P,C)=>{a(N=>{const E=[...N];return E[P]=C,E})},[]),w=_.useCallback(P=>{l(P)},[]),x=_.useCallback(P=>{const C=u[P],N=o===P;C!=null&&C.id&&p(E=>[...E,C.id]),f(E=>E.filter((T,k)=>k!==P)),a(E=>{const T=[...E];return T.splice(P,1),T}),N?u.length-1+e.length>0?l(0):l(null):o!==null&&P<o&&l(o-1)},[u,o,e.length]),b=_.useCallback(P=>{const C=u.length+P,N=o===C;t(E=>E.filter((T,k)=>k!==P)),n(E=>E.filter((T,k)=>k!==P)),a(E=>{const T=[...E];return T.splice(C,1),T}),N?u.length+(e.length-1)>0?l(0):l(null):o!==null&&o>C&&l(o-1)},[u.length,o,e.length]),S=_.useCallback(P=>{if(P.photos&&Array.isArray(P.photos)&&P.photos.length>0){const C=P.photos;f(C);const N=C.map(T=>T.caption||"");a(N);const E=C.findIndex(T=>T.is_profile_photo);E!==-1&&l(E)}},[]),A=_.useCallback(()=>{t([]),n([]),a([]),l(null),f([]),p([])},[]);return{photos:e,photoPreviews:r,captions:i,mainPhotoIndex:o,existingPhotos:u,removedPhotoIds:h,handlePhotoChange:g,updateCaption:v,setAsMainPhoto:w,removeExistingPhoto:x,removeNewPhoto:b,setCaptions:a,setMainPhotoIndex:l,populatePhotoData:S,resetPhotos:A}},Wwe=(e,t)=>{const{id:r}=zS(),[n,i]=_.useState(!1),[a,o]=_.useState(!1),l=!!r;_.useEffect(()=>{l&&r&&!a&&u()},[r,l,a]);const u=async()=>{try{i(!0);const f=Number.parseInt(r,10);if(isNaN(f))throw new Error("Invalid person ID");const h=await ht.getMigrantById(f);e(h),t(h),o(!0)}catch{hm("Failed to load migrant data for editing.")}finally{i(!1)}};return{loading:n,isEditMode:l,initialDataLoaded:a,setInitialDataLoaded:f=>o(f)}};function Hwe({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(rc,{open:e,onOpenChange:t,children:d.jsxs(nc,{className:"sm:max-w-md",children:[d.jsxs(ic,{children:[d.jsx(ac,{className:"text-xl font-serif text-green-600",children:"Confirm New Migrant"}),d.jsx(oc,{children:"Are you sure you want to add this new migrant to the database?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"Please verify the information before confirming. Once added, you can edit the record later if needed."})}),d.jsxs(Qf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Te,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(AL,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(HS,{className:"mr-2 size-4"})," Confirm"]})]})]})})}function Kwe({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(rc,{open:e,onOpenChange:t,children:d.jsxs(nc,{className:"sm:max-w-md",children:[d.jsxs(ic,{children:[d.jsx(ac,{className:"text-xl font-serif text-blue-600",children:"Confirm Update"}),d.jsx(oc,{children:"Are you sure you want to update this migrant's information?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"Double-check the changes before confirming. This will overwrite the current data."})}),d.jsxs(Qf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Te,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(AL,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Te,{variant:"default",onClick:r,children:[d.jsx(XS,{className:"mr-2 size-4"})," Update"]})]})]})})}const Gwe=({person:e,setPerson:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Surname",e.surname,n=>t({...e,surname:n}),"text","Enter surname",!0),r("Christian Name",e.christian_name,n=>t({...e,christian_name:n}),"text","Enter first name",!0),r("Date of Birth",e.date_of_birth,n=>t({...e,date_of_birth:n}),"date"),r("Place of Birth",e.place_of_birth,n=>t({...e,place_of_birth:n})),r("Date of Death",e.date_of_death,n=>t({...e,date_of_death:n}),"date"),r("Occupation",e.occupation,n=>t({...e,occupation:n})),d.jsx("div",{className:"md:col-span-2",children:r("Additional Notes",e.additional_notes,n=>t({...e,additional_notes:n}),"textarea","Enter any additional notes or comments")}),r("Reference",e.reference,n=>t({...e,reference:n})),r("ID Card Number",e.id_card_no,n=>t({...e,id_card_no:n}))]}),Ywe=({migration:e,setMigration:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Date of Arrival in Australia",e.date_of_arrival_aus,n=>t({...e,date_of_arrival_aus:n}),"date"),r("Date of Arrival in NT",e.date_of_arrival_nt,n=>t({...e,date_of_arrival_nt:n}),"date"),r("Arrival Period",e.arrival_period,n=>t({...e,arrival_period:n})),r("Data Source",e.data_source,n=>t({...e,data_source:n}))]}),Xwe=({naturalization:e,setNaturalization:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Date of Naturalisation",e.date_of_naturalisation,n=>t({...e,date_of_naturalisation:n}),"date"),r("Certificate Number",e.no_of_cert,n=>t({...e,no_of_cert:n})),d.jsx("div",{className:"md:col-span-2",children:r("Issued At",e.issued_at,n=>t({...e,issued_at:n}))})]}),Zwe=({residence:e,setResidence:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Town or City",e.town_or_city,n=>t({...e,town_or_city:n})),r("Home at Death",e.home_at_death,n=>t({...e,home_at_death:n}))]}),Qwe=({family:e,setFamily:t,renderFormField:r})=>d.jsxs("div",{className:"space-y-6",children:[r("Names of Parents",e.names_of_parents,n=>t({...e,names_of_parents:n}),"textarea","Enter parent names (one per line or separated by commas)"),r("Names of Children",e.names_of_children,n=>t({...e,names_of_children:n}),"textarea","Enter children names (one per line or separated by commas)")]}),Jwe=({internment:e,setInternment:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Corps Issued",e.corps_issued,n=>t({...e,corps_issued:n})),r("Interned In",e.interned_in,n=>t({...e,interned_in:n})),r("Sent To",e.sent_to,n=>t({...e,sent_to:n})),r("Internee Occupation",e.internee_occupation,n=>t({...e,internee_occupation:n})),d.jsx("div",{className:"md:col-span-2",children:r("Internee Address",e.internee_address,n=>t({...e,internee_address:n}))}),r("CAV",e.cav,n=>t({...e,cav:n}))]}),e1e=({photos:e,photoPreviews:t,captions:r,existingPhotos:n,mainPhotoIndex:i,API_BASE_URL:a,handlePhotoChange:o,removeExistingPhoto:l,removeNewPhoto:u,setCaptions:f,setMainPhotoIndex:h})=>{const[p,g]=V.useState(!1),v=(S,A)=>{const P=[...r];P[S]=A,f(P)},w=S=>{S.preventDefault(),g(!0)},x=S=>{S.preventDefault(),g(!1)},b=S=>{S.preventDefault(),g(!1);const A=Array.from(S.dataTransfer.files).filter(P=>P.type.startsWith("image/"));A.length>0&&o({target:{files:A}})};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx($t,{htmlFor:"photo-upload",className:"text-sm font-medium text-gray-300 mb-4 block",children:"Upload Photos"}),d.jsx("div",{className:`border-2 border-dashed rounded-lg p-6 transition-all duration-200 ${p?"border-blue-400 bg-blue-900/20 scale-[1.02]":"border-gray-600 bg-gray-800/50 hover:border-gray-500 hover:bg-gray-800/70"}`,onDragOver:w,onDragLeave:x,onDrop:b,children:d.jsxs("div",{className:"flex flex-col items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs(Te,{type:"button",variant:"outline",className:"border-gray-900 text-white bg-gray-700 hover:bg-gray-600",onClick:()=>{var S;return(S=document.getElementById("photo-upload"))==null?void 0:S.click()},children:[d.jsx(rp,{className:"w-4 h-4 mr-2"}),"Add Photos"]}),d.jsx(kt,{id:"photo-upload",type:"file",multiple:!0,accept:"image/*",onChange:o,className:"hidden"})]}),d.jsx("p",{className:"text-sm text-gray-400 text-center",children:p?"Drop your photos here!":"Click to select photos or drag and drop them here"})]})})]}),n.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("h3",{className:"text-lg font-semibold text-white border-b border-gray-600 pb-2",children:["Existing Photos (",n.length,")"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map((S,A)=>d.jsx(Qe,{className:"bg-gray-800 border-gray-700",children:d.jsxs(Je,{className:"p-4",children:[d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:`${a}${S.file_path}`,alt:S.caption||`Photo ${A+1}`,className:"w-full h-48 object-cover rounded-md"}),d.jsxs("div",{className:"absolute top-2 right-2 flex gap-2",children:[d.jsx(Te,{type:"button",size:"sm",variant:i===A?"default":"outline",className:i===A?"bg-yellow-600 hover:bg-yellow-700":"",onClick:()=>h(A),children:d.jsx(TE,{className:"w-4 h-4"})}),d.jsx(Te,{type:"button",size:"sm",variant:"destructive",onClick:()=>l(A),children:d.jsx(Fo,{className:"w-4 h-4"})})]})]}),d.jsx(kt,{type:"text",placeholder:"Add caption...",value:r[A]||"",onChange:P=>v(A,P.target.value),className:"mt-2 bg-gray-700 border-gray-600 text-white"})]})},`existing-${S.id}`))})]}),t.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("h3",{className:"text-lg font-semibold text-white border-b border-gray-600 pb-2",children:["New Photos (",t.length,")"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map((S,A)=>{const P=n.length+A;return d.jsx(Qe,{className:"bg-gray-800 border-gray-700",children:d.jsxs(Je,{className:"p-4",children:[d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:S,alt:`New photo ${A+1}`,className:"w-full h-48 object-cover rounded-md"}),d.jsxs("div",{className:"absolute top-2 right-2 flex gap-2",children:[d.jsx(Te,{type:"button",size:"sm",variant:i===P?"default":"outline",className:i===P?"bg-yellow-600 hover:bg-yellow-700":"",onClick:()=>h(P),children:d.jsx(TE,{className:"w-4 h-4"})}),d.jsx(Te,{type:"button",size:"sm",variant:"destructive",onClick:()=>u(A),children:d.jsx(Fo,{className:"w-4 h-4"})})]})]}),d.jsx(kt,{type:"text",placeholder:"Add caption...",value:r[P]||"",onChange:C=>v(P,C.target.value),className:"mt-2 bg-gray-700 border-gray-600 text-white"})]})},`new-${A}`)})})]}),n.length===0&&e.length===0&&d.jsxs("div",{className:"text-center py-8 text-gray-400",children:[d.jsx(rp,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),d.jsx("p",{children:'No photos uploaded yet. Click "Add Photos" to get started.'})]})]})},t1e=TL("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function wu({className:e,variant:t,asChild:r=!1,...n}){const i=r?EL:"span";return d.jsx(i,{"data-slot":"badge",className:Ke(t1e({variant:t}),e),...n})}const r1e=({person:e,migration:t,naturalization:r,residence:n,family:i,internment:a,photos:o,photoPreviews:l,captions:u,existingPhotos:f,mainPhotoIndex:h,API_BASE_URL:p})=>{const g=E=>{if(!E)return"Not provided";try{return new Date(E).toLocaleDateString()}catch{return E}},v=({title:E,children:T,isEmpty:k=!1})=>d.jsxs(Qe,{className:"bg-gray-800 border-gray-700",children:[d.jsx(bn,{className:"pb-3",children:d.jsxs(wn,{className:"text-lg text-white flex items-center justify-between",children:[E,k&&d.jsx(wu,{variant:"secondary",className:"text-xs",children:"No data"})]})}),d.jsx(Je,{className:"space-y-2",children:T})]}),w=({label:E,value:T})=>d.jsxs("div",{className:"flex justify-between items-start py-1",children:[d.jsxs("span",{className:"text-gray-400 text-sm",children:[E,":"]}),d.jsx("span",{className:"text-white text-sm text-right max-w-xs",children:T||"Not provided"})]}),x=e.surname||e.christian_name,b=t.date_of_arrival_aus||t.date_of_arrival_nt||t.arrival_period||t.data_source,S=r.date_of_naturalisation||r.no_of_cert||r.issued_at,A=n.town_or_city||n.home_at_death,P=i.names_of_parents||i.names_of_children,C=a.corps_issued||a.interned_in||a.sent_to||a.internee_occupation||a.internee_address||a.cav,N=o.length>0||f.length>0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center mb-8",children:[d.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Review Your Information"}),d.jsx("p",{className:"text-gray-400",children:"Please review all the information before submitting"})]}),d.jsxs("div",{className:"grid gap-6",children:[d.jsxs(v,{title:"Personal Details",isEmpty:!x,children:[d.jsx(w,{label:"Surname",value:e.surname}),d.jsx(w,{label:"Christian Name",value:e.christian_name}),d.jsx(w,{label:"Date of Birth",value:g(e.date_of_birth)}),d.jsx(w,{label:"Place of Birth",value:e.place_of_birth}),d.jsx(w,{label:"Date of Death",value:g(e.date_of_death)}),d.jsx(w,{label:"Occupation",value:e.occupation}),d.jsx(w,{label:"ID Card No",value:e.id_card_no}),d.jsx(w,{label:"Reference",value:e.reference}),e.additional_notes&&d.jsxs("div",{className:"pt-2 border-t border-gray-700",children:[d.jsx("span",{className:"text-gray-400 text-sm",children:"Additional Notes:"}),d.jsx("p",{className:"text-white text-sm mt-1 bg-gray-700/50 p-2 rounded",children:e.additional_notes})]})]}),d.jsxs(v,{title:"Migration Information",isEmpty:!b,children:[d.jsx(w,{label:"Date of Arrival (Australia)",value:g(t.date_of_arrival_aus)}),d.jsx(w,{label:"Date of Arrival (NT)",value:g(t.date_of_arrival_nt)}),d.jsx(w,{label:"Arrival Period",value:t.arrival_period}),d.jsx(w,{label:"Data Source",value:t.data_source})]}),d.jsxs(v,{title:"Naturalization",isEmpty:!S,children:[d.jsx(w,{label:"Date of Naturalisation",value:g(r.date_of_naturalisation)}),d.jsx(w,{label:"Certificate Number",value:r.no_of_cert}),d.jsx(w,{label:"Issued At",value:r.issued_at})]}),d.jsxs(v,{title:"Residence",isEmpty:!A,children:[d.jsx(w,{label:"Town or City",value:n.town_or_city}),d.jsx(w,{label:"Home at Death",value:n.home_at_death})]}),d.jsxs(v,{title:"Family",isEmpty:!P,children:[d.jsx(w,{label:"Names of Parents",value:i.names_of_parents}),d.jsx(w,{label:"Names of Children",value:i.names_of_children})]}),d.jsxs(v,{title:"Internment",isEmpty:!C,children:[d.jsx(w,{label:"Corps Issued",value:a.corps_issued}),d.jsx(w,{label:"Interned In",value:a.interned_in}),d.jsx(w,{label:"Sent To",value:a.sent_to}),d.jsx(w,{label:"Internee Occupation",value:a.internee_occupation}),d.jsx(w,{label:"Internee Address",value:a.internee_address}),d.jsx(w,{label:"CAV",value:a.cav})]}),d.jsx(v,{title:"Photos",isEmpty:!N,children:N?d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"text-sm text-gray-400",children:["Total Photos: ",o.length+f.length,h>=0&&d.jsx(wu,{variant:"outline",className:"ml-2",children:"Main photo selected"})]}),d.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:[f.map((E,T)=>d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:`${p}${E.file_path}`,alt:`Photo ${T+1}`,className:"w-full h-24 object-cover rounded border border-gray-600"}),h===T&&d.jsx(wu,{className:"absolute top-1 left-1 text-xs bg-[#9B2335]",children:"Main"}),u[T]&&d.jsx("p",{className:"text-xs text-gray-400 mt-1 truncate",children:u[T]})]},`existing-${T}`)),l.map((E,T)=>d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:E,alt:`New photo ${T+1}`,className:"w-full h-24 object-cover rounded border border-gray-600"}),h===f.length+T&&d.jsx(wu,{className:"absolute top-1 left-1 text-xs bg-[#9B2335]",children:"Main"}),u[f.length+T]&&d.jsx("p",{className:"text-xs text-gray-400 mt-1 truncate",children:u[f.length+T]})]},`new-${T}`))]})]}):d.jsx("p",{className:"text-gray-400 text-sm",children:"No photos uploaded"})})]}),d.jsx("div",{className:"mt-8 p-4 bg-blue-900/20 border border-blue-500/30 rounded-lg",children:d.jsxs("div",{className:"flex items-start space-x-3",children:[d.jsx("div",{className:"text-blue-400 mt-0.5",children:""}),d.jsxs("div",{children:[d.jsx("h4",{className:"text-blue-400 font-medium",children:"Ready to Submit"}),d.jsxs("p",{className:"text-blue-300 text-sm mt-1",children:["Please review all the information above. Once you submit,"," ","this record will be saved to the database."]})]})]})})]})};var _A="Progress",SA=100,[n1e,i_e]=Sn(_A),[i1e,a1e]=n1e(_A),y9=_.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=o1e,...o}=e;(i||i===0)&&!Q$(i)&&console.error(s1e(`${i}`,"Progress"));const l=Q$(i)?i:SA;n!==null&&!J$(n,l)&&console.error(l1e(`${n}`,"Progress"));const u=J$(n,l)?n:null,f=wm(u)?a(u,l):void 0;return d.jsx(i1e,{scope:r,value:u,max:l,children:d.jsx(Ie.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":wm(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":w9(u,l),"data-value":u??void 0,"data-max":l,...o,ref:t})})});y9.displayName=_A;var x9="ProgressIndicator",b9=_.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=a1e(x9,r);return d.jsx(Ie.div,{"data-state":w9(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});b9.displayName=x9;function o1e(e,t){return`${Math.round(e/t*100)}%`}function w9(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function wm(e){return typeof e=="number"}function Q$(e){return wm(e)&&!isNaN(e)&&e>0}function J$(e,t){return wm(e)&&!isNaN(e)&&e<=t&&e>=0}function s1e(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${SA}\`.`}function l1e(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${SA} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var c1e=y9,u1e=b9;function f1e({className:e,value:t,...r}){return d.jsx(c1e,{"data-slot":"progress",className:Ke("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...r,children:d.jsx(u1e,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Fs=["Personal Details","Immigration History","Naturalization Records","Residence History","Family Information","Internment Records","Photos & Documents"],d1e=["Enter basic personal information and identification details","Record immigration and arrival information in Australia","Document citizenship and naturalization records","Track residential history and location changes","Add family members and relationship details","Record internment and detention history","Upload photos and supporting documents"],h1e=[gr,Am,YS,Pm,QS,OL,rp],p1e=({currentStep:e,isEditMode:t})=>d.jsxs(bn,{className:"bg-gray-800 p-8 border-b border-gray-700",children:[d.jsxs("div",{className:"flex justify-between items-start mb-6",children:[d.jsxs("div",{children:[d.jsx(wn,{className:"text-xl md:text-2xl font-bold text-white",children:t?`Edit ${Fs[e]}`:Fs[e]}),d.jsx(ts,{className:"text-gray-400 mt-1",children:d1e[e]})]}),d.jsxs(wu,{variant:"outline",className:"text-sm border-gray-700 text-gray-300",children:["Step ",e+1," of ",Fs.length]})]}),d.jsxs("div",{className:"mt-6",children:[d.jsxs("div",{className:"flex justify-between text-sm text-gray-400 mb-2",children:[d.jsx("span",{children:"Progress"}),d.jsxs("span",{children:[Math.round(e/(Fs.length-1)*100),"% Complete"]})]}),d.jsx(f1e,{value:e/(Fs.length-1)*100,className:"h-2 bg-gray-700",style:{"--progress-foreground":"#9B2335","--progress-background":"#374151"}})]}),d.jsx("div",{className:"flex justify-between mt-4 overflow-x-auto",children:Fs.map((r,n)=>{const i=h1e[n];return d.jsxs("div",{className:"flex flex-col items-center min-w-0 flex-1",children:[d.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-2 transition-all duration-200 ${n<=e?"bg-[#9B2335] text-white shadow-lg":"bg-gray-800 text-gray-500 border border-gray-700"}`,children:d.jsx(i,{className:"w-5 h-5"})}),d.jsx("span",{className:`text-xs text-center px-1 transition-colors duration-200 ${n<=e?"text-[#9B2335] font-medium":"text-gray-500"}`,children:r})]},n)})})]}),m1e=({currentStep:e,totalSteps:t,isSubmitting:r,isEditMode:n,onPrevious:i,onNext:a,onSubmit:o})=>d.jsx("div",{className:"bg-gray-800 px-8 py-6 border-t border-gray-700",children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs(Te,{variant:"outline",disabled:e===0,onClick:i,className:"flex items-center gap-2 border-gray-700 text-gray-300 hover:bg-gray-700 hover:text-white disabled:opacity-50",children:[d.jsx(cW,{className:"w-4 h-4"}),"Previous"]}),d.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:d.jsxs("span",{children:["Step ",e+1," of ",t]})}),e<t-2?d.jsxs(Te,{onClick:a,className:"flex items-center gap-2 bg-[#9B2335] hover:bg-[#9B2335]/90 shadow-lg",children:["Next",d.jsx(EE,{className:"w-4 h-4"})]}):e===t-2?d.jsxs(Te,{onClick:a,className:"flex items-center gap-2 bg-blue-600 hover:bg-blue-700 shadow-lg",children:["Review",d.jsx(EE,{className:"w-4 h-4"})]}):d.jsx(Te,{onClick:o,disabled:r,className:"flex items-center gap-2 bg-green-600 hover:bg-green-700 shadow-lg",children:r?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),"Saving..."]}):d.jsxs(d.Fragment,{children:[d.jsx(XS,{className:"w-4 h-4"}),n?"Update Record":"Submit Form"]})})]})}),_9=()=>{const e=Hn(),{formData:t,setters:r,resetForm:n,populateFormData:i,validation:a}=Uwe(),o=qwe(),{loading:l,isEditMode:u,initialDataLoaded:f}=Wwe(i,o.populatePhotoData),[h,p]=_.useState(0),[g,v]=_.useState(!1),[w,x]=_.useState(!1),[b,S]=_.useState(!1),A=(k,M,z,D="text",B,U,G)=>{const Y=G?a.hasFieldError(G):!1,F=G?a.getFieldError(G):null;return d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:k.toLowerCase().replace(/\s+/g,"-"),className:"text-sm font-medium text-gray-300",children:[k,U&&d.jsx("span",{className:"text-red-400 ml-1",children:"*"})]}),D==="textarea"?d.jsx(hwe,{id:k.toLowerCase().replace(/\s+/g,"-"),placeholder:B||k,value:M,onChange:X=>z(X.target.value),className:`min-h-[100px] resize-none bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335] focus:ring-[#9B2335] ${Y?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}):d.jsx(kt,{id:k.toLowerCase().replace(/\s+/g,"-"),type:D,placeholder:B||k,value:M,onChange:X=>z(X.target.value),className:`bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335] focus:ring-[#9B2335] ${Y?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),F&&d.jsx("p",{className:"text-sm text-red-400 mt-1",children:F})]})},P=()=>{switch(h){case 0:return d.jsx(Gwe,{person:t.person,setPerson:r.setPerson,renderFormField:A});case 1:return d.jsx(Ywe,{migration:t.migration,setMigration:r.setMigration,renderFormField:A});case 2:return d.jsx(Xwe,{naturalization:t.naturalization,setNaturalization:r.setNaturalization,renderFormField:A});case 3:return d.jsx(Zwe,{residence:t.residence,setResidence:r.setResidence,renderFormField:A});case 4:return d.jsx(Qwe,{family:t.family,setFamily:r.setFamily,renderFormField:A});case 5:return d.jsx(Jwe,{internment:t.internment,setInternment:r.setInternment,renderFormField:A});case 6:return d.jsx(e1e,{photos:o.photos,photoPreviews:o.photoPreviews,captions:o.captions,existingPhotos:o.existingPhotos,mainPhotoIndex:o.mainPhotoIndex,API_BASE_URL:ht.baseURL,handlePhotoChange:o.handlePhotoChange,removeExistingPhoto:o.removeExistingPhoto,removeNewPhoto:o.removeNewPhoto,setCaptions:o.setCaptions,setMainPhotoIndex:o.setMainPhotoIndex});case 7:return d.jsx(r1e,{person:t.person,migration:t.migration,naturalization:t.naturalization,residence:t.residence,family:t.family,internment:t.internment,photos:o.photos,photoPreviews:o.photoPreviews,captions:o.captions,existingPhotos:o.existingPhotos,mainPhotoIndex:o.mainPhotoIndex??-1,API_BASE_URL:ht.baseURL});default:return null}},C=async()=>{try{const k=pwe({...t,photos:o.photos,captions:o.captions,mainPhotoIndex:o.mainPhotoIndex,existingPhotos:o.existingPhotos,removedPhotoIds:o.removedPhotoIds,isEditMode:u});if(u){const M=window.location.pathname.split("/").pop();return await ht.updateMigrant(parseInt(M),k)}else return await ht.createMigrant(k)}catch(k){throw k}},N=()=>{const k=["person","migration","naturalization","residence","family","internment"];if(h<k.length){const M=k[h];(a.validateSection(M)||h>0)&&p(D=>D+1)}else p(M=>M+1)},E=()=>{if(!b){if(!a.validateForm()){hm("Please fix the errors in the form before submitting.");return}u?x(!0):v(!0)}},T=async()=>{if(!b)try{S(!0),await C(),u?rbe(`Migrant ${t.person.surname}, ${t.person.christian_name}`,()=>{e("/admin/migrants")}):(Jxe(()=>{e("/admin/migrants")}),n(),o.resetPhotos())}catch{hm("There was a problem saving the migrant data. Please try again.")}finally{S(!1),v(!1),x(!1)}};return l&&u&&!f?d.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center",children:d.jsx(Qe,{className:"w-full max-w-md bg-gray-900 border-gray-800",children:d.jsxs(Je,{className:"p-6 text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335] mx-auto mb-4"}),d.jsx("p",{className:"text-gray-400",children:"Loading form data..."})]})})}):d.jsxs("div",{className:"max-w-6xl mx-auto mt-8 mb-24 p-4",children:[d.jsxs(Qe,{className:"shadow-2xl border border-gray-800 bg-gray-900/50 overflow-hidden backdrop-blur-sm",children:[d.jsx(p1e,{currentStep:h,isEditMode:u}),d.jsxs(Je,{className:"p-8 bg-gray-900",children:[P(),Object.keys(a.validationErrors).length>0&&d.jsxs("div",{className:"mt-6 p-4 bg-red-900/20 border border-red-500/30 rounded-lg",children:[d.jsx("h4",{className:"text-red-400 font-medium mb-2",children:"Please fix the following errors:"}),d.jsx("ul",{className:"text-sm text-red-300 space-y-1",children:Object.entries(a.validationErrors).map(([k,M])=>d.jsxs("li",{children:["• ",M]},k))})]})]}),d.jsx(m1e,{currentStep:h,totalSteps:8,isSubmitting:b,isEditMode:u,onPrevious:()=>p(k=>k-1),onNext:N,onSubmit:E})]}),d.jsx(Hwe,{open:g,onOpenChange:v,onConfirm:T,isSubmitting:b}),d.jsx(Kwe,{open:w,onOpenChange:x,onConfirm:T,isSubmitting:b})]})};function g1e(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Add New Migrant"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"flex items-center mb-6",children:[d.jsx(ct,{to:"/admin/migrants",children:d.jsxs(Te,{variant:"ghost",size:"sm",className:"gap-1 text-gray-300",children:[d.jsx(_L,{className:"size-4"})," Back to Migrants"]})}),d.jsx("h1",{className:"text-3xl font-serif font-bold text-white ml-4",children:"Add New Migrant"})]}),d.jsx(_9,{})]})]})]})}function v1e(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Edit Migrant"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"flex items-center mb-6",children:[d.jsx(ct,{to:"/admin/migrants",children:d.jsxs(Te,{variant:"ghost",size:"sm",className:"gap-1 text-gray-300",children:[d.jsx(_L,{className:"size-4"})," Back to Migrants"]})}),d.jsx("h1",{className:"text-3xl font-serif font-bold text-white ml-4",children:"Edit Migrant"})]}),d.jsx(_9,{})]})]})]})}const y1e=ia({name:et().min(1,"Full name is required"),email:et().email("Invalid email address").min(1,"Email is required"),password:et().min(8,"Password must be at least 8 characters").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[0-9]/,"Password must contain at least one number"),password_confirmation:et()}).refine(e=>e.password===e.password_confirmation,{message:"Passwords don't match",path:["password_confirmation"]}),x1e=ia({name:et().min(1,"Full name is required"),email:et().email("Invalid email address").min(1,"Email is required"),current_password:et().min(1,"Current password is required"),password:et().min(8,"Password must be at least 8 characters").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[0-9]/,"Password must contain at least one number").optional().or(W$("")),password_confirmation:et().optional().or(W$(""))}).refine(e=>e.password&&e.password.length>0?e.password===e.password_confirmation:!0,{message:"Passwords don't match",path:["password_confirmation"]});function b1e(){const e=Hn(),[t,r]=_.useState(!1),[n,i]=_.useState(null),[a,o]=_.useState({name:"",email:"",current_password:"",password:"",password_confirmation:""}),[l,u]=_.useState({});_.useEffect(()=>{async function v(){try{const w=await ht.fetchCurrentUser();i(w),w&&o(x=>({...x,name:w.name||"",email:w.email||""}))}catch{Nt.error("Failed to load user information")}}v()},[]);const f=v=>{const{name:w,value:x}=v.target;o(b=>({...b,[w]:x})),l[w]&&u(b=>{const S={...b};return delete S[w],S})},h=()=>{try{return x1e.parse(a),u({}),!0}catch(v){if(v instanceof en){const w={};return v.errors.forEach(x=>{const b=x.path.join(".");w[b]=x.message}),u(w),!1}return!1}},p=v=>l[v]||null,g=async v=>{var w,x;if(v.preventDefault(),!h()){const b=Object.values(l)[0];b&&Nt.error(b);return}try{r(!0);const b=await ht.updateUser({name:a.name,email:a.email,current_password:a.current_password,password:a.password,password_confirmation:a.password_confirmation});Nt.success(b.message||"User updated successfully!"),Nt.success("You will now be logged out for security reasons. Please log in with your updated credentials.",{duration:5e3}),setTimeout(async()=>{await ht.logout(),e("/login")},2e3)}catch(b){(x=(w=b.response)==null?void 0:w.data)!=null&&x.message?Nt.error(b.response.data.message):Nt.error("Failed to update user. Please try again.")}finally{r(!1)}};return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Create User"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white",children:"Account Settings"})}),d.jsx("p",{className:"text-gray-400 mt-2",children:"Manage your profile and security preferences"})]}),n&&d.jsx("div",{className:"mb-6 max-w-10xl mx-auto",children:d.jsxs(Qe,{className:"shadow-xl border border-gray-800 bg-gray-900 overflow-hidden mb-6",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(bn,{className:"border-b border-gray-800",children:d.jsxs(wn,{className:"text-xl font-serif text-white flex items-center",children:[d.jsx(gr,{className:"mr-2 size-5"}),"Current User Profile"]})}),d.jsx(Je,{className:"p-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[d.jsx("div",{className:"flex-shrink-0 flex justify-center",children:d.jsx("div",{className:"size-24 rounded-full bg-[#9B2335] flex items-center justify-center border-4 border-gray-800",children:d.jsx("span",{className:"text-3xl font-bold text-white",children:n.name.charAt(0).toUpperCase()})})}),d.jsxs("div",{className:"flex-grow space-y-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-gray-400 text-sm",children:"Full Name"}),d.jsx("p",{className:"text-white text-lg font-medium",children:n.name})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-gray-400 text-sm",children:"Email Address"}),d.jsx("p",{className:"text-white text-lg font-medium",children:n.email})]})]})]})})]})}),d.jsx("div",{className:"max-w-10xl mx-auto",children:d.jsxs(Qe,{className:"shadow-2xl border border-gray-800 bg-gray-900 overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(bn,{className:"border-b border-gray-800",children:[d.jsx(wn,{className:"text-xl font-serif text-white",children:"User Information"}),d.jsx(ts,{className:"text-gray-400",children:"Please fill in all required fields"})]}),d.jsxs("form",{onSubmit:g,children:[d.jsx(Je,{className:"space-y-6 p-6",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"name",className:"text-gray-300",children:["Full Name ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"name",name:"name",placeholder:"Enter full name",value:a.name,onChange:f,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${l.name?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),p("name")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:p("name")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"email",className:"text-gray-300",children:["Email Address ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"email",name:"email",type:"email",placeholder:"Enter email address",value:a.email,onChange:f,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${l.email?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),p("email")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:p("email")})]}),d.jsxs("div",{className:"border-t border-gray-800 pt-6",children:[d.jsx("h3",{className:"text-lg font-medium mb-4 text-white",children:"Security Information"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"current_password",className:"text-gray-300",children:["Current Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"current_password",name:"current_password",type:"password",placeholder:"Enter current password",value:a.current_password,onChange:f,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${l.current_password?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),p("current_password")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:p("current_password")})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx($t,{htmlFor:"password",className:"text-gray-300",children:"New Password"}),d.jsx(kt,{id:"password",name:"password",type:"password",placeholder:"Enter new password (optional)",value:a.password,onChange:f,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${l.password?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),p("password")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:p("password")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx($t,{htmlFor:"password_confirmation",className:"text-gray-300",children:"Confirm New Password"}),d.jsx(kt,{id:"password_confirmation",name:"password_confirmation",type:"password",placeholder:"Confirm new password",value:a.password_confirmation,onChange:f,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${l.password_confirmation?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),p("password_confirmation")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:p("password_confirmation")})]})]})]})]}),Object.keys(l).length>0&&d.jsxs("div",{className:"mt-6 p-4 bg-red-900/20 border border-red-500/30 rounded-lg",children:[d.jsx("h4",{className:"text-red-400 font-medium mb-2",children:"Please fix the following errors:"}),d.jsx("ul",{className:"text-sm text-red-300 space-y-1",children:Object.entries(l).map(([v,w])=>d.jsxs("li",{children:["• ",w]},v))})]})]})}),d.jsxs(Om,{className:"flex justify-end gap-3 pt-2 pb-6 px-6 border-t border-gray-800",children:[d.jsx(Te,{type:"button",variant:"outline",onClick:()=>e("/admin/settings"),disabled:t,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white bg-gray-900 shadow-lg",children:"Cancel"}),d.jsxs(Te,{type:"submit",disabled:t,className:"bg-[#9B2335] hover:bg-[#9B2335]/90 text-white shadow-lg",children:[d.jsx(ZS,{className:"mr-2 size-4"}),t?"Updating...":"Update User"]})]})]})]})})]})]})]})}function w1e(){const[e,t]=_.useState(!0),[r,n]=_.useState(!1),[i,a]=_.useState("profile"),[o,l]=_.useState({firstName:"Admin",lastName:"User",email:"admin@example.com",jobTitle:"Database Administrator",department:"IT",bio:"Experienced database administrator with a focus on migration data management.",avatar:""}),u=Hn(),f=()=>{localStorage.removeItem("adminToken"),localStorage.removeItem("adminNavigation"),u("/admin/login")};_.useEffect(()=>{if(!localStorage.getItem("adminToken")){u("/admin/login");return}if(localStorage.getItem("adminNavigation"))t(!1);else if(localStorage.setItem("adminNavigation","true"),e){const x=setTimeout(()=>{t(!1)},500);return()=>clearTimeout(x)}},[e,u]);const h=v=>{const{name:w,value:x}=v.target;l(b=>({...b,[w]:x}))},p=()=>{n(!0),setTimeout(()=>{n(!1)},500)},g=v=>{var x;const w=(x=v.target.files)==null?void 0:x[0];if(w){const b=new FileReader;b.onload=S=>{var A;(A=S.target)!=null&&A.result},b.readAsDataURL(w)}};return e?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#E8DCCA]/10",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"w-16 h-16 border-4 border-[#9B2335] border-t-transparent rounded-full animate-spin mx-auto"}),d.jsx("p",{className:"mt-4 text-gray-600",children:"Loading profile..."})]})}):d.jsxs("div",{className:"min-h-screen flex",children:[d.jsxs("div",{className:"w-64 bg-[#1A2A57] text-white",children:[d.jsxs("div",{className:"p-4 border-b border-[#1A2A57]/30",children:[d.jsx("h2",{className:"text-xl font-serif font-bold",children:"Italian Migrants"}),d.jsx("p",{className:"text-sm text-white/70",children:"Northern Territory DB"})]}),d.jsx("nav",{className:"mt-6 px-4",children:d.jsxs("div",{className:"space-y-1",children:[d.jsxs(ct,{to:"/admin",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(Pm,{className:"h-5 w-5 mr-3"}),"Dashboard"]}),d.jsxs(ct,{to:"/admin/migrants",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(gr,{className:"h-5 w-5 mr-3"}),"Migrants"]}),d.jsxs(ct,{to:"#",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(NL,{className:"h-5 w-5 mr-3"}),"Reports"]}),d.jsxs(ct,{to:"#",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(Am,{className:"h-5 w-5 mr-3"}),"Database"]}),d.jsxs(ct,{to:"/admin/settings/profile",className:"flex items-center px-4 py-3 text-white bg-[#1A2A57]/40 rounded-md",children:[d.jsx(w1,{className:"h-5 w-5 mr-3"}),"Settings"]})]})}),d.jsx("div",{className:"absolute bottom-0 w-64 p-4 border-t border-[#1A2A57]/30",children:d.jsxs("button",{onClick:f,className:"flex items-center w-full px-4 py-2 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx("div",{className:"h-8 w-8 rounded-full bg-white text-[#1A2A57] flex items-center justify-center mr-2",children:d.jsx(gr,{className:"h-5 w-5"})}),d.jsx("span",{className:"text-sm",children:"Admin User"})]})})]}),d.jsxs("div",{className:"flex-1 overflow-auto",children:[d.jsx("div",{className:"bg-white shadow-sm border-b border-gray-200",children:d.jsxs("div",{className:"flex justify-between items-center px-6 py-4",children:[d.jsx("h1",{className:"text-xl font-medium text-[#1A2A57]",children:"Admin Portal"}),d.jsx("div",{className:"text-sm text-gray-600",children:"Northern Territory"})]})}),d.jsx("div",{className:"p-6",children:d.jsxs(PS.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:[d.jsxs("div",{className:"flex justify-between items-center mb-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Settings"}),d.jsx("p",{className:"text-gray-600",children:"Manage your account preferences"})]}),d.jsx("button",{onClick:p,disabled:r,className:"px-4 py-2 bg-[#01796F] text-white rounded-md hover:bg-[#01796F]/90 flex items-center disabled:opacity-70",children:r?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2"}),"Saving..."]}):d.jsxs(d.Fragment,{children:[d.jsx(XS,{className:"h-4 w-4 mr-2"}),"Save Changes"]})})]}),d.jsxs("div",{className:"flex mb-6 border-b border-gray-200",children:[d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="profile"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("profile"),children:[d.jsx(gr,{className:"h-4 w-4 mr-2"}),"Profile"]}),d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="security"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("security"),children:[d.jsx(w1,{className:"h-4 w-4 mr-2"}),"Security"]}),d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="notifications"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("notifications"),children:[d.jsx(eW,{className:"h-4 w-4 mr-2"}),"Notifications"]})]}),i==="profile"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Profile Information"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Update your personal information and how it appears on your profile."}),d.jsxs("div",{className:"flex items-start mb-8",children:[d.jsxs("div",{className:"mr-6",children:[d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"h-24 w-24 rounded-full bg-gray-200 overflow-hidden",children:o.avatar?d.jsx("img",{src:o.avatar||"/assets/placeholder.png",alt:"Profile",className:"h-full w-full object-cover"}):d.jsx("div",{className:"h-full w-full flex items-center justify-center bg-gray-300",children:d.jsx(gr,{className:"h-12 w-12 text-gray-400"})})}),d.jsxs("label",{htmlFor:"avatar-upload",className:"absolute bottom-0 right-0 p-1 bg-[#9B2335] text-white rounded-full cursor-pointer",children:[d.jsx(rp,{className:"h-4 w-4"}),d.jsx("input",{id:"avatar-upload",type:"file",accept:"image/*",className:"hidden",onChange:g})]})]}),d.jsx("button",{className:"mt-2 text-sm text-[#1A2A57] hover:underline",children:"Change"})]}),d.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"firstName",className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name"}),d.jsx("input",{type:"text",id:"firstName",name:"firstName",value:o.firstName,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"lastName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name"}),d.jsx("input",{type:"text",id:"lastName",name:"lastName",value:o.lastName,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{className:"col-span-2",children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),d.jsx("input",{type:"email",id:"email",name:"email",value:o.email,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"jobTitle",className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title"}),d.jsx("input",{type:"text",id:"jobTitle",name:"jobTitle",value:o.jobTitle,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"department",className:"block text-sm font-medium text-gray-700 mb-1",children:"Department"}),d.jsx("input",{type:"text",id:"department",name:"department",value:o.department,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"bio",className:"block text-sm font-medium text-gray-700 mb-1",children:"Bio"}),d.jsx("textarea",{id:"bio",name:"bio",rows:4,value:o.bio,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]}),i==="security"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Security Settings"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Manage your password and account security preferences."}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"text-md font-medium mb-2",children:"Change Password"}),d.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"currentPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Current Password"}),d.jsx("input",{type:"password",id:"currentPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"newPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"New Password"}),d.jsx("input",{type:"password",id:"newPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm New Password"}),d.jsx("input",{type:"password",id:"confirmPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]}),d.jsx("button",{className:"mt-4 px-4 py-2 bg-[#1A2A57] text-white rounded-md hover:bg-[#1A2A57]/90",children:"Update Password"})]}),d.jsxs("div",{className:"pt-6 border-t border-gray-200",children:[d.jsx("h4",{className:"text-md font-medium mb-2",children:"Two-Factor Authentication"}),d.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Add an extra layer of security to your account by enabling two-factor authentication."}),d.jsx("button",{className:"px-4 py-2 bg-[#9B2335] text-white rounded-md hover:bg-[#9B2335]/90",children:"Enable 2FA"})]})]})]}),i==="notifications"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Notification Preferences"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Manage how and when you receive notifications."}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"text-md font-medium mb-4",children:"Email Notifications"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"System Updates"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails about system updates and maintenance"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"New Records"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails when new migrant records are added"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Security Alerts"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails about security-related events"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]})]})]}),d.jsxs("div",{className:"pt-6 border-t border-gray-200",children:[d.jsx("h4",{className:"text-md font-medium mb-4",children:"In-App Notifications"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Record Updates"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive notifications when records are updated"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"User Activity"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive notifications about other users' activity"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer"}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]})]})]})]})]})]})})]})]})}const _1e=()=>{const{occupationData:e,loading:t,error:r}=lj();if(t)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(Je,{className:"p-6 flex items-center justify-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})})]});if(r)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-red-500 to-red-600"}),d.jsx(Je,{className:"p-6 text-center",children:d.jsx("p",{className:"text-red-400",children:r})})]});if(!e.length)return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-gray-600 to-gray-700"}),d.jsx(Je,{className:"p-6 text-center",children:d.jsx("p",{className:"text-gray-400",children:"No data available"})})]});const n=[...e].sort((i,a)=>a.value-i.value).slice(0,10);return d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(bn,{className:"border-b border-gray-800",children:[d.jsx(wn,{className:"text-xl font-serif text-white",children:"Top 10 Occupations of Migrants"}),d.jsx(ts,{className:"text-gray-400",children:"The most common occupations among Italian migrants"})]}),d.jsx(Je,{className:"p-6",children:d.jsx(Tj,{width:"100%",height:400,children:d.jsxs(YF,{data:n,layout:"vertical",margin:{top:20,right:10,left:10,bottom:20},barCategoryGap:"20%",children:[d.jsx(pP,{strokeDasharray:"3 3",stroke:"#374151",vertical:!1}),d.jsx(Kf,{type:"number",tick:{fontSize:12,fill:"#9CA3AF"}}),d.jsx(Gf,{type:"category",dataKey:"occupation",tick:{fontSize:12,fill:"#9CA3AF"},width:140}),d.jsx(hn,{contentStyle:{backgroundColor:"#1F2937",borderRadius:"8px",color:"#fff",fontSize:"0.875rem",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",border:"1px solid #374151"},formatter:(i,a)=>[`${i} migrants`,a]}),d.jsx(Da,{verticalAlign:"top",align:"right",iconType:"circle",wrapperStyle:{fontSize:"0.875rem",color:"#9CA3AF",marginBottom:"1rem"}}),d.jsx(Ja,{dataKey:"value",fill:"url(#colorUv)",radius:[6,6,6,6],barSize:18}),d.jsx("defs",{children:d.jsxs("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"1",y2:"0",children:[d.jsx("stop",{offset:"0%",stopColor:"#9B2335",stopOpacity:.8}),d.jsx("stop",{offset:"100%",stopColor:"#DC2626",stopOpacity:.8})]})})]})})})]})};function S1e(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Reports"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white mb-2",children:"Data Reports"}),d.jsx("p",{className:"text-gray-400",children:"Generate and analyze reports from the Italian Migrants Database"})]}),d.jsx(sj,{defaultValue:"demographics",className:"space-y-6",children:d.jsxs(Oo,{value:"demographics",className:"space-y-6",children:[d.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[d.jsx(mP,{}),d.jsx(_1e,{})]}),d.jsxs(Qe,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(bn,{className:"border-b border-gray-800",children:[d.jsx(wn,{className:"text-xl font-serif text-white",children:"Family Status"}),d.jsx(ts,{className:"text-gray-400",children:"Family composition of Italian migrants"})]}),d.jsx(Je,{className:"p-6",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-[#9B2335]/20 border border-[#9B2335]/30 flex items-center justify-center mb-4",children:d.jsx(gr,{className:"size-8 text-[#9B2335]"})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"42%"}),d.jsx("p",{className:"text-gray-400",children:"Single"})]}),d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-blue-500/20 border border-blue-500/30 flex items-center justify-center mb-4",children:d.jsxs("div",{className:"flex -space-x-2",children:[d.jsx(gr,{className:"size-8 text-blue-400"}),d.jsx(gr,{className:"size-8 text-blue-300"})]})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"35%"}),d.jsx("p",{className:"text-gray-400",children:"Married"})]}),d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-orange-500/20 border border-orange-500/30 flex items-center justify-center mb-4",children:d.jsxs("div",{className:"flex -space-x-4",children:[d.jsx(gr,{className:"size-8 text-orange-400"}),d.jsx(gr,{className:"size-6 text-orange-300"}),d.jsx(gr,{className:"size-4 text-orange-200"})]})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"23%"}),d.jsx("p",{className:"text-gray-400",children:"Family"})]})]})})]})]})})]})]})]})}function j1e(){const e=Hn(),[t,r]=_.useState(!1),[n,i]=_.useState({name:"",email:"",password:"",password_confirmation:""}),[a,o]=_.useState({}),l=p=>{const{name:g,value:v}=p.target;i(w=>({...w,[g]:v})),a[g]&&o(w=>{const x={...w};return delete x[g],x})},u=()=>{try{return y1e.parse(n),o({}),!0}catch(p){if(p instanceof en){const g={};return p.errors.forEach(v=>{const w=v.path.join(".");g[w]=v.message}),o(g),!1}return!1}},f=p=>a[p]||null,h=async p=>{if(p.preventDefault(),!u()){const g=Object.values(a)[0];g&&Nt.error(g);return}try{r(!0),await ht.createUser(n),Nt.success("User created successfully!"),e("/admin/settings")}catch(g){console.error("Error creating user:",g),Nt.error("Failed to create user. Please try again.")}finally{r(!1)}};return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Vi,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(zi,{title:"Create User"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white",children:"Create New User"})}),d.jsx("p",{className:"text-gray-400 mt-2",children:"Add a new administrator to the system"})]}),d.jsx("div",{className:"max-w-10xl mx-auto",children:d.jsxs(Qe,{className:"shadow-2xl border border-gray-800 bg-gray-900 overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(bn,{className:"border-b border-gray-800",children:[d.jsx(wn,{className:"text-xl font-serif text-white",children:"User Information"}),d.jsx(ts,{className:"text-gray-400",children:"Please fill in all required fields"})]}),d.jsxs("form",{onSubmit:h,children:[d.jsxs(Je,{className:"space-y-6 p-6",children:[d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"name",className:"text-gray-300",children:["Full Name ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"name",name:"name",placeholder:"Enter full name",value:n.name,onChange:l,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${a.name?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),f("name")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:f("name")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"email",className:"text-gray-300",children:["Email Address ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"email",name:"email",type:"email",placeholder:"Enter email address",value:n.email,onChange:l,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${a.email?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),f("email")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:f("email")})]}),d.jsxs("div",{className:"border-t border-gray-800 pt-6",children:[d.jsx("h3",{className:"text-lg font-medium mb-4 text-white",children:"Security Information"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"password",className:"text-gray-300",children:["Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"password",name:"password",type:"password",placeholder:"Enter password",value:n.password,onChange:l,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${a.password?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),f("password")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:f("password")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs($t,{htmlFor:"password_confirmation",className:"text-gray-300",children:["Confirm Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(kt,{id:"password_confirmation",name:"password_confirmation",type:"password",placeholder:"Confirm password",value:n.password_confirmation,onChange:l,required:!0,className:`bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500 ${a.password_confirmation?"border-red-500 focus:border-red-500 focus:ring-red-500":""}`}),f("password_confirmation")&&d.jsx("p",{className:"text-red-400 text-sm mt-1",children:f("password_confirmation")})]})]})]})]}),Object.keys(a).length>0&&d.jsxs("div",{className:"mt-6 p-4 bg-red-900/20 border border-red-500/30 rounded-lg",children:[d.jsx("h4",{className:"text-red-400 font-medium mb-2",children:"Please fix the following errors:"}),d.jsx("ul",{className:"text-sm text-red-300 space-y-1",children:Object.entries(a).map(([p,g])=>d.jsxs("li",{children:["• ",g]},p))})]})]}),d.jsxs(Om,{className:"flex justify-end gap-3 pt-2 pb-6 px-6 border-t border-gray-800",children:[d.jsx(Te,{type:"button",variant:"outline",onClick:()=>e("/admin/settings"),disabled:t,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white bg-gray-900 shadow-lg",children:"Cancel"}),d.jsxs(Te,{type:"submit",disabled:t,className:"bg-[#9B2335] hover:bg-[#9B2335]/90 text-white shadow-lg",children:[d.jsx(ZS,{className:"mr-2 size-4"}),t?"Creating...":"Create User"]})]})]})]})})]})]})]})}const P1e=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t};function A1e(e=10){const[t]=Xq(),[r,n]=_.useState([]),[i,a]=_.useState(!1),[o,l]=_.useState(null),[u,f]=_.useState(1),[h,p]=_.useState({currentPage:1,totalPages:1,totalItems:0}),g=t.toString().length>0,v=async S=>{if(S.person_id===void 0)return console.warn("Missing person_id for migrant",S),{...S,photos:[],profilePhoto:null};try{const A=await ht.getMigrantById(S.person_id);if(Array.isArray(A==null?void 0:A.photos))return{...S,photos:A.photos,profilePhoto:A.photos.find(C=>C.is_profile_photo)||null};const P=await ht.getPhotos(S.person_id);return{...S,photos:P,profilePhoto:P.find(C=>C.is_profile_photo)||null}}catch(A){return console.error(`Failed to fetch photos for person ${S.person_id}`,A),{...S,photos:[],profilePhoto:null}}},w=_.useCallback(async()=>{a(!0),l(null);try{const S=P1e(t),A=await ht.getMigrants(u,e,S),P=A.data||[],C=await Promise.all(P.map(N=>v(N)));n(C),p({currentPage:A.current_page??1,totalPages:A.last_page??1,totalItems:A.total??0})}catch(S){console.error("Failed to fetch migrants",S),l("Failed to fetch migrants data.")}finally{a(!1)}},[t,u,e]);return _.useEffect(()=>{w()},[w]),{migrants:r,loading:i,error:o,pagination:h,hasActiveFilters:g,handleNextPage:()=>{h.currentPage<h.totalPages&&f(S=>S+1)},handlePrevPage:()=>{h.currentPage>1&&f(S=>S-1)}}}function N1e(){const{migrants:e,loading:t,error:r,pagination:n,hasActiveFilters:i,handleNextPage:a,handlePrevPage:o}=A1e(10),l="https://migrants.staging.anss.au";return d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"border-b",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(ct,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-[#9B2335]",children:"Italian Migrants NT"})}),d.jsx("nav",{className:"hidden md:flex gap-6",children:["home","about","search","stories","contact"].map(u=>d.jsx(ct,{to:"/",className:"text-sm font-medium hover:underline underline-offset-4 capitalize",children:u},u))})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"w-full py-12 md:py-16 lg:py-20 bg-[#E8DCCA]",children:d.jsxs("div",{className:"container px-4 md:px-6 text-center space-y-4",children:[d.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-serif font-bold tracking-tighter text-[#9B2335]",children:"Search Results"}),d.jsx("p",{className:"max-w-[700px] mx-auto text-muted-foreground md:text-xl/relaxed",children:"Displaying results based on your search criteria."})]})}),d.jsx("section",{className:"w-full py-8 md:py-12",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[r&&d.jsx("div",{className:"p-3 bg-red-100 text-red-700 rounded mb-6",children:r}),t?d.jsx("div",{className:"flex justify-center my-8",children:d.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-blue-500"})}):d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.length>0?e.map(u=>d.jsxs(Qe,{className:"overflow-hidden pt-0",children:[d.jsx("div",{className:"aspect-square overflow-hidden",children:d.jsx("img",{src:u.profilePhoto?`${l}${u.profilePhoto.file_path}`:"/assets/placeholder.png",alt:u.full_name||"Unknown",className:"w-full h-full object-cover object-center transition-transform hover:scale-105"})}),d.jsx(bn,{children:d.jsx(wn,{className:"font-serif text-[#9B2335]",children:u.full_name||"Unknown"})}),d.jsxs(Je,{className:"text-sm space-y-2",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"font-medium",children:"Date of Birth:"}),d.jsx("span",{children:Ri(u.date_of_birth)||"Unknown"})]}),u.place_of_birth&&d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"font-medium",children:"Place of Birth:"}),d.jsx("span",{children:Ri(u.place_of_birth)||"Unknown"})]})]}),d.jsx(Om,{children:d.jsx(Te,{asChild:!0,className:"w-full bg-[#01796F] hover:bg-[#015a54] text-white",children:d.jsx(ct,{to:`/migrant-profile/${u.person_id}`,children:"View Profile"})})})]},u.person_id)):d.jsx("div",{className:"col-span-3 text-center p-8 bg-gray-50 rounded-lg",children:d.jsx("p",{className:"text-gray-500",children:i?"No migrants found matching your search criteria.":"No migrants found."})})}),e.length>0&&d.jsxs("div",{className:"flex justify-between items-center mt-8",children:[d.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",d.jsx("span",{className:"font-medium",children:e.length})," of"," ",d.jsx("span",{className:"font-medium",children:n.totalItems})," results",i&&d.jsxs("span",{children:[" • Page ",n.currentPage," of ",n.totalPages]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Te,{variant:"outline",onClick:o,disabled:n.currentPage===1,children:"Previous"}),d.jsx(Te,{variant:"outline",onClick:a,children:"Next"})]})]})]})})]}),d.jsx("footer",{className:"border-t bg-[#1A2A57] text-white",children:d.jsxs("div",{className:"container flex flex-col sm:flex-row items-center justify-between px-4 md:px-6 py-4 gap-2",children:[d.jsxs("p",{className:"text-xs",children:["© ",new Date().getFullYear()," Italian Migrants NT. All rights reserved."]}),d.jsxs("nav",{className:"flex gap-4 sm:gap-6 text-xs",children:[d.jsx(ct,{to:"/terms",className:"hover:underline underline-offset-4",children:"Terms"}),d.jsx(ct,{to:"/privacy",className:"hover:underline underline-offset-4",children:"Privacy"}),d.jsx(ct,{to:"/admin",className:"hover:underline underline-offset-4",children:"Admin"})]})]})})]})}function Ti({children:e}){const[t,r]=_.useState({isAuthenticated:!1,isLoading:!0,user:null});return _.useEffect(()=>{(async()=>{try{if(!localStorage.getItem("token"))return r({isAuthenticated:!1,isLoading:!1,user:null});const a=await ht.fetchCurrentUser();r({isAuthenticated:!0,isLoading:!1,user:a})}catch{localStorage.removeItem("token"),localStorage.removeItem("user"),r({isAuthenticated:!1,isLoading:!1,user:null})}})()},[]),t.isLoading?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#9B2335] mx-auto mb-4"}),d.jsx("p",{className:"text-gray-600",children:"Verifying authentication..."})]})}):t.isAuthenticated?d.jsx(d.Fragment,{children:e}):d.jsx(fL,{to:"/login",replace:!0})}function O1e({children:e}){const[t,r]=_.useState(null);return _.useEffect(()=>{(async()=>{try{if(!localStorage.getItem("token"))return r(!1);await ht.fetchCurrentUser(),r(!0)}catch{localStorage.removeItem("token"),localStorage.removeItem("user"),r(!1)}})()},[]),t===null?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})}):t?d.jsx(fL,{to:"/admin",replace:!0}):d.jsx(d.Fragment,{children:e})}function E1e(){return d.jsxs(Wq,{children:[d.jsx(H7,{position:"top-right",reverseOrder:!1}),d.jsxs(bq,{children:[d.jsx(sr,{path:"/",element:d.jsx(NG,{})}),d.jsx(sr,{path:"/migrant-profile/:id",element:d.jsx(nY,{})}),d.jsx(sr,{path:"/search-results",element:d.jsx(N1e,{})}),d.jsx(sr,{path:"/migration-chart",element:d.jsx(hV,{})}),d.jsx(sr,{path:"/residence-chart",element:d.jsx(mP,{})}),d.jsx(sr,{path:"/login",element:d.jsx(O1e,{children:d.jsx(iY,{})})}),d.jsx(sr,{path:"/admin",element:d.jsx(Ti,{children:d.jsx(Zxe,{})})}),d.jsx(sr,{path:"/admin/migrants",element:d.jsx(Ti,{children:d.jsx(dwe,{})})}),d.jsx(sr,{path:"/admin/migrants/add",element:d.jsx(Ti,{children:d.jsx(g1e,{})})}),d.jsx(sr,{path:"/admin/migrants/edit/:id",element:d.jsx(Ti,{children:d.jsx(v1e,{})})}),d.jsx(sr,{path:"/admin/settings",element:d.jsx(Ti,{children:d.jsx(b1e,{})})}),d.jsx(sr,{path:"/admin/settings/profile",element:d.jsx(Ti,{children:d.jsx(w1e,{})})}),d.jsx(sr,{path:"/admin/reports",element:d.jsx(Ti,{children:d.jsx(S1e,{})})}),d.jsx(sr,{path:"/admin/users/create",element:d.jsx(Ti,{children:d.jsx(j1e,{})})}),d.jsx(sr,{path:"/sample",element:d.jsx(Ti,{children:d.jsx(s9,{})})}),d.jsx(sr,{path:"*",element:d.jsx(OG,{})})]})]})}EU.createRoot(document.getElementById("root")).render(d.jsx(_.StrictMode,{children:d.jsx(E1e,{})}));