78b57273e2
- Add password hashing with bcrypt - Add AuthService with proper login - Add password strength validation - Add RBAC middleware (AdminOnly, ManagerOrAdmin) - Add tenant isolation middleware - Update CRM handler with tenant filtering - Add JWT fallback for development mode - Add user context helpers - Build successful
759 lines
1.1 MiB
Plaintext
759 lines
1.1 MiB
Plaintext
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var kf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uy={exports:{}},Mc={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var jO;function IB(){if(jO)return Mc;jO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:r,key:c,ref:i!==void 0?i:null,props:l}}return Mc.Fragment=t,Mc.jsx=n,Mc.jsxs=n,Mc}var wO;function qB(){return wO||(wO=1,Uy.exports=IB()),Uy.exports}var s=qB(),Vy={exports:{}},ke={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var SO;function UB(){if(SO)return ke;SO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function j(q){return q===null||typeof q!="object"?null:(q=y&&q[y]||q["@@iterator"],typeof q=="function"?q:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,v={};function A(q,Y,ae){this.props=q,this.context=Y,this.refs=v,this.updater=ae||w}A.prototype.isReactComponent={},A.prototype.setState=function(q,Y){if(typeof q!="object"&&typeof q!="function"&&q!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,q,Y,"setState")},A.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function O(){}O.prototype=A.prototype;function _(q,Y,ae){this.props=q,this.context=Y,this.refs=v,this.updater=ae||w}var T=_.prototype=new O;T.constructor=_,S(T,A.prototype),T.isPureReactComponent=!0;var N=Array.isArray;function E(){}var k={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function B(q,Y,ae){var fe=ae.ref;return{$$typeof:e,type:q,key:Y,ref:fe!==void 0?fe:null,props:ae}}function D(q,Y){return B(q.type,Y,q.props)}function z(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function $(q){var Y={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(ae){return Y[ae]})}var L=/\/+/g;function K(q,Y){return typeof q=="object"&&q!==null&&q.key!=null?$(""+q.key):Y.toString(36)}function H(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(E,E):(q.status="pending",q.then(function(Y){q.status==="pending"&&(q.status="fulfilled",q.value=Y)},function(Y){q.status==="pending"&&(q.status="rejected",q.reason=Y)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function I(q,Y,ae,fe,ye){var we=typeof q;(we==="undefined"||we==="boolean")&&(q=null);var Ie=!1;if(q===null)Ie=!0;else switch(we){case"bigint":case"string":case"number":Ie=!0;break;case"object":switch(q.$$typeof){case e:case t:Ie=!0;break;case p:return Ie=q._init,I(Ie(q._payload),Y,ae,fe,ye)}}if(Ie)return ye=ye(q),Ie=fe===""?"."+K(q,0):fe,N(ye)?(ae="",Ie!=null&&(ae=Ie.replace(L,"$&/")+"/"),I(ye,Y,ae,"",function(Oe){return Oe})):ye!=null&&(z(ye)&&(ye=D(ye,ae+(ye.key==null||q&&q.key===ye.key?"":(""+ye.key).replace(L,"$&/")+"/")+Ie)),Y.push(ye)),1;Ie=0;var et=fe===""?".":fe+":";if(N(q))for(var de=0;de<q.length;de++)fe=q[de],we=et+K(fe,de),Ie+=I(fe,Y,ae,we,ye);else if(de=j(q),typeof de=="function")for(q=de.call(q),de=0;!(fe=q.next()).done;)fe=fe.value,we=et+K(fe,de++),Ie+=I(fe,Y,ae,we,ye);else if(we==="object"){if(typeof q.then=="function")return I(H(q),Y,ae,fe,ye);throw Y=String(q),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ie}function F(q,Y,ae){if(q==null)return q;var fe=[],ye=0;return I(q,fe,"","",function(we){return Y.call(ae,we,ye++)}),fe}function Z(q){if(q._status===-1){var Y=q._result;Y=Y(),Y.then(function(ae){(q._status===0||q._status===-1)&&(q._status=1,q._result=ae)},function(ae){(q._status===0||q._status===-1)&&(q._status=2,q._result=ae)}),q._status===-1&&(q._status=0,q._result=Y)}if(q._status===1)return q._result.default;throw q._result}var ie=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},ce={map:F,forEach:function(q,Y,ae){F(q,function(){Y.apply(this,arguments)},ae)},count:function(q){var Y=0;return F(q,function(){Y++}),Y},toArray:function(q){return F(q,function(Y){return Y})||[]},only:function(q){if(!z(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return ke.Activity=x,ke.Children=ce,ke.Component=A,ke.Fragment=n,ke.Profiler=i,ke.PureComponent=_,ke.StrictMode=r,ke.Suspense=f,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,ke.__COMPILER_RUNTIME={__proto__:null,c:function(q){return k.H.useMemoCache(q)}},ke.cache=function(q){return function(){return q.apply(null,arguments)}},ke.cacheSignal=function(){return null},ke.cloneElement=function(q,Y,ae){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var fe=S({},q.props),ye=q.key;if(Y!=null)for(we in Y.key!==void 0&&(ye=""+Y.key),Y)!R.call(Y,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&Y.ref===void 0||(fe[we]=Y[we]);var we=arguments.length-2;if(we===1)fe.children=ae;else if(1<we){for(var Ie=Array(we),et=0;et<we;et++)Ie[et]=arguments[et+2];fe.children=Ie}return B(q.type,ye,fe)},ke.createContext=function(q){return q={$$typeof:c,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:l,_context:q},q},ke.createElement=function(q,Y,ae){var fe,ye={},we=null;if(Y!=null)for(fe in Y.key!==void 0&&(we=""+Y.key),Y)R.call(Y,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ye[fe]=Y[fe]);var Ie=arguments.length-2;if(Ie===1)ye.children=ae;else if(1<Ie){for(var et=Array(Ie),de=0;de<Ie;de++)et[de]=arguments[de+2];ye.children=et}if(q&&q.defaultProps)for(fe in Ie=q.defaultProps,Ie)ye[fe]===void 0&&(ye[fe]=Ie[fe]);return B(q,we,ye)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(q){return{$$typeof:d,render:q}},ke.isValidElement=z,ke.lazy=function(q){return{$$typeof:p,_payload:{_status:-1,_result:q},_init:Z}},ke.memo=function(q,Y){return{$$typeof:h,type:q,compare:Y===void 0?null:Y}},ke.startTransition=function(q){var Y=k.T,ae={};k.T=ae;try{var fe=q(),ye=k.S;ye!==null&&ye(ae,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(E,ie)}catch(we){ie(we)}finally{Y!==null&&ae.types!==null&&(Y.types=ae.types),k.T=Y}},ke.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},ke.use=function(q){return k.H.use(q)},ke.useActionState=function(q,Y,ae){return k.H.useActionState(q,Y,ae)},ke.useCallback=function(q,Y){return k.H.useCallback(q,Y)},ke.useContext=function(q){return k.H.useContext(q)},ke.useDebugValue=function(){},ke.useDeferredValue=function(q,Y){return k.H.useDeferredValue(q,Y)},ke.useEffect=function(q,Y){return k.H.useEffect(q,Y)},ke.useEffectEvent=function(q){return k.H.useEffectEvent(q)},ke.useId=function(){return k.H.useId()},ke.useImperativeHandle=function(q,Y,ae){return k.H.useImperativeHandle(q,Y,ae)},ke.useInsertionEffect=function(q,Y){return k.H.useInsertionEffect(q,Y)},ke.useLayoutEffect=function(q,Y){return k.H.useLayoutEffect(q,Y)},ke.useMemo=function(q,Y){return k.H.useMemo(q,Y)},ke.useOptimistic=function(q,Y){return k.H.useOptimistic(q,Y)},ke.useReducer=function(q,Y,ae){return k.H.useReducer(q,Y,ae)},ke.useRef=function(q){return k.H.useRef(q)},ke.useState=function(q){return k.H.useState(q)},ke.useSyncExternalStore=function(q,Y,ae){return k.H.useSyncExternalStore(q,Y,ae)},ke.useTransition=function(){return k.H.useTransition()},ke.version="19.2.7",ke}var NO;function Nw(){return NO||(NO=1,Vy.exports=UB()),Vy.exports}var M=Nw();const V=st(M);var Hy={exports:{}},kc={},Fy={exports:{}},Gy={};/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var AO;function VB(){return AO||(AO=1,(function(e){function t(I,F){var Z=I.length;I.push(F);e:for(;0<Z;){var ie=Z-1>>>1,ce=I[ie];if(0<i(ce,F))I[ie]=F,I[Z]=ce,Z=ie;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var F=I[0],Z=I.pop();if(Z!==F){I[0]=Z;e:for(var ie=0,ce=I.length,q=ce>>>1;ie<q;){var Y=2*(ie+1)-1,ae=I[Y],fe=Y+1,ye=I[fe];if(0>i(ae,Z))fe<ce&&0>i(ye,ae)?(I[ie]=ye,I[fe]=Z,ie=fe):(I[ie]=ae,I[Y]=Z,ie=Y);else if(fe<ce&&0>i(ye,Z))I[ie]=ye,I[fe]=Z,ie=fe;else break e}}return F}function i(I,F){var Z=I.sortIndex-F.sortIndex;return Z!==0?Z:I.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],p=1,x=null,y=3,j=!1,w=!1,S=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function T(I){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=I)r(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function N(I){if(S=!1,T(I),!w)if(n(f)!==null)w=!0,E||(E=!0,$());else{var F=n(h);F!==null&&H(N,F.startTime-I)}}var E=!1,k=-1,R=5,B=-1;function D(){return v?!0:!(e.unstable_now()-B<R)}function z(){if(v=!1,E){var I=e.unstable_now();B=I;var F=!0;try{e:{w=!1,S&&(S=!1,O(k),k=-1),j=!0;var Z=y;try{t:{for(T(I),x=n(f);x!==null&&!(x.expirationTime>I&&D());){var ie=x.callback;if(typeof ie=="function"){x.callback=null,y=x.priorityLevel;var ce=ie(x.expirationTime<=I);if(I=e.unstable_now(),typeof ce=="function"){x.callback=ce,T(I),F=!0;break t}x===n(f)&&r(f),T(I)}else r(f);x=n(f)}if(x!==null)F=!0;else{var q=n(h);q!==null&&H(N,q.startTime-I),F=!1}}break e}finally{x=null,y=Z,j=!1}F=void 0}}finally{F?$():E=!1}}}var $;if(typeof _=="function")$=function(){_(z)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,K=L.port2;L.port1.onmessage=z,$=function(){K.postMessage(null)}}else $=function(){A(z,0)};function H(I,F){k=A(function(){I(e.unstable_now())},F)}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_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"):R=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(I){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var Z=y;y=F;try{return I()}finally{y=Z}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Z=y;y=I;try{return F()}finally{y=Z}},e.unstable_scheduleCallback=function(I,F,Z){var ie=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ie+Z:ie):Z=ie,I){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=Z+ce,I={id:p++,callback:F,priorityLevel:I,startTime:Z,expirationTime:ce,sortIndex:-1},Z>ie?(I.sortIndex=Z,t(h,I),n(f)===null&&I===n(h)&&(S?(O(k),k=-1):S=!0,H(N,Z-ie))):(I.sortIndex=ce,t(f,I),w||j||(w=!0,E||(E=!0,$()))),I},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(I){var F=y;return function(){var Z=y;y=F;try{return I.apply(this,arguments)}finally{y=Z}}}})(Gy)),Gy}var _O;function HB(){return _O||(_O=1,Fy.exports=VB()),Fy.exports}var Ky={exports:{}},pn={};/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var OO;function FB(){if(OO)return pn;OO=1;var e=Nw();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:f,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pn.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},pn.flushSync=function(f){var h=c.T,p=r.p;try{if(c.T=null,r.p=2,f)return f()}finally{c.T=h,r.p=p,r.d.f()}},pn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},pn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},pn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,j=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:j}):p==="script"&&r.d.X(f,{crossOrigin:x,integrity:y,fetchPriority:j,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},pn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},pn.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=d(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},pn.requestFormReset=function(f){r.d.r(f)},pn.unstable_batchedUpdates=function(f,h){return f(h)},pn.useFormState=function(f,h,p){return c.H.useFormState(f,h,p)},pn.useFormStatus=function(){return c.H.useHostTransitionStatus()},pn.version="19.2.7",pn}var TO;function GB(){if(TO)return Ky.exports;TO=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(),Ky.exports=FB(),Ky.exports}/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var EO;function KB(){if(EO)return kc;EO=1;var e=HB(),t=Nw(),n=GB();function r(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var o=a,u=a;if(a.alternate)for(;o.return;)o=o.return;else{a=o;do o=a,(o.flags&4098)!==0&&(u=o.return),a=o.return;while(a)}return o.tag===3?u:null}function c(a){if(a.tag===13){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function d(a){if(a.tag===31){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(r(188))}function h(a){var o=a.alternate;if(!o){if(o=l(a),o===null)throw Error(r(188));return o!==a?null:a}for(var u=a,m=o;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(m=g.return,m!==null){u=m;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===m)return f(g),o;b=b.sibling}throw Error(r(188))}if(u.return!==m.return)u=g,m=b;else{for(var C=!1,P=g.child;P;){if(P===u){C=!0,u=g,m=b;break}if(P===m){C=!0,m=g,u=b;break}P=P.sibling}if(!C){for(P=b.child;P;){if(P===u){C=!0,u=b,m=g;break}if(P===m){C=!0,m=b,u=g;break}P=P.sibling}if(!C)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:o}function p(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a;for(a=a.child;a!==null;){if(o=p(a),o!==null)return o;a=a.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=z&&a[z]||a["@@iterator"],typeof a=="function"?a:null)}var L=Symbol.for("react.client.reference");function K(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===L?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case A:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case E:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case _:return a.displayName||"Context";case O:return(a._context.displayName||"Context")+".Consumer";case T:var o=a.render;return a=a.displayName,a||(a=o.displayName||o.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return o=a.displayName||null,o!==null?o:K(a.type)||"Memo";case R:o=a._payload,a=a._init;try{return K(a(o))}catch{}}return null}var H=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ie=[],ce=-1;function q(a){return{current:a}}function Y(a){0>ce||(a.current=ie[ce],ie[ce]=null,ce--)}function ae(a,o){ce++,ie[ce]=a.current,a.current=o}var fe=q(null),ye=q(null),we=q(null),Ie=q(null);function et(a,o){switch(ae(we,o),ae(ye,a),ae(fe,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?H_(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=H_(o),a=F_(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Y(fe),ae(fe,a)}function de(){Y(fe),Y(ye),Y(we)}function Oe(a){a.memoizedState!==null&&ae(Ie,a);var o=fe.current,u=F_(o,a.type);o!==u&&(ae(ye,a),ae(fe,u))}function Me(a){ye.current===a&&(Y(fe),Y(ye)),Ie.current===a&&(Y(Ie),Oc._currentValue=Z)}var ue,gt;function Le(a){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",gt=-1<u.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+ue+a+gt}var Tt=!1;function Et(a,o){if(!a||Tt)return"";Tt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(o){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var J=ee}Reflect.construct(a,[],oe)}else{try{oe.call()}catch(ee){J=ee}a.call(oe.prototype)}}else{try{throw Error()}catch(ee){J=ee}(oe=a())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ee){if(ee&&J&&typeof ee.stack=="string")return[ee.stack,J.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=m.DetermineComponentFrameRoot(),C=b[0],P=b[1];if(C&&P){var U=C.split(`
|
||
`),Q=P.split(`
|
||
`);for(g=m=0;m<U.length&&!U[m].includes("DetermineComponentFrameRoot");)m++;for(;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;if(m===U.length||g===Q.length)for(m=U.length-1,g=Q.length-1;1<=m&&0<=g&&U[m]!==Q[g];)g--;for(;1<=m&&0<=g;m--,g--)if(U[m]!==Q[g]){if(m!==1||g!==1)do if(m--,g--,0>g||U[m]!==Q[g]){var ne=`
|
||
`+U[m].replace(" at new "," at ");return a.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",a.displayName)),ne}while(1<=m&&0<=g);break}}}finally{Tt=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Le(u):""}function hn(a,o){switch(a.tag){case 26:case 27:case 5:return Le(a.type);case 16:return Le("Lazy");case 13:return a.child!==o&&o!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Et(a.type,!1);case 11:return Et(a.type.render,!1);case 1:return Et(a.type,!0);case 31:return Le("Activity");default:return""}}function Nr(a){try{var o="",u=null;do o+=hn(a,u),u=a,a=a.return;while(a);return o}catch(m){return`
|
||
Error generating stack: `+m.message+`
|
||
`+m.stack}}var Ur=Object.prototype.hasOwnProperty,Wa=e.unstable_scheduleCallback,Ar=e.unstable_cancelCallback,oa=e.unstable_shouldYield,$l=e.unstable_requestPaint,mn=e.unstable_now,hd=e.unstable_getCurrentPriorityLevel,w2=e.unstable_ImmediatePriority,S2=e.unstable_UserBlockingPriority,md=e.unstable_NormalPriority,j8=e.unstable_LowPriority,N2=e.unstable_IdlePriority,w8=e.log,S8=e.unstable_setDisableYieldValue,Bl=null,zn=null;function Za(a){if(typeof w8=="function"&&S8(a),zn&&typeof zn.setStrictMode=="function")try{zn.setStrictMode(Bl,a)}catch{}}var Ln=Math.clz32?Math.clz32:_8,N8=Math.log,A8=Math.LN2;function _8(a){return a>>>=0,a===0?32:31-(N8(a)/A8|0)|0}var pd=256,xd=262144,yd=4194304;function Hi(a){var o=a&42;if(o!==0)return o;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function gd(a,o,u){var m=a.pendingLanes;if(m===0)return 0;var g=0,b=a.suspendedLanes,C=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~b,m!==0?g=Hi(m):(C&=P,C!==0?g=Hi(C):u||(u=P&~a,u!==0&&(g=Hi(u))))):(P=m&~b,P!==0?g=Hi(P):C!==0?g=Hi(C):u||(u=m&~a,u!==0&&(g=Hi(u)))),g===0?0:o!==0&&o!==g&&(o&b)===0&&(b=g&-g,u=o&-o,b>=u||b===32&&(u&4194048)!==0)?o:g}function Il(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function O8(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function A2(){var a=yd;return yd<<=1,(yd&62914560)===0&&(yd=4194304),a}function Cp(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function ql(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function T8(a,o,u,m,g,b){var C=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var P=a.entanglements,U=a.expirationTimes,Q=a.hiddenUpdates;for(u=C&~u;0<u;){var ne=31-Ln(u),oe=1<<ne;P[ne]=0,U[ne]=-1;var J=Q[ne];if(J!==null)for(Q[ne]=null,ne=0;ne<J.length;ne++){var ee=J[ne];ee!==null&&(ee.lane&=-536870913)}u&=~oe}m!==0&&_2(a,m,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(C&~o))}function _2(a,o,u){a.pendingLanes|=o,a.suspendedLanes&=~o;var m=31-Ln(o);a.entangledLanes|=o,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function O2(a,o){var u=a.entangledLanes|=o;for(a=a.entanglements;u;){var m=31-Ln(u),g=1<<m;g&o|a[m]&o&&(a[m]|=o),u&=~g}}function T2(a,o){var u=o&-o;return u=(u&42)!==0?1:Mp(u),(u&(a.suspendedLanes|o))!==0?0:u}function Mp(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function kp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function E2(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:mO(a.type))}function C2(a,o){var u=F.p;try{return F.p=a,o()}finally{F.p=u}}var Qa=Math.random().toString(36).slice(2),nn="__reactFiber$"+Qa,On="__reactProps$"+Qa,qs="__reactContainer$"+Qa,Pp="__reactEvents$"+Qa,E8="__reactListeners$"+Qa,C8="__reactHandles$"+Qa,M2="__reactResources$"+Qa,Ul="__reactMarker$"+Qa;function Rp(a){delete a[nn],delete a[On],delete a[Pp],delete a[E8],delete a[C8]}function Us(a){var o=a[nn];if(o)return o;for(var u=a.parentNode;u;){if(o=u[qs]||u[nn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(a=Q_(a);a!==null;){if(u=a[nn])return u;a=Q_(a)}return o}a=u,u=a.parentNode}return null}function Vs(a){if(a=a[nn]||a[qs]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function Vl(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function Hs(a){var o=a[M2];return o||(o=a[M2]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Zt(a){a[Ul]=!0}var k2=new Set,P2={};function Fi(a,o){Fs(a,o),Fs(a+"Capture",o)}function Fs(a,o){for(P2[a]=o,a=0;a<o.length;a++)k2.add(o[a])}var M8=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),R2={},D2={};function k8(a){return Ur.call(D2,a)?!0:Ur.call(R2,a)?!1:M8.test(a)?D2[a]=!0:(R2[a]=!0,!1)}function vd(a,o,u){if(k8(o))if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var m=o.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+u)}}function bd(a,o,u){if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+u)}}function la(a,o,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(o,u,""+m)}}function er(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function z2(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function P8(a,o,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var g=m.get,b=m.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return g.call(this)},set:function(C){u=""+C,b.call(this,C)}}),Object.defineProperty(a,o,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(C){u=""+C},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function Dp(a){if(!a._valueTracker){var o=z2(a)?"checked":"value";a._valueTracker=P8(a,o,""+a[o])}}function L2(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var u=o.getValue(),m="";return a&&(m=z2(a)?a.checked?"true":"false":a.value),a=m,a!==u?(o.setValue(a),!0):!1}function jd(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var R8=/[\n"\\]/g;function tr(a){return a.replace(R8,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function zp(a,o,u,m,g,b,C,P){a.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.type=C:a.removeAttribute("type"),o!=null?C==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+er(o)):a.value!==""+er(o)&&(a.value=""+er(o)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),o!=null?Lp(a,C,er(o)):u!=null?Lp(a,C,er(u)):m!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+er(P):a.removeAttribute("name")}function $2(a,o,u,m,g,b,C,P){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),o!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||o!=null)){Dp(a);return}u=u!=null?""+er(u):"",o=o!=null?""+er(o):u,P||o===a.value||(a.value=o),a.defaultValue=o}m=m??g,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(a.name=C),Dp(a)}function Lp(a,o,u){o==="number"&&jd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Gs(a,o,u,m){if(a=a.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=o.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&m&&(a[u].defaultSelected=!0)}else{for(u=""+er(u),o=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,m&&(a[g].defaultSelected=!0);return}o!==null||a[g].disabled||(o=a[g])}o!==null&&(o.selected=!0)}}function B2(a,o,u){if(o!=null&&(o=""+er(o),o!==a.value&&(a.value=o),u==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=u!=null?""+er(u):""}function I2(a,o,u,m){if(o==null){if(m!=null){if(u!=null)throw Error(r(92));if(H(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),o=u}u=er(o),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Dp(a)}function Ks(a,o){if(o){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=o;return}}a.textContent=o}var D8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function q2(a,o,u){var m=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":m?a.setProperty(o,u):typeof u!="number"||u===0||D8.has(o)?o==="float"?a.cssFloat=u:a[o]=(""+u).trim():a[o]=u+"px"}function U2(a,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||o!=null&&o.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var g in o)m=o[g],o.hasOwnProperty(g)&&u[g]!==m&&q2(a,g,m)}else for(var b in o)o.hasOwnProperty(b)&&q2(a,b,o[b])}function $p(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var z8=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),L8=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wd(a){return L8.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ca(){}var Bp=null;function Ip(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ys=null,Xs=null;function V2(a){var o=Vs(a);if(o&&(a=o.stateNode)){var u=a[On]||null;e:switch(a=o.stateNode,o.type){case"input":if(zp(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+tr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var m=u[o];if(m!==a&&m.form===a.form){var g=m[On]||null;if(!g)throw Error(r(90));zp(m,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(o=0;o<u.length;o++)m=u[o],m.form===a.form&&L2(m)}break e;case"textarea":B2(a,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Gs(a,!!u.multiple,o,!1)}}}var qp=!1;function H2(a,o,u){if(qp)return a(o,u);qp=!0;try{var m=a(o);return m}finally{if(qp=!1,(Ys!==null||Xs!==null)&&(uf(),Ys&&(o=Ys,a=Xs,Xs=Ys=null,V2(o),a)))for(o=0;o<a.length;o++)V2(a[o])}}function Hl(a,o){var u=a.stateNode;if(u===null)return null;var m=u[On]||null;if(m===null)return null;u=m[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Up=!1;if(ua)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){Up=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{Up=!1}var Ja=null,Vp=null,Sd=null;function F2(){if(Sd)return Sd;var a,o=Vp,u=o.length,m,g="value"in Ja?Ja.value:Ja.textContent,b=g.length;for(a=0;a<u&&o[a]===g[a];a++);var C=u-a;for(m=1;m<=C&&o[u-m]===g[b-m];m++);return Sd=g.slice(a,1<m?1-m:void 0)}function Nd(a){var o=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function Ad(){return!0}function G2(){return!1}function Tn(a){function o(u,m,g,b,C){this._reactName=u,this._targetInst=g,this.type=m,this.nativeEvent=b,this.target=C,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ad:G2,this.isPropagationStopped=G2,this}return x(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ad)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ad)},persist:function(){},isPersistent:Ad}),o}var Gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_d=Tn(Gi),Gl=x({},Gi,{view:0,detail:0}),$8=Tn(Gl),Hp,Fp,Kl,Od=x({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kp,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Kl&&(Kl&&a.type==="mousemove"?(Hp=a.screenX-Kl.screenX,Fp=a.screenY-Kl.screenY):Fp=Hp=0,Kl=a),Hp)},movementY:function(a){return"movementY"in a?a.movementY:Fp}}),K2=Tn(Od),B8=x({},Od,{dataTransfer:0}),I8=Tn(B8),q8=x({},Gl,{relatedTarget:0}),Gp=Tn(q8),U8=x({},Gi,{animationName:0,elapsedTime:0,pseudoElement:0}),V8=Tn(U8),H8=x({},Gi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),F8=Tn(H8),G8=x({},Gi,{data:0}),Y2=Tn(G8),K8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y8={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"},X8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W8(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=X8[a])?!!o[a]:!1}function Kp(){return W8}var Z8=x({},Gl,{key:function(a){if(a.key){var o=K8[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=Nd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Y8[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kp,charCode:function(a){return a.type==="keypress"?Nd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Nd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Q8=Tn(Z8),J8=x({},Od,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),X2=Tn(J8),e$=x({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kp}),t$=Tn(e$),n$=x({},Gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),r$=Tn(n$),a$=x({},Od,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),i$=Tn(a$),s$=x({},Gi,{newState:0,oldState:0}),o$=Tn(s$),l$=[9,13,27,32],Yp=ua&&"CompositionEvent"in window,Yl=null;ua&&"documentMode"in document&&(Yl=document.documentMode);var c$=ua&&"TextEvent"in window&&!Yl,W2=ua&&(!Yp||Yl&&8<Yl&&11>=Yl),Z2=" ",Q2=!1;function J2(a,o){switch(a){case"keyup":return l$.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eN(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ws=!1;function u$(a,o){switch(a){case"compositionend":return eN(o);case"keypress":return o.which!==32?null:(Q2=!0,Z2);case"textInput":return a=o.data,a===Z2&&Q2?null:a;default:return null}}function d$(a,o){if(Ws)return a==="compositionend"||!Yp&&J2(a,o)?(a=F2(),Sd=Vp=Ja=null,Ws=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return W2&&o.locale!=="ko"?null:o.data;default:return null}}var f$={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 tN(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!f$[a.type]:o==="textarea"}function nN(a,o,u,m){Ys?Xs?Xs.push(m):Xs=[m]:Ys=m,o=yf(o,"onChange"),0<o.length&&(u=new _d("onChange","change",null,u,m),a.push({event:u,listeners:o}))}var Xl=null,Wl=null;function h$(a){$_(a,0)}function Td(a){var o=Vl(a);if(L2(o))return a}function rN(a,o){if(a==="change")return o}var aN=!1;if(ua){var Xp;if(ua){var Wp="oninput"in document;if(!Wp){var iN=document.createElement("div");iN.setAttribute("oninput","return;"),Wp=typeof iN.oninput=="function"}Xp=Wp}else Xp=!1;aN=Xp&&(!document.documentMode||9<document.documentMode)}function sN(){Xl&&(Xl.detachEvent("onpropertychange",oN),Wl=Xl=null)}function oN(a){if(a.propertyName==="value"&&Td(Wl)){var o=[];nN(o,Wl,a,Ip(a)),H2(h$,o)}}function m$(a,o,u){a==="focusin"?(sN(),Xl=o,Wl=u,Xl.attachEvent("onpropertychange",oN)):a==="focusout"&&sN()}function p$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Td(Wl)}function x$(a,o){if(a==="click")return Td(o)}function y$(a,o){if(a==="input"||a==="change")return Td(o)}function g$(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var $n=typeof Object.is=="function"?Object.is:g$;function Zl(a,o){if($n(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var u=Object.keys(a),m=Object.keys(o);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var g=u[m];if(!Ur.call(o,g)||!$n(a[g],o[g]))return!1}return!0}function lN(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function cN(a,o){var u=lN(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=o&&m>=o)return{node:u,offset:o-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=lN(u)}}function uN(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?uN(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function dN(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=jd(a.document);o instanceof a.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)a=o.contentWindow;else break;o=jd(a.document)}return o}function Zp(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var v$=ua&&"documentMode"in document&&11>=document.documentMode,Zs=null,Qp=null,Ql=null,Jp=!1;function fN(a,o,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Jp||Zs==null||Zs!==jd(m)||(m=Zs,"selectionStart"in m&&Zp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ql&&Zl(Ql,m)||(Ql=m,m=yf(Qp,"onSelect"),0<m.length&&(o=new _d("onSelect","select",null,o,u),a.push({event:o,listeners:m}),o.target=Zs)))}function Ki(a,o){var u={};return u[a.toLowerCase()]=o.toLowerCase(),u["Webkit"+a]="webkit"+o,u["Moz"+a]="moz"+o,u}var Qs={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},ex={},hN={};ua&&(hN=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Yi(a){if(ex[a])return ex[a];if(!Qs[a])return a;var o=Qs[a],u;for(u in o)if(o.hasOwnProperty(u)&&u in hN)return ex[a]=o[u];return a}var mN=Yi("animationend"),pN=Yi("animationiteration"),xN=Yi("animationstart"),b$=Yi("transitionrun"),j$=Yi("transitionstart"),w$=Yi("transitioncancel"),yN=Yi("transitionend"),gN=new Map,tx="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tx.push("scrollEnd");function _r(a,o){gN.set(a,o),Fi(o,[a])}var Ed=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},nr=[],Js=0,nx=0;function Cd(){for(var a=Js,o=nx=Js=0;o<a;){var u=nr[o];nr[o++]=null;var m=nr[o];nr[o++]=null;var g=nr[o];nr[o++]=null;var b=nr[o];if(nr[o++]=null,m!==null&&g!==null){var C=m.pending;C===null?g.next=g:(g.next=C.next,C.next=g),m.pending=g}b!==0&&vN(u,g,b)}}function Md(a,o,u,m){nr[Js++]=a,nr[Js++]=o,nr[Js++]=u,nr[Js++]=m,nx|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function rx(a,o,u,m){return Md(a,o,u,m),kd(a)}function Xi(a,o){return Md(a,null,null,o),kd(a)}function vN(a,o,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,m=b.alternate,m!==null&&(m.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&o!==null&&(g=31-Ln(u),a=b.hiddenUpdates,m=a[g],m===null?a[g]=[o]:m.push(o),o.lane=u|536870912),b):null}function kd(a){if(50<bc)throw bc=0,fy=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var eo={};function S$(a,o,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bn(a,o,u,m){return new S$(a,o,u,m)}function ax(a){return a=a.prototype,!(!a||!a.isReactComponent)}function da(a,o){var u=a.alternate;return u===null?(u=Bn(a.tag,o,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=o,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,o=a.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function bN(a,o){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,o=u.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function Pd(a,o,u,m,g,b){var C=0;if(m=a,typeof a=="function")ax(a)&&(C=1);else if(typeof a=="string")C=TB(a,u,fe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=Bn(31,u,o,g),a.elementType=B,a.lanes=b,a;case S:return Wi(u.children,g,b,o);case v:C=8,g|=24;break;case A:return a=Bn(12,u,o,g|2),a.elementType=A,a.lanes=b,a;case N:return a=Bn(13,u,o,g),a.elementType=N,a.lanes=b,a;case E:return a=Bn(19,u,o,g),a.elementType=E,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:C=10;break e;case O:C=9;break e;case T:C=11;break e;case k:C=14;break e;case R:C=16,m=null;break e}C=29,u=Error(r(130,a===null?"null":typeof a,"")),m=null}return o=Bn(C,u,o,g),o.elementType=a,o.type=m,o.lanes=b,o}function Wi(a,o,u,m){return a=Bn(7,a,m,o),a.lanes=u,a}function ix(a,o,u){return a=Bn(6,a,null,o),a.lanes=u,a}function jN(a){var o=Bn(18,null,null,0);return o.stateNode=a,o}function sx(a,o,u){return o=Bn(4,a.children!==null?a.children:[],a.key,o),o.lanes=u,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var wN=new WeakMap;function rr(a,o){if(typeof a=="object"&&a!==null){var u=wN.get(a);return u!==void 0?u:(o={value:a,source:o,stack:Nr(o)},wN.set(a,o),o)}return{value:a,source:o,stack:Nr(o)}}var to=[],no=0,Rd=null,Jl=0,ar=[],ir=0,ei=null,Vr=1,Hr="";function fa(a,o){to[no++]=Jl,to[no++]=Rd,Rd=a,Jl=o}function SN(a,o,u){ar[ir++]=Vr,ar[ir++]=Hr,ar[ir++]=ei,ei=a;var m=Vr;a=Hr;var g=32-Ln(m)-1;m&=~(1<<g),u+=1;var b=32-Ln(o)+g;if(30<b){var C=g-g%5;b=(m&(1<<C)-1).toString(32),m>>=C,g-=C,Vr=1<<32-Ln(o)+g|u<<g|m,Hr=b+a}else Vr=1<<b|u<<g|m,Hr=a}function ox(a){a.return!==null&&(fa(a,1),SN(a,1,0))}function lx(a){for(;a===Rd;)Rd=to[--no],to[no]=null,Jl=to[--no],to[no]=null;for(;a===ei;)ei=ar[--ir],ar[ir]=null,Hr=ar[--ir],ar[ir]=null,Vr=ar[--ir],ar[ir]=null}function NN(a,o){ar[ir++]=Vr,ar[ir++]=Hr,ar[ir++]=ei,Vr=o.id,Hr=o.overflow,ei=a}var rn=null,vt=null,Fe=!1,ti=null,sr=!1,cx=Error(r(519));function ni(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ec(rr(o,a)),cx}function AN(a){var o=a.stateNode,u=a.type,m=a.memoizedProps;switch(o[nn]=a,o[On]=m,u){case"dialog":Ue("cancel",o),Ue("close",o);break;case"iframe":case"object":case"embed":Ue("load",o);break;case"video":case"audio":for(u=0;u<wc.length;u++)Ue(wc[u],o);break;case"source":Ue("error",o);break;case"img":case"image":case"link":Ue("error",o),Ue("load",o);break;case"details":Ue("toggle",o);break;case"input":Ue("invalid",o),$2(o,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ue("invalid",o);break;case"textarea":Ue("invalid",o),I2(o,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||m.suppressHydrationWarning===!0||U_(o.textContent,u)?(m.popover!=null&&(Ue("beforetoggle",o),Ue("toggle",o)),m.onScroll!=null&&Ue("scroll",o),m.onScrollEnd!=null&&Ue("scrollend",o),m.onClick!=null&&(o.onclick=ca),o=!0):o=!1,o||ni(a,!0)}function _N(a){for(rn=a.return;rn;)switch(rn.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:rn=rn.return}}function ro(a){if(a!==rn)return!1;if(!Fe)return _N(a),Fe=!0,!1;var o=a.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Oy(a.type,a.memoizedProps)),u=!u),u&&vt&&ni(a),_N(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=Z_(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=Z_(a)}else o===27?(o=vt,xi(a.type)?(a=ky,ky=null,vt=a):vt=o):vt=rn?lr(a.stateNode.nextSibling):null;return!0}function Zi(){vt=rn=null,Fe=!1}function ux(){var a=ti;return a!==null&&(kn===null?kn=a:kn.push.apply(kn,a),ti=null),a}function ec(a){ti===null?ti=[a]:ti.push(a)}var dx=q(null),Qi=null,ha=null;function ri(a,o,u){ae(dx,o._currentValue),o._currentValue=u}function ma(a){a._currentValue=dx.current,Y(dx)}function fx(a,o,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,m!==null&&(m.childLanes|=o)):m!==null&&(m.childLanes&o)!==o&&(m.childLanes|=o),a===u)break;a=a.return}}function hx(a,o,u,m){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var C=g.child;b=b.firstContext;e:for(;b!==null;){var P=b;b=g;for(var U=0;U<o.length;U++)if(P.context===o[U]){b.lanes|=u,P=b.alternate,P!==null&&(P.lanes|=u),fx(b.return,u,a),m||(C=null);break e}b=P.next}}else if(g.tag===18){if(C=g.return,C===null)throw Error(r(341));C.lanes|=u,b=C.alternate,b!==null&&(b.lanes|=u),fx(C,u,a),C=null}else C=g.child;if(C!==null)C.return=g;else for(C=g;C!==null;){if(C===a){C=null;break}if(g=C.sibling,g!==null){g.return=C.return,C=g;break}C=C.return}g=C}}function ao(a,o,u,m){a=null;for(var g=o,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var C=g.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var P=g.type;$n(g.pendingProps.value,C.value)||(a!==null?a.push(P):a=[P])}}else if(g===Ie.current){if(C=g.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(Oc):a=[Oc])}g=g.return}a!==null&&hx(o,a,u,m),o.flags|=262144}function Dd(a){for(a=a.firstContext;a!==null;){if(!$n(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Ji(a){Qi=a,ha=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function an(a){return ON(Qi,a)}function zd(a,o){return Qi===null&&Ji(a),ON(a,o)}function ON(a,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ha===null){if(a===null)throw Error(r(308));ha=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else ha=ha.next=o;return u}var N$=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){o.aborted=!0,a.forEach(function(u){return u()})}},A$=e.unstable_scheduleCallback,_$=e.unstable_NormalPriority,Lt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mx(){return{controller:new N$,data:new Map,refCount:0}}function tc(a){a.refCount--,a.refCount===0&&A$(_$,function(){a.controller.abort()})}var nc=null,px=0,io=0,so=null;function O$(a,o){if(nc===null){var u=nc=[];px=0,io=gy(),so={status:"pending",value:void 0,then:function(m){u.push(m)}}}return px++,o.then(TN,TN),o}function TN(){if(--px===0&&nc!==null){so!==null&&(so.status="fulfilled");var a=nc;nc=null,io=0,so=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function T$(a,o){var u=[],m={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){m.status="fulfilled",m.value=o;for(var g=0;g<u.length;g++)(0,u[g])(o)},function(g){for(m.status="rejected",m.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),m}var EN=I.S;I.S=function(a,o){f_=mn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&O$(a,o),EN!==null&&EN(a,o)};var es=q(null);function xx(){var a=es.current;return a!==null?a:dt.pooledCache}function Ld(a,o){o===null?ae(es,es.current):ae(es,o.pool)}function CN(){var a=xx();return a===null?null:{parent:Lt._currentValue,pool:a}}var oo=Error(r(460)),yx=Error(r(474)),$d=Error(r(542)),Bd={then:function(){}};function MN(a){return a=a.status,a==="fulfilled"||a==="rejected"}function kN(a,o,u){switch(u=a[u],u===void 0?a.push(o):u!==o&&(o.then(ca,ca),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,RN(a),a;default:if(typeof o.status=="string")o.then(ca,ca);else{if(a=dt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(m){if(o.status==="pending"){var g=o;g.status="fulfilled",g.value=m}},function(m){if(o.status==="pending"){var g=o;g.status="rejected",g.reason=m}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,RN(a),a}throw ns=o,oo}}function ts(a){try{var o=a._init;return o(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ns=u,oo):u}}var ns=null;function PN(){if(ns===null)throw Error(r(459));var a=ns;return ns=null,a}function RN(a){if(a===oo||a===$d)throw Error(r(483))}var lo=null,rc=0;function Id(a){var o=rc;return rc+=1,lo===null&&(lo=[]),kN(lo,a,o)}function ac(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function qd(a,o){throw o.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(o),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function DN(a){function o(X,G){if(a){var W=X.deletions;W===null?(X.deletions=[G],X.flags|=16):W.push(G)}}function u(X,G){if(!a)return null;for(;G!==null;)o(X,G),G=G.sibling;return null}function m(X){for(var G=new Map;X!==null;)X.key!==null?G.set(X.key,X):G.set(X.index,X),X=X.sibling;return G}function g(X,G){return X=da(X,G),X.index=0,X.sibling=null,X}function b(X,G,W){return X.index=W,a?(W=X.alternate,W!==null?(W=W.index,W<G?(X.flags|=67108866,G):W):(X.flags|=67108866,G)):(X.flags|=1048576,G)}function C(X){return a&&X.alternate===null&&(X.flags|=67108866),X}function P(X,G,W,se){return G===null||G.tag!==6?(G=ix(W,X.mode,se),G.return=X,G):(G=g(G,W),G.return=X,G)}function U(X,G,W,se){var ve=W.type;return ve===S?ne(X,G,W.props.children,se,W.key):G!==null&&(G.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&ts(ve)===G.type)?(G=g(G,W.props),ac(G,W),G.return=X,G):(G=Pd(W.type,W.key,W.props,null,X.mode,se),ac(G,W),G.return=X,G)}function Q(X,G,W,se){return G===null||G.tag!==4||G.stateNode.containerInfo!==W.containerInfo||G.stateNode.implementation!==W.implementation?(G=sx(W,X.mode,se),G.return=X,G):(G=g(G,W.children||[]),G.return=X,G)}function ne(X,G,W,se,ve){return G===null||G.tag!==7?(G=Wi(W,X.mode,se,ve),G.return=X,G):(G=g(G,W),G.return=X,G)}function oe(X,G,W){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=ix(""+G,X.mode,W),G.return=X,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return W=Pd(G.type,G.key,G.props,null,X.mode,W),ac(W,G),W.return=X,W;case w:return G=sx(G,X.mode,W),G.return=X,G;case R:return G=ts(G),oe(X,G,W)}if(H(G)||$(G))return G=Wi(G,X.mode,W,null),G.return=X,G;if(typeof G.then=="function")return oe(X,Id(G),W);if(G.$$typeof===_)return oe(X,zd(X,G),W);qd(X,G)}return null}function J(X,G,W,se){var ve=G!==null?G.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return ve!==null?null:P(X,G,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case j:return W.key===ve?U(X,G,W,se):null;case w:return W.key===ve?Q(X,G,W,se):null;case R:return W=ts(W),J(X,G,W,se)}if(H(W)||$(W))return ve!==null?null:ne(X,G,W,se,null);if(typeof W.then=="function")return J(X,G,Id(W),se);if(W.$$typeof===_)return J(X,G,zd(X,W),se);qd(X,W)}return null}function ee(X,G,W,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return X=X.get(W)||null,P(G,X,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return X=X.get(se.key===null?W:se.key)||null,U(G,X,se,ve);case w:return X=X.get(se.key===null?W:se.key)||null,Q(G,X,se,ve);case R:return se=ts(se),ee(X,G,W,se,ve)}if(H(se)||$(se))return X=X.get(W)||null,ne(G,X,se,ve,null);if(typeof se.then=="function")return ee(X,G,W,Id(se),ve);if(se.$$typeof===_)return ee(X,G,W,zd(G,se),ve);qd(G,se)}return null}function pe(X,G,W,se){for(var ve=null,Xe=null,ge=G,$e=G=0,He=null;ge!==null&&$e<W.length;$e++){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var We=J(X,ge,W[$e],se);if(We===null){ge===null&&(ge=He);break}a&&ge&&We.alternate===null&&o(X,ge),G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We,ge=He}if($e===W.length)return u(X,ge),Fe&&fa(X,$e),ve;if(ge===null){for(;$e<W.length;$e++)ge=oe(X,W[$e],se),ge!==null&&(G=b(ge,G,$e),Xe===null?ve=ge:Xe.sibling=ge,Xe=ge);return Fe&&fa(X,$e),ve}for(ge=m(ge);$e<W.length;$e++)He=ee(ge,X,$e,W[$e],se),He!==null&&(a&&He.alternate!==null&&ge.delete(He.key===null?$e:He.key),G=b(He,G,$e),Xe===null?ve=He:Xe.sibling=He,Xe=He);return a&&ge.forEach(function(ji){return o(X,ji)}),Fe&&fa(X,$e),ve}function Se(X,G,W,se){if(W==null)throw Error(r(151));for(var ve=null,Xe=null,ge=G,$e=G=0,He=null,We=W.next();ge!==null&&!We.done;$e++,We=W.next()){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var ji=J(X,ge,We.value,se);if(ji===null){ge===null&&(ge=He);break}a&&ge&&ji.alternate===null&&o(X,ge),G=b(ji,G,$e),Xe===null?ve=ji:Xe.sibling=ji,Xe=ji,ge=He}if(We.done)return u(X,ge),Fe&&fa(X,$e),ve;if(ge===null){for(;!We.done;$e++,We=W.next())We=oe(X,We.value,se),We!==null&&(G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We);return Fe&&fa(X,$e),ve}for(ge=m(ge);!We.done;$e++,We=W.next())We=ee(ge,X,$e,We.value,se),We!==null&&(a&&We.alternate!==null&&ge.delete(We.key===null?$e:We.key),G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We);return a&&ge.forEach(function(BB){return o(X,BB)}),Fe&&fa(X,$e),ve}function ct(X,G,W,se){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case j:e:{for(var ve=W.key;G!==null;){if(G.key===ve){if(ve=W.type,ve===S){if(G.tag===7){u(X,G.sibling),se=g(G,W.props.children),se.return=X,X=se;break e}}else if(G.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&ts(ve)===G.type){u(X,G.sibling),se=g(G,W.props),ac(se,W),se.return=X,X=se;break e}u(X,G);break}else o(X,G);G=G.sibling}W.type===S?(se=Wi(W.props.children,X.mode,se,W.key),se.return=X,X=se):(se=Pd(W.type,W.key,W.props,null,X.mode,se),ac(se,W),se.return=X,X=se)}return C(X);case w:e:{for(ve=W.key;G!==null;){if(G.key===ve)if(G.tag===4&&G.stateNode.containerInfo===W.containerInfo&&G.stateNode.implementation===W.implementation){u(X,G.sibling),se=g(G,W.children||[]),se.return=X,X=se;break e}else{u(X,G);break}else o(X,G);G=G.sibling}se=sx(W,X.mode,se),se.return=X,X=se}return C(X);case R:return W=ts(W),ct(X,G,W,se)}if(H(W))return pe(X,G,W,se);if($(W)){if(ve=$(W),typeof ve!="function")throw Error(r(150));return W=ve.call(W),Se(X,G,W,se)}if(typeof W.then=="function")return ct(X,G,Id(W),se);if(W.$$typeof===_)return ct(X,G,zd(X,W),se);qd(X,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,G!==null&&G.tag===6?(u(X,G.sibling),se=g(G,W),se.return=X,X=se):(u(X,G),se=ix(W,X.mode,se),se.return=X,X=se),C(X)):u(X,G)}return function(X,G,W,se){try{rc=0;var ve=ct(X,G,W,se);return lo=null,ve}catch(ge){if(ge===oo||ge===$d)throw ge;var Xe=Bn(29,ge,null,X.mode);return Xe.lanes=se,Xe.return=X,Xe}finally{}}}var rs=DN(!0),zN=DN(!1),ai=!1;function gx(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vx(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ii(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function si(a,o,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Je&2)!==0){var g=m.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),m.pending=o,o=kd(a),vN(a,null,u),o}return Md(a,m,o,u),kd(a)}function ic(a,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,O2(a,u)}}function bx(a,o){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var C={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=C:b=b.next=C,u=u.next}while(u!==null);b===null?g=b=o:b=b.next=o}else g=b=o;u={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=o:a.next=o,u.lastBaseUpdate=o}var jx=!1;function sc(){if(jx){var a=so;if(a!==null)throw a}}function oc(a,o,u,m){jx=!1;var g=a.updateQueue;ai=!1;var b=g.firstBaseUpdate,C=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var U=P,Q=U.next;U.next=null,C===null?b=Q:C.next=Q,C=U;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==C&&(P===null?ne.firstBaseUpdate=Q:P.next=Q,ne.lastBaseUpdate=U))}if(b!==null){var oe=g.baseState;C=0,ne=Q=U=null,P=b;do{var J=P.lane&-536870913,ee=J!==P.lane;if(ee?(Ve&J)===J:(m&J)===J){J!==0&&J===io&&(jx=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var pe=a,Se=P;J=o;var ct=u;switch(Se.tag){case 1:if(pe=Se.payload,typeof pe=="function"){oe=pe.call(ct,oe,J);break e}oe=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Se.payload,J=typeof pe=="function"?pe.call(ct,oe,J):pe,J==null)break e;oe=x({},oe,J);break e;case 2:ai=!0}}J=P.callback,J!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=g.callbacks,ee===null?g.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(Q=ne=ee,U=oe):ne=ne.next=ee,C|=J;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;ee=P,P=ee.next,ee.next=null,g.lastBaseUpdate=ee,g.shared.pending=null}}while(!0);ne===null&&(U=oe),g.baseState=U,g.firstBaseUpdate=Q,g.lastBaseUpdate=ne,b===null&&(g.shared.lanes=0),di|=C,a.lanes=C,a.memoizedState=oe}}function LN(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function $N(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)LN(u[a],o)}var co=q(null),Ud=q(0);function BN(a,o){a=Sa,ae(Ud,a),ae(co,o),Sa=a|o.baseLanes}function wx(){ae(Ud,Sa),ae(co,co.current)}function Sx(){Sa=Ud.current,Y(co),Y(Ud)}var In=q(null),or=null;function oi(a){var o=a.alternate;ae(Dt,Dt.current&1),ae(In,a),or===null&&(o===null||co.current!==null||o.memoizedState!==null)&&(or=a)}function Nx(a){ae(Dt,Dt.current),ae(In,a),or===null&&(or=a)}function IN(a){a.tag===22?(ae(Dt,Dt.current),ae(In,a),or===null&&(or=a)):li()}function li(){ae(Dt,Dt.current),ae(In,In.current)}function qn(a){Y(In),or===a&&(or=null),Y(Dt)}var Dt=q(0);function Vd(a){for(var o=a;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Cy(u)||My(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var pa=0,De=null,ot=null,$t=null,Hd=!1,uo=!1,as=!1,Fd=0,lc=0,fo=null,E$=0;function Ct(){throw Error(r(321))}function Ax(a,o){if(o===null)return!1;for(var u=0;u<o.length&&u<a.length;u++)if(!$n(a[u],o[u]))return!1;return!0}function _x(a,o,u,m,g,b){return pa=b,De=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=a===null||a.memoizedState===null?SA:qx,as=!1,b=u(m,g),as=!1,uo&&(b=UN(o,u,m,g)),qN(a),b}function qN(a){I.H=dc;var o=ot!==null&&ot.next!==null;if(pa=0,$t=ot=De=null,Hd=!1,lc=0,fo=null,o)throw Error(r(300));a===null||Bt||(a=a.dependencies,a!==null&&Dd(a)&&(Bt=!0))}function UN(a,o,u,m){De=a;var g=0;do{if(uo&&(fo=null),lc=0,uo=!1,25<=g)throw Error(r(301));if(g+=1,$t=ot=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}I.H=NA,b=o(u,m)}while(uo);return b}function C$(){var a=I.H,o=a.useState()[0];return o=typeof o.then=="function"?cc(o):o,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&(De.flags|=1024),o}function Ox(){var a=Fd!==0;return Fd=0,a}function Tx(a,o,u){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~u}function Ex(a){if(Hd){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}Hd=!1}pa=0,$t=ot=De=null,uo=!1,lc=Fd=0,fo=null}function vn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?De.memoizedState=$t=a:$t=$t.next=a,$t}function zt(){if(ot===null){var a=De.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var o=$t===null?De.memoizedState:$t.next;if(o!==null)$t=o,ot=a;else{if(a===null)throw De.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},$t===null?De.memoizedState=$t=a:$t=$t.next=a}return $t}function Gd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cc(a){var o=lc;return lc+=1,fo===null&&(fo=[]),a=kN(fo,a,o),o=De,($t===null?o.memoizedState:$t.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?SA:qx),a}function Kd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return cc(a);if(a.$$typeof===_)return an(a)}throw Error(r(438,String(a)))}function Cx(a){var o=null,u=De.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var m=De.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(o={data:m.data.map(function(g){return g.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Gd(),De.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(a),m=0;m<a;m++)u[m]=D;return o.index++,u}function xa(a,o){return typeof o=="function"?o(a):o}function Yd(a){var o=zt();return Mx(o,ot,a)}function Mx(a,o,u){var m=a.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var g=a.baseQueue,b=m.pending;if(b!==null){if(g!==null){var C=g.next;g.next=b.next,b.next=C}o.baseQueue=g=b,m.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{o=g.next;var P=C=null,U=null,Q=o,ne=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Ve&oe)===oe:(pa&oe)===oe){var J=Q.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===io&&(ne=!0);else if((pa&J)===J){Q=Q.next,J===io&&(ne=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(P=U=oe,C=b):U=U.next=oe,De.lanes|=J,di|=J;oe=Q.action,as&&u(b,oe),b=Q.hasEagerState?Q.eagerState:u(b,oe)}else J={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(P=U=J,C=b):U=U.next=J,De.lanes|=oe,di|=oe;Q=Q.next}while(Q!==null&&Q!==o);if(U===null?C=b:U.next=P,!$n(b,a.memoizedState)&&(Bt=!0,ne&&(u=so,u!==null)))throw u;a.memoizedState=b,a.baseState=C,a.baseQueue=U,m.lastRenderedState=b}return g===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function kx(a){var o=zt(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var m=u.dispatch,g=u.pending,b=o.memoizedState;if(g!==null){u.pending=null;var C=g=g.next;do b=a(b,C.action),C=C.next;while(C!==g);$n(b,o.memoizedState)||(Bt=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),u.lastRenderedState=b}return[b,m]}function VN(a,o,u){var m=De,g=zt(),b=Fe;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=o();var C=!$n((ot||g).memoizedState,u);if(C&&(g.memoizedState=u,Bt=!0),g=g.queue,Dx(GN.bind(null,m,g,a),[a]),g.getSnapshot!==o||C||$t!==null&&$t.memoizedState.tag&1){if(m.flags|=2048,ho(9,{destroy:void 0},FN.bind(null,m,g,u,o),null),dt===null)throw Error(r(349));b||(pa&127)!==0||HN(m,o,u)}return u}function HN(a,o,u){a.flags|=16384,a={getSnapshot:o,value:u},o=De.updateQueue,o===null?(o=Gd(),De.updateQueue=o,o.stores=[a]):(u=o.stores,u===null?o.stores=[a]:u.push(a))}function FN(a,o,u,m){o.value=u,o.getSnapshot=m,KN(o)&&YN(a)}function GN(a,o,u){return u(function(){KN(o)&&YN(a)})}function KN(a){var o=a.getSnapshot;a=a.value;try{var u=o();return!$n(a,u)}catch{return!0}}function YN(a){var o=Xi(a,2);o!==null&&Pn(o,a,2)}function Px(a){var o=vn();if(typeof a=="function"){var u=a;if(a=u(),as){Za(!0);try{u()}finally{Za(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:a},o}function XN(a,o,u,m){return a.baseState=u,Mx(a,ot,typeof m=="function"?m:xa)}function M$(a,o,u,m,g){if(Zd(a))throw Error(r(485));if(a=o.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){b.listeners.push(C)}};I.T!==null?u(!0):b.isTransition=!1,m(b),u=o.pending,u===null?(b.next=o.pending=b,WN(o,b)):(b.next=u.next,o.pending=u.next=b)}}function WN(a,o){var u=o.action,m=o.payload,g=a.state;if(o.isTransition){var b=I.T,C={};I.T=C;try{var P=u(g,m),U=I.S;U!==null&&U(C,P),ZN(a,o,P)}catch(Q){Rx(a,o,Q)}finally{b!==null&&C.types!==null&&(b.types=C.types),I.T=b}}else try{b=u(g,m),ZN(a,o,b)}catch(Q){Rx(a,o,Q)}}function ZN(a,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){QN(a,o,m)},function(m){return Rx(a,o,m)}):QN(a,o,u)}function QN(a,o,u){o.status="fulfilled",o.value=u,JN(o),a.state=u,o=a.pending,o!==null&&(u=o.next,u===o?a.pending=null:(u=u.next,o.next=u,WN(a,u)))}function Rx(a,o,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do o.status="rejected",o.reason=u,JN(o),o=o.next;while(o!==m)}a.action=null}function JN(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function eA(a,o){return o}function tA(a,o){if(Fe){var u=dt.formState;if(u!==null){e:{var m=De;if(Fe){if(vt){t:{for(var g=vt,b=sr;g.nodeType!==8;){if(!b){g=null;break t}if(g=lr(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){vt=lr(g.nextSibling),m=g.data==="F!";break e}}ni(m)}m=!1}m&&(o=u[0])}}return u=vn(),u.memoizedState=u.baseState=o,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eA,lastRenderedState:o},u.queue=m,u=bA.bind(null,De,m),m.dispatch=u,m=Px(!1),b=Ix.bind(null,De,!1,m.queue),m=vn(),g={state:o,dispatch:null,action:a,pending:null},m.queue=g,u=M$.bind(null,De,g,b,u),g.dispatch=u,m.memoizedState=a,[o,u,!1]}function nA(a){var o=zt();return rA(o,ot,a)}function rA(a,o,u){if(o=Mx(a,o,eA)[0],a=Yd(xa)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var m=cc(o)}catch(C){throw C===oo?$d:C}else m=o;o=zt();var g=o.queue,b=g.dispatch;return u!==o.memoizedState&&(De.flags|=2048,ho(9,{destroy:void 0},k$.bind(null,g,u),null)),[m,b,a]}function k$(a,o){a.action=o}function aA(a){var o=zt(),u=ot;if(u!==null)return rA(o,u,a);zt(),o=o.memoizedState,u=zt();var m=u.queue.dispatch;return u.memoizedState=a,[o,m,!1]}function ho(a,o,u,m){return a={tag:a,create:u,deps:m,inst:o,next:null},o=De.updateQueue,o===null&&(o=Gd(),De.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,o.lastEffect=a),a}function iA(){return zt().memoizedState}function Xd(a,o,u,m){var g=vn();De.flags|=a,g.memoizedState=ho(1|o,{destroy:void 0},u,m===void 0?null:m)}function Wd(a,o,u,m){var g=zt();m=m===void 0?null:m;var b=g.memoizedState.inst;ot!==null&&m!==null&&Ax(m,ot.memoizedState.deps)?g.memoizedState=ho(o,b,u,m):(De.flags|=a,g.memoizedState=ho(1|o,b,u,m))}function sA(a,o){Xd(8390656,8,a,o)}function Dx(a,o){Wd(2048,8,a,o)}function P$(a){De.flags|=4;var o=De.updateQueue;if(o===null)o=Gd(),De.updateQueue=o,o.events=[a];else{var u=o.events;u===null?o.events=[a]:u.push(a)}}function oA(a){var o=zt().memoizedState;return P$({ref:o,nextImpl:a}),function(){if((Je&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function lA(a,o){return Wd(4,2,a,o)}function cA(a,o){return Wd(4,4,a,o)}function uA(a,o){if(typeof o=="function"){a=a();var u=o(a);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function dA(a,o,u){u=u!=null?u.concat([a]):null,Wd(4,4,uA.bind(null,o,a),u)}function zx(){}function fA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;return o!==null&&Ax(o,m[1])?m[0]:(u.memoizedState=[a,o],a)}function hA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;if(o!==null&&Ax(o,m[1]))return m[0];if(m=a(),as){Za(!0);try{a()}finally{Za(!1)}}return u.memoizedState=[m,o],m}function Lx(a,o,u){return u===void 0||(pa&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=o:(a.memoizedState=u,a=m_(),De.lanes|=a,di|=a,u)}function mA(a,o,u,m){return $n(u,o)?u:co.current!==null?(a=Lx(a,u,m),$n(a,o)||(Bt=!0),a):(pa&42)===0||(pa&1073741824)!==0&&(Ve&261930)===0?(Bt=!0,a.memoizedState=u):(a=m_(),De.lanes|=a,di|=a,o)}function pA(a,o,u,m,g){var b=F.p;F.p=b!==0&&8>b?b:8;var C=I.T,P={};I.T=P,Ix(a,!1,o,u);try{var U=g(),Q=I.S;if(Q!==null&&Q(P,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ne=T$(U,m);uc(a,o,ne,Hn(a))}else uc(a,o,m,Hn(a))}catch(oe){uc(a,o,{then:function(){},status:"rejected",reason:oe},Hn())}finally{F.p=b,C!==null&&P.types!==null&&(C.types=P.types),I.T=C}}function R$(){}function $x(a,o,u,m){if(a.tag!==5)throw Error(r(476));var g=xA(a).queue;pA(a,g,o,Z,u===null?R$:function(){return yA(a),u(m)})}function xA(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:Z},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function yA(a){var o=xA(a);o.next===null&&(o=a.alternate.memoizedState),uc(a,o.next.queue,{},Hn())}function Bx(){return an(Oc)}function gA(){return zt().memoizedState}function vA(){return zt().memoizedState}function D$(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=Hn();a=ii(u);var m=si(o,a,u);m!==null&&(Pn(m,o,u),ic(m,o,u)),o={cache:mx()},a.payload=o;return}o=o.return}}function z$(a,o,u){var m=Hn();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Zd(a)?jA(o,u):(u=rx(a,o,u,m),u!==null&&(Pn(u,a,m),wA(u,o,m)))}function bA(a,o,u){var m=Hn();uc(a,o,u,m)}function uc(a,o,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Zd(a))jA(o,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var C=o.lastRenderedState,P=b(C,u);if(g.hasEagerState=!0,g.eagerState=P,$n(P,C))return Md(a,o,g,0),dt===null&&Cd(),!1}catch{}finally{}if(u=rx(a,o,g,m),u!==null)return Pn(u,a,m),wA(u,o,m),!0}return!1}function Ix(a,o,u,m){if(m={lane:2,revertLane:gy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Zd(a)){if(o)throw Error(r(479))}else o=rx(a,u,m,2),o!==null&&Pn(o,a,2)}function Zd(a){var o=a.alternate;return a===De||o!==null&&o===De}function jA(a,o){uo=Hd=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function wA(a,o,u){if((u&4194048)!==0){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,O2(a,u)}}var dc={readContext:an,use:Kd,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};dc.useEffectEvent=Ct;var SA={readContext:an,use:Kd,useCallback:function(a,o){return vn().memoizedState=[a,o===void 0?null:o],a},useContext:an,useEffect:sA,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Xd(4194308,4,uA.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Xd(4194308,4,a,o)},useInsertionEffect:function(a,o){Xd(4,2,a,o)},useMemo:function(a,o){var u=vn();o=o===void 0?null:o;var m=a();if(as){Za(!0);try{a()}finally{Za(!1)}}return u.memoizedState=[m,o],m},useReducer:function(a,o,u){var m=vn();if(u!==void 0){var g=u(o);if(as){Za(!0);try{u(o)}finally{Za(!1)}}}else g=o;return m.memoizedState=m.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},m.queue=a,a=a.dispatch=z$.bind(null,De,a),[m.memoizedState,a]},useRef:function(a){var o=vn();return a={current:a},o.memoizedState=a},useState:function(a){a=Px(a);var o=a.queue,u=bA.bind(null,De,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:zx,useDeferredValue:function(a,o){var u=vn();return Lx(u,a,o)},useTransition:function(){var a=Px(!1);return a=pA.bind(null,De,a.queue,!0,!1),vn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var m=De,g=vn();if(Fe){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),dt===null)throw Error(r(349));(Ve&127)!==0||HN(m,o,u)}g.memoizedState=u;var b={value:u,getSnapshot:o};return g.queue=b,sA(GN.bind(null,m,b,a),[a]),m.flags|=2048,ho(9,{destroy:void 0},FN.bind(null,m,b,u,o),null),u},useId:function(){var a=vn(),o=dt.identifierPrefix;if(Fe){var u=Hr,m=Vr;u=(m&~(1<<32-Ln(m)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Fd++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=E$++,o="_"+o+"r_"+u.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:Bx,useFormState:tA,useActionState:tA,useOptimistic:function(a){var o=vn();o.memoizedState=o.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Ix.bind(null,De,!0,u),u.dispatch=o,[a,o]},useMemoCache:Cx,useCacheRefresh:function(){return vn().memoizedState=D$.bind(null,De)},useEffectEvent:function(a){var o=vn(),u={impl:a};return o.memoizedState=u,function(){if((Je&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},qx={readContext:an,use:Kd,useCallback:fA,useContext:an,useEffect:Dx,useImperativeHandle:dA,useInsertionEffect:lA,useLayoutEffect:cA,useMemo:hA,useReducer:Yd,useRef:iA,useState:function(){return Yd(xa)},useDebugValue:zx,useDeferredValue:function(a,o){var u=zt();return mA(u,ot.memoizedState,a,o)},useTransition:function(){var a=Yd(xa)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:cc(a),o]},useSyncExternalStore:VN,useId:gA,useHostTransitionStatus:Bx,useFormState:nA,useActionState:nA,useOptimistic:function(a,o){var u=zt();return XN(u,ot,a,o)},useMemoCache:Cx,useCacheRefresh:vA};qx.useEffectEvent=oA;var NA={readContext:an,use:Kd,useCallback:fA,useContext:an,useEffect:Dx,useImperativeHandle:dA,useInsertionEffect:lA,useLayoutEffect:cA,useMemo:hA,useReducer:kx,useRef:iA,useState:function(){return kx(xa)},useDebugValue:zx,useDeferredValue:function(a,o){var u=zt();return ot===null?Lx(u,a,o):mA(u,ot.memoizedState,a,o)},useTransition:function(){var a=kx(xa)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:cc(a),o]},useSyncExternalStore:VN,useId:gA,useHostTransitionStatus:Bx,useFormState:aA,useActionState:aA,useOptimistic:function(a,o){var u=zt();return ot!==null?XN(u,ot,a,o):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Cx,useCacheRefresh:vA};NA.useEffectEvent=oA;function Ux(a,o,u,m){o=a.memoizedState,u=u(m,o),u=u==null?o:x({},o,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var Vx={enqueueSetState:function(a,o,u){a=a._reactInternals;var m=Hn(),g=ii(m);g.payload=o,u!=null&&(g.callback=u),o=si(a,g,m),o!==null&&(Pn(o,a,m),ic(o,a,m))},enqueueReplaceState:function(a,o,u){a=a._reactInternals;var m=Hn(),g=ii(m);g.tag=1,g.payload=o,u!=null&&(g.callback=u),o=si(a,g,m),o!==null&&(Pn(o,a,m),ic(o,a,m))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var u=Hn(),m=ii(u);m.tag=2,o!=null&&(m.callback=o),o=si(a,m,u),o!==null&&(Pn(o,a,u),ic(o,a,u))}};function AA(a,o,u,m,g,b,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,b,C):o.prototype&&o.prototype.isPureReactComponent?!Zl(u,m)||!Zl(g,b):!0}function _A(a,o,u,m){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,m),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,m),o.state!==a&&Vx.enqueueReplaceState(o,o.state,null)}function is(a,o){var u=o;if("ref"in o){u={};for(var m in o)m!=="ref"&&(u[m]=o[m])}if(a=a.defaultProps){u===o&&(u=x({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function OA(a){Ed(a)}function TA(a){console.error(a)}function EA(a){Ed(a)}function Qd(a,o){try{var u=a.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(m){setTimeout(function(){throw m})}}function CA(a,o,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Hx(a,o,u){return u=ii(u),u.tag=3,u.payload={element:null},u.callback=function(){Qd(a,o)},u}function MA(a){return a=ii(a),a.tag=3,a}function kA(a,o,u,m){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=m.value;a.payload=function(){return g(b)},a.callback=function(){CA(o,u,m)}}var C=u.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){CA(o,u,m),typeof g!="function"&&(fi===null?fi=new Set([this]):fi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function L$(a,o,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(o=u.alternate,o!==null&&ao(o,u,g,!0),u=In.current,u!==null){switch(u.tag){case 31:case 13:return or===null?df():u.alternate===null&&Mt===0&&(Mt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===Bd?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([m]):o.add(m),py(a,m,g)),!1;case 22:return u.flags|=65536,m===Bd?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([m]):u.add(m)),py(a,m,g)),!1}throw Error(r(435,u.tag))}return py(a,m,g),df(),!1}if(Fe)return o=In.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,m!==cx&&(a=Error(r(422),{cause:m}),ec(rr(a,u)))):(m!==cx&&(o=Error(r(423),{cause:m}),ec(rr(o,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=rr(m,u),g=Hx(a.stateNode,m,g),bx(a,g),Mt!==4&&(Mt=2)),!1;var b=Error(r(520),{cause:m});if(b=rr(b,u),vc===null?vc=[b]:vc.push(b),Mt!==4&&(Mt=2),o===null)return!0;m=rr(m,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=Hx(u.stateNode,m,a),bx(u,a),!1;case 1:if(o=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(fi===null||!fi.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=MA(g),kA(g,a,u,m),bx(u,g),!1}u=u.return}while(u!==null);return!1}var Fx=Error(r(461)),Bt=!1;function sn(a,o,u,m){o.child=a===null?zN(o,null,u,m):rs(o,a.child,u,m)}function PA(a,o,u,m,g){u=u.render;var b=o.ref;if("ref"in m){var C={};for(var P in m)P!=="ref"&&(C[P]=m[P])}else C=m;return Ji(o),m=_x(a,o,u,C,b,g),P=Ox(),a!==null&&!Bt?(Tx(a,o,g),ya(a,o,g)):(Fe&&P&&ox(o),o.flags|=1,sn(a,o,m,g),o.child)}function RA(a,o,u,m,g){if(a===null){var b=u.type;return typeof b=="function"&&!ax(b)&&b.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=b,DA(a,o,b,m,g)):(a=Pd(u.type,null,m,o,o.mode,g),a.ref=o.ref,a.return=o,o.child=a)}if(b=a.child,!Jx(a,g)){var C=b.memoizedProps;if(u=u.compare,u=u!==null?u:Zl,u(C,m)&&a.ref===o.ref)return ya(a,o,g)}return o.flags|=1,a=da(b,m),a.ref=o.ref,a.return=o,o.child=a}function DA(a,o,u,m,g){if(a!==null){var b=a.memoizedProps;if(Zl(b,m)&&a.ref===o.ref)if(Bt=!1,o.pendingProps=m=b,Jx(a,g))(a.flags&131072)!==0&&(Bt=!0);else return o.lanes=a.lanes,ya(a,o,g)}return Gx(a,o,u,m,g)}function zA(a,o,u,m){var g=m.children,b=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((o.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(m=o.child=a.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;m=g&~b}else m=0,o.child=null;return LA(a,o,b,u,m)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ld(o,b!==null?b.cachePool:null),b!==null?BN(o,b):wx(),IN(o);else return m=o.lanes=536870912,LA(a,o,b!==null?b.baseLanes|u:u,u,m)}else b!==null?(Ld(o,b.cachePool),BN(o,b),li(),o.memoizedState=null):(a!==null&&Ld(o,null),wx(),li());return sn(a,o,g,u),o.child}function fc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function LA(a,o,u,m,g){var b=xx();return b=b===null?null:{parent:Lt._currentValue,pool:b},o.memoizedState={baseLanes:u,cachePool:b},a!==null&&Ld(o,null),wx(),IN(o),a!==null&&ao(a,o,m,!0),o.childLanes=g,null}function Jd(a,o){return o=tf({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function $A(a,o,u){return rs(o,a.child,null,u),a=Jd(o,o.pendingProps),a.flags|=2,qn(o),o.memoizedState=null,a}function $$(a,o,u){var m=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(Fe){if(m.mode==="hidden")return a=Jd(o,m),o.lanes=536870912,fc(null,a);if(Nx(o),(a=vt)?(a=W_(a,sr),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:ei!==null?{id:Vr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},u=jN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ni(o);return o.lanes=536870912,null}return Jd(o,m)}var b=a.memoizedState;if(b!==null){var C=b.dehydrated;if(Nx(o),g)if(o.flags&256)o.flags&=-257,o=$A(a,o,u);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(Bt||ao(a,o,u,!1),g=(u&a.childLanes)!==0,Bt||g){if(m=dt,m!==null&&(C=T2(m,u),C!==0&&C!==b.retryLane))throw b.retryLane=C,Xi(a,C),Pn(m,a,C),Fx;df(),o=$A(a,o,u)}else a=b.treeContext,vt=lr(C.nextSibling),rn=o,Fe=!0,ti=null,sr=!1,a!==null&&NN(o,a),o=Jd(o,m),o.flags|=4096;return o}return a=da(a.child,{mode:m.mode,children:m.children}),a.ref=o.ref,o.child=a,a.return=o,a}function ef(a,o){var u=o.ref;if(u===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(o.flags|=4194816)}}function Gx(a,o,u,m,g){return Ji(o),u=_x(a,o,u,m,void 0,g),m=Ox(),a!==null&&!Bt?(Tx(a,o,g),ya(a,o,g)):(Fe&&m&&ox(o),o.flags|=1,sn(a,o,u,g),o.child)}function BA(a,o,u,m,g,b){return Ji(o),o.updateQueue=null,u=UN(o,m,u,g),qN(a),m=Ox(),a!==null&&!Bt?(Tx(a,o,b),ya(a,o,b)):(Fe&&m&&ox(o),o.flags|=1,sn(a,o,u,b),o.child)}function IA(a,o,u,m,g){if(Ji(o),o.stateNode===null){var b=eo,C=u.contextType;typeof C=="object"&&C!==null&&(b=an(C)),b=new u(m,b),o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Vx,o.stateNode=b,b._reactInternals=o,b=o.stateNode,b.props=m,b.state=o.memoizedState,b.refs={},gx(o),C=u.contextType,b.context=typeof C=="object"&&C!==null?an(C):eo,b.state=o.memoizedState,C=u.getDerivedStateFromProps,typeof C=="function"&&(Ux(o,u,C,m),b.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(C=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),C!==b.state&&Vx.enqueueReplaceState(b,b.state,null),oc(o,m,b,g),sc(),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!0}else if(a===null){b=o.stateNode;var P=o.memoizedProps,U=is(u,P);b.props=U;var Q=b.context,ne=u.contextType;C=eo,typeof ne=="object"&&ne!==null&&(C=an(ne));var oe=u.getDerivedStateFromProps;ne=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=o.pendingProps!==P,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||Q!==C)&&_A(o,b,m,C),ai=!1;var J=o.memoizedState;b.state=J,oc(o,m,b,g),sc(),Q=o.memoizedState,P||J!==Q||ai?(typeof oe=="function"&&(Ux(o,u,oe,m),Q=o.memoizedState),(U=ai||AA(o,u,U,m,J,Q,C))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=m,o.memoizedState=Q),b.props=m,b.state=Q,b.context=C,m=U):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!1)}else{b=o.stateNode,vx(a,o),C=o.memoizedProps,ne=is(u,C),b.props=ne,oe=o.pendingProps,J=b.context,Q=u.contextType,U=eo,typeof Q=="object"&&Q!==null&&(U=an(Q)),P=u.getDerivedStateFromProps,(Q=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==oe||J!==U)&&_A(o,b,m,U),ai=!1,J=o.memoizedState,b.state=J,oc(o,m,b,g),sc();var ee=o.memoizedState;C!==oe||J!==ee||ai||a!==null&&a.dependencies!==null&&Dd(a.dependencies)?(typeof P=="function"&&(Ux(o,u,P,m),ee=o.memoizedState),(ne=ai||AA(o,u,ne,m,J,ee,U)||a!==null&&a.dependencies!==null&&Dd(a.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(m,ee,U),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(m,ee,U)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=1024),o.memoizedProps=m,o.memoizedState=ee),b.props=m,b.state=ee,b.context=U,m=ne):(typeof b.componentDidUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=1024),m=!1)}return b=m,ef(a,o),m=(o.flags&128)!==0,b||m?(b=o.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:b.render(),o.flags|=1,a!==null&&m?(o.child=rs(o,a.child,null,g),o.child=rs(o,null,u,g)):sn(a,o,u,g),o.memoizedState=b.state,a=o.child):a=ya(a,o,g),a}function qA(a,o,u,m){return Zi(),o.flags|=256,sn(a,o,u,m),o.child}var Kx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yx(a){return{baseLanes:a,cachePool:CN()}}function Xx(a,o,u){return a=a!==null?a.childLanes&~u:0,o&&(a|=Vn),a}function UA(a,o,u){var m=o.pendingProps,g=!1,b=(o.flags&128)!==0,C;if((C=b)||(C=a!==null&&a.memoizedState===null?!1:(Dt.current&2)!==0),C&&(g=!0,o.flags&=-129),C=(o.flags&32)!==0,o.flags&=-33,a===null){if(Fe){if(g?oi(o):li(),(a=vt)?(a=W_(a,sr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:ei!==null?{id:Vr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},u=jN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ni(o);return My(a)?o.lanes=32:o.lanes=536870912,null}var P=m.children;return m=m.fallback,g?(li(),g=o.mode,P=tf({mode:"hidden",children:P},g),m=Wi(m,g,u,null),P.return=o,m.return=o,P.sibling=m,o.child=P,m=o.child,m.memoizedState=Yx(u),m.childLanes=Xx(a,C,u),o.memoizedState=Kx,fc(null,m)):(oi(o),Wx(o,P))}var U=a.memoizedState;if(U!==null&&(P=U.dehydrated,P!==null)){if(b)o.flags&256?(oi(o),o.flags&=-257,o=Zx(a,o,u)):o.memoizedState!==null?(li(),o.child=a.child,o.flags|=128,o=null):(li(),P=m.fallback,g=o.mode,m=tf({mode:"visible",children:m.children},g),P=Wi(P,g,u,null),P.flags|=2,m.return=o,P.return=o,m.sibling=P,o.child=m,rs(o,a.child,null,u),m=o.child,m.memoizedState=Yx(u),m.childLanes=Xx(a,C,u),o.memoizedState=Kx,o=fc(null,m));else if(oi(o),My(P)){if(C=P.nextSibling&&P.nextSibling.dataset,C)var Q=C.dgst;C=Q,m=Error(r(419)),m.stack="",m.digest=C,ec({value:m,source:null,stack:null}),o=Zx(a,o,u)}else if(Bt||ao(a,o,u,!1),C=(u&a.childLanes)!==0,Bt||C){if(C=dt,C!==null&&(m=T2(C,u),m!==0&&m!==U.retryLane))throw U.retryLane=m,Xi(a,m),Pn(C,a,m),Fx;Cy(P)||df(),o=Zx(a,o,u)}else Cy(P)?(o.flags|=192,o.child=a.child,o=null):(a=U.treeContext,vt=lr(P.nextSibling),rn=o,Fe=!0,ti=null,sr=!1,a!==null&&NN(o,a),o=Wx(o,m.children),o.flags|=4096);return o}return g?(li(),P=m.fallback,g=o.mode,U=a.child,Q=U.sibling,m=da(U,{mode:"hidden",children:m.children}),m.subtreeFlags=U.subtreeFlags&65011712,Q!==null?P=da(Q,P):(P=Wi(P,g,u,null),P.flags|=2),P.return=o,m.return=o,m.sibling=P,o.child=m,fc(null,m),m=o.child,P=a.child.memoizedState,P===null?P=Yx(u):(g=P.cachePool,g!==null?(U=Lt._currentValue,g=g.parent!==U?{parent:U,pool:U}:g):g=CN(),P={baseLanes:P.baseLanes|u,cachePool:g}),m.memoizedState=P,m.childLanes=Xx(a,C,u),o.memoizedState=Kx,fc(a.child,m)):(oi(o),u=a.child,a=u.sibling,u=da(u,{mode:"visible",children:m.children}),u.return=o,u.sibling=null,a!==null&&(C=o.deletions,C===null?(o.deletions=[a],o.flags|=16):C.push(a)),o.child=u,o.memoizedState=null,u)}function Wx(a,o){return o=tf({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function tf(a,o){return a=Bn(22,a,null,o),a.lanes=0,a}function Zx(a,o,u){return rs(o,a.child,null,u),a=Wx(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function VA(a,o,u){a.lanes|=o;var m=a.alternate;m!==null&&(m.lanes|=o),fx(a.return,o,u)}function Qx(a,o,u,m,g,b){var C=a.memoizedState;C===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:g,treeForkCount:b}:(C.isBackwards=o,C.rendering=null,C.renderingStartTime=0,C.last=m,C.tail=u,C.tailMode=g,C.treeForkCount=b)}function HA(a,o,u){var m=o.pendingProps,g=m.revealOrder,b=m.tail;m=m.children;var C=Dt.current,P=(C&2)!==0;if(P?(C=C&1|2,o.flags|=128):C&=1,ae(Dt,C),sn(a,o,m,u),m=Fe?Jl:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&VA(a,u,o);else if(a.tag===19)VA(a,u,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=o.child,g=null;u!==null;)a=u.alternate,a!==null&&Vd(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Qx(o,!1,g,u,b,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(a=g.alternate,a!==null&&Vd(a)===null){o.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}Qx(o,!0,u,null,b,m);break;case"together":Qx(o,!1,null,null,void 0,m);break;default:o.memoizedState=null}return o.child}function ya(a,o,u){if(a!==null&&(o.dependencies=a.dependencies),di|=o.lanes,(u&o.childLanes)===0)if(a!==null){if(ao(a,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,u=da(a,a.pendingProps),o.child=u,u.return=o;a.sibling!==null;)a=a.sibling,u=u.sibling=da(a,a.pendingProps),u.return=o;u.sibling=null}return o.child}function Jx(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&Dd(a)))}function B$(a,o,u){switch(o.tag){case 3:et(o,o.stateNode.containerInfo),ri(o,Lt,a.memoizedState.cache),Zi();break;case 27:case 5:Oe(o);break;case 4:et(o,o.stateNode.containerInfo);break;case 10:ri(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Nx(o),null;break;case 13:var m=o.memoizedState;if(m!==null)return m.dehydrated!==null?(oi(o),o.flags|=128,null):(u&o.child.childLanes)!==0?UA(a,o,u):(oi(o),a=ya(a,o,u),a!==null?a.sibling:null);oi(o);break;case 19:var g=(a.flags&128)!==0;if(m=(u&o.childLanes)!==0,m||(ao(a,o,u,!1),m=(u&o.childLanes)!==0),g){if(m)return HA(a,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ae(Dt,Dt.current),m)break;return null;case 22:return o.lanes=0,zA(a,o,u,o.pendingProps);case 24:ri(o,Lt,a.memoizedState.cache)}return ya(a,o,u)}function FA(a,o,u){if(a!==null)if(a.memoizedProps!==o.pendingProps)Bt=!0;else{if(!Jx(a,u)&&(o.flags&128)===0)return Bt=!1,B$(a,o,u);Bt=(a.flags&131072)!==0}else Bt=!1,Fe&&(o.flags&1048576)!==0&&SN(o,Jl,o.index);switch(o.lanes=0,o.tag){case 16:e:{var m=o.pendingProps;if(a=ts(o.elementType),o.type=a,typeof a=="function")ax(a)?(m=is(a,m),o.tag=1,o=IA(null,o,a,m,u)):(o.tag=0,o=Gx(null,o,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===T){o.tag=11,o=PA(null,o,a,m,u);break e}else if(g===k){o.tag=14,o=RA(null,o,a,m,u);break e}}throw o=K(a)||a,Error(r(306,o,""))}}return o;case 0:return Gx(a,o,o.type,o.pendingProps,u);case 1:return m=o.type,g=is(m,o.pendingProps),IA(a,o,m,g,u);case 3:e:{if(et(o,o.stateNode.containerInfo),a===null)throw Error(r(387));m=o.pendingProps;var b=o.memoizedState;g=b.element,vx(a,o),oc(o,m,null,u);var C=o.memoizedState;if(m=C.cache,ri(o,Lt,m),m!==b.cache&&hx(o,[Lt],u,!0),sc(),m=C.element,b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:C.cache},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){o=qA(a,o,m,u);break e}else if(m!==g){g=rr(Error(r(424)),o),ec(g),o=qA(a,o,m,u);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(vt=lr(a.firstChild),rn=o,Fe=!0,ti=null,sr=!0,u=zN(o,null,m,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Zi(),m===g){o=ya(a,o,u);break e}sn(a,o,m,u)}o=o.child}return o;case 26:return ef(a,o),a===null?(u=nO(o.type,null,o.pendingProps,null))?o.memoizedState=u:Fe||(u=o.type,a=o.pendingProps,m=gf(we.current).createElement(u),m[nn]=o,m[On]=a,on(m,u,a),Zt(m),o.stateNode=m):o.memoizedState=nO(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return Oe(o),a===null&&Fe&&(m=o.stateNode=J_(o.type,o.pendingProps,we.current),rn=o,sr=!0,g=vt,xi(o.type)?(ky=g,vt=lr(m.firstChild)):vt=g),sn(a,o,o.pendingProps.children,u),ef(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&Fe&&((g=m=vt)&&(m=pB(m,o.type,o.pendingProps,sr),m!==null?(o.stateNode=m,rn=o,vt=lr(m.firstChild),sr=!1,g=!0):g=!1),g||ni(o)),Oe(o),g=o.type,b=o.pendingProps,C=a!==null?a.memoizedProps:null,m=b.children,Oy(g,b)?m=null:C!==null&&Oy(g,C)&&(o.flags|=32),o.memoizedState!==null&&(g=_x(a,o,C$,null,null,u),Oc._currentValue=g),ef(a,o),sn(a,o,m,u),o.child;case 6:return a===null&&Fe&&((a=u=vt)&&(u=xB(u,o.pendingProps,sr),u!==null?(o.stateNode=u,rn=o,vt=null,a=!0):a=!1),a||ni(o)),null;case 13:return UA(a,o,u);case 4:return et(o,o.stateNode.containerInfo),m=o.pendingProps,a===null?o.child=rs(o,null,m,u):sn(a,o,m,u),o.child;case 11:return PA(a,o,o.type,o.pendingProps,u);case 7:return sn(a,o,o.pendingProps,u),o.child;case 8:return sn(a,o,o.pendingProps.children,u),o.child;case 12:return sn(a,o,o.pendingProps.children,u),o.child;case 10:return m=o.pendingProps,ri(o,o.type,m.value),sn(a,o,m.children,u),o.child;case 9:return g=o.type._context,m=o.pendingProps.children,Ji(o),g=an(g),m=m(g),o.flags|=1,sn(a,o,m,u),o.child;case 14:return RA(a,o,o.type,o.pendingProps,u);case 15:return DA(a,o,o.type,o.pendingProps,u);case 19:return HA(a,o,u);case 31:return $$(a,o,u);case 22:return zA(a,o,u,o.pendingProps);case 24:return Ji(o),m=an(Lt),a===null?(g=xx(),g===null&&(g=dt,b=mx(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),o.memoizedState={parent:m,cache:g},gx(o),ri(o,Lt,g)):((a.lanes&u)!==0&&(vx(a,o),oc(o,null,null,u),sc()),g=a.memoizedState,b=o.memoizedState,g.parent!==m?(g={parent:m,cache:m},o.memoizedState=g,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=g),ri(o,Lt,m)):(m=b.cache,ri(o,Lt,m),m!==g.cache&&hx(o,[Lt],u,!0))),sn(a,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ga(a){a.flags|=4}function ey(a,o,u,m,g){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(g_())a.flags|=8192;else throw ns=Bd,yx}else a.flags&=-16777217}function GA(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!oO(o))if(g_())a.flags|=8192;else throw ns=Bd,yx}function nf(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?A2():536870912,a.lanes|=o,yo|=o)}function hc(a,o){if(!Fe)switch(a.tailMode){case"hidden":o=a.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function bt(a){var o=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(o)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags&65011712,m|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=m,a.childLanes=u,o}function I$(a,o,u){var m=o.pendingProps;switch(lx(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(o),null;case 1:return bt(o),null;case 3:return u=o.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),o.memoizedState.cache!==m&&(o.flags|=2048),ma(Lt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(ro(o)?ga(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,ux())),bt(o),null;case 26:var g=o.type,b=o.memoizedState;return a===null?(ga(o),b!==null?(bt(o),GA(o,b)):(bt(o),ey(o,g,null,m,u))):b?b!==a.memoizedState?(ga(o),bt(o),GA(o,b)):(bt(o),o.flags&=-16777217):(a=a.memoizedProps,a!==m&&ga(o),bt(o),ey(o,g,a,m,u)),null;case 27:if(Me(o),u=we.current,g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}a=fe.current,ro(o)?AN(o):(a=J_(g,m,u),o.stateNode=a,ga(o))}return bt(o),null;case 5:if(Me(o),g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}if(b=fe.current,ro(o))AN(o);else{var C=gf(we.current);switch(b){case 1:b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=C.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof m.is=="string"?C.createElement("select",{is:m.is}):C.createElement("select"),m.multiple?b.multiple=!0:m.size&&(b.size=m.size);break;default:b=typeof m.is=="string"?C.createElement(g,{is:m.is}):C.createElement(g)}}b[nn]=o,b[On]=m;e:for(C=o.child;C!==null;){if(C.tag===5||C.tag===6)b.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break e;for(;C.sibling===null;){if(C.return===null||C.return===o)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}o.stateNode=b;e:switch(on(b,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&ga(o)}}return bt(o),ey(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(typeof m!="string"&&o.stateNode===null)throw Error(r(166));if(a=we.current,ro(o)){if(a=o.stateNode,u=o.memoizedProps,m=null,g=rn,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[nn]=o,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||U_(a.nodeValue,u)),a||ni(o,!0)}else a=gf(a).createTextNode(m),a[nn]=o,o.stateNode=a}return bt(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(m=ro(o),u!==null){if(a===null){if(!m)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[nn]=o}else Zi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),a=!1}else u=ux(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(qn(o),o):(qn(o),null);if((o.flags&128)!==0)throw Error(r(558))}return bt(o),null;case 13:if(m=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=ro(o),m!==null&&m.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[nn]=o}else Zi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),g=!1}else g=ux(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(qn(o),o):(qn(o),null)}return qn(o),(o.flags&128)!==0?(o.lanes=u,o):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=o.child,g=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(g=m.alternate.memoizedState.cachePool.pool),b=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(b=m.memoizedState.cachePool.pool),b!==g&&(m.flags|=2048)),u!==a&&u&&(o.child.flags|=8192),nf(o,o.updateQueue),bt(o),null);case 4:return de(),a===null&&wy(o.stateNode.containerInfo),bt(o),null;case 10:return ma(o.type),bt(o),null;case 19:if(Y(Dt),m=o.memoizedState,m===null)return bt(o),null;if(g=(o.flags&128)!==0,b=m.rendering,b===null)if(g)hc(m,!1);else{if(Mt!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(b=Vd(a),b!==null){for(o.flags|=128,hc(m,!1),a=b.updateQueue,o.updateQueue=a,nf(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)bN(u,a),u=u.sibling;return ae(Dt,Dt.current&1|2),Fe&&fa(o,m.treeForkCount),o.child}a=a.sibling}m.tail!==null&&mn()>lf&&(o.flags|=128,g=!0,hc(m,!1),o.lanes=4194304)}else{if(!g)if(a=Vd(b),a!==null){if(o.flags|=128,g=!0,a=a.updateQueue,o.updateQueue=a,nf(o,a),hc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Fe)return bt(o),null}else 2*mn()-m.renderingStartTime>lf&&u!==536870912&&(o.flags|=128,g=!0,hc(m,!1),o.lanes=4194304);m.isBackwards?(b.sibling=o.child,o.child=b):(a=m.last,a!==null?a.sibling=b:o.child=b,m.last=b)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=mn(),a.sibling=null,u=Dt.current,ae(Dt,g?u&1|2:u&1),Fe&&fa(o,m.treeForkCount),a):(bt(o),null);case 22:case 23:return qn(o),Sx(),m=o.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(o.flags|=8192):m&&(o.flags|=8192),m?(u&536870912)!==0&&(o.flags&128)===0&&(bt(o),o.subtreeFlags&6&&(o.flags|=8192)):bt(o),u=o.updateQueue,u!==null&&nf(o,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==u&&(o.flags|=2048),a!==null&&Y(es),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ma(Lt),bt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function q$(a,o){switch(lx(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return ma(Lt),de(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return Me(o),null;case 31:if(o.memoizedState!==null){if(qn(o),o.alternate===null)throw Error(r(340));Zi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(qn(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Zi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return Y(Dt),null;case 4:return de(),null;case 10:return ma(o.type),null;case 22:case 23:return qn(o),Sx(),a!==null&&Y(es),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return ma(Lt),null;case 25:return null;default:return null}}function KA(a,o){switch(lx(o),o.tag){case 3:ma(Lt),de();break;case 26:case 27:case 5:Me(o);break;case 4:de();break;case 31:o.memoizedState!==null&&qn(o);break;case 13:qn(o);break;case 19:Y(Dt);break;case 10:ma(o.type);break;case 22:case 23:qn(o),Sx(),a!==null&&Y(es);break;case 24:ma(Lt)}}function mc(a,o){try{var u=o.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&a)===a){m=void 0;var b=u.create,C=u.inst;m=b(),C.destroy=m}u=u.next}while(u!==g)}}catch(P){at(o,o.return,P)}}function ci(a,o,u){try{var m=o.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var b=g.next;m=b;do{if((m.tag&a)===a){var C=m.inst,P=C.destroy;if(P!==void 0){C.destroy=void 0,g=o;var U=u,Q=P;try{Q()}catch(ne){at(g,U,ne)}}}m=m.next}while(m!==b)}}catch(ne){at(o,o.return,ne)}}function YA(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{$N(o,u)}catch(m){at(a,a.return,m)}}}function XA(a,o,u){u.props=is(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){at(a,o,m)}}function pc(a,o){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(g){at(a,o,g)}}function Fr(a,o){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(g){at(a,o,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){at(a,o,g)}else u.current=null}function WA(a){var o=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(g){at(a,a.return,g)}}function ty(a,o,u){try{var m=a.stateNode;cB(m,a.type,u,o),m[On]=o}catch(g){at(a,a.return,g)}}function ZA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&xi(a.type)||a.tag===4}function ny(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||ZA(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&xi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function ry(a,o,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(a),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=ca));else if(m!==4&&(m===27&&xi(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(ry(a,o,u),a=a.sibling;a!==null;)ry(a,o,u),a=a.sibling}function rf(a,o,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,o?u.insertBefore(a,o):u.appendChild(a);else if(m!==4&&(m===27&&xi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(rf(a,o,u),a=a.sibling;a!==null;)rf(a,o,u),a=a.sibling}function QA(a){var o=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);on(o,m,u),o[nn]=a,o[On]=u}catch(b){at(a,a.return,b)}}var va=!1,It=!1,ay=!1,JA=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function U$(a,o){if(a=a.containerInfo,Ay=Af,a=dN(a),Zp(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var g=m.anchorOffset,b=m.focusNode;m=m.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var C=0,P=-1,U=-1,Q=0,ne=0,oe=a,J=null;t:for(;;){for(var ee;oe!==u||g!==0&&oe.nodeType!==3||(P=C+g),oe!==b||m!==0&&oe.nodeType!==3||(U=C+m),oe.nodeType===3&&(C+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)J=oe,oe=ee;for(;;){if(oe===a)break t;if(J===u&&++Q===g&&(P=C),J===b&&++ne===m&&(U=C),(ee=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=ee}u=P===-1||U===-1?null:{start:P,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(_y={focusedElem:a,selectionRange:u},Af=!1,Qt=o;Qt!==null;)if(o=Qt,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Qt=a;else for(;Qt!==null;){switch(o=Qt,b=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=o,g=b.memoizedProps,b=b.memoizedState,m=u.stateNode;try{var pe=is(u.type,g);a=m.getSnapshotBeforeUpdate(pe,b),m.__reactInternalSnapshotBeforeUpdate=a}catch(Se){at(u,u.return,Se)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,u=a.nodeType,u===9)Ey(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Ey(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=o.sibling,a!==null){a.return=o.return,Qt=a;break}Qt=o.return}}function e_(a,o,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:ja(a,u),m&4&&mc(5,u);break;case 1:if(ja(a,u),m&4)if(a=u.stateNode,o===null)try{a.componentDidMount()}catch(C){at(u,u.return,C)}else{var g=is(u.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(g,o,a.__reactInternalSnapshotBeforeUpdate)}catch(C){at(u,u.return,C)}}m&64&&YA(u),m&512&&pc(u,u.return);break;case 3:if(ja(a,u),m&64&&(a=u.updateQueue,a!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{$N(a,o)}catch(C){at(u,u.return,C)}}break;case 27:o===null&&m&4&&QA(u);case 26:case 5:ja(a,u),o===null&&m&4&&WA(u),m&512&&pc(u,u.return);break;case 12:ja(a,u);break;case 31:ja(a,u),m&4&&r_(a,u);break;case 13:ja(a,u),m&4&&a_(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=Z$.bind(null,u),yB(a,u))));break;case 22:if(m=u.memoizedState!==null||va,!m){o=o!==null&&o.memoizedState!==null||It,g=va;var b=It;va=m,(It=o)&&!b?wa(a,u,(u.subtreeFlags&8772)!==0):ja(a,u),va=g,It=b}break;case 30:break;default:ja(a,u)}}function t_(a){var o=a.alternate;o!==null&&(a.alternate=null,t_(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Rp(o)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var At=null,En=!1;function ba(a,o,u){for(u=u.child;u!==null;)n_(a,o,u),u=u.sibling}function n_(a,o,u){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Bl,u)}catch{}switch(u.tag){case 26:It||Fr(u,o),ba(a,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||Fr(u,o);var m=At,g=En;xi(u.type)&&(At=u.stateNode,En=!1),ba(a,o,u),Nc(u.stateNode),At=m,En=g;break;case 5:It||Fr(u,o);case 6:if(m=At,g=En,At=null,ba(a,o,u),At=m,En=g,At!==null)if(En)try{(At.nodeType===9?At.body:At.nodeName==="HTML"?At.ownerDocument.body:At).removeChild(u.stateNode)}catch(b){at(u,o,b)}else try{At.removeChild(u.stateNode)}catch(b){at(u,o,b)}break;case 18:At!==null&&(En?(a=At,Y_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Ao(a)):Y_(At,u.stateNode));break;case 4:m=At,g=En,At=u.stateNode.containerInfo,En=!0,ba(a,o,u),At=m,En=g;break;case 0:case 11:case 14:case 15:ci(2,u,o),It||ci(4,u,o),ba(a,o,u);break;case 1:It||(Fr(u,o),m=u.stateNode,typeof m.componentWillUnmount=="function"&&XA(u,o,m)),ba(a,o,u);break;case 21:ba(a,o,u);break;case 22:It=(m=It)||u.memoizedState!==null,ba(a,o,u),It=m;break;default:ba(a,o,u)}}function r_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Ao(a)}catch(u){at(o,o.return,u)}}}function a_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ao(a)}catch(u){at(o,o.return,u)}}function V$(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new JA),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new JA),o;default:throw Error(r(435,a.tag))}}function af(a,o){var u=V$(a);o.forEach(function(m){if(!u.has(m)){u.add(m);var g=Q$.bind(null,a,m);m.then(g,g)}})}function Cn(a,o){var u=o.deletions;if(u!==null)for(var m=0;m<u.length;m++){var g=u[m],b=a,C=o,P=C;e:for(;P!==null;){switch(P.tag){case 27:if(xi(P.type)){At=P.stateNode,En=!1;break e}break;case 5:At=P.stateNode,En=!1;break e;case 3:case 4:At=P.stateNode.containerInfo,En=!0;break e}P=P.return}if(At===null)throw Error(r(160));n_(b,C,g),At=null,En=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)i_(o,a),o=o.sibling}var Or=null;function i_(a,o){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Cn(o,a),Mn(a),m&4&&(ci(3,a,a.return),mc(3,a),ci(5,a,a.return));break;case 1:Cn(o,a),Mn(a),m&512&&(It||u===null||Fr(u,u.return)),m&64&&va&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var g=Or;if(Cn(o,a),Mn(a),m&512&&(It||u===null||Fr(u,u.return)),m&4){var b=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(m){case"title":b=g.getElementsByTagName("title")[0],(!b||b[Ul]||b[nn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(m),g.head.insertBefore(b,g.querySelector("head > title"))),on(b,m,u),b[nn]=a,Zt(b),m=b;break e;case"link":var C=iO("link","href",g).get(m+(u.href||""));if(C){for(var P=0;P<C.length;P++)if(b=C[P],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;case"meta":if(C=iO("meta","content",g).get(m+(u.content||""))){for(P=0;P<C.length;P++)if(b=C[P],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;default:throw Error(r(468,m))}b[nn]=a,Zt(b),m=b}a.stateNode=m}else sO(g,a.type,a.stateNode);else a.stateNode=aO(g,m,a.memoizedProps);else b!==m?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,m===null?sO(g,a.type,a.stateNode):aO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&ty(a,a.memoizedProps,u.memoizedProps)}break;case 27:Cn(o,a),Mn(a),m&512&&(It||u===null||Fr(u,u.return)),u!==null&&m&4&&ty(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Cn(o,a),Mn(a),m&512&&(It||u===null||Fr(u,u.return)),a.flags&32){g=a.stateNode;try{Ks(g,"")}catch(pe){at(a,a.return,pe)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,ty(a,g,u!==null?u.memoizedProps:g)),m&1024&&(ay=!0);break;case 6:if(Cn(o,a),Mn(a),m&4){if(a.stateNode===null)throw Error(r(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(pe){at(a,a.return,pe)}}break;case 3:if(jf=null,g=Or,Or=vf(o.containerInfo),Cn(o,a),Or=g,Mn(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ao(o.containerInfo)}catch(pe){at(a,a.return,pe)}ay&&(ay=!1,s_(a));break;case 4:m=Or,Or=vf(a.stateNode.containerInfo),Cn(o,a),Mn(a),Or=m;break;case 12:Cn(o,a),Mn(a);break;case 31:Cn(o,a),Mn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 13:Cn(o,a),Mn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(of=mn()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 22:g=a.memoizedState!==null;var U=u!==null&&u.memoizedState!==null,Q=va,ne=It;if(va=Q||g,It=ne||U,Cn(o,a),It=ne,va=Q,Mn(a),m&8192)e:for(o=a.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(u===null||U||va||It||ss(a)),u=null,o=a;;){if(o.tag===5||o.tag===26){if(u===null){U=u=o;try{if(b=U.stateNode,g)C=b.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{P=U.stateNode;var oe=U.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;P.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(pe){at(U,U.return,pe)}}}else if(o.tag===6){if(u===null){U=o;try{U.stateNode.nodeValue=g?"":U.memoizedProps}catch(pe){at(U,U.return,pe)}}}else if(o.tag===18){if(u===null){U=o;try{var ee=U.stateNode;g?X_(ee,!0):X_(U.stateNode,!1)}catch(pe){at(U,U.return,pe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,af(a,u))));break;case 19:Cn(o,a),Mn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 30:break;case 21:break;default:Cn(o,a),Mn(a)}}function Mn(a){var o=a.flags;if(o&2){try{for(var u,m=a.return;m!==null;){if(ZA(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=ny(a);rf(a,b,g);break;case 5:var C=u.stateNode;u.flags&32&&(Ks(C,""),u.flags&=-33);var P=ny(a);rf(a,P,C);break;case 3:case 4:var U=u.stateNode.containerInfo,Q=ny(a);ry(a,Q,U);break;default:throw Error(r(161))}}catch(ne){at(a,a.return,ne)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function s_(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;s_(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function ja(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)e_(a,o.alternate,o),o=o.sibling}function ss(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:ci(4,o,o.return),ss(o);break;case 1:Fr(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&XA(o,o.return,u),ss(o);break;case 27:Nc(o.stateNode);case 26:case 5:Fr(o,o.return),ss(o);break;case 22:o.memoizedState===null&&ss(o);break;case 30:ss(o);break;default:ss(o)}a=a.sibling}}function wa(a,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var m=o.alternate,g=a,b=o,C=b.flags;switch(b.tag){case 0:case 11:case 15:wa(g,b,u),mc(4,b);break;case 1:if(wa(g,b,u),m=b,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Q){at(m,m.return,Q)}if(m=b,g=m.updateQueue,g!==null){var P=m.stateNode;try{var U=g.shared.hiddenCallbacks;if(U!==null)for(g.shared.hiddenCallbacks=null,g=0;g<U.length;g++)LN(U[g],P)}catch(Q){at(m,m.return,Q)}}u&&C&64&&YA(b),pc(b,b.return);break;case 27:QA(b);case 26:case 5:wa(g,b,u),u&&m===null&&C&4&&WA(b),pc(b,b.return);break;case 12:wa(g,b,u);break;case 31:wa(g,b,u),u&&C&4&&r_(g,b);break;case 13:wa(g,b,u),u&&C&4&&a_(g,b);break;case 22:b.memoizedState===null&&wa(g,b,u),pc(b,b.return);break;case 30:break;default:wa(g,b,u)}o=o.sibling}}function iy(a,o){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&tc(u))}function sy(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&tc(a))}function Tr(a,o,u,m){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)o_(a,o,u,m),o=o.sibling}function o_(a,o,u,m){var g=o.flags;switch(o.tag){case 0:case 11:case 15:Tr(a,o,u,m),g&2048&&mc(9,o);break;case 1:Tr(a,o,u,m);break;case 3:Tr(a,o,u,m),g&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&tc(a)));break;case 12:if(g&2048){Tr(a,o,u,m),a=o.stateNode;try{var b=o.memoizedProps,C=b.id,P=b.onPostCommit;typeof P=="function"&&P(C,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(U){at(o,o.return,U)}}else Tr(a,o,u,m);break;case 31:Tr(a,o,u,m);break;case 13:Tr(a,o,u,m);break;case 23:break;case 22:b=o.stateNode,C=o.alternate,o.memoizedState!==null?b._visibility&2?Tr(a,o,u,m):xc(a,o):b._visibility&2?Tr(a,o,u,m):(b._visibility|=2,mo(a,o,u,m,(o.subtreeFlags&10256)!==0||!1)),g&2048&&iy(C,o);break;case 24:Tr(a,o,u,m),g&2048&&sy(o.alternate,o);break;default:Tr(a,o,u,m)}}function mo(a,o,u,m,g){for(g=g&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var b=a,C=o,P=u,U=m,Q=C.flags;switch(C.tag){case 0:case 11:case 15:mo(b,C,P,U,g),mc(8,C);break;case 23:break;case 22:var ne=C.stateNode;C.memoizedState!==null?ne._visibility&2?mo(b,C,P,U,g):xc(b,C):(ne._visibility|=2,mo(b,C,P,U,g)),g&&Q&2048&&iy(C.alternate,C);break;case 24:mo(b,C,P,U,g),g&&Q&2048&&sy(C.alternate,C);break;default:mo(b,C,P,U,g)}o=o.sibling}}function xc(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=a,m=o,g=m.flags;switch(m.tag){case 22:xc(u,m),g&2048&&iy(m.alternate,m);break;case 24:xc(u,m),g&2048&&sy(m.alternate,m);break;default:xc(u,m)}o=o.sibling}}var yc=8192;function po(a,o,u){if(a.subtreeFlags&yc)for(a=a.child;a!==null;)l_(a,o,u),a=a.sibling}function l_(a,o,u){switch(a.tag){case 26:po(a,o,u),a.flags&yc&&a.memoizedState!==null&&EB(u,Or,a.memoizedState,a.memoizedProps);break;case 5:po(a,o,u);break;case 3:case 4:var m=Or;Or=vf(a.stateNode.containerInfo),po(a,o,u),Or=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=yc,yc=16777216,po(a,o,u),yc=m):po(a,o,u));break;default:po(a,o,u)}}function c_(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function gc(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,d_(m,a)}c_(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)u_(a),a=a.sibling}function u_(a){switch(a.tag){case 0:case 11:case 15:gc(a),a.flags&2048&&ci(9,a,a.return);break;case 3:gc(a);break;case 12:gc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,sf(a)):gc(a);break;default:gc(a)}}function sf(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,d_(m,a)}c_(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:ci(8,o,o.return),sf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,sf(o));break;default:sf(o)}a=a.sibling}}function d_(a,o){for(;Qt!==null;){var u=Qt;switch(u.tag){case 0:case 11:case 15:ci(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:tc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Qt=m;else e:for(u=a;Qt!==null;){m=Qt;var g=m.sibling,b=m.return;if(t_(m),m===u){Qt=null;break e}if(g!==null){g.return=b,Qt=g;break e}Qt=b}}}var H$={getCacheForType:function(a){var o=an(Lt),u=o.data.get(a);return u===void 0&&(u=a(),o.data.set(a,u)),u},cacheSignal:function(){return an(Lt).controller.signal}},F$=typeof WeakMap=="function"?WeakMap:Map,Je=0,dt=null,qe=null,Ve=0,rt=0,Un=null,ui=!1,xo=!1,oy=!1,Sa=0,Mt=0,di=0,os=0,ly=0,Vn=0,yo=0,vc=null,kn=null,cy=!1,of=0,f_=0,lf=1/0,cf=null,fi=null,Ht=0,hi=null,go=null,Na=0,uy=0,dy=null,h_=null,bc=0,fy=null;function Hn(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:I.T!==null?gy():E2()}function m_(){if(Vn===0)if((Ve&536870912)===0||Fe){var a=xd;xd<<=1,(xd&3932160)===0&&(xd=262144),Vn=a}else Vn=536870912;return a=In.current,a!==null&&(a.flags|=32),Vn}function Pn(a,o,u){(a===dt&&(rt===2||rt===9)||a.cancelPendingCommit!==null)&&(vo(a,0),mi(a,Ve,Vn,!1)),ql(a,u),((Je&2)===0||a!==dt)&&(a===dt&&((Je&2)===0&&(os|=u),Mt===4&&mi(a,Ve,Vn,!1)),Gr(a))}function p_(a,o,u){if((Je&6)!==0)throw Error(r(327));var m=!u&&(o&127)===0&&(o&a.expiredLanes)===0||Il(a,o),g=m?Y$(a,o):my(a,o,!0),b=m;do{if(g===0){xo&&!m&&mi(a,o,0,!1);break}else{if(u=a.current.alternate,b&&!G$(u)){g=my(a,o,!1),b=!1;continue}if(g===2){if(b=o,a.errorRecoveryDisabledLanes&b)var C=0;else C=a.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){o=C;e:{var P=a;g=vc;var U=P.current.memoizedState.isDehydrated;if(U&&(vo(P,C).flags|=256),C=my(P,C,!1),C!==2){if(oy&&!U){P.errorRecoveryDisabledLanes|=b,os|=b,g=4;break e}b=kn,kn=g,b!==null&&(kn===null?kn=b:kn.push.apply(kn,b))}g=C}if(b=!1,g!==2)continue}}if(g===1){vo(a,0),mi(a,o,0,!0);break}e:{switch(m=a,b=g,b){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:mi(m,o,Vn,!ui);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(g=of+300-mn(),10<g)){if(mi(m,o,Vn,!ui),gd(m,0,!0)!==0)break e;Na=o,m.timeoutHandle=G_(x_.bind(null,m,u,kn,cf,cy,o,Vn,os,yo,ui,b,"Throttled",-0,0),g);break e}x_(m,u,kn,cf,cy,o,Vn,os,yo,ui,b,null,-0,0)}}break}while(!0);Gr(a)}function x_(a,o,u,m,g,b,C,P,U,Q,ne,oe,J,ee){if(a.timeoutHandle=-1,oe=o.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ca},l_(o,b,oe);var pe=(b&62914560)===b?of-mn():(b&4194048)===b?f_-mn():0;if(pe=CB(oe,pe),pe!==null){Na=b,a.cancelPendingCommit=pe(N_.bind(null,a,o,b,u,m,g,C,P,U,ne,oe,null,J,ee)),mi(a,b,C,!Q);return}}N_(a,o,b,u,m,g,C,P,U)}function G$(a){for(var o=a;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var g=u[m],b=g.getSnapshot;g=g.value;try{if(!$n(b(),g))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function mi(a,o,u,m){o&=~ly,o&=~os,a.suspendedLanes|=o,a.pingedLanes&=~o,m&&(a.warmLanes|=o),m=a.expirationTimes;for(var g=o;0<g;){var b=31-Ln(g),C=1<<b;m[b]=-1,g&=~C}u!==0&&_2(a,u,o)}function uf(){return(Je&6)===0?(jc(0),!1):!0}function hy(){if(qe!==null){if(rt===0)var a=qe.return;else a=qe,ha=Qi=null,Ex(a),lo=null,rc=0,a=qe;for(;a!==null;)KA(a.alternate,a),a=a.return;qe=null}}function vo(a,o){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,fB(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Na=0,hy(),dt=a,qe=u=da(a.current,null),Ve=o,rt=0,Un=null,ui=!1,xo=Il(a,o),oy=!1,yo=Vn=ly=os=di=Mt=0,kn=vc=null,cy=!1,(o&8)!==0&&(o|=o&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=o;0<m;){var g=31-Ln(m),b=1<<g;o|=a[g],m&=~b}return Sa=o,Cd(),u}function y_(a,o){De=null,I.H=dc,o===oo||o===$d?(o=PN(),rt=3):o===yx?(o=PN(),rt=4):rt=o===Fx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Un=o,qe===null&&(Mt=1,Qd(a,rr(o,a.current)))}function g_(){var a=In.current;return a===null?!0:(Ve&4194048)===Ve?or===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===or:!1}function v_(){var a=I.H;return I.H=dc,a===null?dc:a}function b_(){var a=I.A;return I.A=H$,a}function df(){Mt=4,ui||(Ve&4194048)!==Ve&&In.current!==null||(xo=!0),(di&134217727)===0&&(os&134217727)===0||dt===null||mi(dt,Ve,Vn,!1)}function my(a,o,u){var m=Je;Je|=2;var g=v_(),b=b_();(dt!==a||Ve!==o)&&(cf=null,vo(a,o)),o=!1;var C=Mt;e:do try{if(rt!==0&&qe!==null){var P=qe,U=Un;switch(rt){case 8:hy(),C=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(o=!0);var Q=rt;if(rt=0,Un=null,bo(a,P,U,Q),u&&xo){C=0;break e}break;default:Q=rt,rt=0,Un=null,bo(a,P,U,Q)}}K$(),C=Mt;break}catch(ne){y_(a,ne)}while(!0);return o&&a.shellSuspendCounter++,ha=Qi=null,Je=m,I.H=g,I.A=b,qe===null&&(dt=null,Ve=0,Cd()),C}function K$(){for(;qe!==null;)j_(qe)}function Y$(a,o){var u=Je;Je|=2;var m=v_(),g=b_();dt!==a||Ve!==o?(cf=null,lf=mn()+500,vo(a,o)):xo=Il(a,o);e:do try{if(rt!==0&&qe!==null){o=qe;var b=Un;t:switch(rt){case 1:rt=0,Un=null,bo(a,o,b,1);break;case 2:case 9:if(MN(b)){rt=0,Un=null,w_(o);break}o=function(){rt!==2&&rt!==9||dt!==a||(rt=7),Gr(a)},b.then(o,o);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:MN(b)?(rt=0,Un=null,w_(o)):(rt=0,Un=null,bo(a,o,b,7));break;case 5:var C=null;switch(qe.tag){case 26:C=qe.memoizedState;case 5:case 27:var P=qe;if(C?oO(C):P.stateNode.complete){rt=0,Un=null;var U=P.sibling;if(U!==null)qe=U;else{var Q=P.return;Q!==null?(qe=Q,ff(Q)):qe=null}break t}}rt=0,Un=null,bo(a,o,b,5);break;case 6:rt=0,Un=null,bo(a,o,b,6);break;case 8:hy(),Mt=6;break e;default:throw Error(r(462))}}X$();break}catch(ne){y_(a,ne)}while(!0);return ha=Qi=null,I.H=m,I.A=g,Je=u,qe!==null?0:(dt=null,Ve=0,Cd(),Mt)}function X$(){for(;qe!==null&&!oa();)j_(qe)}function j_(a){var o=FA(a.alternate,a,Sa);a.memoizedProps=a.pendingProps,o===null?ff(a):qe=o}function w_(a){var o=a,u=o.alternate;switch(o.tag){case 15:case 0:o=BA(u,o,o.pendingProps,o.type,void 0,Ve);break;case 11:o=BA(u,o,o.pendingProps,o.type.render,o.ref,Ve);break;case 5:Ex(o);default:KA(u,o),o=qe=bN(o,Sa),o=FA(u,o,Sa)}a.memoizedProps=a.pendingProps,o===null?ff(a):qe=o}function bo(a,o,u,m){ha=Qi=null,Ex(o),lo=null,rc=0;var g=o.return;try{if(L$(a,g,o,u,Ve)){Mt=1,Qd(a,rr(u,a.current)),qe=null;return}}catch(b){if(g!==null)throw qe=g,b;Mt=1,Qd(a,rr(u,a.current)),qe=null;return}o.flags&32768?(Fe||m===1?a=!0:xo||(Ve&536870912)!==0?a=!1:(ui=a=!0,(m===2||m===9||m===3||m===6)&&(m=In.current,m!==null&&m.tag===13&&(m.flags|=16384))),S_(o,a)):ff(o)}function ff(a){var o=a;do{if((o.flags&32768)!==0){S_(o,ui);return}a=o.return;var u=I$(o.alternate,o,Sa);if(u!==null){qe=u;return}if(o=o.sibling,o!==null){qe=o;return}qe=o=a}while(o!==null);Mt===0&&(Mt=5)}function S_(a,o){do{var u=q$(a.alternate,a);if(u!==null){u.flags&=32767,qe=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(a=a.sibling,a!==null)){qe=a;return}qe=a=u}while(a!==null);Mt=6,qe=null}function N_(a,o,u,m,g,b,C,P,U){a.cancelPendingCommit=null;do hf();while(Ht!==0);if((Je&6)!==0)throw Error(r(327));if(o!==null){if(o===a.current)throw Error(r(177));if(b=o.lanes|o.childLanes,b|=nx,T8(a,u,b,C,P,U),a===dt&&(qe=dt=null,Ve=0),go=o,hi=a,Na=u,uy=b,dy=g,h_=m,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,J$(md,function(){return E_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||m){m=I.T,I.T=null,g=F.p,F.p=2,C=Je,Je|=4;try{U$(a,o,u)}finally{Je=C,F.p=g,I.T=m}}Ht=1,A_(),__(),O_()}}function A_(){if(Ht===1){Ht=0;var a=hi,o=go,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var m=F.p;F.p=2;var g=Je;Je|=4;try{i_(o,a);var b=_y,C=dN(a.containerInfo),P=b.focusedElem,U=b.selectionRange;if(C!==P&&P&&P.ownerDocument&&uN(P.ownerDocument.documentElement,P)){if(U!==null&&Zp(P)){var Q=U.start,ne=U.end;if(ne===void 0&&(ne=Q),"selectionStart"in P)P.selectionStart=Q,P.selectionEnd=Math.min(ne,P.value.length);else{var oe=P.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var ee=J.getSelection(),pe=P.textContent.length,Se=Math.min(U.start,pe),ct=U.end===void 0?Se:Math.min(U.end,pe);!ee.extend&&Se>ct&&(C=ct,ct=Se,Se=C);var X=cN(P,Se),G=cN(P,ct);if(X&&G&&(ee.rangeCount!==1||ee.anchorNode!==X.node||ee.anchorOffset!==X.offset||ee.focusNode!==G.node||ee.focusOffset!==G.offset)){var W=oe.createRange();W.setStart(X.node,X.offset),ee.removeAllRanges(),Se>ct?(ee.addRange(W),ee.extend(G.node,G.offset)):(W.setEnd(G.node,G.offset),ee.addRange(W))}}}}for(oe=[],ee=P;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<oe.length;P++){var se=oe[P];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Af=!!Ay,_y=Ay=null}finally{Je=g,F.p=m,I.T=u}}a.current=o,Ht=2}}function __(){if(Ht===2){Ht=0;var a=hi,o=go,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var m=F.p;F.p=2;var g=Je;Je|=4;try{e_(a,o.alternate,o)}finally{Je=g,F.p=m,I.T=u}}Ht=3}}function O_(){if(Ht===4||Ht===3){Ht=0,$l();var a=hi,o=go,u=Na,m=h_;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ht=5:(Ht=0,go=hi=null,T_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(fi=null),kp(u),o=o.stateNode,zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Bl,o,void 0,(o.current.flags&128)===128)}catch{}if(m!==null){o=I.T,g=F.p,F.p=2,I.T=null;try{for(var b=a.onRecoverableError,C=0;C<m.length;C++){var P=m[C];b(P.value,{componentStack:P.stack})}}finally{I.T=o,F.p=g}}(Na&3)!==0&&hf(),Gr(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===fy?bc++:(bc=0,fy=a):bc=0,jc(0)}}function T_(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,tc(o)))}function hf(){return A_(),__(),O_(),E_()}function E_(){if(Ht!==5)return!1;var a=hi,o=uy;uy=0;var u=kp(Na),m=I.T,g=F.p;try{F.p=32>u?32:u,I.T=null,u=dy,dy=null;var b=hi,C=Na;if(Ht=0,go=hi=null,Na=0,(Je&6)!==0)throw Error(r(331));var P=Je;if(Je|=4,u_(b.current),o_(b,b.current,C,u),Je=P,jc(0,!1),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Bl,b)}catch{}return!0}finally{F.p=g,I.T=m,T_(a,o)}}function C_(a,o,u){o=rr(u,o),o=Hx(a.stateNode,o,2),a=si(a,o,2),a!==null&&(ql(a,2),Gr(a))}function at(a,o,u){if(a.tag===3)C_(a,a,u);else for(;o!==null;){if(o.tag===3){C_(o,a,u);break}else if(o.tag===1){var m=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(fi===null||!fi.has(m))){a=rr(u,a),u=MA(2),m=si(o,u,2),m!==null&&(kA(u,m,o,a),ql(m,2),Gr(m));break}}o=o.return}}function py(a,o,u){var m=a.pingCache;if(m===null){m=a.pingCache=new F$;var g=new Set;m.set(o,g)}else g=m.get(o),g===void 0&&(g=new Set,m.set(o,g));g.has(u)||(oy=!0,g.add(u),a=W$.bind(null,a,o,u),o.then(a,a))}function W$(a,o,u){var m=a.pingCache;m!==null&&m.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,dt===a&&(Ve&u)===u&&(Mt===4||Mt===3&&(Ve&62914560)===Ve&&300>mn()-of?(Je&2)===0&&vo(a,0):ly|=u,yo===Ve&&(yo=0)),Gr(a)}function M_(a,o){o===0&&(o=A2()),a=Xi(a,o),a!==null&&(ql(a,o),Gr(a))}function Z$(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),M_(a,u)}function Q$(a,o){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(o),M_(a,u)}function J$(a,o){return Wa(a,o)}var mf=null,jo=null,xy=!1,pf=!1,yy=!1,pi=0;function Gr(a){a!==jo&&a.next===null&&(jo===null?mf=jo=a:jo=jo.next=a),pf=!0,xy||(xy=!0,tB())}function jc(a,o){if(!yy&&pf){yy=!0;do for(var u=!1,m=mf;m!==null;){if(a!==0){var g=m.pendingLanes;if(g===0)var b=0;else{var C=m.suspendedLanes,P=m.pingedLanes;b=(1<<31-Ln(42|a)+1)-1,b&=g&~(C&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,D_(m,b))}else b=Ve,b=gd(m,m===dt?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||Il(m,b)||(u=!0,D_(m,b));m=m.next}while(u);yy=!1}}function eB(){k_()}function k_(){pf=xy=!1;var a=0;pi!==0&&dB()&&(a=pi);for(var o=mn(),u=null,m=mf;m!==null;){var g=m.next,b=P_(m,o);b===0?(m.next=null,u===null?mf=g:u.next=g,g===null&&(jo=u)):(u=m,(a!==0||(b&3)!==0)&&(pf=!0)),m=g}Ht!==0&&Ht!==5||jc(a),pi!==0&&(pi=0)}function P_(a,o){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var C=31-Ln(b),P=1<<C,U=g[C];U===-1?((P&u)===0||(P&m)!==0)&&(g[C]=O8(P,o)):U<=o&&(a.expiredLanes|=P),b&=~P}if(o=dt,u=Ve,u=gd(a,a===o?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===o&&(rt===2||rt===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Ar(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Il(a,u)){if(o=u&-u,o===a.callbackPriority)return o;switch(m!==null&&Ar(m),kp(u)){case 2:case 8:u=S2;break;case 32:u=md;break;case 268435456:u=N2;break;default:u=md}return m=R_.bind(null,a),u=Wa(u,m),a.callbackPriority=o,a.callbackNode=u,o}return m!==null&&m!==null&&Ar(m),a.callbackPriority=2,a.callbackNode=null,2}function R_(a,o){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(hf()&&a.callbackNode!==u)return null;var m=Ve;return m=gd(a,a===dt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(p_(a,m,o),P_(a,mn()),a.callbackNode!=null&&a.callbackNode===u?R_.bind(null,a):null)}function D_(a,o){if(hf())return null;p_(a,o,!0)}function tB(){hB(function(){(Je&6)!==0?Wa(w2,eB):k_()})}function gy(){if(pi===0){var a=io;a===0&&(a=pd,pd<<=1,(pd&261888)===0&&(pd=256)),pi=a}return pi}function z_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:wd(""+a)}function L_(a,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,a.id&&u.setAttribute("form",a.id),o.parentNode.insertBefore(u,o),a=new FormData(a),u.parentNode.removeChild(u),a}function nB(a,o,u,m,g){if(o==="submit"&&u&&u.stateNode===g){var b=z_((g[On]||null).action),C=m.submitter;C&&(o=(o=C[On]||null)?z_(o.formAction):C.getAttribute("formAction"),o!==null&&(b=o,C=null));var P=new _d("action","action",null,m,g);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(pi!==0){var U=C?L_(g,C):new FormData(g);$x(u,{pending:!0,data:U,method:g.method,action:b},null,U)}}else typeof b=="function"&&(P.preventDefault(),U=C?L_(g,C):new FormData(g),$x(u,{pending:!0,data:U,method:g.method,action:b},b,U))},currentTarget:g}]})}}for(var vy=0;vy<tx.length;vy++){var by=tx[vy],rB=by.toLowerCase(),aB=by[0].toUpperCase()+by.slice(1);_r(rB,"on"+aB)}_r(mN,"onAnimationEnd"),_r(pN,"onAnimationIteration"),_r(xN,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(b$,"onTransitionRun"),_r(j$,"onTransitionStart"),_r(w$,"onTransitionCancel"),_r(yN,"onTransitionEnd"),Fs("onMouseEnter",["mouseout","mouseover"]),Fs("onMouseLeave",["mouseout","mouseover"]),Fs("onPointerEnter",["pointerout","pointerover"]),Fs("onPointerLeave",["pointerout","pointerover"]),Fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wc="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(" "),iB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wc));function $_(a,o){o=(o&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],g=m.event;m=m.listeners;e:{var b=void 0;if(o)for(var C=m.length-1;0<=C;C--){var P=m[C],U=P.instance,Q=P.currentTarget;if(P=P.listener,U!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Q;try{b(g)}catch(ne){Ed(ne)}g.currentTarget=null,b=U}else for(C=0;C<m.length;C++){if(P=m[C],U=P.instance,Q=P.currentTarget,P=P.listener,U!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Q;try{b(g)}catch(ne){Ed(ne)}g.currentTarget=null,b=U}}}}function Ue(a,o){var u=o[Pp];u===void 0&&(u=o[Pp]=new Set);var m=a+"__bubble";u.has(m)||(B_(o,a,2,!1),u.add(m))}function jy(a,o,u){var m=0;o&&(m|=4),B_(u,a,m,o)}var xf="_reactListening"+Math.random().toString(36).slice(2);function wy(a){if(!a[xf]){a[xf]=!0,k2.forEach(function(u){u!=="selectionchange"&&(iB.has(u)||jy(u,!1,a),jy(u,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[xf]||(o[xf]=!0,jy("selectionchange",!1,o))}}function B_(a,o,u,m){switch(mO(o)){case 2:var g=PB;break;case 8:g=RB;break;default:g=Ly}u=g.bind(null,o,u,a),g=void 0,!Up||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),m?g!==void 0?a.addEventListener(o,u,{capture:!0,passive:g}):a.addEventListener(o,u,!0):g!==void 0?a.addEventListener(o,u,{passive:g}):a.addEventListener(o,u,!1)}function Sy(a,o,u,m,g){var b=m;if((o&1)===0&&(o&2)===0&&m!==null)e:for(;;){if(m===null)return;var C=m.tag;if(C===3||C===4){var P=m.stateNode.containerInfo;if(P===g)break;if(C===4)for(C=m.return;C!==null;){var U=C.tag;if((U===3||U===4)&&C.stateNode.containerInfo===g)return;C=C.return}for(;P!==null;){if(C=Us(P),C===null)return;if(U=C.tag,U===5||U===6||U===26||U===27){m=b=C;continue e}P=P.parentNode}}m=m.return}H2(function(){var Q=b,ne=Ip(u),oe=[];e:{var J=gN.get(a);if(J!==void 0){var ee=_d,pe=a;switch(a){case"keypress":if(Nd(u)===0)break e;case"keydown":case"keyup":ee=Q8;break;case"focusin":pe="focus",ee=Gp;break;case"focusout":pe="blur",ee=Gp;break;case"beforeblur":case"afterblur":ee=Gp;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=K2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=I8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=t$;break;case mN:case pN:case xN:ee=V8;break;case yN:ee=r$;break;case"scroll":case"scrollend":ee=$8;break;case"wheel":ee=i$;break;case"copy":case"cut":case"paste":ee=F8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=X2;break;case"toggle":case"beforetoggle":ee=o$}var Se=(o&4)!==0,ct=!Se&&(a==="scroll"||a==="scrollend"),X=Se?J!==null?J+"Capture":null:J;Se=[];for(var G=Q,W;G!==null;){var se=G;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||X===null||(se=Hl(G,X),se!=null&&Se.push(Sc(G,se,W))),ct)break;G=G.return}0<Se.length&&(J=new ee(J,pe,null,u,ne),oe.push({event:J,listeners:Se}))}}if((o&7)===0){e:{if(J=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",J&&u!==Bp&&(pe=u.relatedTarget||u.fromElement)&&(Us(pe)||pe[qs]))break e;if((ee||J)&&(J=ne.window===ne?ne:(J=ne.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(pe=u.relatedTarget||u.toElement,ee=Q,pe=pe?Us(pe):null,pe!==null&&(ct=l(pe),Se=pe.tag,pe!==ct||Se!==5&&Se!==27&&Se!==6)&&(pe=null)):(ee=null,pe=Q),ee!==pe)){if(Se=K2,se="onMouseLeave",X="onMouseEnter",G="mouse",(a==="pointerout"||a==="pointerover")&&(Se=X2,se="onPointerLeave",X="onPointerEnter",G="pointer"),ct=ee==null?J:Vl(ee),W=pe==null?J:Vl(pe),J=new Se(se,G+"leave",ee,u,ne),J.target=ct,J.relatedTarget=W,se=null,Us(ne)===Q&&(Se=new Se(X,G+"enter",pe,u,ne),Se.target=W,Se.relatedTarget=ct,se=Se),ct=se,ee&&pe)t:{for(Se=sB,X=ee,G=pe,W=0,se=X;se;se=Se(se))W++;se=0;for(var ve=G;ve;ve=Se(ve))se++;for(;0<W-se;)X=Se(X),W--;for(;0<se-W;)G=Se(G),se--;for(;W--;){if(X===G||G!==null&&X===G.alternate){Se=X;break t}X=Se(X),G=Se(G)}Se=null}else Se=null;ee!==null&&I_(oe,J,ee,Se,!1),pe!==null&&ct!==null&&I_(oe,ct,pe,Se,!0)}}e:{if(J=Q?Vl(Q):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Xe=rN;else if(tN(J))if(aN)Xe=y$;else{Xe=p$;var ge=m$}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&$p(Q.elementType)&&(Xe=rN):Xe=x$;if(Xe&&(Xe=Xe(a,Q))){nN(oe,Xe,u,ne);break e}ge&&ge(a,J,Q),a==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&Lp(J,"number",J.value)}switch(ge=Q?Vl(Q):window,a){case"focusin":(tN(ge)||ge.contentEditable==="true")&&(Zs=ge,Qp=Q,Ql=null);break;case"focusout":Ql=Qp=Zs=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,fN(oe,u,ne);break;case"selectionchange":if(v$)break;case"keydown":case"keyup":fN(oe,u,ne)}var $e;if(Yp)e:{switch(a){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Ws?J2(a,u)&&(He="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(He="onCompositionStart");He&&(W2&&u.locale!=="ko"&&(Ws||He!=="onCompositionStart"?He==="onCompositionEnd"&&Ws&&($e=F2()):(Ja=ne,Vp="value"in Ja?Ja.value:Ja.textContent,Ws=!0)),ge=yf(Q,He),0<ge.length&&(He=new Y2(He,a,null,u,ne),oe.push({event:He,listeners:ge}),$e?He.data=$e:($e=eN(u),$e!==null&&(He.data=$e)))),($e=c$?u$(a,u):d$(a,u))&&(He=yf(Q,"onBeforeInput"),0<He.length&&(ge=new Y2("onBeforeInput","beforeinput",null,u,ne),oe.push({event:ge,listeners:He}),ge.data=$e)),nB(oe,a,Q,u,ne)}$_(oe,o)})}function Sc(a,o,u){return{instance:a,listener:o,currentTarget:u}}function yf(a,o){for(var u=o+"Capture",m=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=Hl(a,u),g!=null&&m.unshift(Sc(a,g,b)),g=Hl(a,o),g!=null&&m.push(Sc(a,g,b))),a.tag===3)return m;a=a.return}return[]}function sB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function I_(a,o,u,m,g){for(var b=o._reactName,C=[];u!==null&&u!==m;){var P=u,U=P.alternate,Q=P.stateNode;if(P=P.tag,U!==null&&U===m)break;P!==5&&P!==26&&P!==27||Q===null||(U=Q,g?(Q=Hl(u,b),Q!=null&&C.unshift(Sc(u,Q,U))):g||(Q=Hl(u,b),Q!=null&&C.push(Sc(u,Q,U)))),u=u.return}C.length!==0&&a.push({event:o,listeners:C})}var oB=/\r\n?/g,lB=/\u0000|\uFFFD/g;function q_(a){return(typeof a=="string"?a:""+a).replace(oB,`
|
||
`).replace(lB,"")}function U_(a,o){return o=q_(o),q_(a)===o}function lt(a,o,u,m,g,b){switch(u){case"children":typeof m=="string"?o==="body"||o==="textarea"&&m===""||Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&o!=="body"&&Ks(a,""+m);break;case"className":bd(a,"class",m);break;case"tabIndex":bd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":bd(a,u,m);break;case"style":U2(a,m,b);break;case"data":if(o!=="object"){bd(a,"data",m);break}case"src":case"href":if(m===""&&(o!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=wd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(o!=="input"&<(a,o,"name",g.name,g,null),lt(a,o,"formEncType",g.formEncType,g,null),lt(a,o,"formMethod",g.formMethod,g,null),lt(a,o,"formTarget",g.formTarget,g,null)):(lt(a,o,"encType",g.encType,g,null),lt(a,o,"method",g.method,g,null),lt(a,o,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=wd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ca);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=wd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Ue("beforetoggle",a),Ue("toggle",a),vd(a,"popover",m);break;case"xlinkActuate":la(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":la(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":la(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":la(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":la(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":la(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":la(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":la(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":la(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":vd(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=z8.get(u)||u,vd(a,u,m))}}function Ny(a,o,u,m,g,b){switch(u){case"style":U2(a,m,b);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&Ks(a,""+m);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ca);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P2.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),o=u.slice(2,g?u.length-7:void 0),b=a[On]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(o,b,g),typeof m=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(o,m,g);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):vd(a,u,m)}}}function on(a,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",a),Ue("load",a);var m=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var C=u[b];if(C!=null)switch(b){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,b,C,u,null)}}g&<(a,o,"srcSet",u.srcSet,u,null),m&<(a,o,"src",u.src,u,null);return;case"input":Ue("invalid",a);var P=b=C=g=null,U=null,Q=null;for(m in u)if(u.hasOwnProperty(m)){var ne=u[m];if(ne!=null)switch(m){case"name":g=ne;break;case"type":C=ne;break;case"checked":U=ne;break;case"defaultChecked":Q=ne;break;case"value":b=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,o));break;default:lt(a,o,m,ne,u,null)}}$2(a,b,P,U,Q,C,g,!1);return;case"select":Ue("invalid",a),m=C=b=null;for(g in u)if(u.hasOwnProperty(g)&&(P=u[g],P!=null))switch(g){case"value":b=P;break;case"defaultValue":C=P;break;case"multiple":m=P;default:lt(a,o,g,P,u,null)}o=b,u=C,a.multiple=!!m,o!=null?Gs(a,!!m,o,!1):u!=null&&Gs(a,!!m,u,!0);return;case"textarea":Ue("invalid",a),b=g=m=null;for(C in u)if(u.hasOwnProperty(C)&&(P=u[C],P!=null))switch(C){case"value":m=P;break;case"defaultValue":g=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:lt(a,o,C,P,u,null)}I2(a,m,g,b);return;case"option":for(U in u)if(u.hasOwnProperty(U)&&(m=u[U],m!=null))switch(U){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:lt(a,o,U,m,u,null)}return;case"dialog":Ue("beforetoggle",a),Ue("toggle",a),Ue("cancel",a),Ue("close",a);break;case"iframe":case"object":Ue("load",a);break;case"video":case"audio":for(m=0;m<wc.length;m++)Ue(wc[m],a);break;case"image":Ue("error",a),Ue("load",a);break;case"details":Ue("toggle",a);break;case"embed":case"source":case"link":Ue("error",a),Ue("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in u)if(u.hasOwnProperty(Q)&&(m=u[Q],m!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,Q,m,u,null)}return;default:if($p(o)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Ny(a,o,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&<(a,o,P,m,u,null))}function cB(a,o,u,m){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,b=null,C=null,P=null,U=null,Q=null,ne=null;for(ee in u){var oe=u[ee];if(u.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":U=oe;default:m.hasOwnProperty(ee)||lt(a,o,ee,null,m,oe)}}for(var J in m){var ee=m[J];if(oe=u[J],m.hasOwnProperty(J)&&(ee!=null||oe!=null))switch(J){case"type":b=ee;break;case"name":g=ee;break;case"checked":Q=ee;break;case"defaultChecked":ne=ee;break;case"value":C=ee;break;case"defaultValue":P=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,o));break;default:ee!==oe&<(a,o,J,ee,m,oe)}}zp(a,C,P,U,Q,ne,b,g);return;case"select":ee=C=P=J=null;for(b in u)if(U=u[b],u.hasOwnProperty(b)&&U!=null)switch(b){case"value":break;case"multiple":ee=U;default:m.hasOwnProperty(b)||lt(a,o,b,null,m,U)}for(g in m)if(b=m[g],U=u[g],m.hasOwnProperty(g)&&(b!=null||U!=null))switch(g){case"value":J=b;break;case"defaultValue":P=b;break;case"multiple":C=b;default:b!==U&<(a,o,g,b,m,U)}o=P,u=C,m=ee,J!=null?Gs(a,!!u,J,!1):!!m!=!!u&&(o!=null?Gs(a,!!u,o,!0):Gs(a,!!u,u?[]:"",!1));return;case"textarea":ee=J=null;for(P in u)if(g=u[P],u.hasOwnProperty(P)&&g!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:lt(a,o,P,null,m,g)}for(C in m)if(g=m[C],b=u[C],m.hasOwnProperty(C)&&(g!=null||b!=null))switch(C){case"value":J=g;break;case"defaultValue":ee=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==b&<(a,o,C,g,m,b)}B2(a,J,ee);return;case"option":for(var pe in u)if(J=u[pe],u.hasOwnProperty(pe)&&J!=null&&!m.hasOwnProperty(pe))switch(pe){case"selected":a.selected=!1;break;default:lt(a,o,pe,null,m,J)}for(U in m)if(J=m[U],ee=u[U],m.hasOwnProperty(U)&&J!==ee&&(J!=null||ee!=null))switch(U){case"selected":a.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:lt(a,o,U,J,m,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in u)J=u[Se],u.hasOwnProperty(Se)&&J!=null&&!m.hasOwnProperty(Se)&<(a,o,Se,null,m,J);for(Q in m)if(J=m[Q],ee=u[Q],m.hasOwnProperty(Q)&&J!==ee&&(J!=null||ee!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,o));break;default:lt(a,o,Q,J,m,ee)}return;default:if($p(o)){for(var ct in u)J=u[ct],u.hasOwnProperty(ct)&&J!==void 0&&!m.hasOwnProperty(ct)&&Ny(a,o,ct,void 0,m,J);for(ne in m)J=m[ne],ee=u[ne],!m.hasOwnProperty(ne)||J===ee||J===void 0&&ee===void 0||Ny(a,o,ne,J,m,ee);return}}for(var X in u)J=u[X],u.hasOwnProperty(X)&&J!=null&&!m.hasOwnProperty(X)&<(a,o,X,null,m,J);for(oe in m)J=m[oe],ee=u[oe],!m.hasOwnProperty(oe)||J===ee||J==null&&ee==null||lt(a,o,oe,J,m,ee)}function V_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uB(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var g=u[m],b=g.transferSize,C=g.initiatorType,P=g.duration;if(b&&P&&V_(C)){for(C=0,P=g.responseEnd,m+=1;m<u.length;m++){var U=u[m],Q=U.startTime;if(Q>P)break;var ne=U.transferSize,oe=U.initiatorType;ne&&V_(oe)&&(U=U.responseEnd,C+=ne*(U<P?1:(P-Q)/(U-Q)))}if(--m,o+=8*(b+C)/(g.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Ay=null,_y=null;function gf(a){return a.nodeType===9?a:a.ownerDocument}function H_(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function F_(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function Oy(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Ty=null;function dB(){var a=window.event;return a&&a.type==="popstate"?a===Ty?!1:(Ty=a,!0):(Ty=null,!1)}var G_=typeof setTimeout=="function"?setTimeout:void 0,fB=typeof clearTimeout=="function"?clearTimeout:void 0,K_=typeof Promise=="function"?Promise:void 0,hB=typeof queueMicrotask=="function"?queueMicrotask:typeof K_<"u"?function(a){return K_.resolve(null).then(a).catch(mB)}:G_;function mB(a){setTimeout(function(){throw a})}function xi(a){return a==="head"}function Y_(a,o){var u=o,m=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(g),Ao(o);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Nc(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Nc(u);for(var b=u.firstChild;b;){var C=b.nextSibling,P=b.nodeName;b[Ul]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=C}}else u==="body"&&Nc(a.ownerDocument.body);u=g}while(u);Ao(o)}function X_(a,o){var u=a;a=0;do{var m=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function Ey(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Ey(u),Rp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function pB(a,o,u,m){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[Ul])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=lr(a.nextSibling),a===null)break}return null}function xB(a,o,u){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=lr(a.nextSibling),a===null))return null;return a}function W_(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=lr(a.nextSibling),a===null))return null;return a}function Cy(a){return a.data==="$?"||a.data==="$~"}function My(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function yB(a,o){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||u.readyState!=="loading")o();else{var m=function(){o(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function lr(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var ky=null;function Z_(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(o===0)return lr(a.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}a=a.nextSibling}return null}function Q_(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return a;o--}else u!=="/$"&&u!=="/&"||o++}a=a.previousSibling}return null}function J_(a,o,u){switch(o=gf(u),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Nc(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Rp(a)}var cr=new Map,eO=new Set;function vf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Aa=F.d;F.d={f:gB,r:vB,D:bB,C:jB,L:wB,m:SB,X:AB,S:NB,M:_B};function gB(){var a=Aa.f(),o=uf();return a||o}function vB(a){var o=Vs(a);o!==null&&o.tag===5&&o.type==="form"?yA(o):Aa.r(a)}var wo=typeof document>"u"?null:document;function tO(a,o,u){var m=wo;if(m&&typeof o=="string"&&o){var g=tr(o);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),eO.has(g)||(eO.add(g),a={rel:a,crossOrigin:u,href:o},m.querySelector(g)===null&&(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function bB(a){Aa.D(a),tO("dns-prefetch",a,null)}function jB(a,o){Aa.C(a,o),tO("preconnect",a,o)}function wB(a,o,u){Aa.L(a,o,u);var m=wo;if(m&&a&&o){var g='link[rel="preload"][as="'+tr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+tr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+tr(u.imageSizes)+'"]')):g+='[href="'+tr(a)+'"]';var b=g;switch(o){case"style":b=So(a);break;case"script":b=No(a)}cr.has(b)||(a=x({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),cr.set(b,a),m.querySelector(g)!==null||o==="style"&&m.querySelector(Ac(b))||o==="script"&&m.querySelector(_c(b))||(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function SB(a,o){Aa.m(a,o);var u=wo;if(u&&a){var m=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+tr(m)+'"][href="'+tr(a)+'"]',b=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=No(a)}if(!cr.has(b)&&(a=x({rel:"modulepreload",href:a},o),cr.set(b,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(_c(b)))return}m=u.createElement("link"),on(m,"link",a),Zt(m),u.head.appendChild(m)}}}function NB(a,o,u){Aa.S(a,o,u);var m=wo;if(m&&a){var g=Hs(m).hoistableStyles,b=So(a);o=o||"default";var C=g.get(b);if(!C){var P={loading:0,preload:null};if(C=m.querySelector(Ac(b)))P.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":o},u),(u=cr.get(b))&&Py(a,u);var U=C=m.createElement("link");Zt(U),on(U,"link",a),U._p=new Promise(function(Q,ne){U.onload=Q,U.onerror=ne}),U.addEventListener("load",function(){P.loading|=1}),U.addEventListener("error",function(){P.loading|=2}),P.loading|=4,bf(C,o,m)}C={type:"stylesheet",instance:C,count:1,state:P},g.set(b,C)}}}function AB(a,o){Aa.X(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(_c(g)),b||(a=x({src:a,async:!0},o),(o=cr.get(g))&&Ry(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function _B(a,o){Aa.M(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(_c(g)),b||(a=x({src:a,async:!0,type:"module"},o),(o=cr.get(g))&&Ry(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function nO(a,o,u,m){var g=(g=we.current)?vf(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=So(u.href),u=Hs(g).hoistableStyles,m=u.get(o),m||(m={type:"style",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=So(u.href);var b=Hs(g).hoistableStyles,C=b.get(a);if(C||(g=g.ownerDocument||g,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,C),(b=g.querySelector(Ac(a)))&&!b._p&&(C.instance=b,C.state.loading=5),cr.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},cr.set(a,u),b||OB(g,a,u,C.state))),o&&m===null)throw Error(r(528,""));return C}if(o&&m!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=No(u),u=Hs(g).hoistableScripts,m=u.get(o),m||(m={type:"script",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function So(a){return'href="'+tr(a)+'"'}function Ac(a){return'link[rel="stylesheet"]['+a+"]"}function rO(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function OB(a,o,u,m){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?m.loading=1:(o=a.createElement("link"),m.preload=o,o.addEventListener("load",function(){return m.loading|=1}),o.addEventListener("error",function(){return m.loading|=2}),on(o,"link",u),Zt(o),a.head.appendChild(o))}function No(a){return'[src="'+tr(a)+'"]'}function _c(a){return"script[async]"+a}function aO(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var m=a.querySelector('style[data-href~="'+tr(u.href)+'"]');if(m)return o.instance=m,Zt(m),m;var g=x({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Zt(m),on(m,"style",g),bf(m,u.precedence,a),o.instance=m;case"stylesheet":g=So(u.href);var b=a.querySelector(Ac(g));if(b)return o.state.loading|=4,o.instance=b,Zt(b),b;m=rO(u),(g=cr.get(g))&&Py(m,g),b=(a.ownerDocument||a).createElement("link"),Zt(b);var C=b;return C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),on(b,"link",m),o.state.loading|=4,bf(b,u.precedence,a),o.instance=b;case"script":return b=No(u.src),(g=a.querySelector(_c(b)))?(o.instance=g,Zt(g),g):(m=u,(g=cr.get(b))&&(m=x({},u),Ry(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Zt(g),on(g,"link",m),a.head.appendChild(g),o.instance=g);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(m=o.instance,o.state.loading|=4,bf(m,u.precedence,a));return o.instance}function bf(a,o,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=m.length?m[m.length-1]:null,b=g,C=0;C<m.length;C++){var P=m[C];if(P.dataset.precedence===o)b=P;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(a,o.firstChild))}function Py(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Ry(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var jf=null;function iO(a,o,u){if(jf===null){var m=new Map,g=jf=new Map;g.set(u,m)}else g=jf,m=g.get(u),m||(m=new Map,g.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[Ul]||b[nn]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var C=b.getAttribute(o)||"";C=a+C;var P=m.get(C);P?P.push(b):m.set(C,[b])}}return m}function sO(a,o,u){a=a.ownerDocument||a,a.head.insertBefore(u,o==="title"?a.querySelector("head > title"):null)}function TB(a,o,u){if(u===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function oO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function EB(a,o,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=So(m.href),b=o.querySelector(Ac(g));if(b){o=b._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=wf.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=b,Zt(b);return}b=o.ownerDocument||o,m=rO(m),(g=cr.get(g))&&Py(m,g),b=b.createElement("link"),Zt(b);var C=b;C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),on(b,"link",m),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=wf.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var Dy=0;function CB(a,o){return a.stylesheets&&a.count===0&&Nf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Nf(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+o);0<a.imgBytes&&Dy===0&&(Dy=62500*uB());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Nf(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Dy?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function wf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Sf=null;function Nf(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Sf=new Map,o.forEach(MB,a),Sf=null,wf.call(a))}function MB(a,o){if(!(o.state.loading&4)){var u=Sf.get(a);if(u)var m=u.get(null);else{u=new Map,Sf.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var C=g[b];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(u.set(C.dataset.precedence,C),m=C)}m&&u.set(null,m)}g=o.instance,C=g.getAttribute("data-precedence"),b=u.get(C)||m,b===m&&u.set(null,g),u.set(C,g),this.count++,m=wf.bind(this),g.addEventListener("load",m),g.addEventListener("error",m),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),o.state.loading|=4}}var Oc={$$typeof:_,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function kB(a,o,u,m,g,b,C,P,U){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cp(0),this.hiddenUpdates=Cp(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function lO(a,o,u,m,g,b,C,P,U,Q,ne,oe){return a=new kB(a,o,u,C,U,Q,ne,oe,P),o=1,b===!0&&(o|=24),b=Bn(3,null,null,o),a.current=b,b.stateNode=a,o=mx(),o.refCount++,a.pooledCache=o,o.refCount++,b.memoizedState={element:m,isDehydrated:u,cache:o},gx(b),a}function cO(a){return a?(a=eo,a):eo}function uO(a,o,u,m,g,b){g=cO(g),m.context===null?m.context=g:m.pendingContext=g,m=ii(o),m.payload={element:u},b=b===void 0?null:b,b!==null&&(m.callback=b),u=si(a,m,o),u!==null&&(Pn(u,a,o),ic(u,a,o))}function dO(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<o?u:o}}function zy(a,o){dO(a,o),(a=a.alternate)&&dO(a,o)}function fO(a){if(a.tag===13||a.tag===31){var o=Xi(a,67108864);o!==null&&Pn(o,a,67108864),zy(a,67108864)}}function hO(a){if(a.tag===13||a.tag===31){var o=Hn();o=Mp(o);var u=Xi(a,o);u!==null&&Pn(u,a,o),zy(a,o)}}var Af=!0;function PB(a,o,u,m){var g=I.T;I.T=null;var b=F.p;try{F.p=2,Ly(a,o,u,m)}finally{F.p=b,I.T=g}}function RB(a,o,u,m){var g=I.T;I.T=null;var b=F.p;try{F.p=8,Ly(a,o,u,m)}finally{F.p=b,I.T=g}}function Ly(a,o,u,m){if(Af){var g=$y(m);if(g===null)Sy(a,o,m,_f,u),pO(a,m);else if(zB(g,a,o,u,m))m.stopPropagation();else if(pO(a,m),o&4&&-1<DB.indexOf(a)){for(;g!==null;){var b=Vs(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var C=Hi(b.pendingLanes);if(C!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;C;){var U=1<<31-Ln(C);P.entanglements[1]|=U,C&=~U}Gr(b),(Je&6)===0&&(lf=mn()+500,jc(0))}}break;case 31:case 13:P=Xi(b,2),P!==null&&Pn(P,b,2),uf(),zy(b,2)}if(b=$y(m),b===null&&Sy(a,o,m,_f,u),b===g)break;g=b}g!==null&&m.stopPropagation()}else Sy(a,o,m,null,u)}}function $y(a){return a=Ip(a),By(a)}var _f=null;function By(a){if(_f=null,a=Us(a),a!==null){var o=l(a);if(o===null)a=null;else{var u=o.tag;if(u===13){if(a=c(o),a!==null)return a;a=null}else if(u===31){if(a=d(o),a!==null)return a;a=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return _f=a,null}function mO(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(hd()){case w2:return 2;case S2:return 8;case md:case j8:return 32;case N2:return 268435456;default:return 32}default:return 32}}var Iy=!1,yi=null,gi=null,vi=null,Tc=new Map,Ec=new Map,bi=[],DB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function pO(a,o){switch(a){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Tc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ec.delete(o.pointerId)}}function Cc(a,o,u,m,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:o,domEventName:u,eventSystemFlags:m,nativeEvent:b,targetContainers:[g]},o!==null&&(o=Vs(o),o!==null&&fO(o)),a):(a.eventSystemFlags|=m,o=a.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),a)}function zB(a,o,u,m,g){switch(o){case"focusin":return yi=Cc(yi,a,o,u,m,g),!0;case"dragenter":return gi=Cc(gi,a,o,u,m,g),!0;case"mouseover":return vi=Cc(vi,a,o,u,m,g),!0;case"pointerover":var b=g.pointerId;return Tc.set(b,Cc(Tc.get(b)||null,a,o,u,m,g)),!0;case"gotpointercapture":return b=g.pointerId,Ec.set(b,Cc(Ec.get(b)||null,a,o,u,m,g)),!0}return!1}function xO(a){var o=Us(a.target);if(o!==null){var u=l(o);if(u!==null){if(o=u.tag,o===13){if(o=c(u),o!==null){a.blockedOn=o,C2(a.priority,function(){hO(u)});return}}else if(o===31){if(o=d(u),o!==null){a.blockedOn=o,C2(a.priority,function(){hO(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Of(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var u=$y(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);Bp=m,u.target.dispatchEvent(m),Bp=null}else return o=Vs(u),o!==null&&fO(o),a.blockedOn=u,!1;o.shift()}return!0}function yO(a,o,u){Of(a)&&u.delete(o)}function LB(){Iy=!1,yi!==null&&Of(yi)&&(yi=null),gi!==null&&Of(gi)&&(gi=null),vi!==null&&Of(vi)&&(vi=null),Tc.forEach(yO),Ec.forEach(yO)}function Tf(a,o){a.blockedOn===o&&(a.blockedOn=null,Iy||(Iy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LB)))}var Ef=null;function gO(a){Ef!==a&&(Ef=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ef===a&&(Ef=null);for(var o=0;o<a.length;o+=3){var u=a[o],m=a[o+1],g=a[o+2];if(typeof m!="function"){if(By(m||u)===null)continue;break}var b=Vs(u);b!==null&&(a.splice(o,3),o-=3,$x(b,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function Ao(a){function o(U){return Tf(U,a)}yi!==null&&Tf(yi,a),gi!==null&&Tf(gi,a),vi!==null&&Tf(vi,a),Tc.forEach(o),Ec.forEach(o);for(var u=0;u<bi.length;u++){var m=bi[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<bi.length&&(u=bi[0],u.blockedOn===null);)xO(u),u.blockedOn===null&&bi.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var g=u[m],b=u[m+1],C=g[On]||null;if(typeof b=="function")C||gO(u);else if(C){var P=null;if(b&&b.hasAttribute("formAction")){if(g=b,C=b[On]||null)P=C.formAction;else if(By(g)!==null)continue}else P=C.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),gO(u)}}}function vO(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(C){return g=C})},focusReset:"manual",scroll:"manual"})}function o(){g!==null&&(g(),g=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),g!==null&&(g(),g=null)}}}function qy(a){this._internalRoot=a}Cf.prototype.render=qy.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,m=Hn();uO(u,m,a,o,null,null)},Cf.prototype.unmount=qy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;uO(a.current,2,null,a,null,null),uf(),o[qs]=null}};function Cf(a){this._internalRoot=a}Cf.prototype.unstable_scheduleHydration=function(a){if(a){var o=E2();a={blockedOn:null,target:a,priority:o};for(var u=0;u<bi.length&&o!==0&&o<bi[u].priority;u++);bi.splice(u,0,a),u===0&&xO(a)}};var bO=t.version;if(bO!=="19.2.7")throw Error(r(527,bO,"19.2.7"));F.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(o),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var $B={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mf.isDisabled&&Mf.supportsFiber)try{Bl=Mf.inject($B),zn=Mf}catch{}}return kc.createRoot=function(a,o){if(!i(a))throw Error(r(299));var u=!1,m="",g=OA,b=TA,C=EA;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(b=o.onCaughtError),o.onRecoverableError!==void 0&&(C=o.onRecoverableError)),o=lO(a,1,!1,null,null,u,m,null,g,b,C,vO),a[qs]=o.current,wy(a),new qy(o)},kc.hydrateRoot=function(a,o,u){if(!i(a))throw Error(r(299));var m=!1,g="",b=OA,C=TA,P=EA,U=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(U=u.formState)),o=lO(a,1,!0,o,u??null,m,g,U,b,C,P,vO),o.context=cO(null),u=o.current,m=Hn(),m=Mp(m),g=ii(m),g.callback=null,si(u,g,m),u=m,o.current.lanes=u,ql(o,u),Gr(o),a[qs]=o.current,wy(a),new Cf(o)},kc.version="19.2.7",kc}var CO;function YB(){if(CO)return Hy.exports;CO=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(),Hy.exports=KB(),Hy.exports}var XB=YB();/**
|
||
* react-router v7.18.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/var Aw=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,wR=/^[\\/]{2}/;function WB(e,t){return t+e.replace(/\\/g,"/")}var MO="popstate";function kO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZB(e={}){function t(r,i){var h;let l=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:f}=l||r.location;return v1("",{pathname:c,search:d,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:lu(i)}return JB(t,n,null,e)}function Ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QB(){return Math.random().toString(36).substring(2,10)}function PO(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function v1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?wl(t):t,state:n,key:t&&t.key||r||QB(),mask:i}}function lu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function wl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function JB(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:l=!1}=r,c=i.history,d="POP",f=null,h=p();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function p(){return(c.state||{idx:null}).idx}function x(){d="POP";let v=p(),A=v==null?null:v-h;h=v,f&&f({action:d,location:S.location,delta:A})}function y(v,A){d="PUSH";let O=kO(v)?v:v1(S.location,v,A);h=p()+1;let _=PO(O,h),T=S.createHref(O.mask||O);try{c.pushState(_,"",T)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(T)}l&&f&&f({action:d,location:S.location,delta:1})}function j(v,A){d="REPLACE";let O=kO(v)?v:v1(S.location,v,A);h=p();let _=PO(O,h),T=S.createHref(O.mask||O);c.replaceState(_,"",T),l&&f&&f({action:d,location:S.location,delta:0})}function w(v){return eI(i,v)}let S={get action(){return d},get location(){return e(i,c)},listen(v){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(MO,x),f=v,()=>{i.removeEventListener(MO,x),f=null}},createHref(v){return t(i,v)},createURL:w,encodeLocation(v){let A=w(v);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:j,go(v){return c.go(v)}};return S}function eI(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),Ot(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:lu(t);return i=i.replace(/ $/,"%20"),!n&&wR.test(i)&&(i=r+i),new URL(i,r)}function SR(e,t,n="/"){return tI(e,t,n,!1)}function tI(e,t,n,r,i){let l=typeof t=="string"?wl(t):t,c=Ia(l.pathname||"/",n);if(c==null)return null;let d=nI(e),f=null,h=hI(c);for(let p=0;f==null&&p<d.length;++p)f=fI(d[p],h,r);return f}function nI(e){let t=NR(e);return rI(t),t}function NR(e,t=[],n=[],r="",i=!1){let l=(c,d,f=i,h)=>{let p={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(r)&&f)return;Ot(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length)}let x=Dr([r,p.relativePath]),y=n.concat(p);c.children&&c.children.length>0&&(Ot(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),NR(c.children,t,y,x,f)),!(c.path==null&&!c.index)&&t.push({path:x,score:uI(x,c.index),routesMeta:y.map((j,w)=>{let[S,v]=OR(j.relativePath,j.caseSensitive,w===y.length-1);return{...j,matcher:S,compiledParams:v}})})};return e.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,d);else for(let h of AR(c.path))l(c,d,!0,h)}),t}function AR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let c=AR(r.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),i&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function rI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var aI=/^:[\w-]+$/,iI=3,sI=2,oI=1,lI=10,cI=-2,RO=e=>e==="*";function uI(e,t){let n=e.split("/"),r=n.length;return n.some(RO)&&(r+=cI),t&&(r+=sI),n.filter(i=>!RO(i)).reduce((i,l)=>i+(aI.test(l)?iI:l===""?oI:lI),r)}function dI(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function fI(e,t,n=!1){let{routesMeta:r}=e,i={},l="/",c=[];for(let d=0;d<r.length;++d){let f=r[d],h=d===r.length-1,p=l==="/"?t:t.slice(l.length)||"/",x={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},y=f.matcher&&f.compiledParams?_R(x,p,f.matcher,f.compiledParams):gh(x,p),j=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=gh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!y)return null;Object.assign(i,y.params),c.push({params:i,pathname:Dr([l,y.pathname]),pathnameBase:xI(Dr([l,y.pathnameBase])),route:j}),y.pathnameBase!=="/"&&(l=Dr([l,y.pathnameBase]))}return c}function gh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=OR(e.path,e.caseSensitive,e.end);return _R(e,t,n,r)}function _R(e,t,n,r){let i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:r.reduce((h,{paramName:p,isOptional:x},y)=>{if(p==="*"){let w=d[y]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const j=d[y];return x&&!j?h[p]=void 0:h[p]=(j||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:e}}function OR(e,t=!1,n=!0){br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f,h,p)=>{if(r.push({paramName:d,isOptional:f!=null}),f){let x=p.charAt(h+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function hI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!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 Ia(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function mI(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?wl(e):e,l;return n?(n=TR(n),n.startsWith("/")?l=DO(n.substring(1),"/"):l=DO(n,t)):l=t,{pathname:l,search:yI(r),hash:gI(i)}}function DO(e,t){let n=vh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Yy(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _w(e){let t=pI(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Dm(e,t,n,r=!1){let i;typeof e=="string"?i=wl(e):(i={...e},Ot(!i.pathname||!i.pathname.includes("?"),Yy("?","pathname","search",i)),Ot(!i.pathname||!i.pathname.includes("#"),Yy("#","pathname","hash",i)),Ot(!i.search||!i.search.includes("#"),Yy("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!r&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;i.pathname=y.join("/")}d=x>=0?t[x]:"/"}let f=mI(i,d),h=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var TR=e=>e.replace(/[\\/]{2,}/g,"/"),Dr=e=>TR(e.join("/")),vh=e=>e.replace(/\/+$/,""),xI=e=>vh(e).replace(/^\/*/,"/"),yI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vI=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function bI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jI(e){let t=e.map(n=>n.route.path).filter(Boolean);return Dr(t)||"/"}var ER=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function CR(e,t){let n=e;if(typeof n!="string"||!Aw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ER)try{let l=new URL(window.location.href),c=wR.test(n)?new URL(WB(n,l.protocol)):new URL(n),d=Ia(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{br(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var MR=["POST","PUT","PATCH","DELETE"];new Set(MR);var wI=["GET",...MR];new Set(wI);var SI=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function NI(e){try{return SI.includes(new URL(e).protocol)}catch{return!1}}var Sl=M.createContext(null);Sl.displayName="DataRouter";var zm=M.createContext(null);zm.displayName="DataRouterState";var kR=M.createContext(!1);function AI(){return M.useContext(kR)}var PR=M.createContext({isTransitioning:!1});PR.displayName="ViewTransition";var _I=M.createContext(new Map);_I.displayName="Fetchers";var OI=M.createContext(null);OI.displayName="Await";var Jn=M.createContext(null);Jn.displayName="Navigation";var Wu=M.createContext(null);Wu.displayName="Location";var Ir=M.createContext({outlet:null,matches:[],isDataRoute:!1});Ir.displayName="Route";var Ow=M.createContext(null);Ow.displayName="RouteError";var RR="REACT_ROUTER_ERROR",TI="REDIRECT",EI="ROUTE_ERROR_RESPONSE";function CI(e){if(e.startsWith(`${RR}:${TI}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function MI(e){if(e.startsWith(`${RR}:${EI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new vI(t.status,t.statusText,t.data)}catch{}}function kI(e,{relative:t}={}){Ot(Nl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=M.useContext(Jn),{hash:i,pathname:l,search:c}=Zu(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Dr([n,l])),r.createHref({pathname:d,search:c,hash:i})}function Nl(){return M.useContext(Wu)!=null}function _n(){return Ot(Nl(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(Wu).location}var DR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zR(e){M.useContext(Jn).static||M.useLayoutEffect(e)}function $i(){let{isDataRoute:e}=M.useContext(Ir);return e?KI():PI()}function PI(){Ot(Nl(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Sl),{basename:t,navigator:n}=M.useContext(Jn),{matches:r}=M.useContext(Ir),{pathname:i}=_n(),l=JSON.stringify(_w(r)),c=M.useRef(!1);return zR(()=>{c.current=!0}),M.useCallback((f,h={})=>{if(br(c.current,DR),!c.current)return;if(typeof f=="number"){n.go(f);return}let p=Dm(f,JSON.parse(l),i,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Dr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,l,i,e])}var RI=M.createContext(null);function DI(e){let t=M.useContext(Ir).outlet;return M.useMemo(()=>t&&M.createElement(RI.Provider,{value:e},t),[t,e])}function Zu(e,{relative:t}={}){let{matches:n}=M.useContext(Ir),{pathname:r}=_n(),i=JSON.stringify(_w(n));return M.useMemo(()=>Dm(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function zI(e,t){return LR(e,t)}function LR(e,t,n){var v;Ot(Nl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=M.useContext(Jn),{matches:i}=M.useContext(Ir),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",h=l&&l.route;{let A=h&&h.path||"";BR(d,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${A}">) 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="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let p=_n(),x;if(t){let A=typeof t=="string"?wl(t):t;Ot(f==="/"||((v=A.pathname)==null?void 0:v.startsWith(f)),`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 "${f}" but pathname "${A.pathname}" was given in the \`location\` prop.`),x=A}else x=p;let y=x.pathname||"/",j=y;if(f!=="/"){let A=f.replace(/^\//,"").split("/");j="/"+y.replace(/^\//,"").split("/").slice(A.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):SR(e,{pathname:j});br(h||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),br(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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=qI(w&&w.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:Dr([f,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:Dr([f,r.encodeLocation?r.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,n);return t&&S?M.createElement(Wu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},S):S}function LI(){let e=GI(),t=bI(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:l},"ErrorBoundary")," or"," ",M.createElement("code",{style:l},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:i},n):null,c)}var $I=M.createElement(LI,null),$R=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=MI(e.digest);n&&(e=n)}let t=e!==void 0?M.createElement(Ir.Provider,{value:this.props.routeContext},M.createElement(Ow.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(BI,{error:e},t):t}};$R.contextType=kR;var Xy=new WeakMap;function BI({children:e,error:t}){let{basename:n}=M.useContext(Jn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=CI(t.digest);if(r){let i=Xy.get(t);if(i)throw i;let l=CR(r.location,n),c=l.absoluteURL||l.to;if(NI(c))throw new Error("Invalid redirect location");if(ER&&!Xy.get(t))if(l.isExternal||r.reloadDocument)window.location.href=c;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Xy.set(t,d),d}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function II({routeContext:e,match:t,children:n}){let r=M.useContext(Sl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Ir.Provider,{value:e},n)}function qI(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,l=r==null?void 0:r.errors;if(l!=null){let p=i.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);Ot(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let c=!1,d=-1;if(n&&r){c=r.renderFallback;for(let p=0;p<i.length;p++){let x=i[p];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=p),x.route.id){let{loaderData:y,errors:j}=r,w=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||w){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,h=r&&f?(p,x)=>{var y,j;f(p,{location:r.location,params:((j=(y=r.matches)==null?void 0:y[0])==null?void 0:j.params)??{},pattern:jI(r.matches),errorInfo:x})}:void 0;return i.reduceRight((p,x,y)=>{let j,w=!1,S=null,v=null;r&&(j=l&&x.route.id?l[x.route.id]:void 0,S=x.route.errorElement||$I,c&&(d<0&&y===0?(BR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,v=null):d===y&&(w=!0,v=x.route.hydrateFallbackElement||null)));let A=t.concat(i.slice(0,y+1)),O=()=>{let _;return j?_=S:w?_=v:x.route.Component?_=M.createElement(x.route.Component,null):x.route.element?_=x.route.element:_=p,M.createElement(II,{match:x,routeContext:{outlet:p,matches:A,isDataRoute:r!=null},children:_})};return r&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?M.createElement($R,{location:r.location,revalidation:r.revalidation,component:S,error:j,children:O(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):O()},null)}function Tw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UI(e){let t=M.useContext(Sl);return Ot(t,Tw(e)),t}function VI(e){let t=M.useContext(zm);return Ot(t,Tw(e)),t}function HI(e){let t=M.useContext(Ir);return Ot(t,Tw(e)),t}function Ew(e){let t=HI(e),n=t.matches[t.matches.length-1];return Ot(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function FI(){return Ew("useRouteId")}function GI(){var r;let e=M.useContext(Ow),t=VI("useRouteError"),n=Ew("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function KI(){let{router:e}=UI("useNavigate"),t=Ew("useNavigate"),n=M.useRef(!1);return zR(()=>{n.current=!0}),M.useCallback(async(i,l={})=>{br(n.current,DR),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var zO={};function BR(e,t,n){!t&&!zO[e]&&(zO[e]=!0,br(!1,n))}M.memo(YI);function YI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:l}){return LR(e,void 0,{manifest:t,state:r,isStatic:i,onError:l})}function Cw({to:e,replace:t,state:n,relative:r}){Ot(Nl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=M.useContext(Jn);br(!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:l}=M.useContext(Ir),{pathname:c}=_n(),d=$i(),f=Dm(e,_w(l),c,r==="path"),h=JSON.stringify(f);return M.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:r})},[d,h,r,t,n]),null}function XI(e){return DI(e.context)}function wt(e){Ot(!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 WI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:l=!1,useTransitions:c}){Ot(!Nl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=M.useMemo(()=>({basename:d,navigator:i,static:l,useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=wl(n));let{pathname:h="/",search:p="",hash:x="",state:y=null,key:j="default",mask:w}=n,S=M.useMemo(()=>{let v=Ia(h,d);return v==null?null:{location:{pathname:v,search:p,hash:x,state:y,key:j,mask:w},navigationType:r}},[d,h,p,x,y,j,r,w]);return br(S!=null,`<Router basename="${d}"> is not able to match the URL "${h}${p}${x}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:M.createElement(Jn.Provider,{value:f},M.createElement(Wu.Provider,{children:t,value:S}))}function ZI({children:e,location:t}){return zI(b1(e),t)}function b1(e,t=[]){let n=[];return M.Children.forEach(e,(r,i)=>{if(!M.isValidElement(r))return;let l=[...t,i];if(r.type===M.Fragment){n.push.apply(n,b1(r.props.children,l));return}Ot(r.type===wt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ot(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=b1(r.props.children,l)),n.push(c)}),n}var ih="get",sh="application/x-www-form-urlencoded";function Lm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function QI(e){return Lm(e)&&e.tagName.toLowerCase()==="button"}function JI(e){return Lm(e)&&e.tagName.toLowerCase()==="form"}function eq(e){return Lm(e)&&e.tagName.toLowerCase()==="input"}function tq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nq(e,t){return e.button===0&&(!t||t==="_self")&&!tq(e)}function j1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rq(e,t){let n=j1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Pf=null;function aq(){if(Pf===null)try{new FormData(document.createElement("form"),0),Pf=!1}catch{Pf=!0}return Pf}var iq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wy(e){return e!=null&&!iq.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sh}"`),null):e}function sq(e,t){let n,r,i,l,c;if(JI(e)){let d=e.getAttribute("action");r=d?Ia(d,t):null,n=e.getAttribute("method")||ih,i=Wy(e.getAttribute("enctype"))||sh,l=new FormData(e)}else if(QI(e)||eq(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(r=f?Ia(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||ih,i=Wy(e.getAttribute("formenctype"))||Wy(d.getAttribute("enctype"))||sh,l=new FormData(d,e),!aq()){let{name:h,type:p,value:x}=e;if(p==="image"){let y=h?`${h}.`:"";l.append(`${y}x`,"0"),l.append(`${y}y`,"0")}else h&&l.append(h,x)}}else{if(Lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ih,r=null,i=sh,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function IR(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&Ia(i.pathname,t)==="/"?i.pathname=`${vh(t)}/_root.${r}`:i.pathname=`${vh(i.pathname)}.${r}`,i}async function oq(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lq(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 cq(e,t,n){let r=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await oq(l,n);return c.links?c.links():[]}return[]}));return hq(r.flat(1).filter(lq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function LO(e,t,n,r,i,l){let c=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var p;return n[h].pathname!==f.pathname||((p=n[h].route.path)==null?void 0:p.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return l==="assets"?t.filter((f,h)=>c(f,h)||d(f,h)):l==="data"?t.filter((f,h)=>{var x;let p=r.routes[f.route.id];if(!p||!p.hasLoader)return!1;if(c(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function uq(e,t,{includeHydrateFallback:n}={}){return dq(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function dq(e){return[...new Set(e)]}function fq(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hq(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let l=JSON.stringify(fq(i));return n.has(l)||(n.add(l),r.push({key:l,link:i})),r},[])}function kw(){let e=M.useContext(Sl);return Mw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function mq(){let e=M.useContext(zm);return Mw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pw=M.createContext(void 0);Pw.displayName="FrameworkContext";function $m(){let e=M.useContext(Pw);return Mw(e,"You must render this element inside a <HydratedRouter> element"),e}function pq(e,t){let n=M.useContext(Pw),[r,i]=M.useState(!1),[l,c]=M.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=t,y=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=A=>{A.forEach(O=>{c(O.isIntersecting)})},v=new IntersectionObserver(S,{threshold:.5});return y.current&&v.observe(y.current),()=>{v.disconnect()}}},[e]),M.useEffect(()=>{if(r){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[r]);let j=()=>{i(!0)},w=()=>{i(!1),c(!1)};return n?e!=="intent"?[l,y,{}]:[l,y,{onFocus:Pc(d,j),onBlur:Pc(f,w),onMouseEnter:Pc(h,j),onMouseLeave:Pc(p,w),onTouchStart:Pc(x,j)}]:[!1,y,{}]}function Pc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function xq({page:e,...t}){let n=AI(),{nonce:r}=$m(),{router:i}=kw(),l=M.useMemo(()=>SR(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?(t.nonce==null&&r&&(t={...t,nonce:r}),n?M.createElement(gq,{page:e,matches:l,...t}):M.createElement(vq,{page:e,matches:l,...t})):null}function yq(e){let{manifest:t,routeModules:n}=$m(),[r,i]=M.useState([]);return M.useEffect(()=>{let l=!1;return cq(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),r}function gq({page:e,matches:t,...n}){let r=_n(),{future:i}=$m(),{basename:l}=kw(),c=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=IR(e,l,i.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?f=!0:h.push(p.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[l,i.v8_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,c.map(d=>M.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function vq({page:e,matches:t,...n}){let r=_n(),{future:i,manifest:l,routeModules:c}=$m(),{basename:d}=kw(),{loaderData:f,matches:h}=mq(),p=M.useMemo(()=>LO(e,t,h,l,r,"data"),[e,t,h,l,r]),x=M.useMemo(()=>LO(e,t,h,l,r,"assets"),[e,t,h,l,r]),y=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,v=!1;if(t.forEach(O=>{var T;let _=l.routes[O.route.id];!_||!_.hasLoader||(!p.some(N=>N.route.id===O.route.id)&&O.route.id in f&&((T=c[O.route.id])!=null&&T.shouldRevalidate)||_.hasClientLoader?v=!0:S.add(O.route.id))}),S.size===0)return[];let A=IR(e,d,i.v8_trailingSlashAwareDataRequests,"data");return v&&S.size>0&&A.searchParams.set("_routes",t.filter(O=>S.has(O.route.id)).map(O=>O.route.id).join(",")),[A.pathname+A.search]},[d,i.v8_trailingSlashAwareDataRequests,f,r,l,p,t,e,c]),j=M.useMemo(()=>uq(x,l),[x,l]),w=yq(x);return M.createElement(M.Fragment,null,y.map(S=>M.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),j.map(S=>M.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),w.map(({key:S,link:v})=>M.createElement("link",{key:S,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function bq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var jq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{jq&&(window.__reactRouterVersion="7.18.1")}catch{}function wq({basename:e,children:t,useTransitions:n,window:r}){let i=M.useRef();i.current==null&&(i.current=ZB({window:r,v5Compat:!0}));let l=i.current,[c,d]=M.useState({action:l.action,location:l.location}),f=M.useCallback(h=>{n===!1?d(h):M.startTransition(()=>d(h))},[n]);return M.useLayoutEffect(()=>l.listen(f),[l,f]),M.createElement(WI,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:n})}var Ca=M.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:l,replace:c,mask:d,state:f,target:h,to:p,preventScrollReset:x,viewTransition:y,defaultShouldRevalidate:j,...w},S){let{basename:v,navigator:A,useTransitions:O}=M.useContext(Jn),_=typeof p=="string"&&Aw.test(p),T=CR(p,v);p=T.to;let N=kI(p,{relative:i}),E=_n(),k=null;if(d){let H=Dm(d,[],E.mask?E.mask.pathname:"/",!0);v!=="/"&&(H.pathname=H.pathname==="/"?v:Dr([v,H.pathname])),k=A.createHref(H)}let[R,B,D]=pq(r,w),z=Aq(p,{replace:c,mask:d,state:f,target:h,preventScrollReset:x,relative:i,viewTransition:y,defaultShouldRevalidate:j,useTransitions:O});function $(H){t&&t(H),H.defaultPrevented||z(H)}let L=!(T.isExternal||l),K=M.createElement("a",{...w,...D,href:(L?k:void 0)||T.absoluteURL||N,onClick:L?$:t,ref:bq(S,B),target:h,"data-discover":!_&&n==="render"?"true":void 0});return R&&!_?M.createElement(M.Fragment,null,K,M.createElement(xq,{page:N})):K});Ca.displayName="Link";var qR=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:l,to:c,viewTransition:d,children:f,...h},p){let x=Zu(c,{relative:h.relative}),y=_n(),j=M.useContext(zm),{navigator:w,basename:S}=M.useContext(Jn),v=j!=null&&Mq(x)&&d===!0,A=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,O=y.pathname,_=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(O=O.toLowerCase(),_=_?_.toLowerCase():null,A=A.toLowerCase()),_&&S&&(_=Ia(_,S)||_);const T=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let N=O===A||!i&&O.startsWith(A)&&O.charAt(T)==="/",E=_!=null&&(_===A||!i&&_.startsWith(A)&&_.charAt(A.length)==="/"),k={isActive:N,isPending:E,isTransitioning:v},R=N?t:void 0,B;typeof r=="function"?B=r(k):B=[r,N?"active":null,E?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let D=typeof l=="function"?l(k):l;return M.createElement(Ca,{...h,"aria-current":R,className:B,ref:p,style:D,to:c,viewTransition:d},typeof f=="function"?f(k):f)});qR.displayName="NavLink";var Sq=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:c=ih,action:d,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y,...j},w)=>{let{useTransitions:S}=M.useContext(Jn),v=Eq(),A=Cq(d,{relative:h}),O=c.toLowerCase()==="get"?"get":"post",_=typeof d=="string"&&Aw.test(d),T=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let E=N.nativeEvent.submitter,k=(E==null?void 0:E.getAttribute("formmethod"))||c,R=()=>v(E||N.currentTarget,{fetcherKey:t,method:k,navigate:n,replace:i,state:l,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y});S&&n!==!1?M.startTransition(()=>R()):R()};return M.createElement("form",{ref:w,method:O,action:A,onSubmit:r?f:T,...j,"data-discover":!_&&e==="render"?"true":void 0})});Sq.displayName="Form";function Nq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UR(e){let t=M.useContext(Sl);return Ot(t,Nq(e)),t}function Aq(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let p=$i(),x=_n(),y=Zu(e,{relative:c});return M.useCallback(j=>{if(nq(j,t)){j.preventDefault();let w=n!==void 0?n:lu(x)===lu(y),S=()=>p(e,{replace:w,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f});h?M.startTransition(()=>S()):S()}},[x,p,y,n,r,i,t,e,l,c,d,f,h])}function _q(e){br(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=M.useRef(j1(e)),n=M.useRef(!1),r=_n(),i=M.useMemo(()=>rq(r.search,n.current?null:t.current),[r.search]),l=$i(),c=M.useCallback((d,f)=>{const h=j1(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+h,f)},[l,i]);return[i,c]}var Oq=0,Tq=()=>`__${String(++Oq)}__`;function Eq(){let{router:e}=UR("useSubmit"),{basename:t}=M.useContext(Jn),n=FI(),r=e.fetch,i=e.navigate;return M.useCallback(async(l,c={})=>{let{action:d,method:f,encType:h,formData:p,body:x}=sq(l,t);if(c.navigate===!1){let y=c.fetcherKey||Tq();await r(y,n,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||f,formEncType:c.encType||h,flushSync:c.flushSync})}else await i(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||f,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,i,t,n])}function Cq(e,{relative:t}={}){let{basename:n}=M.useContext(Jn),r=M.useContext(Ir);Ot(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),l={...Zu(e||".",{relative:t})},c=_n();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(p=>p==="")){d.delete("index"),f.filter(x=>x).forEach(x=>d.append("index",x));let p=d.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Dr([n,l.pathname])),lu(l)}function Mq(e,{relative:t}={}){let n=M.useContext(PR);Ot(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=UR("useViewTransitionState"),i=Zu(e,{relative:t});if(!n.isTransitioning)return!1;let l=Ia(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=Ia(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gh(i.pathname,c)!=null||gh(i.pathname,l)!=null}const $O=e=>{let t;const n=new Set,r=(h,p)=>{const x=typeof h=="function"?h(t):h;if(!Object.is(x,t)){const y=t;t=p??(typeof x!="object"||x===null)?x:Object.assign({},t,x),n.forEach(j=>j(t,y))}},i=()=>t,d={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(r,i,d);return d},kq=(e=>e?$O(e):$O),Pq=e=>e;function Rq(e,t=Pq){const n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}const BO=e=>{const t=kq(e),n=r=>Rq(t,r);return Object.assign(n,t),n},VR=(e=>e?BO(e):BO);function Dq(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var l;const c=f=>f===null?null:JSON.parse(f,void 0),d=(l=n.getItem(i))!=null?l:null;return d instanceof Promise?d.then(c):c(d)},setItem:(i,l)=>n.setItem(i,JSON.stringify(l,void 0)),removeItem:i=>n.removeItem(i)}}const w1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return w1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return w1(r)(n)}}}},zq=(e,t)=>(n,r,i)=>{let l={storage:Dq(()=>window.localStorage),partialize:v=>v,version:0,merge:(v,A)=>({...A,...v}),...t},c=!1,d=0;const f=new Set,h=new Set;let p=l.storage;if(!p)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...v)},r,i);const x=()=>{const v=l.partialize({...r()});return p.setItem(l.name,{state:v,version:l.version})},y=i.setState;i.setState=(v,A)=>(y(v,A),x());const j=e((...v)=>(n(...v),x()),r,i);i.getInitialState=()=>j;let w;const S=()=>{var v,A;if(!p)return;const O=++d;c=!1,f.forEach(T=>{var N;return T((N=r())!=null?N:j)});const _=((A=l.onRehydrateStorage)==null?void 0:A.call(l,(v=r())!=null?v:j))||void 0;return w1(p.getItem.bind(p))(l.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==l.version){if(l.migrate){const N=l.migrate(T.state,T.version);return N instanceof Promise?N.then(E=>[!0,E]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var N;if(O!==d)return;const[E,k]=T;if(w=l.merge(k,(N=r())!=null?N:j),n(w,!0),E)return x()}).then(()=>{O===d&&(_==null||_(r(),void 0),w=r(),c=!0,h.forEach(T=>T(w)))}).catch(T=>{O===d&&(_==null||_(void 0,T))})};return i.persist={setOptions:v=>{l={...l,...v},v.storage&&(p=v.storage)},clearStorage:()=>{p==null||p.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>S(),hasHydrated:()=>c,onHydrate:v=>(f.add(v),()=>{f.delete(v)}),onFinishHydration:v=>(h.add(v),()=>{h.delete(v)})},l.skipHydration||S(),w||j},Lq=zq,ea=VR()(Lq(e=>({token:null,user:null,isAuthenticated:!1,isLoading:!1,login:(t,n)=>{localStorage.setItem("amos_token",t),e({token:t,user:n,isAuthenticated:!0})},logout:()=>{localStorage.removeItem("amos_token"),e({token:null,user:null,isAuthenticated:!1})},setUser:t=>e({user:t})}),{name:"amos-auth",partialize:e=>({token:e.token,user:e.user,isAuthenticated:e.isAuthenticated})})),Rw=M.createContext({});function Dw(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const $q=typeof window<"u",zw=$q?M.useLayoutEffect:M.useEffect,Bm=M.createContext(null);function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function bh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ta=(e,t,n)=>n>t?t:n<e?e:n;let $w=()=>{};const Mi={},HR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FR=e=>typeof e=="object"&&e!==null,GR=e=>/^0[^.\s]+$/u.test(e);function KR(e){let t;return()=>(t===void 0&&(t=e()),t)}const gr=e=>e,Qu=(...e)=>e.reduce((t,n)=>r=>n(t(r))),cu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Bw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>bh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let l=0;l<i;l++){const c=this.subscriptions[l];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wn=e=>e*1e3,pr=e=>e/1e3,YR=(e,t)=>t?e*(1e3/t):0,XR=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Bq=1e-7,Iq=12;function qq(e,t,n,r,i){let l,c,d=0;do c=t+(n-t)/2,l=XR(c,r,i)-e,l>0?n=c:t=c;while(Math.abs(l)>Bq&&++d<Iq);return c}function Ju(e,t,n,r){if(e===t&&n===r)return gr;const i=l=>qq(l,0,1,e,n);return l=>l===0||l===1?l:XR(i(l),t,r)}const WR=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZR=e=>t=>1-e(1-t),QR=Ju(.33,1.53,.69,.99),Iw=ZR(QR),JR=WR(Iw),eD=e=>e>=1?1:(e*=2)<1?.5*Iw(e):.5*(2-Math.pow(2,-10*(e-1))),qw=e=>1-Math.sin(Math.acos(e)),tD=ZR(qw),nD=WR(qw),Uq=Ju(.42,0,1,1),Vq=Ju(0,0,.58,1),rD=Ju(.42,0,.58,1),Hq=e=>Array.isArray(e)&&typeof e[0]!="number",aD=e=>Array.isArray(e)&&typeof e[0]=="number",Fq={linear:gr,easeIn:Uq,easeInOut:rD,easeOut:Vq,circIn:qw,circInOut:nD,circOut:tD,backIn:Iw,backInOut:JR,backOut:QR,anticipate:eD},Gq=e=>typeof e=="string",IO=e=>{if(aD(e)){$w(e.length===4);const[t,n,r,i]=e;return Ju(t,n,r,i)}else if(Gq(e))return Fq[e];return e},Rf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Kq(e){let t=new Set,n=new Set,r=!1,i=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(h){l.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,p=!1,x=!1)=>{const j=x&&r?t:n;return p&&l.add(h),j.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(c=h,r){i=!0;return}r=!0;const p=t;t=n,n=p,t.forEach(d),t.clear(),r=!1,i&&(i=!1,f.process(h))}};return f}const Yq=40;function iD(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Rf.reduce((_,T)=>(_[T]=Kq(l),_),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:p,update:x,preRender:y,render:j,postRender:w}=c,S=()=>{const _=Mi.useManualTiming,T=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,Yq),1)),i.timestamp=T,i.isProcessing=!0,d.process(i),f.process(i),h.process(i),p.process(i),x.process(i),y.process(i),j.process(i),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(S))},v=()=>{n=!0,r=!0,i.isProcessing||e(S)};return{schedule:Rf.reduce((_,T)=>{const N=c[T];return _[T]=(E,k=!1,R=!1)=>(n||v(),N.schedule(E,k,R)),_},{}),cancel:_=>{for(let T=0;T<Rf.length;T++)c[Rf[T]].cancel(_)},state:i,steps:c}}const{schedule:ht,cancel:ki,state:cn,steps:Zy}=iD(typeof requestAnimationFrame<"u"?requestAnimationFrame:gr,!0);let oh;function Xq(){oh=void 0}const bn={now:()=>(oh===void 0&&bn.set(cn.isProcessing||Mi.useManualTiming?cn.timestamp:performance.now()),oh),set:e=>{oh=e,queueMicrotask(Xq)}},sD=e=>t=>typeof t=="string"&&t.startsWith(e),oD=sD("--"),Wq=sD("var(--"),Uw=e=>Wq(e)?Zq.test(e.split("/*")[0].trim()):!1,Zq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qO(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Al={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uu={...Al,transform:e=>ta(0,1,e)},Df={...Al,default:1},Zc=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qq(e){return e==null}const Jq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&Jq.test(n)&&n.startsWith(e)||t&&!Qq(n)&&Object.prototype.hasOwnProperty.call(n,t)),lD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,l,c,d]=r.match(Vw);return{[e]:parseFloat(i),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},e7=e=>ta(0,255,e),Qy={...Al,transform:e=>Math.round(e7(e))},gs={test:Hw("rgb","red"),parse:lD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qy.transform(e)+", "+Qy.transform(t)+", "+Qy.transform(n)+", "+Zc(uu.transform(r))+")"};function t7(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const S1={test:Hw("#"),parse:t7,transform:gs.transform},ed=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ta=ed("deg"),Wr=ed("%"),xe=ed("px"),n7=ed("vh"),r7=ed("vw"),UO={...Wr,parse:e=>Wr.parse(e)/100,transform:e=>Wr.transform(e*100)},Mo={test:Hw("hsl","hue"),parse:lD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wr.transform(Zc(t))+", "+Wr.transform(Zc(n))+", "+Zc(uu.transform(r))+")"},Ut={test:e=>gs.test(e)||S1.test(e)||Mo.test(e),parse:e=>gs.test(e)?gs.parse(e):Mo.test(e)?Mo.parse(e):S1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?gs.transform(e):Mo.transform(e),getAnimatableNone:e=>{const t=Ut.parse(e);return t.alpha=0,Ut.transform(t)}},a7=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function i7(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))==null?void 0:t.length)||0)+(((n=e.match(a7))==null?void 0:n.length)||0)>0}const cD="number",uD="color",s7="var",o7="var(",VO="${}",l7=/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 Ko(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let l=0;const d=t.replace(l7,f=>(Ut.test(f)?(r.color.push(l),i.push(uD),n.push(Ut.parse(f))):f.startsWith(o7)?(r.var.push(l),i.push(s7),n.push(f)):(r.number.push(l),i.push(cD),n.push(parseFloat(f))),++l,VO)).split(VO);return{values:n,split:d,indexes:r,types:i}}function c7(e){return Ko(e).values}function dD({split:e,types:t}){const n=e.length;return r=>{let i="";for(let l=0;l<n;l++)if(i+=e[l],r[l]!==void 0){const c=t[l];c===cD?i+=Zc(r[l]):c===uD?i+=Ut.transform(r[l]):i+=r[l]}return i}}function u7(e){return dD(Ko(e))}const d7=e=>typeof e=="number"?0:Ut.test(e)?Ut.getAnimatableNone(e):e,f7=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:d7(e);function h7(e){const t=Ko(e);return dD(t)(t.values.map((r,i)=>f7(r,t.split[i])))}const zr={test:i7,parse:c7,createTransformer:u7,getAnimatableNone:h7};function Jy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function m7({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,l=0,c=0;if(!t)i=l=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,f=2*n-d;i=Jy(f,d,e+1/3),l=Jy(f,d,e),c=Jy(f,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:r}}function jh(e,t){return n=>n>0?t:e}const ft=(e,t,n)=>e+(t-e)*n,eg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},p7=[S1,gs,Mo],x7=e=>p7.find(t=>t.test(e));function HO(e){const t=x7(e);if(!t)return!1;let n=t.parse(e);return t===Mo&&(n=m7(n)),n}const FO=(e,t)=>{const n=HO(e),r=HO(t);if(!n||!r)return jh(e,t);const i={...n};return l=>(i.red=eg(n.red,r.red,l),i.green=eg(n.green,r.green,l),i.blue=eg(n.blue,r.blue,l),i.alpha=ft(n.alpha,r.alpha,l),gs.transform(i))},N1=new Set(["none","hidden"]);function y7(e,t){return N1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function g7(e,t){return n=>ft(e,t,n)}function Fw(e){return typeof e=="number"?g7:typeof e=="string"?Uw(e)?jh:Ut.test(e)?FO:j7:Array.isArray(e)?fD:typeof e=="object"?Ut.test(e)?FO:v7:jh}function fD(e,t){const n=[...e],r=n.length,i=e.map((l,c)=>Fw(l)(l,t[c]));return l=>{for(let c=0;c<r;c++)n[c]=i[c](l);return n}}function v7(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Fw(e[i])(e[i],t[i]));return i=>{for(const l in r)n[l]=r[l](i);return n}}function b7(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const l=t.types[i],c=e.indexes[l][r[l]],d=e.values[c]??0;n[i]=d,r[l]++}return n}const j7=(e,t)=>{const n=zr.createTransformer(t),r=Ko(e),i=Ko(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?N1.has(e)&&!i.values.length||N1.has(t)&&!r.values.length?y7(e,t):Qu(fD(b7(r,i),i.values),n):jh(e,t)};function hD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):Fw(e)(e,t)}const w7=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>ki(t),now:()=>cn.isProcessing?cn.timestamp:bn.now()}},mD=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let l=0;l<i;l++)r+=Math.round(e(l/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wh=2e4;function Gw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wh;)t+=n,r=e.next(t);return t>=wh?1/0:t}function S7(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Gw(r),wh);return{type:"keyframes",ease:l=>r.next(i*l).value/t,duration:pr(i)}}const kt={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};function A1(e,t){return e*Math.sqrt(1-t*t)}const N7=12;function A7(e,t,n){let r=n;for(let i=1;i<N7;i++)r=r-e(r)/t(r);return r}const tg=.001;function _7({duration:e=kt.duration,bounce:t=kt.bounce,velocity:n=kt.velocity,mass:r=kt.mass}){let i,l,c=1-t;c=ta(kt.minDamping,kt.maxDamping,c),e=ta(kt.minDuration,kt.maxDuration,pr(e)),c<1?(i=h=>{const p=h*c,x=p*e,y=p-n,j=A1(h,c),w=Math.exp(-x);return tg-y/j*w},l=h=>{const x=h*c*e,y=x*n+n,j=Math.pow(c,2)*Math.pow(h,2)*e,w=Math.exp(-x),S=A1(Math.pow(h,2),c);return(-i(h)+tg>0?-1:1)*((y-j)*w)/S}):(i=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-tg+p*x},l=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,f=A7(i,l,d);if(e=Wn(e),isNaN(f))return{stiffness:kt.stiffness,damping:kt.damping,duration:e};{const h=Math.pow(f,2)*r;return{stiffness:h,damping:c*2*Math.sqrt(r*h),duration:e}}}const O7=["duration","bounce"],T7=["stiffness","damping","mass"];function GO(e,t){return t.some(n=>e[n]!==void 0)}function E7(e){let t={velocity:kt.velocity,stiffness:kt.stiffness,damping:kt.damping,mass:kt.mass,isResolvedFromDuration:!1,...e};if(!GO(e,T7)&&GO(e,O7))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,l=2*ta(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:kt.mass,stiffness:i,damping:l}}else{const n=_7({...e,velocity:0});t={...t,...n,mass:kt.mass},t.isResolvedFromDuration=!0}return t}function Sh(e=kt.visualDuration,t=kt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:h,mass:p,duration:x,velocity:y,isResolvedFromDuration:j}=E7({...n,velocity:-pr(n.velocity||0)}),w=y||0,S=h/(2*Math.sqrt(f*p)),v=c-l,A=pr(Math.sqrt(f/p)),O=Math.abs(v)<5;r||(r=O?kt.restSpeed.granular:kt.restSpeed.default),i||(i=O?kt.restDelta.granular:kt.restDelta.default);let _,T,N,E,k,R;if(S<1)N=A1(A,S),E=(w+S*A*v)/N,_=D=>{const z=Math.exp(-S*A*D);return c-z*(E*Math.sin(N*D)+v*Math.cos(N*D))},k=S*A*E+v*N,R=S*A*v-E*N,T=D=>Math.exp(-S*A*D)*(k*Math.sin(N*D)+R*Math.cos(N*D));else if(S===1){_=z=>c-Math.exp(-A*z)*(v+(w+A*v)*z);const D=w+A*v;T=z=>Math.exp(-A*z)*(A*D*z-w)}else{const D=A*Math.sqrt(S*S-1);_=K=>{const H=Math.exp(-S*A*K),I=Math.min(D*K,300);return c-H*((w+S*A*v)*Math.sinh(I)+D*v*Math.cosh(I))/D};const z=(w+S*A*v)/D,$=S*A*z-v*D,L=S*A*v-z*D;T=K=>{const H=Math.exp(-S*A*K),I=Math.min(D*K,300);return H*($*Math.sinh(I)+L*Math.cosh(I))}}const B={calculatedDuration:j&&x||null,velocity:D=>Wn(T(D)),next:D=>{if(!j&&S<1){const $=Math.exp(-S*A*D),L=Math.sin(N*D),K=Math.cos(N*D),H=c-$*(E*L+v*K),I=Wn($*(k*L+R*K));return d.done=Math.abs(I)<=r&&Math.abs(c-H)<=i,d.value=d.done?c:H,d}const z=_(D);if(j)d.done=D>=x;else{const $=Wn(T(D));d.done=Math.abs($)<=r&&Math.abs(c-z)<=i}return d.value=d.done?c:z,d},toString:()=>{const D=Math.min(Gw(B),wh),z=mD($=>B.next(D*$).value,D,30);return D+"ms "+z},toTransition:()=>{}};return B}Sh.applyToOptions=e=>{const t=S7(e,100,Sh);return e.ease=t.ease,e.duration=Wn(t.duration),e.type="keyframes",e};const C7=5;function pD(e,t,n){const r=Math.max(t-C7,0);return YR(n-e(r),t-r)}function _1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:f,restDelta:h=.5,restSpeed:p}){const x=e[0],y={done:!1,value:x},j=R=>d!==void 0&&R<d||f!==void 0&&R>f,w=R=>d===void 0?f:f===void 0||Math.abs(d-R)<Math.abs(f-R)?d:f;let S=n*t;const v=x+S,A=c===void 0?v:c(v);A!==v&&(S=A-x);const O=R=>-S*Math.exp(-R/r),_=R=>A+O(R),T=R=>{const B=O(R),D=_(R);y.done=Math.abs(B)<=h,y.value=y.done?A:D};let N,E;const k=R=>{j(y.value)&&(N=R,E=Sh({keyframes:[y.value,w(y.value)],velocity:pD(_,R,y.value),damping:i,stiffness:l,restDelta:h,restSpeed:p}))};return k(0),{calculatedDuration:null,next:R=>{let B=!1;return!E&&N===void 0&&(B=!0,T(R),k(R)),N!==void 0&&R>=N?E.next(R-N):(!B&&T(R),y)}}}function M7(e,t,n){const r=[],i=n||Mi.mix||hD,l=e.length-1;for(let c=0;c<l;c++){let d=i(e[c],e[c+1]);if(t){const f=Array.isArray(t)?t[c]||gr:t;d=Qu(f,d)}r.push(d)}return r}function k7(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const l=e.length;if($w(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=M7(t,r,i),f=d.length,h=p=>{if(c&&p<e[0])return t[0];let x=0;if(f>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const y=cu(e[x],e[x+1],p);return d[x](y)};return n?p=>h(ta(e[0],e[l-1],p)):h}function P7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=cu(0,t,r);e.push(ft(n,1,i))}}function R7(e){const t=[0];return P7(t,e.length-1),t}function D7(e,t){return e.map(n=>n*t)}function z7(e,t){return e.map(()=>t||rD).splice(0,e.length-1)}function Qc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Hq(r)?r.map(IO):IO(r),l={done:!1,value:t[0]},c=D7(n&&n.length===t.length?n:R7(t),e),d=k7(c,t,{ease:Array.isArray(i)?i:z7(t,i)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const L7=e=>e!==null;function Im(e,{repeat:t,repeatType:n="loop"},r,i=1){const l=e.filter(L7),d=i<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const $7={decay:_1,inertia:_1,tween:Qc,keyframes:Qc,spring:Sh};function xD(e){typeof e.type=="string"&&(e.type=$7[e.type])}class Kw{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const B7=e=>e/100;class Nh extends Kw{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==bn.now()&&this.tick(bn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xD(t);const{type:n=Qc,repeat:r=0,repeatDelay:i=0,repeatType:l,velocity:c=0}=t;let{keyframes:d}=t;const f=n||Qc;f!==Qc&&typeof d[0]!="number"&&(this.mixKeyframes=Qu(B7,hD(d[0],d[1])),d=[0,100]);const h=f({...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...d].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=Gw(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:d,calculatedDuration:f}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:p,repeat:x,repeatType:y,repeatDelay:j,type:w,onUpdate:S,finalKeyframe:v}=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)),n?this.currentTime=t:this.updateTime(t);const A=this.currentTime-h*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?A<0:A>i;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=this.currentTime,T=r;if(x){const R=Math.min(this.currentTime,i)/d;let B=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&B--,B=Math.min(B,x+1),!!(B%2)&&(y==="reverse"?(D=1-D,j&&(D-=j/d)):y==="mirror"&&(T=c)),_=ta(0,1,D)*d}let N;O?(this.delayState.value=p[0],N=this.delayState):N=T.next(_),l&&!O&&(N.value=l(N.value));let{done:E}=N;!O&&f!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&w!==_1&&(N.value=Im(p,this.options,v,this.speed)),S&&S(N.value),k&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return pr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(this.currentTime)}set time(t){t=Wn(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return pD(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(bn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=pr(this.currentTime))}play(){var i,l;if(this.isStopped)return;const{driver:t=w7,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(l=(i=this.options).onPlay)==null||l.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(bn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.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 n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function I7(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const vs=e=>e*180/Math.PI,O1=e=>{const t=vs(Math.atan2(e[1],e[0]));return T1(t)},q7={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:O1,rotateZ:O1,skewX:e=>vs(Math.atan(e[1])),skewY:e=>vs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},T1=e=>(e=e%360,e<0&&(e+=360),e),KO=O1,YO=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),XO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:YO,scaleY:XO,scale:e=>(YO(e)+XO(e))/2,rotateX:e=>T1(vs(Math.atan2(e[6],e[5]))),rotateY:e=>T1(vs(Math.atan2(-e[2],e[0]))),rotateZ:KO,rotate:KO,skewX:e=>vs(Math.atan(e[4])),skewY:e=>vs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function E1(e){return e.includes("scale")?1:0}function C1(e,t){if(!e||e==="none")return E1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=U7,i=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=q7,i=d}if(!i)return E1(t);const l=r[t],c=i[1].split(",").map(H7);return typeof l=="function"?l(c):c[l]}const V7=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return C1(n,t)};function H7(e){return parseFloat(e.trim())}const _l=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ol=new Set([..._l,"pathRotation"]),WO=e=>e===Al||e===xe,F7=new Set(["x","y","z"]),G7=_l.filter(e=>!F7.has(e));function K7(e){const t=[];return G7.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Oi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},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})=>C1(t,"x"),y:(e,{transform:t})=>C1(t,"y")};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Ns=new Set;let M1=!1,k1=!1,P1=!1;function yD(){if(k1){const e=Array.from(Ns).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=K7(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([l,c])=>{var d;(d=r.getValue(l))==null||d.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}k1=!1,M1=!1,Ns.forEach(e=>e.complete(P1)),Ns.clear()}function gD(){Ns.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(k1=!0)})}function Y7(){P1=!0,gD(),yD(),P1=!1}class Yw{constructor(t,n,r,i,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Ns.add(this),M1||(M1=!0,ht.read(gD),ht.resolveKeyframes(yD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const l=i==null?void 0:i.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),i&&l===void 0&&i.set(t[0])}I7(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ns.delete(this)}cancel(){this.state==="scheduled"&&(Ns.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const X7=e=>e.startsWith("--");function vD(e,t,n){X7(t)?e.style.setProperty(t,n):e.style[t]=n}const W7={};function bD(e,t){const n=KR(e);return()=>W7[t]??n()}const Z7=bD(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),jD=bD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ZO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kc([0,.65,.55,1]),circOut:Kc([.55,0,1,.45]),backIn:Kc([.31,.01,.66,-.59]),backOut:Kc([.33,1.53,.69,.99])};function wD(e,t){if(e)return typeof e=="function"?jD()?mD(e,t):"ease-out":aD(e)?Kc(e):Array.isArray(e)?e.map(n=>wD(n,t)||ZO.easeOut):ZO[e]}function Q7(e,t,n,{delay:r=0,duration:i=300,repeat:l=0,repeatType:c="loop",ease:d="easeOut",times:f}={},h=void 0){const p={[t]:n};f&&(p.offset=f);const x=wD(d,i);Array.isArray(x)&&(p.easing=x);const y={delay:r,duration:i,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(p,y)}function SD(e){return typeof e=="function"&&"applyToOptions"in e}function J7({type:e,...t}){return SD(e)&&jD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ND extends Kw{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:d,onComplete:f}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,$w(typeof t.type!="string");const h=J7(t);this.animation=Q7(n,r,i,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=Im(i,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(p),vD(n,r,p),this.animation.cancel()}f==null||f(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.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 n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return pr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wn(t),n&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var l;return this.allowFlatten&&((l=this.animation.effect)==null||l.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Z7()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),gr):i(this)}}const AD={anticipate:eD,backInOut:JR,circInOut:nD};function e9(e){return e in AD}function t9(e){typeof e.ease=="string"&&e9(e.ease)&&(e.ease=AD[e.ease])}const ng=10;class n9 extends ND{constructor(t){t9(t),xD(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:l,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new Nh({...c,autoplay:!1}),f=Math.max(ng,bn.now()-this.startTime),h=ta(0,ng,f-ng),p=d.sample(f).value,{name:x}=this.options;l&&x&&vD(l,x,p),n.setWithVelocity(d.sample(Math.max(0,f-h)).value,p,h),d.stop()}}const QO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zr.test(e)||e==="0")&&!e.startsWith("url("));function r9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function a9(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=QO(i,t),d=QO(l,t);return!c||!d?!1:r9(e)||(n==="spring"||SD(n))&&r}function R1(e){e.duration=0,e.type="keyframes"}const _D=new Set(["opacity","clipPath","filter","transform"]),i9=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function s9(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&i9.test(e[t]))return!0;return!1}const o9=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),l9=KR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function c9(e){var x;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:l,type:c,keyframes:d}=e;if(!(((x=t==null?void 0:t.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:p}=t.owner.getProps();return l9()&&n&&(_D.has(n)||o9.has(n)&&s9(d))&&(n!=="transform"||!p)&&!h&&!r&&i!=="mirror"&&l!==0&&c!=="inertia"}const u9=40;class d9 extends Kw{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:l=0,repeatType:c="loop",keyframes:d,name:f,motionValue:h,element:p,...x}){var w;super(),this.stop=()=>{var S,v;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=bn.now();const y={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:l,repeatType:c,name:f,motionValue:h,element:p,...x},j=(p==null?void 0:p.KeyframeResolver)||Yw;this.keyframeResolver=new j(d,(S,v,A)=>this.onKeyframesResolved(S,v,y,!A),f,h,p),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,i){var A,O;this.keyframeResolver=void 0;const{name:l,type:c,velocity:d,delay:f,isHandoff:h,onUpdate:p}=r;this.resolvedAt=bn.now();let x=!0;a9(t,l,c,d)||(x=!1,(Mi.instantAnimations||!f)&&(p==null||p(Im(t,r,n))),t[0]=t[t.length-1],R1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>u9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=x&&!h&&c9(j),S=(O=(A=j.motionValue)==null?void 0:A.owner)==null?void 0:O.current;let v;if(w)try{v=new n9({...j,element:S})}catch{v=new Nh(j)}else v=new Nh(j);v.finished.then(()=>{this.notifyFinished()}).catch(gr),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,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Y7()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function OD(e,t,n,r=0,i=1){const l=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),c=e.size,d=(c-1)*r;return typeof n=="function"?n(l,c):i===1?l*r:d-l*r}const JO=30,f9=e=>!isNaN(parseFloat(e));class h9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var l;const i=bn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=f9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bw);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>JO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,JO);return YR(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Yo(e,t){return new h9(e,t)}function TD(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xw(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?TD(n,e):n}const m9={type:"spring",stiffness:500,damping:25,restSpeed:10},p9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),x9={type:"keyframes",duration:.8},y9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},g9=(e,{keyframes:t})=>t.length>2?x9:Ol.has(e)?e.startsWith("scale")?p9(t[1]):m9:y9,v9=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function b9(e){for(const t in e)if(!v9.has(t))return!0;return!1}const Ww=(e,t,n,r={},i,l)=>c=>{const d=Xw(r,e)||{},f=d.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Wn(f);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-h,onUpdate:y=>{t.set(y),d.onUpdate&&d.onUpdate(y)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:i};b9(d)||Object.assign(p,g9(e,p)),p.duration&&(p.duration=Wn(p.duration)),p.repeatDelay&&(p.repeatDelay=Wn(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(R1(p),p.delay===0&&(x=!0)),(Mi.instantAnimations||Mi.skipAnimations||i!=null&&i.shouldSkipAnimations||d.skipAnimations)&&(x=!0,R1(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!l&&t.get()!==void 0){const y=Im(p.keyframes,d);if(y!==void 0){ht.update(()=>{p.onUpdate(y),p.onComplete()});return}}return d.isSync?new Nh(p):new d9(p)},j9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function w9(e){const t=j9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function ED(e,t,n=1){const[r,i]=w9(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const c=l.trim();return HR(c)?parseFloat(c):c}return Uw(i)?ED(i,t,n+1):i}function eT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zw(e,t,n,r){if(typeof t=="function"){const[i,l]=eT(r);t=t(n!==void 0?n:e.custom,i,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,l]=eT(r);t=t(n!==void 0?n:e.custom,i,l)}return t}function As(e,t,n){const r=e.getProps();return Zw(r,t,n!==void 0?n:r.custom,e)}const CD=new Set(["width","height","top","left","right","bottom",..._l]),D1=e=>Array.isArray(e);function S9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yo(n))}function N9(e){return D1(e)?e[e.length-1]||0:e}function A9(e,t){const n=As(e,t);let{transitionEnd:r={},transition:i={},...l}=n||{};l={...l,...r};for(const c in l){const d=N9(l[c]);S9(e,c,d)}}const un=e=>!!(e&&e.getVelocity);function _9(e){return!!(un(e)&&e.add)}function z1(e,t){const n=e.getValue("willChange");if(_9(n))return n.add(t);if(!n&&Mi.WillChange){const r=new Mi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qw(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const O9="framerAppearId",MD="data-"+Qw(O9);function kD(e){return e.props[MD]}function T9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:l,transitionEnd:c,...d}=t;const f=e.getDefaultTransition();l=l?TD(l,f):f;const h=l==null?void 0:l.reduceMotion,p=l==null?void 0:l.skipAnimations;r&&(l=r);const x=[],y=i&&e.animationState&&e.animationState.getState()[i],j=l==null?void 0:l.path;j&&j.animateVisualElement(e,d,l,n,x);for(const w in d){const S=e.getValue(w,e.latestValues[w]??null),v=d[w];if(v===void 0||y&&T9(y,w))continue;const A={delay:n,...Xw(l||{},w)};p&&(A.skipAnimations=!0);const O=S.get();if(O!==void 0&&!S.isAnimating()&&!Array.isArray(v)&&v===O&&!A.velocity){ht.update(()=>S.set(v));continue}let _=!1;if(window.MotionHandoffAnimation){const E=kD(e);if(E){const k=window.MotionHandoffAnimation(E,w,ht);k!==null&&(A.startTime=k,_=!0)}}z1(e,w);const T=h??e.shouldReduceMotion;S.start(Ww(w,S,v,T&&CD.has(w)?{type:!1}:A,e,_));const N=S.animation;N&&x.push(N)}if(c){const w=()=>ht.update(()=>{c&&A9(e,c)});x.length?Promise.all(x).then(w):w()}return x}function L1(e,t,n={}){var f;const r=As(e,t,n.type==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const l=r?()=>Promise.all(PD(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:p=0,staggerChildren:x,staggerDirection:y}=i;return E9(e,t,h,p,x,y,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[h,p]=d==="beforeChildren"?[l,c]:[c,l];return h().then(()=>p())}else return Promise.all([l(),c(n.delay)])}function E9(e,t,n=0,r=0,i=0,l=1,c){const d=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),d.push(L1(f,t,{...c,delay:n+(typeof r=="function"?0:r)+OD(e.variantChildren,f,r,i,l)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function C9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(l=>L1(e,l,n));r=Promise.all(i)}else if(typeof t=="string")r=L1(e,t,n);else{const i=typeof t=="function"?As(e,t,n.custom):t;r=Promise.all(PD(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const M9={test:e=>e==="auto",parse:e=>e},RD=e=>t=>t.test(e),DD=[Al,xe,Wr,Ta,r7,n7,M9],tT=e=>DD.find(RD(e));function k9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||GR(e):!0}const P9=new Set(["brightness","contrast","saturate","opacity"]);function R9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const i=n.replace(r,"");let l=P9.has(t)?1:0;return r!==n&&(l*=100),t+"("+l+i+")"}const D9=/\b([a-z-]*)\(.*?\)/gu,$1={...zr,getAnimatableNone:e=>{const t=e.match(D9);return t?t.map(R9).join(" "):e}},B1={...zr,getAnimatableNone:e=>{const t=zr.parse(e);return zr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},nT={...Al,transform:Math.round},z9={rotate:Ta,pathRotation:Ta,rotateX:Ta,rotateY:Ta,rotateZ:Ta,scale:Df,scaleX:Df,scaleY:Df,scaleZ:Df,skew:Ta,skewX:Ta,skewY:Ta,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:uu,originX:UO,originY:UO,originZ:xe},Ah={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,inset:xe,insetBlock:xe,insetBlockStart:xe,insetBlockEnd:xe,insetInline:xe,insetInlineStart:xe,insetInlineEnd:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,paddingBlock:xe,paddingBlockStart:xe,paddingBlockEnd:xe,paddingInline:xe,paddingInlineStart:xe,paddingInlineEnd:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,marginBlock:xe,marginBlockStart:xe,marginBlockEnd:xe,marginInline:xe,marginInlineStart:xe,marginInlineEnd:xe,fontSize:xe,backgroundPositionX:xe,backgroundPositionY:xe,...z9,zIndex:nT,fillOpacity:uu,strokeOpacity:uu,numOctaves:nT},L9={...Ah,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:$1,WebkitFilter:$1,mask:B1,WebkitMask:B1},zD=e=>L9[e],$9=new Set([$1,B1]);function LD(e,t){let n=zD(e);return $9.has(n)||(n=zr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B9=new Set(["auto","none","0"]);function I9(e,t,n){let r=0,i;for(;r<e.length&&!i;){const l=e[r];typeof l=="string"&&!B9.has(l)&&Ko(l).values.length&&(i=e[r]),r++}if(i&&n)for(const l of t)e[l]=LD(n,i)}class q9 extends Yw{constructor(t,n,r,i,l){super(t,n,r,i,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let x=t[p];if(typeof x=="string"&&(x=x.trim(),Uw(x))){const y=ED(x,n.current);y!==void 0&&(t[p]=y),p===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!CD.has(r)||t.length!==2)return;const[i,l]=t,c=tT(i),d=tT(l),f=qO(i),h=qO(l);if(f!==h&&Oi[r]){this.needsMeasurement=!0;return}if(c!==d)if(WO(c)&&WO(d))for(let p=0;p<t.length;p++){const x=t[p];typeof x=="string"&&(t[p]=parseFloat(x))}else Oi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||k9(t[i]))&&r.push(i);r.length&&I9(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var d;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const l=r.length-1,c=r[l];r[l]=Oi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(d=this.removedTransforms)!=null&&d.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}const Jw=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function $D(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const I1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lh(e){return FR(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:eS}=iD(queueMicrotask,!1),Mr={x:!1,y:!1};function BD(){return Mr.x||Mr.y}function U9(e){return e==="x"||e==="y"?Mr[e]?null:(Mr[e]=!0,()=>{Mr[e]=!1}):Mr.x||Mr.y?null:(Mr.x=Mr.y=!0,()=>{Mr.x=Mr.y=!1})}function ID(e,t){const n=$D(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function V9(e){return!(e.pointerType==="touch"||BD())}function H9(e,t,n={}){const[r,i,l]=ID(e,n);return r.forEach(c=>{let d=!1,f=!1,h;const p=()=>{c.removeEventListener("pointerleave",w)},x=v=>{h&&(h(v),h=void 0),p()},y=v=>{d=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),f&&(f=!1,x(v))},j=()=>{d=!0,window.addEventListener("pointerup",y,i),window.addEventListener("pointercancel",y,i)},w=v=>{if(v.pointerType!=="touch"){if(d){f=!0;return}x(v)}},S=v=>{if(!V9(v))return;f=!1;const A=t(c,v);typeof A=="function"&&(h=A,c.addEventListener("pointerleave",w,i))};c.addEventListener("pointerenter",S,i),c.addEventListener("pointerdown",j,i)}),l}const qD=(e,t)=>t?e===t?!0:qD(e,t.parentElement):!1,tS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,F9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function G9(e){return F9.has(e.tagName)||e.isContentEditable===!0}const K9=new Set(["INPUT","SELECT","TEXTAREA"]);function Y9(e){return K9.has(e.tagName)||e.isContentEditable===!0}const ch=new WeakSet;function rT(e){return t=>{t.key==="Enter"&&e(t)}}function rg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const X9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=rT(()=>{if(ch.has(n))return;rg(n,"down");const i=rT(()=>{rg(n,"up")}),l=()=>rg(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function aT(e){return tS(e)&&!BD()}const iT=new WeakSet;function W9(e,t,n={}){const[r,i,l]=ID(e,n),c=d=>{const f=d.currentTarget;if(!aT(d)||iT.has(d))return;ch.add(f),n.stopPropagation&&iT.add(d);const h=t(f,d),p={...i,capture:!0},x=(w,S)=>{window.removeEventListener("pointerup",y,p),window.removeEventListener("pointercancel",j,p),ch.has(f)&&ch.delete(f),aT(w)&&typeof h=="function"&&h(w,{success:S})},y=w=>{x(w,f===window||f===document||n.useGlobalTarget||qD(f,w.target))},j=w=>{x(w,!1)};window.addEventListener("pointerup",y,p),window.addEventListener("pointercancel",j,p)};return r.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,i),lh(d)&&(d.addEventListener("focus",h=>X9(h,i)),!G9(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function nS(e){return FR(e)&&"ownerSVGElement"in e}const uh=new WeakMap;let Ni;const UD=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:nS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Z9=UD("inline","width","offsetWidth"),Q9=UD("block","height","offsetHeight");function J9({target:e,borderBoxSize:t}){var n;(n=uh.get(e))==null||n.forEach(r=>{r(e,{get width(){return Z9(e,t)},get height(){return Q9(e,t)}})})}function eU(e){e.forEach(J9)}function tU(){typeof ResizeObserver>"u"||(Ni=new ResizeObserver(eU))}function nU(e,t){Ni||tU();const n=$D(e);return n.forEach(r=>{let i=uh.get(r);i||(i=new Set,uh.set(r,i)),i.add(t),Ni==null||Ni.observe(r)}),()=>{n.forEach(r=>{const i=uh.get(r);i==null||i.delete(t),i!=null&&i.size||Ni==null||Ni.unobserve(r)})}}const dh=new Set;let ko;function rU(){ko=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};dh.forEach(t=>t(e))},window.addEventListener("resize",ko)}function aU(e){return dh.add(e),ko||rU(),()=>{dh.delete(e),!dh.size&&typeof ko=="function"&&(window.removeEventListener("resize",ko),ko=void 0)}}function sT(e,t){return typeof e=="function"?aU(e):nU(e,t)}function iU(e){return nS(e)&&e.tagName==="svg"}const sU=[...DD,Ut,zr],oU=e=>sU.find(RD(e)),oT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:oT(),y:oT()}),lT=()=>({min:0,max:0}),Kt=()=>({x:lT(),y:lT()}),lU=new WeakMap;function qm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function du(e){return typeof e=="string"||Array.isArray(e)}const rS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],aS=["initial",...rS];function Um(e){return qm(e.animate)||aS.some(t=>du(e[t]))}function VD(e){return!!(Um(e)||e.variants)}function cU(e,t,n){for(const r in t){const i=t[r],l=n[r];if(un(i))e.addValue(r,i);else if(un(l))e.addValue(r,Yo(i,{owner:e}));else if(l!==i)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(i):c.hasAnimated||c.set(i)}else{const c=e.getStaticValue(r);e.addValue(r,Yo(c!==void 0?c:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const q1={current:null},HD={current:!1},uU=typeof window<"u";function dU(){if(HD.current=!0,!!uU)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>q1.current=e.matches;e.addEventListener("change",t),t()}else q1.current=!1}const cT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _h={};function FD(e){_h=e}function fU(){return _h}class hU{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:l,blockInitialAnimation:c,visualState:d},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Yw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 j=bn.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,ht.render(this.render,!1,!0))};const{latestValues:h,renderState:p}=d;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=p,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=l,this.options=f,this.blockInitialAnimation=!!c,this.isControllingVariants=Um(n),this.isVariantNode=VD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:x,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const j in y){const w=y[j];h[j]!==void 0&&un(w)&&w.set(h[j])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,lU.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((i,l)=>this.bindToMotionValue(l,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(HD.current||dU(),this.shouldReduceMotion=q1.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ki(this.notifyUpdate),ki(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&_D.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:f,ease:h,duration:p}=n.accelerate,x=new ND({element:this.current,name:t,keyframes:d,times:f,ease:h,duration:Wn(p)}),y=c(x);this.valueSubscriptions.set(t,()=>{y(),x.cancel()});return}const r=Ol.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),l&&l()})}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 _h){const n=_h[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<cT.length;r++){const i=cT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const l="on"+i,c=t[l];c&&(this.propEventSubscriptions[i]=this.on(i,c))}this.prevMotionValues=cU(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(HR(r)||GR(r))?r=parseFloat(r):!oU(r)&&zr.test(n)&&(r=LD(t,n)),this.setBaseTarget(t,un(r)?r.get():r)),un(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var l;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=Zw(this.props,n,(l=this.presenceContext)==null?void 0:l.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){eS.render(this.render)}}class GD extends hU{constructor(){super(...arguments),this.KeyframeResolver=q9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Bi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function KD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pU(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ag(e){return e===void 0||e===1}function U1({scale:e,scaleX:t,scaleY:n}){return!ag(e)||!ag(t)||!ag(n)}function hs(e){return U1(e)||YD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function YD(e){return uT(e.x)||uT(e.y)}function uT(e){return e&&e!=="0%"}function Oh(e,t,n){const r=e-n,i=t*r;return n+i}function dT(e,t,n,r,i){return i!==void 0&&(e=Oh(e,i,r)),Oh(e,n,r)+t}function V1(e,t=0,n=1,r,i){e.min=dT(e.min,t,n,r,i),e.max=dT(e.max,t,n,r,i)}function XD(e,{x:t,y:n}){V1(e.x,t.translate,t.scale,t.originPoint),V1(e.y,n.translate,n.scale,n.originPoint)}const fT=.999999999999,hT=1.0000000000001;function xU(e,t,n,r=!1){var d;const i=n.length;if(!i)return;t.x=t.y=1;let l,c;for(let f=0;f<i;f++){l=n[f],c=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(r&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Yr(e.x,-l.scroll.offset.x),Yr(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,XD(e,c)),r&&hs(l.latestValues)&&fh(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<hT&&t.x>fT&&(t.x=1),t.y<hT&&t.y>fT&&(t.y=1)}function Yr(e,t){e.min+=t,e.max+=t}function mT(e,t,n,r,i=.5){const l=ft(e.min,e.max,i);V1(e,t,n,l,r)}function pT(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function fh(e,t,n){const r=n??e;mT(e.x,pT(t.x,r.x),t.scaleX,t.scale,t.originX),mT(e.y,pT(t.y,r.y),t.scaleY,t.scale,t.originY)}function WD(e,t){return KD(pU(e.getBoundingClientRect(),t))}function yU(e,t,n){const r=WD(e,n),{scroll:i}=t;return i&&(Yr(r.x,i.offset.x),Yr(r.y,i.offset.y)),r}const gU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vU=_l.length;function bU(e,t,n){let r="",i=!0;for(let c=0;c<vU;c++){const d=_l[c],f=e[d];if(f===void 0)continue;let h=!0;if(typeof f=="number")h=f===(d.startsWith("scale")?1:0);else{const p=parseFloat(f);h=d.startsWith("scale")?p===1:p===0}if(!h||n){const p=I1(f,Ah[d]);if(!h){i=!1;const x=gU[d]||d;r+=`${x}(${p}) `}n&&(t[d]=p)}}const l=e.pathRotation;return l&&(i=!1,r+=`rotate(${I1(l,Ah.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function iS(e,t,n){const{style:r,vars:i,transformOrigin:l}=e;let c=!1,d=!1;for(const f in t){const h=t[f];if(Ol.has(f)){c=!0;continue}else if(oD(f)){i[f]=h;continue}else{const p=I1(h,Ah[f]);f.startsWith("origin")?(d=!0,l[f]=p):r[f]=p}}if(t.transform||(c||n?r.transform=bU(t,e.transform,n):r.transform&&(r.transform="none")),d){const{originX:f="50%",originY:h="50%",originZ:p=0}=l;r.transformOrigin=`${f} ${h} ${p}`}}function ZD(e,{style:t,vars:n},r,i){const l=e.style;let c;for(c in t)l[c]=t[c];i==null||i.applyProjectionStyles(l,r);for(c in n)l.setProperty(c,n[c])}function xT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=xT(e,t.target.x),r=xT(e,t.target.y);return`${n}% ${r}%`}},jU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=zr.parse(e);if(i.length>5)return r;const l=zr.createTransformer(e),c=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;i[0+c]/=d,i[1+c]/=f;const h=ft(d,f,.5);return typeof i[2+c]=="number"&&(i[2+c]/=h),typeof i[3+c]=="number"&&(i[3+c]/=h),l(i)}},H1={borderRadius:{...Rc,applyTo:[...Jw]},borderTopLeftRadius:Rc,borderTopRightRadius:Rc,borderBottomLeftRadius:Rc,borderBottomRightRadius:Rc,boxShadow:jU};function QD(e,{layout:t,layoutId:n}){return Ol.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H1[e]||e==="opacity")}function sS(e,t,n){var c;const r=e.style,i=t==null?void 0:t.style,l={};if(!r)return l;for(const d in r)(un(r[d])||i&&un(i[d])||QD(d,e)||((c=n==null?void 0:n.getValue(d))==null?void 0:c.liveStyle)!==void 0)&&(l[d]=r[d]);return l}function wU(e){return window.getComputedStyle(e)}class SU extends GD{constructor(){super(...arguments),this.type="html",this.renderInstance=ZD}readValueFromInstance(t,n){var r;if(Ol.has(n))return(r=this.projection)!=null&&r.isProjecting?E1(n):V7(t,n);{const i=wU(t),l=(oD(n)?i.getPropertyValue(n):i[n])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:n}){return WD(t,n)}build(t,n,r){iS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sS(t,n,r)}}const NU={offset:"stroke-dashoffset",array:"stroke-dasharray"},AU={offset:"strokeDashoffset",array:"strokeDasharray"};function _U(e,t,n=1,r=0,i=!0){e.pathLength=1;const l=i?NU:AU;e[l.offset]=`${-r}`,e[l.array]=`${t} ${n}`}const OU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function JD(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:l=1,pathOffset:c=0,...d},f,h,p){if(iS(e,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:y}=e;x.transform&&(y.transform=x.transform,delete x.transform),(y.transform||x.transformOrigin)&&(y.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),y.transform&&(y.transformBox=(p==null?void 0:p.transformBox)??"fill-box",delete x.transformBox);for(const j of OU)x[j]!==void 0&&(y[j]=x[j],delete x[j]);t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),r!==void 0&&(x.scale=r),i!==void 0&&_U(x,i,l,c,!1)}const e5=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"]),t5=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TU(e,t,n,r){ZD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(e5.has(i)?i:Qw(i),t.attrs[i])}function n5(e,t,n){const r=sS(e,t,n);for(const i in e)if(un(e[i])||un(t[i])){const l=_l.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[l]=e[i]}return r}class EU extends GD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ol.has(n)){const r=zD(n);return r&&r.default||0}return n=e5.has(n)?n:Qw(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return n5(t,n,r)}build(t,n,r){JD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){TU(t,n,r,i)}mount(t){this.isSVGTag=t5(t.tagName),super.mount(t)}}const CU=aS.length;function r5(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?r5(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<CU;n++){const r=aS[n],i=e.props[r];(du(i)||i===!1)&&(t[r]=i)}return t}function a5(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const MU=[...rS].reverse(),kU=rS.length;function PU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>C9(e,n,r)))}function RU(e){let t=PU(e),n=yT(),r=!0,i=!1;const l=h=>(p,x)=>{var j;const y=As(e,x,h==="exit"?(j=e.presenceContext)==null?void 0:j.custom:void 0);if(y){const{transition:w,transitionEnd:S,...v}=y;p={...p,...v,...S}}return p};function c(h){t=h(e)}function d(h){const{props:p}=e,x=r5(e.parent)||{},y=[],j=new Set;let w={},S=1/0;for(let A=0;A<kU;A++){const O=MU[A],_=n[O],T=p[O]!==void 0?p[O]:x[O],N=du(T),E=O===h?_.isActive:null;E===!1&&(S=A);let k=T===x[O]&&T!==p[O]&&N;if(k&&(r||i)&&e.manuallyAnimateOnMount&&(k=!1),_.protectedKeys={...w},!_.isActive&&E===null||!T&&!_.prevProp||qm(T)||typeof T=="boolean")continue;if(O==="exit"&&_.isActive&&E!==!0){_.prevResolvedValues&&(w={...w,..._.prevResolvedValues});continue}const R=DU(_.prevProp,T);let B=R||O===h&&_.isActive&&!k&&N||A>S&&N,D=!1;const z=Array.isArray(T)?T:[T];let $=z.reduce(l(O),{});E===!1&&($={});const{prevResolvedValues:L={}}=_,K={...L,...$},H=Z=>{B=!0,j.has(Z)&&(D=!0,j.delete(Z)),_.needsAnimating[Z]=!0;const ie=e.getValue(Z);ie&&(ie.liveStyle=!1)};for(const Z in K){const ie=$[Z],ce=L[Z];if(w.hasOwnProperty(Z))continue;let q=!1;D1(ie)&&D1(ce)?q=!a5(ie,ce)||R:q=ie!==ce,q?ie!=null?H(Z):j.add(Z):ie!==void 0&&j.has(Z)?H(Z):_.protectedKeys[Z]=!0}_.prevProp=T,_.prevResolvedValues=$,_.isActive&&(w={...w,...$}),(r||i)&&e.blockInitialAnimation&&(B=!1);const I=k&&R;B&&(!I||D)&&y.push(...z.map(Z=>{const ie={type:O};if(typeof Z=="string"&&(r||i)&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,q=As(ce,Z);if(ce.enteringChildren&&q){const{delayChildren:Y}=q.transition||{};ie.delay=OD(ce.enteringChildren,e,Y)}}return{animation:Z,options:ie}}))}if(j.size){const A={};if(typeof p.initial!="boolean"){const O=As(e,Array.isArray(p.initial)?p.initial[0]:p.initial);O&&O.transition&&(A.transition=O.transition)}j.forEach(O=>{const _=e.getBaseTarget(O),T=e.getValue(O);T&&(T.liveStyle=!0),A[O]=_??null}),y.push({animation:A})}let v=!!y.length;return r&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,i=!1,v?t(y):Promise.resolve()}function f(h,p){var y;if(n[h].isActive===p)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(j=>{var w;return(w=j.animationState)==null?void 0:w.setActive(h,p)}),n[h].isActive=p;const x=d(h);for(const j in n)n[j].protectedKeys={};return x}return{animateChanges:d,setActive:f,setAnimateFunction:c,getState:()=>n,reset:()=>{n=yT(),i=!0}}}function DU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!a5(t,e):!1}function ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yT(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}function F1(e,t){e.min=t.min,e.max=t.max}function Er(e,t){F1(e.x,t.x),F1(e.y,t.y)}function gT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const i5=1e-4,zU=1-i5,LU=1+i5,s5=.01,$U=0-s5,BU=0+s5;function jn(e){return e.max-e.min}function IU(e,t,n){return Math.abs(e-t)<=n}function vT(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=jn(n)/jn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zU&&e.scale<=LU||isNaN(e.scale))&&(e.scale=1),(e.translate>=$U&&e.translate<=BU||isNaN(e.translate))&&(e.translate=0)}function Jc(e,t,n,r){vT(e.x,t.x,n.x,r?r.originX:void 0),vT(e.y,t.y,n.y,r?r.originY:void 0)}function bT(e,t,n,r=0){const i=r?ft(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+jn(t)}function qU(e,t,n,r){bT(e.x,t.x,n.x,r==null?void 0:r.x),bT(e.y,t.y,n.y,r==null?void 0:r.y)}function jT(e,t,n,r=0){const i=r?ft(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+jn(t)}function Th(e,t,n,r){jT(e.x,t.x,n.x,r==null?void 0:r.x),jT(e.y,t.y,n.y,r==null?void 0:r.y)}function wT(e,t,n,r,i){return e-=t,e=Oh(e,1/n,r),i!==void 0&&(e=Oh(e,1/i,r)),e}function UU(e,t=0,n=1,r=.5,i,l=e,c=e){if(Wr.test(t)&&(t=parseFloat(t),t=ft(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=ft(l.min,l.max,r);e===l&&(d-=t),e.min=wT(e.min,t,n,d,i),e.max=wT(e.max,t,n,d,i)}function ST(e,t,[n,r,i],l,c){UU(e,t[n],t[r],t[i],t.scale,l,c)}const VU=["x","scaleX","originX"],HU=["y","scaleY","originY"];function NT(e,t,n,r){ST(e.x,t,VU,n?n.x:void 0,r?r.x:void 0),ST(e.y,t,HU,n?n.y:void 0,r?r.y:void 0)}function AT(e){return e.translate===0&&e.scale===1}function o5(e){return AT(e.x)&&AT(e.y)}function _T(e,t){return e.min===t.min&&e.max===t.max}function FU(e,t){return _T(e.x,t.x)&&_T(e.y,t.y)}function OT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function l5(e,t){return OT(e.x,t.x)&&OT(e.y,t.y)}function TT(e){return jn(e.x)/jn(e.y)}function ET(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Kr(e){return[e("x"),e("y")]}function GU(e,t,n){let r="";const i=e.x.translate/t.x,l=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((i||l||c)&&(r=`translate3d(${i}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,pathRotation:x,rotateX:y,rotateY:j,skewX:w,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),p&&(r+=`rotate(${p}deg) `),x&&(r+=`rotate(${x}deg) `),y&&(r+=`rotateX(${y}deg) `),j&&(r+=`rotateY(${j}deg) `),w&&(r+=`skewX(${w}deg) `),S&&(r+=`skewY(${S}deg) `)}const d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(r+=`scale(${d}, ${f})`),r||"none"}const KU=Jw.length,CT=e=>typeof e=="string"?parseFloat(e):e,MT=e=>typeof e=="number"||xe.test(e);function YU(e,t,n,r,i,l){i?(e.opacity=ft(0,n.opacity??1,XU(r)),e.opacityExit=ft(t.opacity??1,0,WU(r))):l&&(e.opacity=ft(t.opacity??1,n.opacity??1,r));for(let c=0;c<KU;c++){const d=Jw[c];let f=kT(t,d),h=kT(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||MT(f)===MT(h)?(e[d]=Math.max(ft(CT(f),CT(h),r),0),(Wr.test(h)||Wr.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function kT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const XU=c5(0,.5,tD),WU=c5(.5,.95,gr);function c5(e,t,n){return r=>r<e?0:r>t?1:n(cu(e,t,r))}function ZU(e,t,n){const r=un(e)?e:Yo(e);return r.start(Ww("",r,t,n)),r.animation}function fu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const QU=(e,t)=>e.depth-t.depth;class JU{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){bh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QU),this.isDirty=!1,this.children.forEach(t)}}function eV(e,t){const n=bn.now(),r=({timestamp:i})=>{const l=i-n;l>=t&&(ki(r),e(l-t))};return ht.setup(r,!0),()=>ki(r)}function hh(e){return un(e)?e.get():e}class tV{constructor(){this.members=[]}add(t){Lw(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(bh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(bh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:l}=r.options,{layoutDependency:c}=t.options;(l===void 0||l!==c)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,l,c;(r=(n=t.options).onExitComplete)==null||r.call(n),(c=(i=t.resumingFrom)==null?void 0:(l=i.options).onExitComplete)==null||c.call(l)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const mh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ig=["","X","Y","Z"],nV=1e3;let rV=0;function sg(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function u5(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kD(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(i||l))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&u5(r)}function d5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(c={},d=t==null?void 0:t()){this.id=rV++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(sV),this.nodes.forEach(fV),this.nodes.forEach(hV),this.nodes.forEach(oV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new JU)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Bw),this.eventHandlers.get(c).add(d)}notifyListeners(c,...d){const f=this.eventHandlers.get(c);f&&f.notify(...d)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=nS(c)&&!iU(c),this.instance=c;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||d)&&(this.isLayoutDirty=!0),e){let p,x=0;const y=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{x=window.innerWidth}),e(c,()=>{const j=window.innerWidth;j!==x&&(x=j,this.root.updateBlockedByResize=!0,p&&p(),p=eV(y,250),mh.hasAnimatedSinceResize&&(mh.hasAnimatedSinceResize=!1,this.nodes.forEach(DT)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:x,hasRelativeLayoutChanged:y,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||h.getDefaultTransition()||gV,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=h.getProps(),A=!this.targetLayout||!l5(this.targetLayout,j),O=!x&&y;if(this.options.layoutRoot||this.resumeFrom||O||x&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...Xw(w,"layout"),onPlay:S,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(p,O,_.path)}else x||DT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ki(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(mV),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&u5(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const x=this.path[p];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:d,layout:f}=this.options;if(d===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const f=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),f&&this.nodes.forEach(cV),this.nodes.forEach(PT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(RT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uV),this.nodes.forEach(dV),this.nodes.forEach(aV),this.nodes.forEach(iV)):this.nodes.forEach(RT),this.clearAllSnapshots();const d=bn.now();cn.delta=ta(0,1e3/60,d-cn.timestamp),cn.timestamp=d,cn.isProcessing=!0,Zy.update.process(cn),Zy.preRender.process(cn),Zy.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lV),this.sharedNodes.forEach(pV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jn(this.snapshot.measuredBox.x)&&!jn(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 f=0;f<this.path.length;f++)this.path[f].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Kt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!i)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!o5(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;c&&this.instance&&(d||hs(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const d=this.measurePageBox();let f=this.removeElementScroll(d);return c&&(f=this.removeTransform(f)),vV(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:c}=this.options;if(!c)return Kt();const d=c.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(bV))){const{scroll:p}=this.root;p&&(Yr(d.x,p.offset.x),Yr(d.y,p.offset.y))}return d}removeElementScroll(c){var f;const d=Kt();if(Er(d,c),(f=this.scroll)!=null&&f.wasRoot)return d;for(let h=0;h<this.path.length;h++){const p=this.path[h],{scroll:x,options:y}=p;p!==this.root&&x&&y.layoutScroll&&(x.wasRoot&&Er(d,c),Yr(d.x,x.offset.x),Yr(d.y,x.offset.y))}return d}applyTransform(c,d=!1,f){var p,x;const h=f||Kt();Er(h,c);for(let y=0;y<this.path.length;y++){const j=this.path[y];!d&&j.options.layoutScroll&&j.scroll&&j!==j.root&&(Yr(h.x,-j.scroll.offset.x),Yr(h.y,-j.scroll.offset.y)),hs(j.latestValues)&&fh(h,j.latestValues,(p=j.layout)==null?void 0:p.layoutBox)}return hs(this.latestValues)&&fh(h,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),h}removeTransform(c){var f;const d=Kt();Er(d,c);for(let h=0;h<this.path.length;h++){const p=this.path[h];if(!hs(p.latestValues))continue;let x;p.instance&&(U1(p.latestValues)&&p.updateSnapshot(),x=Kt(),Er(x,p.measurePageBox())),NT(d,p.latestValues,(f=p.snapshot)==null?void 0:f.layoutBox,x)}return hs(this.latestValues)&&NT(d,this.latestValues),d}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var j;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(c||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:x}=this.options;if(!this.layout||!(p||x))return;this.resolvedRelativeTargetAt=cn.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Kt(),this.targetWithTransforms=Kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Er(this.target,this.layout.layoutBox),XD(this.target,this.targetDelta)):Er(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||U1(this.parent.latestValues)||YD(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,d,f){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Kt(),this.relativeTargetOrigin=Kt(),Th(this.relativeTargetOrigin,d,f,this.options.layoutAnchor||void 0),Er(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let f=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;Er(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,y=this.treeScale.y;xU(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Kt());const{target:j}=c;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gT(this.prevProjectionDelta.x,this.projectionDelta.x),gT(this.prevProjectionDelta.y,this.projectionDelta.y)),Jc(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==y||!ET(this.projectionDelta.x,this.prevProjectionDelta.x)||!ET(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(c,d=!1,f){const h=this.snapshot,p=h?h.latestValues:{},x={...this.latestValues},y=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const j=Kt(),w=h?h.source:void 0,S=this.layout?this.layout.source:void 0,v=w!==S,A=this.getStack(),O=!A||A.members.length<=1,_=!!(v&&!O&&this.options.crossfade===!0&&!this.path.some(yV));this.animationProgress=0;let T;const N=f==null?void 0:f.interpolateProjection(c);this.mixTargetDelta=E=>{const k=E/1e3,R=N==null?void 0:N(k);R?(y.x.translate=R.x,y.x.scale=ft(c.x.scale,1,k),y.x.origin=c.x.origin,y.x.originPoint=c.x.originPoint,y.y.translate=R.y,y.y.scale=ft(c.y.scale,1,k),y.y.origin=c.y.origin,y.y.originPoint=c.y.originPoint):(zT(y.x,c.x,k),zT(y.y,c.y,k)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Th(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),xV(this.relativeTarget,this.relativeTargetOrigin,j,k),T&&FU(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Kt()),Er(T,this.relativeTarget)),v&&(this.animationValues=x,YU(x,p,this.latestValues,k,_,O)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=x),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var d,f,h;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(h=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||h.stop(),this.pendingAnimation&&(ki(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{mh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Yo(0)),this.motionValue.jump(0,!1),this.currentAnimation=ZU(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:f,layout:h,latestValues:p}=c;if(!(!d||!f||!h)){if(this!==c&&this.layout&&h&&f5(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Kt();const x=jn(this.layout.layoutBox.x);f.x.min=c.target.x.min,f.x.max=f.x.min+x;const y=jn(this.layout.layoutBox.y);f.y.min=c.target.y.min,f.y.max=f.y.min+y}Er(d,f),fh(d,p),Jc(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new tV),this.sharedNodes.get(c).add(d);const h=d.options.initialPromotionConfig;d.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var d;const{layoutId:c}=this.options;return c?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:c}=this.options;return c?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:f}=c;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const h={};f.z&&sg("z",c,h,this.animationValues);for(let p=0;p<ig.length;p++)sg(`rotate${ig[p]}`,c,h,this.animationValues),sg(`skew${ig[p]}`,c,h,this.animationValues);c.render();for(const p in h)c.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);c.scheduleRender()}applyProjectionStyles(c,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=hh(d==null?void 0:d.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=hh(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!hs(this.latestValues)&&(c.transform=f?f({},""):"none",this.hasProjected=!1);return}c.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=GU(this.projectionDeltaWithTransform,this.treeScale,p);f&&(x=f(p,x)),c.transform=x;const{x:y,y:j}=this.projectionDelta;c.transformOrigin=`${y.origin*100}% ${j.origin*100}% 0`,h.animationValues?c.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const w in H1){if(p[w]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:A}=H1[w],O=x==="none"?p[w]:S(p[w],h);if(v){const _=v.length;for(let T=0;T<_;T++)c[v[T]]=O}else A?this.options.visualElement.renderState.vars[w]=O:c[w]=O}this.options.layoutId&&(c.pointerEvents=h===this?hh(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var d;return(d=c.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(PT),this.root.sharedNodes.clear()}}}function aV(e){e.updateLayout()}function iV(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:l}=e.options,c=t.source!==e.layout.source;if(l==="size")Kr(x=>{const y=c?t.measuredBox[x]:t.layoutBox[x],j=jn(y);y.min=r[x].min,y.max=y.min+j});else if(l==="x"||l==="y"){const x=l==="x"?"y":"x";F1(c?t.measuredBox[x]:t.layoutBox[x],r[x])}else f5(l,t.layoutBox,r)&&Kr(x=>{const y=c?t.measuredBox[x]:t.layoutBox[x],j=jn(r[x]);y.max=y.min+j,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+j)});const d=Po();Jc(d,r,t.layoutBox);const f=Po();c?Jc(f,e.applyTransform(i,!0),t.measuredBox):Jc(f,r,t.layoutBox);const h=!o5(d);let p=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:y,layout:j}=x;if(y&&j){const w=e.options.layoutAnchor||void 0,S=Kt();Th(S,t.layoutBox,y.layoutBox,w);const v=Kt();Th(v,r,j.layoutBox,w),l5(S,v)||(p=!0),x.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=S,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sV(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 oV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lV(e){e.clearSnapshot()}function PT(e){e.clearMeasurements()}function cV(e){e.isLayoutDirty=!0,e.updateLayout()}function RT(e){e.isLayoutDirty=!1}function uV(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function dV(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fV(e){e.resolveTargetDelta()}function hV(e){e.calcProjection()}function mV(e){e.resetSkewAndRotation()}function pV(e){e.removeLeadSnapshot()}function zT(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function LT(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function xV(e,t,n,r){LT(e.x,t.x,n.x,r),LT(e.y,t.y,n.y,r)}function yV(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gV={duration:.45,ease:[.4,0,.1,1]},$T=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),BT=$T("applewebkit/")&&!$T("chrome/")?Math.round:gr;function IT(e){e.min=BT(e.min),e.max=BT(e.max)}function vV(e){IT(e.x),IT(e.y)}function f5(e,t,n){return e==="position"||e==="preserve-aspect"&&!IU(TT(t),TT(n),.2)}function bV(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const jV=d5({attachResizeListener:(e,t)=>fu(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),og={current:void 0},h5=d5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!og.current){const e=new jV({});e.mount(window),e.setOptions({layoutScroll:!0}),og.current=e}return og.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),oS=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wV(...e){return t=>{let n=!1;const r=e.map(i=>{const l=qT(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<r.length;i++){const l=r[i];typeof l=="function"?l():qT(e[i],null)}}}}function SV(...e){return M.useCallback(wV(...e),e)}class NV extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(lh(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=lh(r)&&r.offsetWidth||0,l=lh(r)&&r.offsetHeight||0,c=getComputedStyle(n),d=this.props.sizeRef.current;d.height=parseFloat(c.height),d.width=parseFloat(c.width),d.top=n.offsetTop,d.left=n.offsetLeft,d.right=i-d.width-d.left,d.bottom=l-d.height-d.top,d.direction=c.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function AV({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:l}){var y;const c=M.useId(),d=M.useRef(null),f=M.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=M.useContext(oS),p=((y=e.props)==null?void 0:y.ref)??(e==null?void 0:e.ref),x=SV(d,p);return M.useInsertionEffect(()=>{const{width:j,height:w,top:S,left:v,right:A,bottom:O,direction:_}=f.current;if(t||l===!1||!d.current||!j||!w)return;const T=_==="rtl",N=n==="left"?T?`right: ${A}`:`left: ${v}`:T?`left: ${v}`:`right: ${A}`,E=r==="bottom"?`bottom: ${O}`:`top: ${S}`;d.current.dataset.motionPopId=c;const k=document.createElement("style");h&&(k.nonce=h);const R=i??document.head;return R.appendChild(k),k.sheet&&k.sheet.insertRule(`
|
||
[data-motion-pop-id="${c}"] {
|
||
position: absolute !important;
|
||
width: ${j}px !important;
|
||
height: ${w}px !important;
|
||
${N}px !important;
|
||
${E}px !important;
|
||
}
|
||
`),()=>{var B;(B=d.current)==null||B.removeAttribute("data-motion-pop-id"),R.contains(k)&&R.removeChild(k)}},[t]),s.jsx(NV,{isPresent:t,childRef:d,sizeRef:f,pop:l,children:l===!1?e:M.cloneElement(e,{ref:x})})}const _V=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:f,root:h})=>{const p=Dw(OV),x=M.useId(),y=M.useRef(n),j=M.useRef(r);zw(()=>{y.current=n,j.current=r});let w=!0,S=M.useMemo(()=>(w=!1,{id:x,initial:t,isPresent:n,custom:i,onExitComplete:v=>{p.set(v,!0);for(const A of p.values())if(!A)return;r&&r()},register:v=>(p.set(v,!1),()=>{var A;p.delete(v),!y.current&&!p.size&&((A=j.current)==null||A.call(j))})}),[n,p,r]);return l&&w&&(S={...S}),M.useMemo(()=>{p.forEach((v,A)=>p.set(A,!1))},[n]),M.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),e=s.jsx(AV,{pop:c==="popLayout",isPresent:n,anchorX:d,anchorY:f,root:h,children:e}),s.jsx(Bm.Provider,{value:S,children:e})};function OV(){return new Map}function m5(e=!0){const t=M.useContext(Bm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,l=M.useId();M.useEffect(()=>{if(e)return i(l)},[e]);const c=M.useCallback(()=>e&&r&&r(l),[l,r,e]);return!n&&r?[!1,c]:[!0]}const zf=e=>e.key||"";function UT(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const Ma=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:l="sync",propagate:c=!1,anchorX:d="left",anchorY:f="top",root:h})=>{const[p,x]=m5(c),y=M.useMemo(()=>UT(e),[e]),j=c&&!p?[]:y.map(zf),w=M.useRef(!0),S=M.useRef(y),v=Dw(()=>new Map),A=M.useRef(new Set),[O,_]=M.useState(y),[T,N]=M.useState(y);zw(()=>{w.current=!1,S.current=y;for(let R=0;R<T.length;R++){const B=zf(T[R]);j.includes(B)?(v.delete(B),A.current.delete(B)):v.get(B)!==!0&&v.set(B,!1)}},[T,j.length,j.join("-")]);const E=[];if(y!==O){let R=[...y];for(let B=0;B<T.length;B++){const D=T[B],z=zf(D);j.includes(z)||(R.splice(B,0,D),E.push(D))}return l==="wait"&&E.length&&(R=E),N(UT(R)),_(y),null}const{forceRender:k}=M.useContext(Rw);return s.jsx(s.Fragment,{children:T.map(R=>{const B=zf(R),D=c&&!p?!1:y===T||j.includes(B),z=()=>{if(A.current.has(B))return;if(v.has(B))A.current.add(B),v.set(B,!0);else return;let $=!0;v.forEach(L=>{L||($=!1)}),$&&(k==null||k(),N(S.current),c&&(x==null||x()),r&&r())};return s.jsx(_V,{isPresent:D,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:l,root:h,onExitComplete:D?void 0:z,anchorX:d,anchorY:f,children:R},B)})})},p5=M.createContext({strict:!1}),VT={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"]};let HT=!1;function TV(){if(HT)return;const e={};for(const t in VT)e[t]={isEnabled:n=>VT[t].some(r=>!!n[r])};FD(e),HT=!0}function x5(){return TV(),fU()}function EV(e){const t=x5();for(const n in e)t[n]={...t[n],...e[n]};FD(t)}const CV=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","propagate","ignoreStrict","viewport"]);function Eh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CV.has(e)}let y5=e=>!Eh(e);function MV(e){typeof e=="function"&&(y5=t=>t.startsWith("on")?!Eh(t):e(t))}try{MV(require("@emotion/is-prop-valid").default)}catch{}function kV(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||un(e[i])||(y5(i)||n===!0&&Eh(i)||!t&&!Eh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Vm=M.createContext({});function PV(e,t){if(Um(e)){const{initial:n,animate:r}=e;return{initial:n===!1||du(n)?n:void 0,animate:du(r)?r:void 0}}return e.inherit!==!1?t:{}}function RV(e){const{initial:t,animate:n}=PV(e,M.useContext(Vm));return M.useMemo(()=>({initial:t,animate:n}),[FT(t),FT(n)])}function FT(e){return Array.isArray(e)?e.join(" "):e}const lS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function g5(e,t,n){for(const r in t)!un(t[r])&&!QD(r,n)&&(e[r]=t[r])}function DV({transformTemplate:e},t){return M.useMemo(()=>{const n=lS();return iS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zV(e,t){const n=e.style||{},r={};return g5(r,n,e),Object.assign(r,DV(e,t)),r}function LV(e,t){const n={},r=zV(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const v5=()=>({...lS(),attrs:{}});function $V(e,t,n,r){const i=M.useMemo(()=>{const l=v5();return JD(l,t,t5(r),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};g5(l,e.style,e),i.style={...l,...i.style}}return i}const BV=["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 cS(e){return typeof e!="string"||e.includes("-")?!1:!!(BV.indexOf(e)>-1||/[A-Z]/u.test(e))}function IV(e,t,n,{latestValues:r},i,l=!1,c){const f=(c??cS(e)?$V:LV)(t,r,i,e),h=kV(t,typeof e=="string",l),p=e!==M.Fragment?{...h,...f,ref:n}:{},{children:x}=t,y=M.useMemo(()=>un(x)?x.get():x,[x]);return M.createElement(e,{...p,children:y})}function qV({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:UV(n,r,i,e),renderState:t()}}function UV(e,t,n,r){const i={},l=r(e,{});for(const y in l)i[y]=hh(l[y]);let{initial:c,animate:d}=e;const f=Um(e),h=VD(e);t&&h&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||c===!1;const x=p?d:c;if(x&&typeof x!="boolean"&&!qm(x)){const y=Array.isArray(x)?x:[x];for(let j=0;j<y.length;j++){const w=Zw(e,y[j]);if(w){const{transitionEnd:S,transition:v,...A}=w;for(const O in A){let _=A[O];if(Array.isArray(_)){const T=p?_.length-1:0;_=_[T]}_!==null&&(i[O]=_)}for(const O in S)i[O]=S[O]}}}return i}const b5=e=>(t,n)=>{const r=M.useContext(Vm),i=M.useContext(Bm),l=()=>qV(e,t,r,i);return n?l():Dw(l)},VV=b5({scrapeMotionValuesFromProps:sS,createRenderState:lS}),HV=b5({scrapeMotionValuesFromProps:n5,createRenderState:v5}),FV=Symbol.for("motionComponentSymbol");function GV(e,t,n){const r=M.useRef(n);M.useInsertionEffect(()=>{r.current=n});const i=M.useRef(null);return M.useCallback(l=>{var d;l&&((d=e.onMount)==null||d.call(e,l)),t&&(l?t.mount(l):t.unmount());const c=r.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(i.current=f)}else i.current?(i.current(),i.current=null):c(l);else c&&(c.current=l)},[t])}const j5=M.createContext({});function Co(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function KV(e,t,n,r,i,l){var _,T;const{visualElement:c}=M.useContext(Vm),d=M.useContext(p5),f=M.useContext(Bm),h=M.useContext(oS),p=h.reducedMotion,x=h.skipAnimations,y=M.useRef(null),j=M.useRef(!1);r=r||d.renderer,!y.current&&r&&(y.current=r(e,{visualState:t,parent:c,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:p,skipAnimations:x,isSVG:l}),j.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const w=y.current,S=M.useContext(j5);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&YV(y.current,n,i,S);const v=M.useRef(!1);M.useInsertionEffect(()=>{w&&v.current&&w.update(n,f)});const A=n[MD],O=M.useRef(!!A&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,A))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,A)));return zw(()=>{j.current=!0,w&&(v.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),O.current&&w.animationState&&w.animationState.animateChanges())}),M.useEffect(()=>{w&&(!O.current&&w.animationState&&w.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var N;(N=window.MotionHandoffMarkAsComplete)==null||N.call(window,A)}),O.current=!1),w.enteringChildren=void 0)}),w}function YV(e,t,n,r){const{layoutId:i,layout:l,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:h,layoutAnchor:p,layoutCrossfade:x}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:w5(e.parent)),e.projection.setOptions({layoutId:i,layout:l,alwaysMeasureLayout:!!c||d&&Co(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:r,crossfade:x,layoutScroll:f,layoutRoot:h,layoutAnchor:p})}function w5(e){if(e)return e.options.allowProjection!==!1?e.projection:w5(e.parent)}function lg(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&EV(r);const l=n?n==="svg":cS(e),c=l?HV:VV;function d(h,p){let x;const y={...M.useContext(oS),...h,layoutId:XV(h)},{isStatic:j}=y,w=RV(h),S=c(h,j);if(!j&&typeof window<"u"){WV();const v=ZV(y);x=v.MeasureLayout,w.visualElement=KV(e,S,y,i,v.ProjectionNode,l)}return s.jsxs(Vm.Provider,{value:w,children:[x&&w.visualElement?s.jsx(x,{visualElement:w.visualElement,...y}):null,IV(e,h,GV(S,w.visualElement,p),S,j,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=M.forwardRef(d);return f[FV]=e,f}function XV({layoutId:e}){const t=M.useContext(Rw).id;return t&&e!==void 0?t+"-"+e:e}function WV(e,t){M.useContext(p5).strict}function ZV(e){const t=x5(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function QV(e,t){if(typeof Proxy>"u")return lg;const n=new Map,r=(l,c)=>lg(l,c,e,t),i=(l,c)=>r(l,c);return new Proxy(i,{get:(l,c)=>c==="create"?r:(n.has(c)||n.set(c,lg(c,void 0,e,t)),n.get(c))})}const JV=(e,t)=>t.isSVG??cS(e)?new EU(t):new SU(t,{allowProjection:e!==M.Fragment});class eH extends Bi{constructor(t){super(t),t.animationState||(t.animationState=RU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let tH=0;class nH extends Bi{constructor(){super(...arguments),this.id=tH++,this.isExitComplete=!1}update(){var l;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:c,custom:d}=this.node.getProps();if(typeof c=="string"||typeof c=="object"&&c!==null&&!Array.isArray(c)){const f=As(this.node,c,d);if(f){const{transition:h,transitionEnd:p,...x}=f;for(const y in x)(l=this.node.getValue(y))==null||l.jump(x[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rH={animation:{Feature:eH},exit:{Feature:nH}};function td(e){return{point:{x:e.pageX,y:e.pageY}}}const aH=e=>t=>tS(t)&&e(t,td(t));function eu(e,t,n,r){return fu(e,t,aH(n),r)}const S5=({current:e})=>e?e.ownerDocument.defaultView:null,GT=(e,t)=>Math.abs(e-t);function iH(e,t){const n=GT(e.x,t.x),r=GT(e.y,t.y);return Math.sqrt(n**2+r**2)}const KT=new Set(["auto","scroll"]);class N5{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Lf(this.lastRawMoveEventInfo,this.transformPagePoint));const w=cg(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,v=iH(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!v)return;const{point:A}=w,{timestamp:O}=cn;this.history.push({...A,timestamp:O});const{onStart:_,onMove:T}=this.handlers;S||(_&&_(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,w)},this.handlePointerMove=(w,S)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=Lf(S,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(w,S)=>{this.end();const{onEnd:v,onSessionEnd:A,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=cg(w.type==="pointercancel"?this.lastMoveEventInfo:Lf(S,this.transformPagePoint),this.history);this.startEvent&&v&&v(w,_),A&&A(w,_)},!tS(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=i||window;const f=td(t),h=Lf(f,this.transformPagePoint),{point:p}=h,{timestamp:x}=cn;this.history=[{...p,timestamp:x}];const{onSessionStart:y}=n;y&&y(t,cg(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=Qu(eu(this.contextWindow,"pointermove",this.handlePointerMove,j),eu(this.contextWindow,"pointerup",this.handlePointerUp,j),eu(this.contextWindow,"pointercancel",this.handlePointerUp,j)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(KT.has(r.overflowX)||KT.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:i.x-n.x,y:i.y-n.y};l.x===0&&l.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,i),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ki(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function YT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cg({point:e},t){return{point:e,delta:YT(e,A5(t)),offset:YT(e,sH(t)),velocity:oH(t,.1)}}function sH(e){return e[0]}function A5(e){return e[e.length-1]}function oH(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=A5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Wn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Wn(t)*2&&(r=e[1]);const l=pr(i.timestamp-r.timestamp);if(l===0)return{x:0,y:0};const c={x:(i.x-r.x)/l,y:(i.y-r.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function lH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function XT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cH(e,{top:t,left:n,bottom:r,right:i}){return{x:XT(e.x,n,i),y:XT(e.y,t,r)}}function WT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function uH(e,t){return{x:WT(e.x,t.x),y:WT(e.y,t.y)}}function dH(e,t){let n=.5;const r=jn(e),i=jn(t);return i>r?n=cu(t.min,t.max-r,e.min):r>i&&(n=cu(e.min,e.max-i,t.min)),ta(0,1,n)}function fH(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const G1=.35;function hH(e=G1){return e===!1?e=0:e===!0&&(e=G1),{x:ZT(e,"left","right"),y:ZT(e,"top","bottom")}}function ZT(e,t,n){return{min:QT(e,t),max:QT(e,n)}}function QT(e,t){return typeof e=="number"?e:e[t]||0}const mH=new WeakMap;class pH{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=Kt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const l=x=>{n&&this.snapToCursor(td(x).point),this.stopAnimation()},c=(x,y)=>{const{drag:j,dragPropagation:w,onDragStart:S}=this.getProps();if(j&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=U9(j),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kr(A=>{let O=this.getAxisMotionValue(A).get()||0;if(Wr.test(O)){const{projection:_}=this.visualElement;if(_&&_.layout){const T=_.layout.layoutBox[A];T&&(O=jn(T)*(parseFloat(O)/100))}}this.originPoint[A]=O}),S&&ht.update(()=>S(x,y),!1,!0),z1(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},d=(x,y)=>{this.latestPointerEvent=x,this.latestPanInfo=y;const{dragPropagation:j,dragDirectionLock:w,onDirectionLock:S,onDrag:v}=this.getProps();if(!j&&!this.openDragLock)return;const{offset:A}=y;if(w&&this.currentDirection===null){this.currentDirection=yH(A),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),v&&ht.update(()=>v(x,y),!1,!0)},f=(x,y)=>{this.latestPointerEvent=x,this.latestPanInfo=y,this.stop(x,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new N5(t,{onSessionStart:l,onStart:c,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:S5(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!i||!r)return;const{velocity:c}=i;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&ht.postRender(()=>d(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!$f(t,i,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=lH(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){var l;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,i=this.constraints;t&&Co(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cH(r.layoutBox,t):this.constraints=!1,this.elastic=hH(n),i!==this.constraints&&!Co(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Kr(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=fH(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Co(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const l=yU(r,i.root,this.visualElement.getTransformPagePoint());let c=uH(i.layout.layoutBox,l);if(n){const d=n(mU(c));this.hasMutatedConstraints=!!d,d&&(c=KD(d))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=Kr(p=>{if(!$f(p,n,this.currentDirection))return;let x=f&&f[p]||{};(c===!0||c===p)&&(x={min:0,max:0});const y=i?200:1e6,j=i?40:1e7,w={type:"inertia",velocity:r?t[p]:0,bounceStiffness:y,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10,...l,...x};return this.startAxisValueAnimation(p,w)});return Promise.all(h).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return z1(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){Kr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Kr(n=>{const{drag:r}=this.getProps();if(!$f(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,l=this.getAxisMotionValue(n);if(i&&i.layout){const{min:c,max:d}=i.layout.layoutBox[n],f=l.get()||0;l.set(t[n]-ft(c,d,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Co(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Kr(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();i[c]=dH({min:f,max:f},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Kr(c=>{if(!$f(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:h}=this.constraints[c];d.set(ft(f,h,i[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mH.set(this.visualElement,this);const t=this.visualElement.current,n=eu(t,"pointerdown",h=>{const{drag:p,dragListener:x=!0}=this.getProps(),y=h.target,j=y!==t&&Y9(y);p&&x&&!j&&this.start(h)});let r;const i=()=>{const{dragConstraints:h}=this.getProps();Co(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=xH(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",i);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),ht.read(i);const d=fu(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Kr(x=>{const y=this.getAxisMotionValue(x);y&&(this.originPoint[x]+=h[x].translate,y.set(y.get()+h[x].translate))}),this.visualElement.render())}));return()=>{d(),n(),c(),f&&f(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:l=!1,dragElastic:c=G1,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function JT(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function xH(e,t,n){const r=sT(e,JT(n)),i=sT(t,JT(n));return()=>{r(),i()}}function $f(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gH extends Bi{constructor(t){super(t),this.removeGroupControls=gr,this.removeListeners=gr,this.controls=new pH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ug=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class vH extends Bi{constructor(){super(...arguments),this.removePointerDownListener=gr}onPointerDown(t){this.session=new N5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:S5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ug(t),onStart:ug(n),onMove:ug(r),onEnd:(l,c)=>{delete this.session,i&&ht.postRender(()=>i(l,c))}}}mount(){this.removePointerDownListener=eu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let dg=!1;class bH extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),r&&r.register&&i&&r.register(l),dg&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),mh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:l}=this.props,{projection:c}=r;return c&&(c.isPresent=l,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),dg=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||ht.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),eS.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;dg=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _5(e){const[t,n]=m5(),r=M.useContext(Rw);return s.jsx(bH,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(j5),isPresent:t,safeToRemove:n})}const jH={pan:{Feature:vH},drag:{Feature:gH,ProjectionNode:h5,MeasureLayout:_5}};function eE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,l=r[i];l&&ht.postRender(()=>l(t,td(t)))}class wH extends Bi{mount(){const{current:t}=this.node;t&&(this.unmount=H9(t,(n,r)=>(eE(this.node,r,"Start"),i=>eE(this.node,i,"End"))))}unmount(){}}class SH extends Bi{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=Qu(fu(this.node.current,"focus",()=>this.onFocus()),fu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function tE(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),l=r[i];l&&ht.postRender(()=>l(t,td(t)))}class NH extends Bi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=W9(t,(i,l)=>(tE(this.node,l,"Start"),(c,{success:d})=>tE(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const K1=new WeakMap,fg=new WeakMap,AH=e=>{const t=K1.get(e.target);t&&t(e)},_H=e=>{e.forEach(AH)};function OH({root:e,...t}){const n=e||document;fg.has(n)||fg.set(n,{});const r=fg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_H,{root:e,...t})),r[i]}function TH(e,t,n){const r=OH(t);return K1.set(e,n),r.observe(e),()=>{K1.delete(e),r.unobserve(e)}}const EH={some:0,all:1};class CH extends Bi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var f;(f=this.stopObserver)==null||f.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:EH[i]},d=h=>{const{isIntersecting:p}=h;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:x,onViewportLeave:y}=this.node.getProps(),j=p?x:y;j&&j(h)};this.stopObserver=TH(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(MH(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function MH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kH={inView:{Feature:CH},tap:{Feature:NH},focus:{Feature:SH},hover:{Feature:wH}},PH={layout:{ProjectionNode:h5,MeasureLayout:_5}},RH={...rH,...kH,...jH,...PH},Ke=QV(RH,JV),O5=VR(e=>({sidebarOpen:!0,toggleSidebar:()=>e(t=>({sidebarOpen:!t.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t})}));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const DH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var zH={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.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const LH=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:c,...d},f)=>M.createElement("svg",{ref:f,...zH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:T5("lucide",i),...d},[...c.map(([h,p])=>M.createElement(h,p)),...Array.isArray(l)?l:[l]]));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const le=(e,t)=>{const n=M.forwardRef(({className:r,...i},l)=>M.createElement(LH,{ref:l,iconNode:t,className:T5(`lucide-${DH(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $H=le("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const BH=le("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const IH=le("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qH=le("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uS=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Y1=le("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const E5=le("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const X1=le("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ch=le("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ei=le("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nE=le("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Hm=le("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qa=le("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const C5=le("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hu=le("Calendar",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ph=le("Camera",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const UH=le("ChartColumn",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const VH=le("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dS=le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const M5=le("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Bo=le("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zr=le("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vr=le("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xr=le("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Mh=le("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dn=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const HH=le("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fS=le("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const k5=le("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hS=le("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Pi=le("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const FH=le("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const GH=le("EyeOff",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const P5=le("Eye",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const R5=le("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rE=le("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const KH=le("FileSpreadsheet",[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const jr=le("FileText",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nd=le("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const D5=le("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const YH=le("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gn=le("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const kh=le("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const aE=le("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const XH=le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const WH=le("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Bf=le("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const z5=le("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ZH=le("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iE=le("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mS=le("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const QH=le("Link2Off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const JH=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const L5=le("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ph=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $5=le("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const B5=le("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hg=le("MailOpen",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const An=le("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const W1=le("MapPin",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const eF=le("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const I5=le("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tF=le("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xh=le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nF=le("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rF=le("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const q5=le("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const aF=le("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const U5=le("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iF=le("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sF=le("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sE=le("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Z1=le("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oE=le("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lE=le("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Q1=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Br=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Da=le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oF=le("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lF=le("Save",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cE=le("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Tl=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fm=le("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Rh=le("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const V5=le("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const pS=le("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const za=le("Shield",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cF=le("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const H5=le("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uF=le("SquarePen",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const F5=le("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dF=le("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const G5=le("TrendingDown",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const na=le("TrendingUp",[["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"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fn=le("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fF=le("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const J1=le("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uE=le("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mu=le("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Lr=le("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const K5=le("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Io=le("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ua=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hF=le("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qo=le("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Y5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Y5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ze(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y5(e))&&(r&&(r+=" "),r+=t);return r}const xS="-",mF=e=>{const t=xF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(xS);return d[0]===""&&d.length!==1&&d.shift(),X5(d,t)||pF(c)},getConflictingClassGroupIds:(c,d)=>{const f=n[c]||[];return d&&r[c]?[...f,...r[c]]:f}}},X5=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?X5(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(xS);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},dE=/^\[(.+)\]$/,pF=e=>{if(dE.test(e)){const t=dE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gF(Object.entries(e.classGroups),n).forEach(([l,c])=>{ej(c,r,l,t)}),r},ej=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:fE(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(yF(i)){ej(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{ej(c,fE(t,l),n,r)})})},fE=(e,t)=>{let n=e;return t.split(xS).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yF=e=>e.isThemeGetter,gF=(e,t)=>t?e.map(([n,r])=>{const i=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,vF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},W5="!",bF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],l=t.length,c=d=>{const f=[];let h=0,p=0,x;for(let v=0;v<d.length;v++){let A=d[v];if(h===0){if(A===i&&(r||d.slice(v,v+l)===t)){f.push(d.slice(p,v)),p=v+l;continue}if(A==="/"){x=v;continue}}A==="["?h++:A==="]"&&h--}const y=f.length===0?d:d.substring(p),j=y.startsWith(W5),w=j?y.substring(1):y,S=x&&x>p?x-p:void 0;return{modifiers:f,hasImportantModifier:j,baseClassName:w,maybePostfixModifierPosition:S}};return n?d=>n({className:d,parseClassName:c}):c},jF=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},wF=e=>({cache:vF(e.cacheSize),parseClassName:bF(e),...mF(e)}),SF=/\s+/,NF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(SF);let d="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:p,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:j}=n(h);let w=!!j,S=r(w?y.substring(0,j):y);if(!S){if(!w){d=h+(d.length>0?" "+d:d);continue}if(S=r(y),!S){d=h+(d.length>0?" "+d:d);continue}w=!1}const v=jF(p).join(":"),A=x?v+W5:v,O=A+S;if(l.includes(O))continue;l.push(O);const _=i(S,w);for(let T=0;T<_.length;++T){const N=_[T];l.push(A+N)}d=h+(d.length>0?" "+d:d)}return d};function AF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Z5(t))&&(r&&(r+=" "),r+=n);return r}const Z5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Z5(e[r]))&&(n&&(n+=" "),n+=t);return n};function _F(e,...t){let n,r,i,l=c;function c(f){const h=t.reduce((p,x)=>x(p),e());return n=wF(h),r=n.cache.get,i=n.cache.set,l=d,d(f)}function d(f){const h=r(f);if(h)return h;const p=NF(f,n);return i(f,p),p}return function(){return l(AF.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Q5=/^\[(?:([a-z-]+):)?(.+)\]$/i,OF=/^\d+\/\d+$/,TF=new Set(["px","full","screen"]),EF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CF=/\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$/,MF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_a=e=>Uo(e)||TF.has(e)||OF.test(e),wi=e=>El(e,"length",qF),Uo=e=>!!e&&!Number.isNaN(Number(e)),mg=e=>El(e,"number",Uo),Dc=e=>!!e&&Number.isInteger(Number(e)),RF=e=>e.endsWith("%")&&Uo(e.slice(0,-1)),Be=e=>Q5.test(e),Si=e=>EF.test(e),DF=new Set(["length","size","percentage"]),zF=e=>El(e,DF,J5),LF=e=>El(e,"position",J5),$F=new Set(["image","url"]),BF=e=>El(e,$F,VF),IF=e=>El(e,"",UF),zc=()=>!0,El=(e,t,n)=>{const r=Q5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},qF=e=>CF.test(e)&&!MF.test(e),J5=()=>!1,UF=e=>kF.test(e),VF=e=>PF.test(e),HF=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),i=jt("borderColor"),l=jt("borderRadius"),c=jt("borderSpacing"),d=jt("borderWidth"),f=jt("contrast"),h=jt("grayscale"),p=jt("hueRotate"),x=jt("invert"),y=jt("gap"),j=jt("gradientColorStops"),w=jt("gradientColorStopPositions"),S=jt("inset"),v=jt("margin"),A=jt("opacity"),O=jt("padding"),_=jt("saturate"),T=jt("scale"),N=jt("sepia"),E=jt("skew"),k=jt("space"),R=jt("translate"),B=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Be,t],$=()=>[Be,t],L=()=>["",_a,wi],K=()=>["auto",Uo,Be],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",Be],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Uo,Be];return{cacheSize:500,separator:":",theme:{colors:[zc],spacing:[_a,wi],blur:["none","",Si,Be],brightness:q(),borderColor:[e],borderRadius:["none","","full",Si,Be],borderSpacing:$(),borderWidth:L(),contrast:q(),grayscale:ie(),hueRotate:q(),invert:ie(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[RF,wi],inset:z(),margin:z(),opacity:q(),padding:$(),saturate:q(),scale:q(),sepia:ie(),skew:q(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[Si]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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"],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:[...H(),Be]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dc,Be]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Dc,Be]}],"grid-cols":[{"grid-cols":[zc]}],"col-start-end":[{col:["auto",{span:["full",Dc,Be]},Be]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[zc]}],"row-start-end":[{row:["auto",{span:[Dc,Be]},Be]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[Si]},Si]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Si,wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",mg]}],"font-family":[{font:[zc]}],"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:["tighter","tight","normal","wide","wider","widest",Be]}],"line-clamp":[{"line-clamp":["none",Uo,mg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_a,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_a,wi]}],"underline-offset":[{"underline-offset":["auto",_a,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),LF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:I()}],"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:["",...I()]}],"outline-offset":[{"outline-offset":[_a,Be]}],"outline-w":[{outline:[_a,wi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[_a,wi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Si,IF]}],"shadow-color":[{shadow:[zc]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Si,Be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[x]}],saturate:[{saturate:[_]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Dc,Be]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_a,wi,mg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},FF=_F(HF);function it(...e){return FF(ze(e))}function Te(e,t="SEK"){return e==null||isNaN(e)?"-":new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function hE(e){return new Intl.NumberFormat("sv-SE").format(e)}function Nt(e){return new Intl.DateTimeFormat("sv-SE",{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function GF(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),i=Math.floor(r/6e4),l=Math.floor(r/36e5),c=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:l<24?`${l}h ago`:c<7?`${c}d ago`:Nt(e)}function KF(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const YF=[{path:"/",label:"Briefing",icon:U5},{path:"/dashboard",label:"Dashboard",icon:mS},{path:"/mail",label:"Mail",icon:An},{path:"/alva",label:"Alva",icon:Ei},{path:"/amos",label:"AMOS",icon:fS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:k5},{path:"/finance",label:"Finance",icon:Io},{path:"/accounting",label:"Accounting",icon:C5},{path:"/crm",label:"CRM",icon:Lr},{path:"/sales",label:"Sales",icon:na},{path:"/marketing",label:"Marketing",icon:I5},{path:"/social",label:"Social Media",icon:pS},{path:"/hr",label:"HR",icon:Hm},{path:"/legal",label:"Legal",icon:jr},{path:"/compliance",label:"Compliance",icon:za},{path:"/support",label:"Support",icon:kh},{path:"/projects",label:"Projects",icon:D5},{path:"/automation",label:"Automation",icon:qo}];function XF(){const{sidebarOpen:e,toggleSidebar:t}=O5(),{logout:n,isAuthenticated:r}=ea(),i=_n(),l=$i(),c=()=>{n(),l("/login")};return s.jsxs(s.Fragment,{children:[s.jsx(Ma,{children:e&&s.jsx(Ke.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/20 z-40 lg:hidden",onClick:t})}),s.jsxs(Ke.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:it("fixed left-0 top-0 h-full bg-sidebar z-50 flex flex-col","border-r border-border/60",e?"px-4":"px-3"),children:[s.jsxs("div",{className:"h-16 flex items-center justify-between shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2.5 overflow-hidden",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center shrink-0",children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 32 32",fill:"none",children:s.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})}),s.jsx(Ma,{children:e&&s.jsx(Ke.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"text-sm font-semibold text-text-primary whitespace-nowrap",children:"AMOS"})})]}),s.jsx("button",{onClick:t,className:"hidden lg:flex w-7 h-7 items-center justify-center rounded-lg hover:bg-bg text-text-secondary transition-colors",children:e?s.jsx(M5,{size:14}):s.jsx(Bo,{size:14})})]}),s.jsx("nav",{className:"flex-1 py-4 space-y-0.5 overflow-y-auto",children:YF.map(d=>{const f=i.pathname===d.path||d.path!=="/"&&i.pathname.startsWith(d.path),h=d.icon;return s.jsxs(qR,{to:d.path,onClick:()=>{window.innerWidth<1024&&t()},className:it("flex items-center gap-3 h-10 rounded-xl px-3 transition-colors duration-150 relative","hover:bg-primary-light",f&&"bg-primary-light text-primary",!f&&"text-text-secondary"),children:[f&&s.jsx(Ke.div,{layoutId:"sidebar-active",className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-primary rounded-full",transition:{duration:.18,ease:"easeOut"}}),s.jsx(h,{size:18,strokeWidth:f?2:1.5}),s.jsx(Ma,{children:e&&s.jsx(Ke.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:it("text-sm font-medium whitespace-nowrap",f?"text-primary":"text-text-secondary"),children:d.label})})]},d.path)})}),r&&s.jsx("div",{className:"py-4 border-t border-border/60",children:s.jsxs("button",{onClick:c,className:it("flex items-center gap-3 h-10 rounded-xl px-3 transition-colors duration-150 w-full","hover:bg-danger-light text-text-secondary hover:text-danger"),children:[s.jsx(B5,{size:18,strokeWidth:1.5}),s.jsx(Ma,{children:e&&s.jsx(Ke.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"text-sm font-medium whitespace-nowrap",children:"Logga ut"})})]})})]})]})}function WF(){const[e,t]=M.useState(!1);M.useEffect(()=>{const r=window.matchMedia("(prefers-color-scheme: dark)").matches,i=localStorage.getItem("amos-dark-mode"),l=i?i==="true":r;t(l),l?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[]);const n=()=>{const r=!e;t(r),localStorage.setItem("amos-dark-mode",String(r)),r?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return s.jsx("button",{onClick:n,className:it("w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e?"bg-primary/20 text-primary":"bg-bg text-text-secondary hover:text-text-primary"),"aria-label":"Toggle dark mode",children:e?s.jsx(q5,{size:18}):s.jsx(F5,{size:18})})}const ZF=[{id:"landvex",name:"Landvex AB",org:"559141-7042"},{id:"landvex-inc",name:"Landvex Inc.",org:"83-4567891"},{id:"quixzoom",name:"quiXzoom Inc",org:"-"}],mE=[{id:"1",title:"Nytt avtal tecknat",description:"Acme Corp har signerat enterprise-avtalet",time:new Date(Date.now()-1e3*60*15).toISOString(),read:!1},{id:"2",title:"Faktura förfallen",description:"Faktura #INV-2024-0042 är 3 dagar försenad",time:new Date(Date.now()-1e3*60*60*2).toISOString(),read:!1},{id:"3",title:"Semester beviljad",description:"Din semesteransökan har godkänts av HR",time:new Date(Date.now()-1e3*60*60*5).toISOString(),read:!0}];function QF(){const{user:e,logout:t}=ea(),n=$i(),[r,i]=M.useState(!1),[l,c]=M.useState(!1),[d,f]=M.useState(!1),[h,p]=M.useState("landvex"),x=()=>{const j=new Date().getHours();return j<12?"Good morning":j<17?"Good afternoon":"Good evening"},y=mE.filter(j=>!j.read).length;return s.jsxs("header",{className:"h-14 lg:h-16 bg-surface border-b border-border/60 flex items-center justify-between px-4 lg:px-10 sticky top-0 z-30 lg:mt-0 mt-14",children:[s.jsx("div",{className:"flex items-center gap-4",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"text-base font-semibold text-text-primary",children:[x(),e?`, ${e.name||"Erik Svensson"}`:", Erik Svensson"]}),s.jsx("p",{className:"text-xs text-text-secondary hidden sm:block",children:new Date().toLocaleDateString("sv-SE",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"hidden md:flex items-center h-9 px-3.5 rounded-xl bg-bg border border-border/60 text-text-secondary",children:[s.jsx(Tl,{size:15}),s.jsx("span",{className:"ml-2 text-sm",children:"Search..."}),s.jsx("kbd",{className:"ml-6 px-1.5 py-0.5 text-[10px] font-medium bg-surface rounded border border-border",children:"⌘K"})]}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(WF,{})}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{i(!r),c(!1)},className:"relative w-9 h-9 flex items-center justify-center rounded-xl hover:bg-bg text-text-secondary transition-colors",children:[s.jsx(X1,{size:17}),y>0&&s.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-danger rounded-full"})]}),s.jsx(Ma,{children:r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),s.jsxs(Ke.div,{initial:{opacity:0,y:4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{duration:.15},className:"absolute right-0 top-full mt-2 w-80 bg-surface rounded-[18px] dropdown-shadow border border-border/60 z-50 overflow-hidden",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-border/60 flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Notifications"}),s.jsx("span",{className:"text-xs text-primary font-medium cursor-pointer",children:"Mark all read"})]}),s.jsx("div",{className:"max-h-80 overflow-y-auto",children:mE.map(j=>s.jsx("div",{onClick:()=>{i(!1),j.title.includes("avtal")?n("/sales"):j.title.includes("faktura")?n("/finance",{state:{activeTab:"Invoices"}}):j.title.includes("semester")||j.title.includes("HR")?n("/hr"):j.title.includes("deal")?n("/sales"):n("/dashboard")},className:it("px-4 py-3 hover:bg-bg/60 transition-colors cursor-pointer",!j.read&&"bg-primary-light/30"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:it("w-2 h-2 rounded-full mt-1.5 shrink-0",j.read?"bg-transparent":"bg-primary")}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:j.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:j.description}),s.jsx("p",{className:"text-[11px] text-text-secondary/60 mt-1",children:GF(j.time)})]})]})},j.id))})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{c(!l),i(!1)},className:"flex items-center gap-2 pl-1 pr-2 h-9 rounded-xl hover:bg-bg transition-colors",children:[s.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:e?KF(e.name):"?"}),s.jsx(dS,{size:14,className:"text-text-secondary"})]}),s.jsx(Ma,{children:l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),s.jsxs(Ke.div,{initial:{opacity:0,y:4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{duration:.15},className:"absolute right-0 top-full mt-2 w-56 bg-surface rounded-[18px] dropdown-shadow border border-border/60 z-50 overflow-hidden",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-border/60",children:[s.jsx("p",{className:"text-sm font-semibold text-text-primary",children:(e==null?void 0:e.name)||"User"}),s.jsx("p",{className:"text-xs text-text-secondary",children:(e==null?void 0:e.email)||"user@amos.com"})]}),s.jsxs("div",{className:"py-1",children:[s.jsxs("button",{onClick:()=>{n("/profile"),c(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[s.jsx(mu,{size:15}),"Min Profil"]}),s.jsxs("button",{onClick:()=>{f(!0),c(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[s.jsx(qa,{size:15}),"Byt Verksamhet"]}),s.jsxs("button",{onClick:()=>{n("/profile?tab=preferences"),c(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[s.jsx(V5,{size:15}),"Inställningar"]}),s.jsx("div",{className:"border-t border-border/60 mt-1 pt-1",children:s.jsxs("button",{onClick:()=>{t(),c(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-danger hover:bg-danger-light transition-colors",children:[s.jsx(B5,{size:15}),"Sign out"]})})]})]})]})})]})]}),s.jsx(Ma,{children:d&&s.jsxs(s.Fragment,{children:[s.jsx(Ke.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50",onClick:()=>f(!1)}),s.jsxs(Ke.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"fixed inset-x-4 top-20 bg-surface rounded-xl border border-border shadow-xl z-50 max-w-md mx-auto",children:[s.jsxs("div",{className:"p-4 border-b border-border/60 flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Välj Verksamhet"}),s.jsx("button",{onClick:()=>f(!1),className:"p-2 hover:bg-surface-hover rounded-lg",children:s.jsx(Ua,{size:20})})]}),s.jsx("div",{className:"p-2",children:ZF.map(j=>s.jsxs("button",{onClick:()=>{p(j.id),f(!1),window.location.reload()},className:`w-full flex items-center gap-3 p-3 rounded-lg transition-colors ${h===j.id?"bg-accent/10 border border-accent/20":"hover:bg-surface-hover"}`,children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(qa,{size:20,className:"text-primary"})}),s.jsxs("div",{className:"text-left",children:[s.jsx("p",{className:"font-medium",children:j.name}),s.jsx("p",{className:"text-sm text-text-secondary",children:j.org})]}),h===j.id&&s.jsx("div",{className:"ml-auto w-2 h-2 rounded-full bg-accent"})]},j.id))})]})]})})]})}const JF=[{path:"/",label:"Briefing",icon:U5},{path:"/dashboard",label:"Dashboard",icon:mS},{path:"/mail",label:"Mail",icon:An}],eG=[{path:"/alva",label:"Alva",icon:Ei},{path:"/amos",label:"AMOS",icon:fS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:k5}],tG=[{path:"/finance",label:"Finance",icon:Io},{path:"/accounting",label:"Accounting",icon:C5},{path:"/crm",label:"CRM",icon:Lr},{path:"/sales",label:"Sales",icon:na},{path:"/marketing",label:"Marketing",icon:I5},{path:"/social",label:"Social",icon:pS},{path:"/hr",label:"HR",icon:Hm},{path:"/legal",label:"Legal",icon:jr},{path:"/compliance",label:"Compliance",icon:za},{path:"/support",label:"Support",icon:kh}];function nG(){const[e,t]=M.useState(!1),[n,r]=M.useState(!1),i=_n(),l=c=>i.pathname===c;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"fixed top-0 left-0 right-0 z-40 bg-bg border-b border-border-subtle px-4 py-3 flex items-center justify-between lg:hidden",children:[s.jsx(Ca,{to:"/",className:"text-lg font-bold text-text-primary tracking-wide",children:"AAMOS"}),s.jsx("button",{onClick:()=>t(!e),className:"p-2 rounded-lg bg-surface text-text-primary active:bg-surface-hover","aria-label":"Toggle menu",children:e?s.jsx(Ua,{size:24}):s.jsx(tF,{size:24})})]}),e&&s.jsxs("div",{className:"fixed inset-0 z-[100] bg-bg lg:hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg shrink-0",children:[s.jsx("span",{className:"text-lg font-bold text-text-primary",children:"Menu"}),s.jsx("button",{onClick:()=>t(!1),className:"p-2 rounded-lg bg-surface text-text-primary active:bg-surface-hover border border-border/40","aria-label":"Close menu",children:s.jsx(Ua,{size:24})})]}),s.jsxs("div",{className:"p-4 space-y-1 overflow-y-auto flex-1",children:[JF.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:22}),c.label]},c.path)}),s.jsxs("div",{className:"pt-2",children:[s.jsxs("button",{onClick:()=>r(!n),className:"flex items-center justify-between w-full px-4 py-3 rounded-xl text-base font-medium text-text-secondary hover:bg-surface-hover transition-colors",children:[s.jsxs("span",{className:"flex items-center gap-3",children:[s.jsx(qo,{size:22}),"Products"]}),s.jsx(dS,{size:18,className:it("transition-transform",n&&"rotate-180")})]}),n&&s.jsx("div",{className:"ml-4 space-y-1 mt-1",children:eG.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-2.5 rounded-xl text-sm font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:18}),c.label]},c.path)})})]}),s.jsx("div",{className:"pt-2",children:tG.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:22}),c.label]},c.path)})})]})]})]})}const e6={light:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(10)},medium:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(20)},heavy:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([30,50,30])},success:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([10,30,10])},error:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([50,30,50])},swipe:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(15)}};function rG({children:e,onSwipeLeft:t,onSwipeRight:n,className:r}){const i=M.useRef(null),l=M.useRef(null),[c,d]=M.useState(!1),f=50,h=M.useCallback(y=>{l.current=null,i.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY},d(!0)},[]),p=M.useCallback(y=>{l.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY}},[]),x=M.useCallback(()=>{if(d(!1),!i.current||!l.current)return;const y=i.current.x-l.current.x,j=i.current.y-l.current.y;Math.abs(y)>Math.abs(j)&&Math.abs(y)>f&&(e6.swipe(),y>0?t==null||t():n==null||n()),i.current=null,l.current=null},[t,n]);return s.jsx("div",{className:it("touch-pan-y",c&&"select-none",r),onTouchStart:h,onTouchMove:p,onTouchEnd:x,children:e})}function aG({onRefresh:e,children:t,className:n}){const[r,i]=M.useState(!1),[l,c]=M.useState(0),[d,f]=M.useState(!1),h=M.useRef(0),p=M.useRef(null),x=100,y=80,j=M.useCallback(v=>{p.current&&p.current.scrollTop===0&&(h.current=v.targetTouches[0].clientY,i(!0))},[]),w=M.useCallback(v=>{if(!r)return;const O=v.targetTouches[0].clientY-h.current;if(O>0){const _=1+O/x*.5,T=Math.min(O/_,x);c(T)}},[r]),S=M.useCallback(async()=>{if(r){if(l>=y&&!d){f(!0);try{await e()}finally{f(!1)}}i(!1),c(0)}},[r,l,d,e]);return s.jsxs("div",{ref:p,className:it("relative overflow-y-auto",n),onTouchStart:j,onTouchMove:w,onTouchEnd:S,children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 flex items-center justify-center transition-transform",style:{transform:`translateY(${l-60}px)`,opacity:r?1:0},children:s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx(Da,{size:24,className:it("text-primary transition-transform",d&&"animate-spin",!d&&l>=y&&"rotate-180")}),s.jsx("span",{className:"text-xs text-text-secondary",children:d?"Refreshing...":l>=y?"Release to refresh":"Pull to refresh"})]})}),s.jsx("div",{style:{transform:r?`translateY(${l}px)`:"translateY(0)",transition:r?"none":"transform 0.3s ease-out"},children:t})]})}function iG({children:e}){const t=$i(),n=M.useRef(0),r=M.useRef(0),i=M.useRef(null),l=M.useCallback(c=>{const d=Date.now();d-n.current<300?(r.current+=1,r.current===2&&(e6.medium(),t("/dashboard"),r.current=0)):r.current=1,n.current=d,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=0},500)},[t]);return s.jsx("div",{onTouchEnd:l,children:e})}const pE={finance:{rum:"finance",titel:"Finance AI",systemPrompt:`Du är en expert på finans och redovisning. Du hjälper användaren med:
|
||
- Analys av balansräkning och resultaträkning
|
||
- MOMS-rapportering och skattefrågor
|
||
- Fakturahantering och betalningspåminnelser
|
||
- Kassaflödesanalys och prognoser
|
||
- Bokslut och årsredovisning
|
||
|
||
Du har tillgång till företagets finansiella data i realtid.
|
||
Svara på svenska eller engelska beroende på användarens språk.
|
||
Var professionell, noggrann och hjälpsam.`,kompetenser:["redovisning","finansanalys","skatt","fakturering"],dataTyp:"financial"},sales:{rum:"sales",titel:"Sales AI",systemPrompt:`Du är en expert på försäljning och CRM. Du hjälper användaren med:
|
||
- Lead-hantering och kvalificering
|
||
- Offertförfrågningar och prissättning
|
||
- Säljrapporter och pipeline-analys
|
||
- Kundkommunikation och uppföljning
|
||
- Säljstrategi och marknadsanalys
|
||
|
||
Du har tillgång till CRM-data och säljstatistik i realtid.
|
||
Svara på svenska eller engelska beroende på användarens språk.`,kompetenser:["försäljning","CRM","leads","offert"],dataTyp:"sales"},hr:{rum:"hr",titel:"HR AI",systemPrompt:`Du är en expert på HR och personalfrågor. Du hjälper användaren med:
|
||
- Rekrytering och anställningsprocesser
|
||
- Personalhandbok och policyer
|
||
- Lönehantering och förmåner
|
||
- Semesterplanering och frånvaro
|
||
- Medarbetarsamtal och utveckling
|
||
|
||
Du har tillgång till personaldata och HR-statistik.
|
||
Svara på svenska eller engelska beroende på användarens språk.
|
||
Var empatisk, professionell och diskret.`,kompetenser:["HR","rekrytering","lön","personal"],dataTyp:"hr"},crm:{rum:"crm",titel:"CRM AI",systemPrompt:`Du är en expert på kundrelationer och CRM. Du hjälper användaren med:
|
||
- Kundanalys och segmentering
|
||
- Kundresor och touchpoints
|
||
- Supportärenden och eskalering
|
||
- Kundnöjdhet och NPS
|
||
- Kundhistorik och interaktioner
|
||
|
||
Du har tillgång till CRM-data och kundinteraktioner i realtid.
|
||
Svara på svenska eller engelska beroende på användarens språk.`,kompetenser:["CRM","kundservice","support","analys"],dataTyp:"crm"},legal:{rum:"legal",titel:"Legal AI",systemPrompt:`Du är en expert på juridik och compliance. Du hjälper användaren med:
|
||
- Avtalsgranskning och tolkning
|
||
- GDPR och dataskydd
|
||
- Företagsjuridik och bolagsstyrning
|
||
- Immaterialrätt och licenser
|
||
- Regelverk och efterlevnad
|
||
|
||
OBS: Du ersätter inte en advokat. Vid komplexa juridiska frågor, hänvisa alltid till jurist.
|
||
Svara på svenska eller engelska beroende på användarens språk.
|
||
Var noggrann, försiktig och tydlig med begränsningar.`,kompetenser:["juridik","GDPR","avtal","compliance"],dataTyp:"legal"},marketing:{rum:"marketing",titel:"Marketing AI",systemPrompt:`Du är en expert på marknadsföring och kommunikation. Du hjälper användaren med:
|
||
- Kampanjplanering och analys
|
||
- Sociala medier och content
|
||
- SEO och digital marknadsföring
|
||
- Marknadsanalys och konkurrenter
|
||
- Varumärke och positionering
|
||
|
||
Du har tillgång till marknadsdata och kampanjstatistik.
|
||
Svara på svenska eller engelska beroende på användarens språk.
|
||
Var kreativ, strategisk och datadriven.`,kompetenser:["marknadsföring","SEO","sociala medier","analys"],dataTyp:"marketing"},dashboard:{rum:"dashboard",titel:"AMOS Assistant",systemPrompt:`Du är AMOS Assistant - en generell AI-assistent för AAMOS-plattformen.
|
||
Du hjälper användaren med:
|
||
- Översikt och navigering i systemet
|
||
- Tekniska frågor om AAMOS-produkter
|
||
- Integrationer och API:er
|
||
- Felsökning och support
|
||
- Allmänna frågor om Landvex och quiXzoom
|
||
|
||
Du har bred kunskap om hela plattformen.
|
||
Svara på svenska eller engelska beroende på användarens språk.
|
||
Var hjälpsam, kunnig och effektiv.`,kompetenser:["generell","support","teknik","navigering"],dataTyp:"general"}};function sG(e){return pE[e]||pE.dashboard}function oG({rum:e,isOpen:t,onToggle:n}){const r=sG(e),[i,l]=M.useState([{id:"welcome",roll:"assistant",innehall:`Hej! Jag är ${r.titel}. Jag kan hjälpa dig med ${r.kompetenser.join(", ")}. Vad kan jag göra för dig?`,tid:new Date().toISOString()}]),[c,d]=M.useState(""),[f,h]=M.useState(!1),[p,x]=M.useState(!1),y=M.useRef(null),j=M.useRef(null);M.useEffect(()=>{y.current&&(y.current.scrollTop=y.current.scrollHeight)},[i]);const w=async()=>{if(!c.trim()||f)return;const v={id:`user-${Date.now()}`,roll:"user",innehall:c.trim(),tid:new Date().toISOString()};l(A=>[...A,v]),d(""),h(!0);try{const A=await fetch("/api/agent/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rum:r.rum,systemPrompt:r.systemPrompt,meddelanden:[...i,v].map(O=>({roll:O.roll,innehall:O.innehall}))})});if(A.ok){const O=await A.json();l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O.svar,tid:new Date().toISOString()}])}else{const O=xE(r,c.trim());l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}}catch{const O=xE(r,c.trim());l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}h(!1)},S=v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),w())};return t?s.jsxs(Ke.div,{initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:100},className:`fixed right-0 top-0 h-full bg-surface border-l border-border z-50 flex flex-col shadow-xl ${p?"w-[500px]":"w-[380px]"}`,children:[s.jsxs("div",{className:"h-14 border-b border-border flex items-center justify-between px-4 bg-primary/5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:s.jsx(Ei,{size:18,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm",children:r.titel}),s.jsx("p",{className:"text-xs text-text-secondary",children:"AI Assistant"})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>x(!p),className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:p?s.jsx(nF,{size:16}):s.jsx(eF,{size:16})}),s.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:s.jsx(Ua,{size:16})})]})]}),s.jsxs("div",{ref:y,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[i.map(v=>s.jsxs("div",{className:`flex gap-3 ${v.roll==="user"?"flex-row-reverse":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${v.roll==="assistant"?"bg-primary text-white":"bg-bg text-text-secondary"}`,children:v.roll==="assistant"?s.jsx(Ei,{size:16}):s.jsx(mu,{size:16})}),s.jsx("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${v.roll==="assistant"?"bg-bg text-text-primary rounded-tl-none":"bg-primary text-white rounded-tr-none"}`,children:s.jsx("p",{className:"whitespace-pre-wrap",children:v.innehall})})]},v.id)),f&&s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-white flex items-center justify-center",children:s.jsx(Ei,{size:16})}),s.jsx("div",{className:"bg-bg rounded-2xl rounded-tl-none px-4 py-3",children:s.jsxs("div",{className:"flex gap-1",children:[s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-100"}),s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-200"})]})})]})]}),s.jsxs("div",{className:"p-4 border-t border-border",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("textarea",{ref:j,value:c,onChange:v=>d(v.target.value),onKeyDown:S,placeholder:"Skriv ett meddelande...",className:"flex-1 min-h-[44px] max-h-[120px] px-4 py-2.5 rounded-xl border bg-surface text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary/20",rows:1}),s.jsx("button",{onClick:w,disabled:!c.trim()||f,className:"w-11 h-11 bg-primary text-white rounded-xl flex items-center justify-center hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s.jsx(Fm,{size:18})})]}),s.jsx("p",{className:"text-xs text-text-secondary mt-2 text-center",children:"AI kan göra misstag. Verifiera viktig information."})]})]}):s.jsx(Ke.button,{initial:{scale:0},animate:{scale:1},className:"fixed bottom-6 right-6 z-50 w-14 h-14 bg-primary rounded-full shadow-lg flex items-center justify-center text-white hover:bg-primary/90 transition-colors",onClick:n,children:s.jsx(H5,{size:24})})}function xE(e,t){const n=t.toLowerCase();return e.rum==="finance"?n.includes("moms")?"MOMS (mervärdesskatt) ska redovisas månadsvis eller kvartalsvis beroende på företagets omsättning. Nuvarande MOMS-att-betala är 336 006 kr för perioden. Vill du se detaljerad MOMS-rapport?":n.includes("faktura")||n.includes("invoice")?"Det finns för närvarande 3 fakturor som väntar på betalning. Faktura #INV-2024-0042 är 3 dagar försenad. Vill du skicka en påminnelse?":n.includes("balans")?"Totala tillgångar är 1 842 278 kr, skulder 435 657 kr och eget kapital 1 406 621 kr. Soliditeten är 76.4% vilket är mycket starkt.":"Jag kan hjälpa dig med finansiell analys, MOMS-rapportering, fakturahantering och kassaflödesprognoser. Vad vill du veta mer om?":e.rum==="sales"?n.includes("lead")?"Just nu har vi 12 aktiva leads i pipelinen. 3 är i förhandlingsfas och beräknas stängas denna månad. Vill du se detaljerad pipeline?":"Jag kan hjälpa dig med lead-hantering, offertförfrågningar och säljrapporter. Vad behöver du hjälp med?":e.rum==="hr"?n.includes("semester")?"Du har 25 semesterdagar kvar att ta ut i år. Nästa planerade semester är vecka 32. Vill du ansöka om ny semester?":"Jag kan hjälpa dig med HR-frågor, semesterplanering och personalärenden. Vad kan jag göra för dig?":`Jag förstår. Som ${e.titel} kan jag hjälpa dig med ${e.kompetenser.join(", ")}. Kan du specificera vad du behöver hjälp med?`}const If=["/","/dashboard","/crm","/finance","/amos","/quixzoom","/landvex","/compliance","/accounting"];function lG(){const{sidebarOpen:e}=O5(),t=_n(),n=$i(),[r,i]=M.useState(!1),l=()=>t.pathname.replace("/","")||"dashboard";M.useEffect(()=>{const p=()=>i(x=>!x);return window.addEventListener("toggle-agent",p),()=>window.removeEventListener("toggle-agent",p)},[]);const c=If.indexOf(t.pathname),d=()=>{c<If.length-1&&n(If[c+1])},f=()=>{c>0&&n(If[c-1])},h=async()=>{window.location.reload()};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsx(XF,{})}),s.jsx("div",{className:"lg:hidden",children:s.jsx(nG,{})}),s.jsxs("div",{className:it("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]",r&&"lg:mr-[380px]"),children:[s.jsx(QF,{}),s.jsx("main",{className:"p-4 lg:p-10",children:s.jsx(iG,{children:s.jsx(rG,{onSwipeLeft:d,onSwipeRight:f,children:s.jsx(aG,{onRefresh:h,children:s.jsx(XI,{})})})})})]}),s.jsx(oG,{rum:l(),isOpen:r,onToggle:()=>i(!r)})]})}const _s=M.forwardRef(({label:e,error:t,icon:n,className:r,...i},l)=>s.jsxs("div",{className:"w-full",children:[e&&s.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1.5",children:e}),s.jsxs("div",{className:"relative",children:[n&&s.jsx("div",{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-secondary",children:n}),s.jsx("input",{ref:l,className:it("w-full h-11 rounded-[14px] border bg-surface text-text-primary text-sm","placeholder:text-text-secondary/50","focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30","transition-all duration-150",n?"pl-10 pr-4":"px-4",t&&"border-danger focus:ring-danger/20 focus:border-danger/30",r),...i})]}),t&&s.jsx("p",{className:"mt-1.5 text-xs text-danger",children:t})]}));_s.displayName="Input";function Ye({children:e,variant:t="primary",size:n="md",loading:r=!1,icon:i,className:l,disabled:c,...d}){const f={primary:"bg-primary text-white hover:bg-primary-hover shadow-sm",secondary:"bg-surface text-text-primary border border-border hover:bg-white",ghost:"bg-transparent text-text-secondary hover:bg-primary-light hover:text-primary",danger:"bg-danger text-white hover:opacity-90"},h={sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-sm"};return s.jsxs("button",{className:it("inline-flex items-center justify-center gap-2 rounded-[14px] font-medium transition-colors duration-150","focus:outline-none focus:ring-2 focus:ring-primary/20","disabled:opacity-50 disabled:cursor-not-allowed","active:scale-[0.98]",f[t],h[n],l),disabled:c||r,...d,children:[r?s.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):i,e]})}const cG="/api/v1";function uG(){var e;try{const t=localStorage.getItem("amos-auth");if(t){const n=JSON.parse(t);if((e=n.state)!=null&&e.token)return n.state.token}}catch{}return localStorage.getItem("amos_token")}async function qf(e,t,n){const r=`${cG}${t}`,i={"Content-Type":"application/json"},l=uG();l&&(i.Authorization=`Bearer ${l}`);const c=await fetch(r,{method:e,headers:i,body:n?JSON.stringify(n):void 0});if(!c.ok){const d=await c.json().catch(()=>({}));throw c.status===503?new Error(d.error||"Integration not configured"):new Error(d.message||`HTTP ${c.status}`)}return c.json()}const Ce={get:e=>qf("GET",e),post:(e,t)=>qf("POST",e,t),put:(e,t)=>qf("PUT",e,t),delete:e=>qf("DELETE",e)},yE={login:(e,t)=>Ce.post("/auth/login",{email:e,password:t}),me:()=>Ce.get("/auth/me")},pg={customers:()=>Ce.get("/crm/customers"),leads:()=>Ce.get("/crm/leads"),pipeline:()=>Ce.get("/crm/pipeline"),createCustomer:e=>Ce.post("/crm/customers",e),updateCustomer:(e,t)=>Ce.put(`/crm/customers/${e}`,t),deleteCustomer:e=>Ce.delete(`/crm/customers/${e}`)},Uf={deals:()=>Ce.get("/sales/deals"),products:()=>Ce.get("/sales/products"),mrr:()=>Ce.get("/sales/mrr"),arr:()=>Ce.get("/sales/arr"),createDeal:e=>Ce.post("/sales/deals",e),updateDeal:(e,t)=>Ce.put(`/sales/deals/${e}`,t)},ms={balance:()=>Ce.get("/finance/balance?period="),income:()=>Ce.get("/finance/income?period="),moms:()=>Ce.get("/finance/moms?period="),accounts:()=>Ce.get("/finance/accounts"),invoices:()=>Ce.get("/finance/invoices"),cashflow:()=>Ce.get("/finance/cashflow")},gE={engines:()=>Ce.get("/amos/engines"),engineDetails:e=>Ce.get(`/amos/engines/${e}`),restartEngine:e=>Ce.post(`/amos/engines/${e}/restart`),engineLogs:e=>Ce.get(`/amos/engines/${e}/logs`)},Vf={zoomers:()=>Ce.get("/quixzoom/zoomers"),zoomer:e=>Ce.get(`/quixzoom/zoomers/${e}`),fieldData:()=>Ce.get("/quixzoom/field-data"),payouts:()=>Ce.get("/quixzoom/payouts"),payoutStats:()=>Ce.get("/quixzoom/payouts/stats"),insights:()=>Ce.get("/quixzoom/insights")},Hf={entities:()=>Ce.get("/landvex/entities"),entity:e=>Ce.get(`/landvex/entities/${e}`),documents:()=>Ce.get("/landvex/documents"),compliance:()=>Ce.get("/landvex/compliance"),ownership:()=>Ce.get("/landvex/ownership")},Lc={iso:()=>Ce.get("/compliance/iso"),gdpr:()=>Ce.get("/compliance/gdpr"),risks:()=>Ce.get("/compliance/risks"),legalCases:()=>Ce.get("/compliance/legal-cases"),policies:()=>Ce.get("/compliance/policies")},vE={employees:()=>Ce.get("/hr/employees"),leaves:()=>Ce.get("/hr/leaves"),createEmployee:e=>Ce.post("/hr/employees",e),createLeave:e=>Ce.post("/hr/leaves",e)},dG={entries:()=>Ce.get("/journal/entries"),entry:e=>Ce.get(`/journal/entries/${e}`)};function fG(){const e=$i(),{login:t}=ea(),[n,r]=M.useState(""),[i,l]=M.useState(""),[c,d]=M.useState(!1),[f,h]=M.useState(""),[p,x]=M.useState(!1),y=async j=>{var w;j.preventDefault(),h(""),x(!0);try{const S=await yE.login(n,i);if(!S.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",S.token);const v=await yE.me();t(S.token,{id:v.user.sub,email:v.user.email,name:"Erik Svensson",role:((w=v.user.roles)==null?void 0:w[0])||"user"}),e("/")}catch(S){h(S instanceof Error?S.message:"Login failed")}finally{x(!1)}};return s.jsx("div",{className:"min-h-screen bg-bg flex items-center justify-center p-4",children:s.jsxs(Ke.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"w-full max-w-[400px]",children:[s.jsx("div",{className:"flex items-center justify-center mb-10",children:s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary flex items-center justify-center",children:s.jsx("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:s.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})})}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-text-primary",children:"Welcome back"}),s.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Sign in to your AMOS account"})]}),s.jsxs("form",{onSubmit:y,className:"space-y-4",children:[s.jsx(_s,{label:"Email",type:"email",placeholder:"you@company.com",value:n,onChange:j=>r(j.target.value),icon:s.jsx(An,{size:16}),required:!0}),s.jsxs("div",{className:"relative",children:[s.jsx(_s,{label:"Password",type:c?"text":"password",placeholder:"Enter your password",value:i,onChange:j=>l(j.target.value),icon:s.jsx($5,{size:16}),required:!0}),s.jsx("button",{type:"button",onClick:()=>d(!c),className:"absolute right-3.5 top-[38px] text-text-secondary hover:text-text-primary transition-colors",children:c?s.jsx(GH,{size:16}):s.jsx(P5,{size:16})})]}),f&&s.jsx(Ke.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:f}),s.jsx(Ye,{type:"submit",size:"lg",loading:p,className:"w-full",children:"Sign in"})]})]})})}function hG(){const[e,t]=M.useState({total:0,open:0,in_progress:0,resolved:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/tickets/stats").then(i=>i.json()).then(i=>{t(i),r(!1)}).catch(()=>{t({total:24,open:8,in_progress:5,resolved:11}),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx("div",{className:"h-16 bg-gray-200 rounded"}),s.jsx("div",{className:"h-16 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx(kh,{size:16,className:"text-blue-600"})}),s.jsx("h3",{className:"font-semibold",children:"Support Tickets"})]}),s.jsxs(Ca,{to:"/support",className:"text-sm text-blue-600 hover:text-blue-700 flex items-center gap-1",children:["View all ",s.jsx(uS,{size:14})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"bg-orange-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Zr,{size:14,className:"text-orange-600"}),s.jsx("span",{className:"text-xs text-orange-600 font-medium",children:"Open"})]}),s.jsx("div",{className:"text-2xl font-bold text-orange-700",children:e.open})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(dn,{size:14,className:"text-blue-600"}),s.jsx("span",{className:"text-xs text-blue-600 font-medium",children:"In Progress"})]}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:e.in_progress})]}),s.jsxs("div",{className:"bg-green-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(xr,{size:14,className:"text-green-600"}),s.jsx("span",{className:"text-xs text-green-600 font-medium",children:"Resolved"})]}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:e.resolved})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(kh,{size:14,className:"text-gray-600"}),s.jsx("span",{className:"text-xs text-gray-600 font-medium",children:"Total"})]}),s.jsx("div",{className:"text-2xl font-bold text-gray-700",children:e.total})]})]})]})}function mG(){const[e,t]=M.useState({active:0,completed:0,overdue:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/dashboard/stats").then(i=>i.json()).then(i=>{t({active:i.active_issues||0,completed:12,overdue:2}),r(!1)}).catch(()=>{t({active:8,completed:12,overdue:2}),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"h-12 bg-gray-200 rounded"}),s.jsx("div",{className:"h-12 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center",children:s.jsx(D5,{size:16,className:"text-purple-600"})}),s.jsx("h3",{className:"font-semibold",children:"Projects"})]}),s.jsxs(Ca,{to:"/projects",className:"text-sm text-purple-600 hover:text-purple-700 flex items-center gap-1",children:["View all ",s.jsx(uS,{size:14})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(na,{size:16,className:"text-blue-600"}),s.jsx("span",{className:"text-sm text-blue-700",children:"Active"})]}),s.jsx("span",{className:"text-xl font-bold text-blue-700",children:e.active})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-green-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xr,{size:16,className:"text-green-600"}),s.jsx("span",{className:"text-sm text-green-700",children:"Completed"})]}),s.jsx("span",{className:"text-xl font-bold text-green-700",children:e.completed})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-red-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zr,{size:16,className:"text-red-600"}),s.jsx("span",{className:"text-sm text-red-700",children:"Overdue"})]}),s.jsx("span",{className:"text-xl font-bold text-red-700",children:e.overdue})]})]})]})}function pG(){const[e,t]=M.useState([]),[n,r]=M.useState(!0);M.useEffect(()=>{fetch("http://localhost:3457/api/services/health").then(l=>l.json()).then(l=>{t(l.slice(0,5)),r(!1)}).catch(()=>{t([{service_name:"aamos-ledger",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"aamos-identity",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"api-gateway",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"postgres-primary",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"redis-cache",status:"down",last_check:new Date().toISOString(),consecutive_failures:2}]),r(!1)})},[]);const i=e.filter(l=>l.status==="down"||l.status==="error");return n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-8 bg-gray-200 rounded"}),s.jsx("div",{className:"h-8 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:s.jsx(Rh,{size:16,className:"text-green-600"})}),s.jsx("h3",{className:"font-semibold",children:"Service Health"})]}),i.length>0&&s.jsxs("span",{className:"px-2 py-1 bg-red-100 text-red-700 text-xs rounded-full font-medium",children:[i.length," down"]})]}),s.jsx("div",{className:"space-y-2",children:e.map(l=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-gray-50",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[l.status==="up"?s.jsx(xr,{size:14,className:"text-green-500"}):l.status==="down"?s.jsx(Mh,{size:14,className:"text-red-500"}):s.jsx(Zr,{size:14,className:"text-yellow-500"}),s.jsx("span",{className:"text-sm",children:l.service_name})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${l.status==="up"?"bg-green-100 text-green-700":l.status==="down"?"bg-red-100 text-red-700":"bg-yellow-100 text-yellow-700"}`,children:l.status})]},l.service_name))})]})}function xG(){const[e,t]=M.useState({active_campaigns:0,scheduled_posts:0,impressions:0,engagement:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{setTimeout(()=>{t({active_campaigns:3,scheduled_posts:12,impressions:45200,engagement:2340}),r(!1)},500)},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx("div",{className:"h-16 bg-gray-200 rounded"}),s.jsx("div",{className:"h-16 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-pink-100 rounded-lg flex items-center justify-center",children:s.jsx(Megaphone,{size:16,className:"text-pink-600"})}),s.jsx("h3",{className:"font-semibold",children:"Marketing"})]}),s.jsxs(Ca,{to:"/marketing",className:"text-sm text-pink-600 hover:text-pink-700 flex items-center gap-1",children:["View all ",s.jsx(ArrowRight,{size:14})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-pink-50 rounded-lg p-3",children:[s.jsx("div",{className:"text-xs text-pink-600 mb-1",children:"Active Campaigns"}),s.jsx("div",{className:"text-2xl font-bold text-pink-700",children:e.active_campaigns})]}),s.jsxs("div",{className:"bg-purple-50 rounded-lg p-3",children:[s.jsx("div",{className:"text-xs text-purple-600 mb-1",children:"Scheduled"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:e.scheduled_posts})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-500 flex items-center gap-1",children:[s.jsx(Eye,{size:14})," Impressions"]}),s.jsx("span",{className:"font-medium",children:e.impressions.toLocaleString()})]}),s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-500 flex items-center gap-1",children:[s.jsx(TrendingUp,{size:14})," Engagement"]}),s.jsx("span",{className:"font-medium",children:e.engagement.toLocaleString()})]})]})]})}function yG(){const[e,t]=M.useState([]),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/sla/violations").then(i=>i.json()).then(i=>{t(i.slice(0,3)),r(!1)}).catch(()=>{t([{id:"1",ticket_number:"SUP-2024-005",subject:"Database timeout",violation_type:"sla_exceeded",severity:"critical",detected_at:new Date().toISOString()},{id:"2",ticket_number:"SUP-2024-003",subject:"Invoice not received",violation_type:"no_response",severity:"high",detected_at:new Date().toISOString()}]),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsx("div",{className:"space-y-2",children:s.jsx("div",{className:"h-10 bg-gray-200 rounded"})})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-yellow-100 rounded-lg flex items-center justify-center",children:s.jsx(Shield,{size:16,className:"text-yellow-600"})}),s.jsx("h3",{className:"font-semibold",children:"SLA Status"})]}),e.length>0&&s.jsxs("span",{className:"px-2 py-1 bg-red-100 text-red-700 text-xs rounded-full font-medium",children:[e.length," violations"]})]}),e.length===0?s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-green-50 rounded-lg",children:[s.jsx(CheckCircle2,{size:20,className:"text-green-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-700",children:"All SLA met"}),s.jsx("p",{className:"text-xs text-green-600",children:"No violations detected"})]})]}):s.jsx("div",{className:"space-y-2",children:e.map(i=>s.jsxs("div",{className:`p-3 rounded-lg ${i.severity==="critical"?"bg-red-50":i.severity==="high"?"bg-orange-50":"bg-yellow-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(AlertTriangle,{size:14,className:i.severity==="critical"?"text-red-600":i.severity==="high"?"text-orange-600":"text-yellow-600"}),s.jsx("span",{className:"text-sm font-medium",children:i.ticket_number})]}),s.jsx("p",{className:"text-xs text-gray-600",children:i.subject}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i.violation_type.replace("_"," ")})]},i.id))})]})}function gG(){return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),s.jsx("p",{className:"text-gray-500",children:"Real-time overview of all operations"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsx(hG,{}),s.jsx(mG,{}),s.jsx(pG,{}),s.jsx(xG,{}),s.jsx(yG,{}),s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"bg-white border rounded-xl p-6",children:[s.jsx("h3",{className:"font-semibold mb-4",children:"Quick Actions"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("a",{href:"/support",className:"flex items-center gap-3 p-3 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors",children:[s.jsx("span",{className:"text-blue-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Support Ticket"})]}),s.jsxs("a",{href:"/projects",className:"flex items-center gap-3 p-3 bg-purple-50 rounded-lg hover:bg-purple-100 transition-colors",children:[s.jsx("span",{className:"text-purple-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Project Issue"})]}),s.jsxs("a",{href:"/marketing",className:"flex items-center gap-3 p-3 bg-pink-50 rounded-lg hover:bg-pink-100 transition-colors",children:[s.jsx("span",{className:"text-pink-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Campaign"})]})]})]})]})]})}const vG={getRealBriefing:()=>Ce.get("/briefing/real")};function _e({children:e,variant:t="default",size:n="sm",className:r}){const i={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",primary:"bg-primary-light text-primary"},l={sm:"px-2 py-0.5 text-[11px]",md:"px-2.5 py-1 text-xs"};return s.jsx("span",{className:it("inline-flex items-center rounded-full font-medium",i[t],l[n],r),children:e})}function Ff({title:e,value:t,subtitle:n,icon:r,trend:i,trendValue:l,variant:c="default"}){const d={default:"bg-surface border-border",success:"bg-success/5 border-success/20",warning:"bg-warning/5 border-warning/20",danger:"bg-danger/5 border-danger/20"};return s.jsxs("div",{className:`p-4 rounded-xl border ${d[c]}`,children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm text-text-secondary",children:e}),s.jsx("p",{className:"text-2xl font-semibold",children:t}),n&&s.jsx("p",{className:"text-xs text-text-tertiary",children:n})]}),r&&s.jsx("div",{className:"text-text-secondary",children:r})]}),i&&s.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[i==="up"&&s.jsx(na,{size:14,className:"text-success"}),i==="down"&&s.jsx(G5,{size:14,className:"text-danger"}),i==="neutral"&&s.jsx(Zr,{size:14,className:"text-text-secondary"}),s.jsx("span",{className:`text-xs ${i==="up"?"text-success":i==="down"?"text-danger":"text-text-secondary"}`,children:l})]})]})}function bG({alert:e}){const t={info:{icon:s.jsx(Zr,{size:16}),color:"text-primary bg-primary/5 border-primary/20"},warning:{icon:s.jsx(fn,{size:16}),color:"text-warning bg-warning/5 border-warning/20"},critical:{icon:s.jsx(fn,{size:16}),color:"text-danger bg-danger/5 border-danger/20"}},n=t[e.level]||t.info;return s.jsx("div",{className:`p-3 rounded-lg border ${n.color}`,children:s.jsxs("div",{className:"flex items-start gap-2",children:[n.icon,s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium",children:e.title}),s.jsx("p",{className:"text-xs opacity-80 mt-0.5",children:e.description})]}),s.jsx(_e,{variant:"default",className:"text-xs",children:e.source})]})})}function jG({action:e}){const t={10:"bg-danger text-white",9:"bg-danger/80 text-white",8:"bg-warning text-white",7:"bg-warning/80 text-white",6:"bg-primary text-white",5:"bg-primary/80 text-white"};return s.jsx("div",{className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium shrink-0 ${t[e.priority]||"bg-text-secondary text-white"}`,children:e.priority}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsxs("span",{className:"text-xs text-text-tertiary flex items-center gap-1",children:[s.jsx(dn,{size:12}),e.time_estimate]}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),s.jsx(uS,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function wG({task:e}){const t={critical:"danger",high:"warning",medium:"default",low:"success"};return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-warning shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm truncate",children:e.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[s.jsx(_e,{variant:t[e.priority],className:"text-xs",children:e.priority}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.category})]})]}),s.jsxs("span",{className:"text-xs text-text-tertiary shrink-0",children:[e.days_open,"d"]})]})}function SG({deal:e}){return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:s.jsx(Hm,{size:16,className:"text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:e.customer})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsx("p",{className:"text-sm font-medium",children:Te(e.value)}),s.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.probability,"%"]})]})]})}function te({children:e,className:t,hover:n=!1,padding:r="lg",onClick:i}){const l={sm:"p-4",md:"p-5",lg:"p-6 md:p-8"};return s.jsx(Ke.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},onClick:i,className:it("bg-surface rounded-[20px] card-shadow",l[r],(n||i)&&"transition-shadow duration-200 hover:shadow-hover cursor-pointer",t),children:e})}function Ge({title:e,subtitle:t,action:n,className:r}){return s.jsxs("div",{className:it("flex items-start justify-between mb-6",r),children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:e}),t&&s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:t})]}),n&&s.jsx("div",{children:n})]})}function Re({className:e}){return s.jsx("div",{className:it("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function NG(){var j;const[e,t]=M.useState(null),[n,r]=M.useState(!0),[i,l]=M.useState("");if(M.useEffect(()=>{async function w(){try{r(!0);const v=await vG.getRealBriefing();t(v)}catch(v){l(v instanceof Error?v.message:"Failed to load briefing")}finally{r(!1)}}w();const S=setInterval(w,3e5);return()=>clearInterval(S)},[]),n)return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Array.from({length:4}).map((w,S)=>s.jsx(Re,{className:"h-[120px]"},S))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(Re,{className:"h-[400px] lg:col-span-2"}),s.jsx(Re,{className:"h-[400px]"})]})]});if(i)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx(fn,{size:48,className:"text-danger mx-auto mb-4"}),s.jsx("p",{className:"text-danger font-medium",children:i}),s.jsx("button",{onClick:()=>window.location.reload(),className:"mt-4 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover transition-colors",children:"Försök igen"})]})});if(!e)return null;const{company_health:c,my_tasks:d,my_deals:f,team_overview:h,financial_status:p,alerts:x,actions:y}=e;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Dagsöversikt"}),s.jsxs("p",{className:"text-text-secondary",children:[e.user.name," • ",new Date(e.generated_at).toLocaleDateString("sv-SE",{weekday:"long",year:"numeric",month:"long",day:"numeric"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${c.status==="healthy"?"bg-success":c.status==="warning"?"bg-warning":"bg-danger"}`}),s.jsx("span",{className:"text-sm text-text-secondary capitalize",children:c.status})]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(Ff,{title:"Cash Position",value:Te(c.cash_position),subtitle:"Eget kapital",icon:s.jsx(hS,{size:20}),trend:c.profit_margin>0?"up":"down",trendValue:`${hE(c.profit_margin)}% marginal`,variant:c.cash_position>1e6?"success":c.cash_position>5e5?"warning":"danger"}),s.jsx(Ff,{title:"Pipeline",value:Te(c.total_pipeline),subtitle:`${c.active_deals} aktiva deals`,icon:s.jsx(Hm,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),s.jsx(Ff,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:s.jsx(Lr,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),s.jsx(Ff,{title:"Mina Tasks",value:d.length,subtitle:`${d.filter(w=>w.priority==="critical").length} kritiska`,icon:s.jsx(dF,{size:20}),variant:d.filter(w=>w.priority==="critical").length>0?"danger":d.filter(w=>w.priority==="high").length>0?"warning":"success"})]}),x.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(fn,{size:20,className:"text-warning"}),"Varningar"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:x.map((w,S)=>s.jsx(bG,{alert:w},S))})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[y.length>0&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Rekommenderade Åtgärder",subtitle:"Prioriterade baserat på din roll och aktuell data"}),s.jsx("div",{className:"p-4 space-y-3",children:y.map((w,S)=>s.jsx(jG,{action:w},S))})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Mina Uppgifter",subtitle:`${d.length} öppna uppgifter`}),s.jsx("div",{className:"p-4 space-y-1",children:d.length===0?s.jsxs("div",{className:"text-center py-8 text-text-secondary",children:[s.jsx(xr,{size:48,className:"mx-auto mb-2 text-success"}),s.jsx("p",{children:"Alla uppgifter är klara!"})]}):d.map(w=>s.jsx(wG,{task:w},w.id))})]}),f.length>0&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Mina Deals",subtitle:`${f.length} aktiva förhandlingar`}),s.jsx("div",{className:"p-4 space-y-1",children:f.map(w=>s.jsx(SG,{deal:w},w.id))})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Teamöversikt",subtitle:`${h.total_members} medlemmar`}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[s.jsxs("div",{className:"text-center p-2 bg-success/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-success",children:h.active_now}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]}),s.jsxs("div",{className:"text-center p-2 bg-warning/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-warning",children:h.on_leave}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Borta"})]}),s.jsxs("div",{className:"text-center p-2 bg-primary/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-primary",children:h.open_tickets}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Tickets"})]})]}),s.jsx("div",{className:"space-y-2",children:h.members.slice(0,5).map((w,S)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-medium text-primary",children:w.name.split(" ").map(v=>v[0]).join("")}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:w.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:w.role})]}),w.open_tasks>0&&s.jsx(_e,{variant:"warning",className:"text-xs",children:w.open_tasks})]},S))})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Finansiell Status",subtitle:"Från ledger i realtid"}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Tillgångar"}),s.jsx("span",{className:"text-sm font-medium",children:Te(p.total_assets)})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Skulder"}),s.jsx("span",{className:"text-sm font-medium",children:Te(p.total_liabilities)})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Eget Kapital"}),s.jsx("span",{className:"text-sm font-medium text-success",children:Te(p.equity)})]}),p.runway_months>0&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Runway"}),s.jsxs("span",{className:"text-sm font-medium",children:[hE(p.runway_months)," mån"]})]}),s.jsxs("div",{className:"pt-2 border-t border-border",children:[s.jsx("p",{className:"text-xs text-text-tertiary mb-2",children:"Top Konton"}),(j=p.top_accounts)==null?void 0:j.slice(0,3).map((w,S)=>s.jsxs("div",{className:"flex justify-between items-center py-1",children:[s.jsx("span",{className:"text-xs text-text-secondary",children:w.name}),s.jsx("span",{className:"text-xs font-medium",children:Te(w.amount)})]},S))]})]})]})]})]})]})}function AG(){return s.jsx(NG,{})}function _G(){const{user:e}=ea(),[t]=_q(),[n,r]=M.useState(null),[i,l]=M.useState(!0),[c,d]=M.useState(!1),[f,h]=M.useState(t.get("tab")||"general");M.useEffect(()=>{l(!0),fetch("/api/v1/users/me",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}).then(y=>y.json()).then(y=>{var j,w,S,v,A,O,_,T,N,E,k,R,B;r({id:((j=y.user)==null?void 0:j.id)||(e==null?void 0:e.id)||"",name:((w=y.user)==null?void 0:w.name)||(e==null?void 0:e.name)||"",email:((S=y.user)==null?void 0:S.email)||(e==null?void 0:e.email)||"",phone:((v=y.user)==null?void 0:v.phone)||"",role:((A=y.user)==null?void 0:A.role)||(e==null?void 0:e.role)||"user",department:((O=y.user)==null?void 0:O.department)||"",timezone:((_=y.user)==null?void 0:_.timezone)||"Europe/Stockholm",language:((T=y.user)==null?void 0:T.language)||"sv",notifications:((N=y.user)==null?void 0:N.notifications)||{email:!0,push:!0,sms:!1},theme:((E=y.user)==null?void 0:E.theme)||"light",twoFactorEnabled:((k=y.user)==null?void 0:k.twoFactorEnabled)||!1,lastLogin:((R=y.user)==null?void 0:R.lastLogin)||new Date().toISOString(),createdAt:((B=y.user)==null?void 0:B.createdAt)||new Date().toISOString()}),l(!1)}).catch(()=>{r({id:(e==null?void 0:e.id)||"",name:(e==null?void 0:e.name)||"",email:(e==null?void 0:e.email)||"",phone:"",role:(e==null?void 0:e.role)||"user",department:"",timezone:"Europe/Stockholm",language:"sv",notifications:{email:!0,push:!0,sms:!1},theme:"light",twoFactorEnabled:!1,lastLogin:new Date().toISOString(),createdAt:new Date().toISOString()}),l(!1)})},[e]);const p=async()=>{d(!0),await new Promise(y=>setTimeout(y,1e3)),d(!1)};if(i)return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Re,{className:"h-[200px]"}),s.jsx(Re,{className:"h-[400px]"})]});if(!n)return null;const x=[{id:"general",label:"Allmänt",icon:mu},{id:"security",label:"Säkerhet",icon:za},{id:"notifications",label:"Notifikationer",icon:X1},{id:"preferences",label:"Inställningar",icon:gn}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Min Profil"}),s.jsx("p",{className:"text-text-secondary",children:"Hantera dina kontoinställningar"})]}),s.jsx(Ye,{onClick:p,disabled:c,icon:c?void 0:s.jsx(lF,{size:16}),children:c?"Sparar...":"Spara ändringar"})]}),s.jsxs(te,{className:"relative overflow-hidden",children:[s.jsx("div",{className:"h-32 bg-gradient-to-r from-primary to-primary-hover"}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"relative -mt-16 mb-4",children:s.jsxs("div",{className:"w-32 h-32 rounded-2xl bg-surface border-4 border-bg flex items-center justify-center text-4xl font-bold text-primary relative",children:[n.avatar?s.jsx("img",{src:n.avatar,alt:n.name,className:"w-full h-full rounded-2xl object-cover"}):n.name.split(" ").map(y=>y[0]).join(""),s.jsx("button",{className:"absolute bottom-0 right-0 w-8 h-8 bg-primary text-white rounded-full flex items-center justify-center hover:bg-primary-hover transition-colors",children:s.jsx(ph,{size:14})})]})}),s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:n.name}),s.jsx("p",{className:"text-text-secondary",children:n.email}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(_e,{variant:"primary",children:n.role}),s.jsx(_e,{variant:"default",children:n.department})]})]}),s.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[s.jsxs("p",{children:["Senaste inloggning: ",Nt(n.lastLogin)]}),s.jsxs("p",{children:["Medlem sedan: ",Nt(n.createdAt)]})]})]})]})]}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:x.map(y=>s.jsxs("button",{onClick:()=>h(y.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${f===y.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(y.icon,{size:16}),y.label]},y.id))}),f==="general"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Personlig information",subtitle:"Uppdatera dina kontouppgifter"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Fullständigt namn"}),s.jsxs("div",{className:"relative",children:[s.jsx(mu,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",value:n.name,onChange:y=>r({...n,name:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"E-post"}),s.jsxs("div",{className:"relative",children:[s.jsx(An,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"email",value:n.email,onChange:y=>r({...n,email:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Telefon"}),s.jsxs("div",{className:"relative",children:[s.jsx(lE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"tel",value:n.phone||"",onChange:y=>r({...n,phone:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Avdelning"}),s.jsxs("div",{className:"relative",children:[s.jsx(qa,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",value:n.department||"",onChange:y=>r({...n,department:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Kontoinformation",subtitle:"Dina kontodetaljer"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Användar-ID"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.id})]}),s.jsx(_e,{variant:"default",children:"Aktiv"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Roll"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.role})]}),s.jsx(za,{size:16,className:"text-primary"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Tidszon"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.timezone})]}),s.jsx(gn,{size:16,className:"text-text-secondary"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Språk"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.language==="sv"?"Svenska":n.language})]}),s.jsx(gn,{size:16,className:"text-text-secondary"})]})]})]})]}),f==="security"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Lösenord",subtitle:"Uppdatera ditt lösenord"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nuvarande lösenord"}),s.jsxs("div",{className:"relative",children:[s.jsx(iE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"password",placeholder:"••••••••",className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nytt lösenord"}),s.jsx("input",{type:"password",placeholder:"Minst 8 tecken",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Bekräfta nytt lösenord"}),s.jsx("input",{type:"password",placeholder:"Upprepa lösenord",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsxs(Ye,{variant:"secondary",className:"w-full",children:[s.jsx(iE,{size:16,className:"mr-2"}),"Ändra lösenord"]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Tvåfaktorsautentisering",subtitle:"Öka säkerheten på ditt konto"}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"2FA-status"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.twoFactorEnabled?"Aktiverad":"Ej aktiverad"})]}),s.jsx(_e,{variant:n.twoFactorEnabled?"success":"default",children:n.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!n.twoFactorEnabled&&s.jsxs(Ye,{className:"w-full",children:[s.jsx(za,{size:16,className:"mr-2"}),"Aktivera 2FA"]})]})]})]}),f==="notifications"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Notifikationsinställningar",subtitle:"Hantera hur du får notifieringar"}),s.jsx("div",{className:"p-4 space-y-4",children:[{key:"email",label:"E-postnotifikationer",description:"Få uppdateringar via e-post",icon:An},{key:"push",label:"Push-notifikationer",description:"Få notifikationer i webbläsaren",icon:X1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:lE}].map(y=>s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border last:border-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:s.jsx(y.icon,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:y.label}),s.jsx("p",{className:"text-xs text-text-secondary",children:y.description})]})]}),s.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:n.notifications[y.key],onChange:j=>r({...n,notifications:{...n.notifications,[y.key]:j.target.checked}}),className:"sr-only peer"}),s.jsx("div",{className:"w-11 h-6 bg-border peer-focus:outline-none 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-primary"})]})]},y.key))})]}),f==="preferences"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Utseende",subtitle:"Anpassa hur BOC ser ut"}),s.jsx("div",{className:"p-4 space-y-4",children:s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Tema"}),s.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{id:"light",label:"Ljust",icon:F5},{id:"dark",label:"Mörkt",icon:q5},{id:"system",label:"System",icon:rF}].map(y=>s.jsxs("button",{onClick:()=>r({...n,theme:y.id}),className:`p-3 rounded-xl border text-center transition-colors ${n.theme===y.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30"}`,children:[s.jsx(y.icon,{size:20,className:"mx-auto mb-1"}),s.jsx("span",{className:"text-xs",children:y.label})]},y.id))})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Regionala inställningar",subtitle:"Språk och tidszon"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Språk"}),s.jsxs("select",{value:n.language,onChange:y=>r({...n,language:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[s.jsx("option",{value:"sv",children:"Svenska"}),s.jsx("option",{value:"en",children:"English"}),s.jsx("option",{value:"no",children:"Norsk"}),s.jsx("option",{value:"da",children:"Dansk"}),s.jsx("option",{value:"fi",children:"Suomi"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Tidszon"}),s.jsxs("select",{value:n.timezone,onChange:y=>r({...n,timezone:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[s.jsx("option",{value:"Europe/Stockholm",children:"Stockholm (CET)"}),s.jsx("option",{value:"Europe/Oslo",children:"Oslo (CET)"}),s.jsx("option",{value:"Europe/Copenhagen",children:"Köpenhamn (CET)"}),s.jsx("option",{value:"Europe/Helsinki",children:"Helsingfors (EET)"}),s.jsx("option",{value:"UTC",children:"UTC"})]})]})]})]})]})]})}function Ri({children:e,className:t}){return s.jsx("div",{className:"w-full overflow-x-auto",children:s.jsx("table",{className:it("w-full",t),children:e})})}function Di({children:e,className:t}){return s.jsx("thead",{className:it("border-b border-border",t),children:e})}function zi({children:e,className:t}){return s.jsx("tbody",{className:t,children:e})}function Rt({children:e,className:t}){return s.jsx("tr",{className:it("border-b border-border/50 transition-colors hover:bg-bg/50",t),children:e})}function Ae({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("th",{colSpan:r,className:it("py-3 px-4 text-xs font-medium text-text-secondary uppercase tracking-wider",i[n],t),children:e})}function be({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("td",{colSpan:r,className:it("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function bE({icon:e,title:t,description:n,action:r,className:i}){return s.jsxs("div",{className:it("flex flex-col items-center justify-center py-16 text-center",i),children:[e&&s.jsx("div",{className:"mb-4 text-text-secondary/40",children:e}),s.jsx("h3",{className:"text-sm font-medium text-text-primary",children:t}),n&&s.jsx("p",{className:"mt-1 text-sm text-text-secondary max-w-sm",children:n}),r&&s.jsx("div",{className:"mt-4",children:r})]})}function OG({children:e,className:t,onClick:n}){return s.jsx("div",{onClick:n,className:it("bg-surface rounded-2xl p-4 card-shadow border border-border/40",n&&"active:scale-[0.98] transition-transform cursor-pointer",t),children:e})}function TG({children:e,variant:t="default",className:n}){const r={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",info:"bg-primary-light text-primary"};return s.jsx("span",{className:it("text-xs font-medium px-2.5 py-1 rounded-full",r[t],n),children:e})}const EG=["Customers","Leads","Pipeline"];function CG(){const[e,t]=M.useState("Customers"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState(0),[y,j]=M.useState([]),[w,S]=M.useState([]);M.useEffect(()=>{async function _(){l(!0),d("");try{const[T,N,E]=await Promise.all([pg.customers(),pg.leads(),pg.pipeline()]);h(T.customers),x(T.total),j(N.leads);const k=E;S(k.stages||k.pipeline||[])}catch(T){d(T instanceof Error?T.message:"Failed to load CRM data")}finally{l(!1)}}_()},[]);const v=f.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),A=y.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),O=w.reduce((_,T)=>_+(T.value||0),0);return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"CRM"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Manage customers, leads, and pipeline"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"Add Contact"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:p}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Customers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(An,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:y.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Leads"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(qa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(O)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pipeline Value"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:EG.map(_=>s.jsx("button",{onClick:()=>t(_),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===_?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:_},_))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:_=>r(_.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Customers"&&s.jsxs(te,{children:[s.jsx("div",{className:"hidden md:block",children:s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Phone"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(zi,{children:v.map(_=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),s.jsx(be,{children:_.company||"—"}),s.jsx(be,{children:s.jsx(_e,{variant:_.status==="active"?"success":_.status==="lead"?"primary":"default",children:_.status})}),s.jsx(be,{children:_.phone||"—"}),s.jsx(be,{children:Nt(_.created_at)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},_.id))})]})}),s.jsx("div",{className:"md:hidden p-4 space-y-3",children:v.map(_=>s.jsx(OG,{children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center text-sm font-semibold shrink-0",children:_.name.charAt(0)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium text-text-primary",children:_.name}),s.jsx("div",{className:"text-sm text-text-secondary",children:_.email}),_.company&&s.jsx("div",{className:"text-sm text-text-secondary mt-1",children:_.company}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(TG,{variant:_.status==="active"?"success":_.status==="lead"?"info":"default",children:_.status}),s.jsx("span",{className:"text-xs text-text-secondary",children:Nt(_.created_at)})]})]})]})},_.id))}),v.length===0&&s.jsx(bE,{icon:s.jsx(Lr,{size:32}),title:"No customers found",description:"Try adjusting your search or filters"})]}),e==="Leads"&&s.jsxs(te,{children:[s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Lead"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Source"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(zi,{children:A.map(_=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),s.jsx(be,{children:_.company||"—"}),s.jsx(be,{children:_.source||"—"}),s.jsx(be,{children:s.jsx(_e,{variant:_.status==="qualified"?"success":_.status==="contacted"?"primary":_.status==="lost"?"danger":"default",children:_.status})}),s.jsx(be,{children:Nt(_.created_at)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},_.id))})]}),A.length===0&&s.jsx(bE,{icon:s.jsx(An,{size:32}),title:"No leads found",description:"Try adjusting your search or filters"})]}),e==="Pipeline"&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[w.length===0&&s.jsx("div",{className:"col-span-full text-center text-text-secondary py-12",children:"No pipeline stages found"}),w.map(_=>s.jsxs(te,{hover:!0,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:_.name}),s.jsxs(_e,{variant:"default",children:[_.deals," deals"]})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_.value>0?new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(_.value):"—"}),s.jsx("div",{className:"mt-4 h-1.5 bg-bg rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${O>0?_.value/O*100:0}%`}})})]},_.id))]})]})}var xg,jE;function Dn(){if(jE)return xg;jE=1;var e=Array.isArray;return xg=e,xg}var yg,wE;function t6(){if(wE)return yg;wE=1;var e=typeof kf=="object"&&kf&&kf.Object===Object&&kf;return yg=e,yg}var gg,SE;function ia(){if(SE)return gg;SE=1;var e=t6(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return gg=n,gg}var vg,NE;function rd(){if(NE)return vg;NE=1;var e=ia(),t=e.Symbol;return vg=t,vg}var bg,AE;function MG(){if(AE)return bg;AE=1;var e=rd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function l(c){var d=n.call(c,i),f=c[i];try{c[i]=void 0;var h=!0}catch{}var p=r.call(c);return h&&(d?c[i]=f:delete c[i]),p}return bg=l,bg}var jg,_E;function kG(){if(_E)return jg;_E=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return jg=n,jg}var wg,OE;function Ga(){if(OE)return wg;OE=1;var e=rd(),t=MG(),n=kG(),r="[object Null]",i="[object Undefined]",l=e?e.toStringTag:void 0;function c(d){return d==null?d===void 0?i:r:l&&l in Object(d)?t(d):n(d)}return wg=c,wg}var Sg,TE;function Ka(){if(TE)return Sg;TE=1;function e(t){return t!=null&&typeof t=="object"}return Sg=e,Sg}var Ng,EE;function Cl(){if(EE)return Ng;EE=1;var e=Ga(),t=Ka(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ng=r,Ng}var Ag,CE;function yS(){if(CE)return Ag;CE=1;var e=Dn(),t=Cl(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(l,c){if(e(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||t(l)?!0:r.test(l)||!n.test(l)||c!=null&&l in Object(c)}return Ag=i,Ag}var _g,ME;function Ii(){if(ME)return _g;ME=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return _g=e,_g}var Og,kE;function gS(){if(kE)return Og;kE=1;var e=Ga(),t=Ii(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",l="[object Proxy]";function c(d){if(!t(d))return!1;var f=e(d);return f==r||f==i||f==n||f==l}return Og=c,Og}var Tg,PE;function PG(){if(PE)return Tg;PE=1;var e=ia(),t=e["__core-js_shared__"];return Tg=t,Tg}var Eg,RE;function RG(){if(RE)return Eg;RE=1;var e=PG(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Eg=n,Eg}var Cg,DE;function n6(){if(DE)return Cg;DE=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Cg=n,Cg}var Mg,zE;function DG(){if(zE)return Mg;zE=1;var e=gS(),t=RG(),n=Ii(),r=n6(),i=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,f=c.toString,h=d.hasOwnProperty,p=RegExp("^"+f.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x(y){if(!n(y)||t(y))return!1;var j=e(y)?p:l;return j.test(r(y))}return Mg=x,Mg}var kg,LE;function zG(){if(LE)return kg;LE=1;function e(t,n){return t==null?void 0:t[n]}return kg=e,kg}var Pg,$E;function zs(){if($E)return Pg;$E=1;var e=DG(),t=zG();function n(r,i){var l=t(r,i);return e(l)?l:void 0}return Pg=n,Pg}var Rg,BE;function Gm(){if(BE)return Rg;BE=1;var e=zs(),t=e(Object,"create");return Rg=t,Rg}var Dg,IE;function LG(){if(IE)return Dg;IE=1;var e=Gm();function t(){this.__data__=e?e(null):{},this.size=0}return Dg=t,Dg}var zg,qE;function $G(){if(qE)return zg;qE=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return zg=e,zg}var Lg,UE;function BG(){if(UE)return Lg;UE=1;var e=Gm(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(l){var c=this.__data__;if(e){var d=c[l];return d===t?void 0:d}return r.call(c,l)?c[l]:void 0}return Lg=i,Lg}var $g,VE;function IG(){if(VE)return $g;VE=1;var e=Gm(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var l=this.__data__;return e?l[i]!==void 0:n.call(l,i)}return $g=r,$g}var Bg,HE;function qG(){if(HE)return Bg;HE=1;var e=Gm(),t="__lodash_hash_undefined__";function n(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=e&&i===void 0?t:i,this}return Bg=n,Bg}var Ig,FE;function UG(){if(FE)return Ig;FE=1;var e=LG(),t=$G(),n=BG(),r=IG(),i=qG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,Ig=l,Ig}var qg,GE;function VG(){if(GE)return qg;GE=1;function e(){this.__data__=[],this.size=0}return qg=e,qg}var Ug,KE;function vS(){if(KE)return Ug;KE=1;function e(t,n){return t===n||t!==t&&n!==n}return Ug=e,Ug}var Vg,YE;function Km(){if(YE)return Vg;YE=1;var e=vS();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Vg=t,Vg}var Hg,XE;function HG(){if(XE)return Hg;XE=1;var e=Km(),t=Array.prototype,n=t.splice;function r(i){var l=this.__data__,c=e(l,i);if(c<0)return!1;var d=l.length-1;return c==d?l.pop():n.call(l,c,1),--this.size,!0}return Hg=r,Hg}var Fg,WE;function FG(){if(WE)return Fg;WE=1;var e=Km();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Fg=t,Fg}var Gg,ZE;function GG(){if(ZE)return Gg;ZE=1;var e=Km();function t(n){return e(this.__data__,n)>-1}return Gg=t,Gg}var Kg,QE;function KG(){if(QE)return Kg;QE=1;var e=Km();function t(n,r){var i=this.__data__,l=e(i,n);return l<0?(++this.size,i.push([n,r])):i[l][1]=r,this}return Kg=t,Kg}var Yg,JE;function Ym(){if(JE)return Yg;JE=1;var e=VG(),t=HG(),n=FG(),r=GG(),i=KG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,Yg=l,Yg}var Xg,eC;function bS(){if(eC)return Xg;eC=1;var e=zs(),t=ia(),n=e(t,"Map");return Xg=n,Xg}var Wg,tC;function YG(){if(tC)return Wg;tC=1;var e=UG(),t=Ym(),n=bS();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Wg=r,Wg}var Zg,nC;function XG(){if(nC)return Zg;nC=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Zg=e,Zg}var Qg,rC;function Xm(){if(rC)return Qg;rC=1;var e=XG();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Qg=t,Qg}var Jg,aC;function WG(){if(aC)return Jg;aC=1;var e=Xm();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Jg=t,Jg}var ev,iC;function ZG(){if(iC)return ev;iC=1;var e=Xm();function t(n){return e(this,n).get(n)}return ev=t,ev}var tv,sC;function QG(){if(sC)return tv;sC=1;var e=Xm();function t(n){return e(this,n).has(n)}return tv=t,tv}var nv,oC;function JG(){if(oC)return nv;oC=1;var e=Xm();function t(n,r){var i=e(this,n),l=i.size;return i.set(n,r),this.size+=i.size==l?0:1,this}return nv=t,nv}var rv,lC;function jS(){if(lC)return rv;lC=1;var e=YG(),t=WG(),n=ZG(),r=QG(),i=JG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,rv=l,rv}var av,cC;function r6(){if(cC)return av;cC=1;var e=jS(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var l=function(){var c=arguments,d=i?i.apply(this,c):c[0],f=l.cache;if(f.has(d))return f.get(d);var h=r.apply(this,c);return l.cache=f.set(d,h)||f,h};return l.cache=new(n.Cache||e),l}return n.Cache=e,av=n,av}var iv,uC;function eK(){if(uC)return iv;uC=1;var e=r6(),t=500;function n(r){var i=e(r,function(c){return l.size===t&&l.clear(),c}),l=i.cache;return i}return iv=n,iv}var sv,dC;function tK(){if(dC)return sv;dC=1;var e=eK(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var l=[];return i.charCodeAt(0)===46&&l.push(""),i.replace(t,function(c,d,f,h){l.push(f?h.replace(n,"$1"):d||c)}),l});return sv=r,sv}var ov,fC;function wS(){if(fC)return ov;fC=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,l=Array(i);++r<i;)l[r]=n(t[r],r,t);return l}return ov=e,ov}var lv,hC;function nK(){if(hC)return lv;hC=1;var e=rd(),t=wS(),n=Dn(),r=Cl(),i=e?e.prototype:void 0,l=i?i.toString:void 0;function c(d){if(typeof d=="string")return d;if(n(d))return t(d,c)+"";if(r(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return lv=c,lv}var cv,mC;function a6(){if(mC)return cv;mC=1;var e=nK();function t(n){return n==null?"":e(n)}return cv=t,cv}var uv,pC;function i6(){if(pC)return uv;pC=1;var e=Dn(),t=yS(),n=tK(),r=a6();function i(l,c){return e(l)?l:t(l,c)?[l]:n(r(l))}return uv=i,uv}var dv,xC;function Wm(){if(xC)return dv;xC=1;var e=Cl();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return dv=t,dv}var fv,yC;function SS(){if(yC)return fv;yC=1;var e=i6(),t=Wm();function n(r,i){i=e(i,r);for(var l=0,c=i.length;r!=null&&l<c;)r=r[t(i[l++])];return l&&l==c?r:void 0}return fv=n,fv}var hv,gC;function s6(){if(gC)return hv;gC=1;var e=SS();function t(n,r,i){var l=n==null?void 0:e(n,r);return l===void 0?i:l}return hv=t,hv}var rK=s6();const Zn=st(rK);var mv,vC;function aK(){if(vC)return mv;vC=1;function e(t){return t==null}return mv=e,mv}var iK=aK();const Pe=st(iK);var pv,bC;function sK(){if(bC)return pv;bC=1;var e=Ga(),t=Dn(),n=Ka(),r="[object String]";function i(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==r}return pv=i,pv}var oK=sK();const Es=st(oK);var lK=gS();const Ee=st(lK);var cK=Ii();const Ml=st(cK);var xv={exports:{}},tt={};/**
|
||
* @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 uK(){if(jC)return tt;jC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function S(v){if(typeof v=="object"&&v!==null){var A=v.$$typeof;switch(A){case e:switch(v=v.type,v){case n:case i:case r:case h:case p:return v;default:switch(v=v&&v.$$typeof,v){case d:case c:case f:case y:case x:case l:return v;default:return A}}case t:return A}}}return tt.ContextConsumer=c,tt.ContextProvider=l,tt.Element=e,tt.ForwardRef=f,tt.Fragment=n,tt.Lazy=y,tt.Memo=x,tt.Portal=t,tt.Profiler=i,tt.StrictMode=r,tt.Suspense=h,tt.SuspenseList=p,tt.isAsyncMode=function(){return!1},tt.isConcurrentMode=function(){return!1},tt.isContextConsumer=function(v){return S(v)===c},tt.isContextProvider=function(v){return S(v)===l},tt.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},tt.isForwardRef=function(v){return S(v)===f},tt.isFragment=function(v){return S(v)===n},tt.isLazy=function(v){return S(v)===y},tt.isMemo=function(v){return S(v)===x},tt.isPortal=function(v){return S(v)===t},tt.isProfiler=function(v){return S(v)===i},tt.isStrictMode=function(v){return S(v)===r},tt.isSuspense=function(v){return S(v)===h},tt.isSuspenseList=function(v){return S(v)===p},tt.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===i||v===r||v===h||v===p||v===j||typeof v=="object"&&v!==null&&(v.$$typeof===y||v.$$typeof===x||v.$$typeof===l||v.$$typeof===c||v.$$typeof===f||v.$$typeof===w||v.getModuleId!==void 0)},tt.typeOf=S,tt}var wC;function dK(){return wC||(wC=1,xv.exports=uK()),xv.exports}var fK=dK(),yv,SC;function o6(){if(SC)return yv;SC=1;var e=Ga(),t=Ka(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return yv=r,yv}var gv,NC;function hK(){if(NC)return gv;NC=1;var e=o6();function t(n){return e(n)&&n!=+n}return gv=t,gv}var mK=hK();const ad=st(mK);var pK=o6();const xK=st(pK);var wn=function(t){return t===0?0:t>0?1:-1},bs=function(t){return Es(t)&&t.indexOf("%")===t.length-1},he=function(t){return xK(t)&&!ad(t)},yK=function(t){return Pe(t)},Xt=function(t){return he(t)||Es(t)},gK=0,kl=function(t){var n=++gK;return"".concat(t||"").concat(n)},Sn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&!Es(t))return r;var l;if(bs(t)){var c=t.indexOf("%");l=n*parseFloat(t.slice(0,c))/100}else l=+t;return ad(l)&&(l=r),i&&l>n&&(l=n),l},_i=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},vK=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Yn=function(t,n){return he(t)&&he(n)?function(r){return t+r*(n-t)}:function(){return n}};function Dh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Zn(r,t))===n})}var bK=function(t,n){return he(t)&&he(n)?t-n:Es(t)&&Es(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Vo(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function tj(e){"@babel/helpers - typeof";return tj=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},tj(e)}var jK=["viewBox","children"],wK=["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"],AC=["points","pathLength"],vv={svg:jK,polygon:AC,polyline:AC},NS=["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"],zh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(M.isValidElement(t)&&(r=t.props),!Ml(r))return null;var i={};return Object.keys(r).forEach(function(l){NS.includes(l)&&(i[l]=n||function(c){return r[l](r,c)})}),i},SK=function(t,n,r){return function(i){return t(n,r,i),null}},Cs=function(t,n,r){if(!Ml(t)||tj(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(l){var c=t[l];NS.includes(l)&&typeof c=="function"&&(i||(i={}),i[l]=SK(c,n,r))}),i},NK=["children"],AK=["children"];function _C(e,t){if(e==null)return{};var n=_K(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _K(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nj(e){"@babel/helpers - typeof";return nj=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},nj(e)}var OC={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"},La=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},TC=null,bv=null,AS=function e(t){if(t===TC&&Array.isArray(bv))return bv;var n=[];return M.Children.forEach(t,function(r){Pe(r)||(fK.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),bv=n,TC=t,n};function Qn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return La(i)}):r=[La(t)],AS(e).forEach(function(i){var l=Zn(i,"type.displayName")||Zn(i,"type.name");r.indexOf(l)!==-1&&n.push(i)}),n}function Kn(e,t){var n=Qn(e,t);return n&&n[0]}var EC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!he(r)||r<=0||!he(i)||i<=0)},OK=["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"],TK=function(t){return t&&t.type&&Es(t.type)&&OK.indexOf(t.type)>=0},EK=function(t){return t&&nj(t)==="object"&&"clipDot"in t},CK=function(t,n,r,i){var l,c=(l=vv==null?void 0:vv[i])!==null&&l!==void 0?l:[];return n.startsWith("data-")||!Ee(t)&&(i&&c.includes(n)||wK.includes(n))||r&&NS.includes(n)},je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(M.isValidElement(t)&&(i=t.props),!Ml(i))return null;var l={};return Object.keys(i).forEach(function(c){var d;CK((d=i)===null||d===void 0?void 0:d[c],c,n,r)&&(l[c]=i[c])}),l},rj=function e(t,n){if(t===n)return!0;var r=M.Children.count(t);if(r!==M.Children.count(n))return!1;if(r===0)return!0;if(r===1)return CC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var l=t[i],c=n[i];if(Array.isArray(l)||Array.isArray(c)){if(!e(l,c))return!1}else if(!CC(l,c))return!1}return!0},CC=function(t,n){if(Pe(t)&&Pe(n))return!0;if(!Pe(t)&&!Pe(n)){var r=t.props||{},i=r.children,l=_C(r,NK),c=n.props||{},d=c.children,f=_C(c,AK);return i&&d?Vo(l,f)&&rj(i,d):!i&&!d?Vo(l,f):!1}return!1},MC=function(t,n){var r=[],i={};return AS(t).forEach(function(l,c){if(TK(l))r.push(l);else if(l){var d=La(l.type),f=n[d]||{},h=f.handler,p=f.once;if(h&&(!p||!i[d])){var x=h(l,d,c);r.push(x),i[d]=!0}}}),r},MK=function(t){var n=t&&t.type;return n&&OC[n]?OC[n]:null},kK=function(t,n){return AS(n).indexOf(t)},PK=["children","width","height","viewBox","className","style","title","desc"];function aj(){return aj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aj.apply(this,arguments)}function RK(e,t){if(e==null)return{};var n=DK(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ij(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,l=e.className,c=e.style,d=e.title,f=e.desc,h=RK(e,PK),p=i||{width:n,height:r,x:0,y:0},x=ze("recharts-surface",l);return V.createElement("svg",aj({},je(h,!0,"svg"),{className:x,width:n,height:r,style:c,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),V.createElement("title",null,d),V.createElement("desc",null,f),t)}var zK=["children","className"];function sj(){return sj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sj.apply(this,arguments)}function LK(e,t){if(e==null)return{};var n=$K(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $K(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ze=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=LK(e,zK),l=ze("recharts-layer",r);return V.createElement("g",sj({className:l},je(i,!0),{ref:t}),n)}),$r=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),l=2;l<r;l++)i[l-2]=arguments[l]},jv,kC;function BK(){if(kC)return jv;kC=1;function e(t,n,r){var i=-1,l=t.length;n<0&&(n=-n>l?0:l+n),r=r>l?l:r,r<0&&(r+=l),l=n>r?0:r-n>>>0,n>>>=0;for(var c=Array(l);++i<l;)c[i]=t[i+n];return c}return jv=e,jv}var wv,PC;function IK(){if(PC)return wv;PC=1;var e=BK();function t(n,r,i){var l=n.length;return i=i===void 0?l:i,!r&&i>=l?n:e(n,r,i)}return wv=t,wv}var Sv,RC;function l6(){if(RC)return Sv;RC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,l="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+e+i+l+"]");function f(h){return d.test(h)}return Sv=f,Sv}var Nv,DC;function qK(){if(DC)return Nv;DC=1;function e(t){return t.split("")}return Nv=e,Nv}var Av,zC;function UK(){if(zC)return Av;zC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,l="\\ufe0e\\ufe0f",c="["+e+"]",d="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+d+"|"+f+")",p="[^"+e+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",w=h+"?",S="["+l+"]?",v="(?:"+j+"(?:"+[p,x,y].join("|")+")"+S+w+")*",A=S+w+v,O="(?:"+[p+d+"?",d,x,y,c].join("|")+")",_=RegExp(f+"(?="+f+")|"+O+A,"g");function T(N){return N.match(_)||[]}return Av=T,Av}var _v,LC;function VK(){if(LC)return _v;LC=1;var e=qK(),t=l6(),n=UK();function r(i){return t(i)?n(i):e(i)}return _v=r,_v}var Ov,$C;function HK(){if($C)return Ov;$C=1;var e=IK(),t=l6(),n=VK(),r=a6();function i(l){return function(c){c=r(c);var d=t(c)?n(c):void 0,f=d?d[0]:c.charAt(0),h=d?e(d,1).join(""):c.slice(1);return f[l]()+h}}return Ov=i,Ov}var Tv,BC;function FK(){if(BC)return Tv;BC=1;var e=HK(),t=e("toUpperCase");return Tv=t,Tv}var GK=FK();const Zm=st(GK);function xt(e){return function(){return e}}const c6=Math.cos,Lh=Math.sin,qr=Math.sqrt,$h=Math.PI,Qm=2*$h,oj=Math.PI,lj=2*oj,ps=1e-6,KK=lj-ps;function u6(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function YK(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return u6;const n=10**t;return function(r){this._+=r[0];for(let i=1,l=r.length;i<l;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class XK{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?u6:YK(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,l,c){this._append`C${+t},${+n},${+r},${+i},${this._x1=+l},${this._y1=+c}`}arcTo(t,n,r,i,l){if(t=+t,n=+n,r=+r,i=+i,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,d=this._y1,f=r-t,h=i-n,p=c-t,x=d-n,y=p*p+x*x;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(y>ps)if(!(Math.abs(x*f-h*p)>ps)||!l)this._append`L${this._x1=t},${this._y1=n}`;else{let j=r-c,w=i-d,S=f*f+h*h,v=j*j+w*w,A=Math.sqrt(S),O=Math.sqrt(y),_=l*Math.tan((oj-Math.acos((S+y-v)/(2*A*O)))/2),T=_/O,N=_/A;Math.abs(T-1)>ps&&this._append`L${t+T*p},${n+T*x}`,this._append`A${l},${l},0,0,${+(x*j>p*w)},${this._x1=t+N*f},${this._y1=n+N*h}`}}arc(t,n,r,i,l,c){if(t=+t,n=+n,r=+r,c=!!c,r<0)throw new Error(`negative radius: ${r}`);let d=r*Math.cos(i),f=r*Math.sin(i),h=t+d,p=n+f,x=1^c,y=c?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>ps||Math.abs(this._y1-p)>ps)&&this._append`L${h},${p}`,r&&(y<0&&(y=y%lj+lj),y>KK?this._append`A${r},${r},0,1,${x},${t-d},${n-f}A${r},${r},0,1,${x},${this._x1=h},${this._y1=p}`:y>ps&&this._append`A${r},${r},0,${+(y>=oj)},${x},${this._x1=t+r*Math.cos(l)},${this._y1=n+r*Math.sin(l)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function _S(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new XK(t)}function OS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function d6(e){this._context=e}d6.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 Jm(e){return new d6(e)}function f6(e){return e[0]}function h6(e){return e[1]}function m6(e,t){var n=xt(!0),r=null,i=Jm,l=null,c=_S(d);e=typeof e=="function"?e:e===void 0?f6:xt(e),t=typeof t=="function"?t:t===void 0?h6:xt(t);function d(f){var h,p=(f=OS(f)).length,x,y=!1,j;for(r==null&&(l=i(j=c())),h=0;h<=p;++h)!(h<p&&n(x=f[h],h,f))===y&&((y=!y)?l.lineStart():l.lineEnd()),y&&l.point(+e(x,h,f),+t(x,h,f));if(j)return l=null,j+""||null}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:xt(+f),d):e},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:xt(+f),d):t},d.defined=function(f){return arguments.length?(n=typeof f=="function"?f:xt(!!f),d):n},d.curve=function(f){return arguments.length?(i=f,r!=null&&(l=i(r)),d):i},d.context=function(f){return arguments.length?(f==null?r=l=null:l=i(r=f),d):r},d}function Gf(e,t,n){var r=null,i=xt(!0),l=null,c=Jm,d=null,f=_S(h);e=typeof e=="function"?e:e===void 0?f6:xt(+e),t=typeof t=="function"?t:xt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?h6:xt(+n);function h(x){var y,j,w,S=(x=OS(x)).length,v,A=!1,O,_=new Array(S),T=new Array(S);for(l==null&&(d=c(O=f())),y=0;y<=S;++y){if(!(y<S&&i(v=x[y],y,x))===A)if(A=!A)j=y,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),w=y-1;w>=j;--w)d.point(_[w],T[w]);d.lineEnd(),d.areaEnd()}A&&(_[y]=+e(v,y,x),T[y]=+t(v,y,x),d.point(r?+r(v,y,x):_[y],n?+n(v,y,x):T[y]))}if(O)return d=null,O+""||null}function p(){return m6().defined(i).curve(c).context(l)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),r=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),h):e},h.x1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:xt(+x),h):r},h.y=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),n=null,h):t},h.y0=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),h):t},h.y1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:xt(+x),h):n},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(n)},h.lineX1=function(){return p().x(r).y(t)},h.defined=function(x){return arguments.length?(i=typeof x=="function"?x:xt(!!x),h):i},h.curve=function(x){return arguments.length?(c=x,l!=null&&(d=c(l)),h):c},h.context=function(x){return arguments.length?(x==null?l=d=null:d=c(l=x),h):l},h}class p6{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function WK(e){return new p6(e,!0)}function ZK(e){return new p6(e,!1)}const TS={draw(e,t){const n=qr(t/$h);e.moveTo(n,0),e.arc(0,0,n,0,Qm)}},QK={draw(e,t){const n=qr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},x6=qr(1/3),JK=x6*2,eY={draw(e,t){const n=qr(t/JK),r=n*x6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},tY={draw(e,t){const n=qr(t),r=-n/2;e.rect(r,r,n,n)}},nY=.8908130915292852,y6=Lh($h/10)/Lh(7*$h/10),rY=Lh(Qm/10)*y6,aY=-c6(Qm/10)*y6,iY={draw(e,t){const n=qr(t*nY),r=rY*n,i=aY*n;e.moveTo(0,-n),e.lineTo(r,i);for(let l=1;l<5;++l){const c=Qm*l/5,d=c6(c),f=Lh(c);e.lineTo(f*n,-d*n),e.lineTo(d*r-f*i,f*r+d*i)}e.closePath()}},Ev=qr(3),sY={draw(e,t){const n=-qr(t/(Ev*3));e.moveTo(0,n*2),e.lineTo(-Ev*n,-n),e.lineTo(Ev*n,-n),e.closePath()}},ur=-.5,dr=qr(3)/2,cj=1/qr(12),oY=(cj/2+1)*3,lY={draw(e,t){const n=qr(t/oY),r=n/2,i=n*cj,l=r,c=n*cj+n,d=-l,f=c;e.moveTo(r,i),e.lineTo(l,c),e.lineTo(d,f),e.lineTo(ur*r-dr*i,dr*r+ur*i),e.lineTo(ur*l-dr*c,dr*l+ur*c),e.lineTo(ur*d-dr*f,dr*d+ur*f),e.lineTo(ur*r+dr*i,ur*i-dr*r),e.lineTo(ur*l+dr*c,ur*c-dr*l),e.lineTo(ur*d+dr*f,ur*f-dr*d),e.closePath()}};function cY(e,t){let n=null,r=_S(i);e=typeof e=="function"?e:xt(e||TS),t=typeof t=="function"?t:xt(t===void 0?64:+t);function i(){let l;if(n||(n=l=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),l)return n=null,l+""||null}return i.type=function(l){return arguments.length?(e=typeof l=="function"?l:xt(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:xt(+l),i):t},i.context=function(l){return arguments.length?(n=l??null,i):n},i}function Bh(){}function Ih(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function g6(e){this._context=e}g6.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:Ih(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:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uY(e){return new g6(e)}function v6(e){this._context=e}v6.prototype={areaStart:Bh,areaEnd:Bh,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:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dY(e){return new v6(e)}function b6(e){this._context=e}b6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fY(e){return new b6(e)}function j6(e){this._context=e}j6.prototype={areaStart:Bh,areaEnd:Bh,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 hY(e){return new j6(e)}function IC(e){return e<0?-1:1}function qC(e,t,n){var r=e._x1-e._x0,i=t-e._x1,l=(e._y1-e._y0)/(r||i<0&&-0),c=(n-e._y1)/(i||r<0&&-0),d=(l*i+c*r)/(r+i);return(IC(l)+IC(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(d))||0}function UC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Cv(e,t,n){var r=e._x0,i=e._y0,l=e._x1,c=e._y1,d=(l-r)/3;e._context.bezierCurveTo(r+d,i+d*t,l-d,c-d*n,l,c)}function qh(e){this._context=e}qh.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:Cv(this,this._t0,UC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Cv(this,UC(this,n=qC(this,e,t)),n);break;default:Cv(this,this._t0,n=qC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function w6(e){this._context=new S6(e)}(w6.prototype=Object.create(qh.prototype)).point=function(e,t){qh.prototype.point.call(this,t,e)};function S6(e){this._context=e}S6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,l){this._context.bezierCurveTo(t,e,r,n,l,i)}};function mY(e){return new qh(e)}function pY(e){return new w6(e)}function N6(e){this._context=e}N6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VC(e),i=VC(t),l=0,c=1;c<n;++l,++c)this._context.bezierCurveTo(r[0][l],i[0][l],r[1][l],i[1][l],e[c],t[c]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function VC(e){var t,n=e.length-1,r,i=new Array(n),l=new Array(n),c=new Array(n);for(i[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,l[n-1]=7,c[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/l[t-1],l[t]-=r,c[t]-=r*c[t-1];for(i[n-1]=c[n-1]/l[n-1],t=n-2;t>=0;--t)i[t]=(c[t]-i[t+1])/l[t];for(l[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)l[t]=2*e[t+1]-i[t+1];return[i,l]}function xY(e){return new N6(e)}function ep(e,t){this._context=e,this._t=t}ep.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function yY(e){return new ep(e,.5)}function gY(e){return new ep(e,0)}function vY(e){return new ep(e,1)}function Xo(e,t){if((c=e.length)>1)for(var n=1,r,i,l=e[t[0]],c,d=l.length;n<c;++n)for(i=l,l=e[t[n]],r=0;r<d;++r)l[r][1]+=l[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function uj(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bY(e,t){return e[t]}function jY(e){const t=[];return t.key=e,t}function wY(){var e=xt([]),t=uj,n=Xo,r=bY;function i(l){var c=Array.from(e.apply(this,arguments),jY),d,f=c.length,h=-1,p;for(const x of l)for(d=0,++h;d<f;++d)(c[d][h]=[0,+r(x,c[d].key,h,l)]).data=x;for(d=0,p=OS(t(c));d<f;++d)c[p[d]].index=d;return n(c,p),c}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:xt(Array.from(l)),i):e},i.value=function(l){return arguments.length?(r=typeof l=="function"?l:xt(+l),i):r},i.order=function(l){return arguments.length?(t=l==null?uj:typeof l=="function"?l:xt(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(n=l??Xo,i):n},i}function SY(e,t){if((r=e.length)>0){for(var n,r,i=0,l=e[0].length,c;i<l;++i){for(c=n=0;n<r;++n)c+=e[n][i][1]||0;if(c)for(n=0;n<r;++n)e[n][i][1]/=c}Xo(e,t)}}function NY(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,l=r.length;n<l;++n){for(var c=0,d=0;c<i;++c)d+=e[c][n][1]||0;r[n][1]+=r[n][0]=-d/2}Xo(e,t)}}function AY(e,t){if(!(!((c=e.length)>0)||!((l=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,l,c;r<l;++r){for(var d=0,f=0,h=0;d<c;++d){for(var p=e[t[d]],x=p[r][1]||0,y=p[r-1][1]||0,j=(x-y)/2,w=0;w<d;++w){var S=e[t[w]],v=S[r][1]||0,A=S[r-1][1]||0;j+=v-A}f+=x,h+=j*x}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,Xo(e,t)}}function pu(e){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}var _Y=["type","size","sizeType"];function dj(){return dj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dj.apply(this,arguments)}function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(r){OY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OY(e,t,n){return t=TY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TY(e){var t=EY(e,"string");return pu(t)=="symbol"?t:t+""}function EY(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CY(e,t){if(e==null)return{};var n=MY(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var A6={symbolCircle:TS,symbolCross:QK,symbolDiamond:eY,symbolSquare:tY,symbolStar:iY,symbolTriangle:sY,symbolWye:lY},kY=Math.PI/180,PY=function(t){var n="symbol".concat(Zm(t));return A6[n]||TS},RY=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*kY;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}},DY=function(t,n){A6["symbol".concat(Zm(t))]=n},ES=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,l=i===void 0?64:i,c=t.sizeType,d=c===void 0?"area":c,f=CY(t,_Y),h=FC(FC({},f),{},{type:r,size:l,sizeType:d}),p=function(){var v=PY(r),A=cY().type(v).size(RY(l,d,r));return A()},x=h.className,y=h.cx,j=h.cy,w=je(h,!0);return y===+y&&j===+j&&l===+l?V.createElement("path",dj({},w,{className:ze("recharts-symbols",x),transform:"translate(".concat(y,", ").concat(j,")"),d:p()})):null};ES.registerSymbol=DY;function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function fj(){return fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fj.apply(this,arguments)}function GC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(n),!0).forEach(function(r){xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O6(r.key),r)}}function BY(e,t,n){return t&&$Y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IY(e,t,n){return t=Uh(t),qY(e,_6()?Reflect.construct(t,n||[],Uh(e).constructor):t.apply(e,n))}function qY(e,t){if(t&&(Wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UY(e)}function UY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_6=function(){return!!e})()}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uh(e)}function VY(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&&hj(e,t)}function hj(e,t){return hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hj(e,t)}function xu(e,t,n){return t=O6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O6(e){var t=HY(e,"string");return Wo(t)=="symbol"?t:t+""}function HY(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fr=32,CS=(function(e){function t(){return LY(this,t),IY(this,t,arguments)}return VY(t,e),BY(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,l=fr/2,c=fr/6,d=fr/3,f=r.inactive?i:r.color;if(r.type==="plainline")return V.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:l,x2:fr,y2:l,className:"recharts-legend-icon"});if(r.type==="line")return V.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(l,"h").concat(d,`
|
||
A`).concat(c,",").concat(c,",0,1,1,").concat(2*d,",").concat(l,`
|
||
H`).concat(fr,"M").concat(2*d,",").concat(l,`
|
||
A`).concat(c,",").concat(c,",0,1,1,").concat(d,",").concat(l),className:"recharts-legend-icon"});if(r.type==="rect")return V.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(fr/8,"h").concat(fr,"v").concat(fr*3/4,"h").concat(-fr,"z"),className:"recharts-legend-icon"});if(V.isValidElement(r.legendIcon)){var h=zY({},r);return delete h.legendIcon,V.cloneElement(r.legendIcon,h)}return V.createElement(ES,{fill:f,cx:l,cy:l,size:fr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,l=i.payload,c=i.iconSize,d=i.layout,f=i.formatter,h=i.inactiveColor,p={x:0,y:0,width:fr,height:fr},x={display:d==="horizontal"?"inline-block":"block",marginRight:10},y={display:"inline-block",verticalAlign:"middle",marginRight:4};return l.map(function(j,w){var S=j.formatter||f,v=ze(xu(xu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",j.inactive));if(j.type==="none")return null;var A=Ee(j.value)?null:j.value;$r(!Ee(j.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var O=j.inactive?h:j.color;return V.createElement("li",fj({className:v,style:x,key:"legend-item-".concat(w)},Cs(r.props,j,w)),V.createElement(ij,{width:c,height:c,viewBox:p,style:y},r.renderIcon(j)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},S?S(A,j,w):A))})}},{key:"render",value:function(){var r=this.props,i=r.payload,l=r.layout,c=r.align;if(!i||!i.length)return null;var d={padding:0,margin:0,textAlign:l==="horizontal"?c:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:d},this.renderItems())}}])})(M.PureComponent);xu(CS,"displayName","Legend");xu(CS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Mv,KC;function FY(){if(KC)return Mv;KC=1;var e=Ym();function t(){this.__data__=new e,this.size=0}return Mv=t,Mv}var kv,YC;function GY(){if(YC)return kv;YC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return kv=e,kv}var Pv,XC;function KY(){if(XC)return Pv;XC=1;function e(t){return this.__data__.get(t)}return Pv=e,Pv}var Rv,WC;function YY(){if(WC)return Rv;WC=1;function e(t){return this.__data__.has(t)}return Rv=e,Rv}var Dv,ZC;function XY(){if(ZC)return Dv;ZC=1;var e=Ym(),t=bS(),n=jS(),r=200;function i(l,c){var d=this.__data__;if(d instanceof e){var f=d.__data__;if(!t||f.length<r-1)return f.push([l,c]),this.size=++d.size,this;d=this.__data__=new n(f)}return d.set(l,c),this.size=d.size,this}return Dv=i,Dv}var zv,QC;function T6(){if(QC)return zv;QC=1;var e=Ym(),t=FY(),n=GY(),r=KY(),i=YY(),l=XY();function c(d){var f=this.__data__=new e(d);this.size=f.size}return c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=r,c.prototype.has=i,c.prototype.set=l,zv=c,zv}var Lv,JC;function WY(){if(JC)return Lv;JC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Lv=t,Lv}var $v,eM;function ZY(){if(eM)return $v;eM=1;function e(t){return this.__data__.has(t)}return $v=e,$v}var Bv,tM;function E6(){if(tM)return Bv;tM=1;var e=jS(),t=WY(),n=ZY();function r(i){var l=-1,c=i==null?0:i.length;for(this.__data__=new e;++l<c;)this.add(i[l])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Bv=r,Bv}var Iv,nM;function C6(){if(nM)return Iv;nM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Iv=e,Iv}var qv,rM;function M6(){if(rM)return qv;rM=1;function e(t,n){return t.has(n)}return qv=e,qv}var Uv,aM;function k6(){if(aM)return Uv;aM=1;var e=E6(),t=C6(),n=M6(),r=1,i=2;function l(c,d,f,h,p,x){var y=f&r,j=c.length,w=d.length;if(j!=w&&!(y&&w>j))return!1;var S=x.get(c),v=x.get(d);if(S&&v)return S==d&&v==c;var A=-1,O=!0,_=f&i?new e:void 0;for(x.set(c,d),x.set(d,c);++A<j;){var T=c[A],N=d[A];if(h)var E=y?h(N,T,A,d,c,x):h(T,N,A,c,d,x);if(E!==void 0){if(E)continue;O=!1;break}if(_){if(!t(d,function(k,R){if(!n(_,R)&&(T===k||p(T,k,f,h,x)))return _.push(R)})){O=!1;break}}else if(!(T===N||p(T,N,f,h,x))){O=!1;break}}return x.delete(c),x.delete(d),O}return Uv=l,Uv}var Vv,iM;function QY(){if(iM)return Vv;iM=1;var e=ia(),t=e.Uint8Array;return Vv=t,Vv}var Hv,sM;function JY(){if(sM)return Hv;sM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,l){r[++n]=[l,i]}),r}return Hv=e,Hv}var Fv,oM;function MS(){if(oM)return Fv;oM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Fv=e,Fv}var Gv,lM;function eX(){if(lM)return Gv;lM=1;var e=rd(),t=QY(),n=vS(),r=k6(),i=JY(),l=MS(),c=1,d=2,f="[object Boolean]",h="[object Date]",p="[object Error]",x="[object Map]",y="[object Number]",j="[object RegExp]",w="[object Set]",S="[object String]",v="[object Symbol]",A="[object ArrayBuffer]",O="[object DataView]",_=e?e.prototype:void 0,T=_?_.valueOf:void 0;function N(E,k,R,B,D,z,$){switch(R){case O:if(E.byteLength!=k.byteLength||E.byteOffset!=k.byteOffset)return!1;E=E.buffer,k=k.buffer;case A:return!(E.byteLength!=k.byteLength||!z(new t(E),new t(k)));case f:case h:case y:return n(+E,+k);case p:return E.name==k.name&&E.message==k.message;case j:case S:return E==k+"";case x:var L=i;case w:var K=B&c;if(L||(L=l),E.size!=k.size&&!K)return!1;var H=$.get(E);if(H)return H==k;B|=d,$.set(E,k);var I=r(L(E),L(k),B,D,z,$);return $.delete(E),I;case v:if(T)return T.call(E)==T.call(k)}return!1}return Gv=N,Gv}var Kv,cM;function P6(){if(cM)return Kv;cM=1;function e(t,n){for(var r=-1,i=n.length,l=t.length;++r<i;)t[l+r]=n[r];return t}return Kv=e,Kv}var Yv,uM;function tX(){if(uM)return Yv;uM=1;var e=P6(),t=Dn();function n(r,i,l){var c=i(r);return t(r)?c:e(c,l(r))}return Yv=n,Yv}var Xv,dM;function nX(){if(dM)return Xv;dM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,l=0,c=[];++r<i;){var d=t[r];n(d,r,t)&&(c[l++]=d)}return c}return Xv=e,Xv}var Wv,fM;function rX(){if(fM)return Wv;fM=1;function e(){return[]}return Wv=e,Wv}var Zv,hM;function aX(){if(hM)return Zv;hM=1;var e=nX(),t=rX(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(c){return c==null?[]:(c=Object(c),e(i(c),function(d){return r.call(c,d)}))}:t;return Zv=l,Zv}var Qv,mM;function iX(){if(mM)return Qv;mM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Qv=e,Qv}var Jv,pM;function sX(){if(pM)return Jv;pM=1;var e=Ga(),t=Ka(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Jv=r,Jv}var eb,xM;function kS(){if(xM)return eb;xM=1;var e=sX(),t=Ka(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,l=e((function(){return arguments})())?e:function(c){return t(c)&&r.call(c,"callee")&&!i.call(c,"callee")};return eb=l,eb}var Yc={exports:{}},tb,yM;function oX(){if(yM)return tb;yM=1;function e(){return!1}return tb=e,tb}Yc.exports;var gM;function R6(){return gM||(gM=1,(function(e,t){var n=ia(),r=oX(),i=t&&!t.nodeType&&t,l=i&&!0&&e&&!e.nodeType&&e,c=l&&l.exports===i,d=c?n.Buffer:void 0,f=d?d.isBuffer:void 0,h=f||r;e.exports=h})(Yc,Yc.exports)),Yc.exports}var nb,vM;function PS(){if(vM)return nb;vM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var l=typeof r;return i=i??e,!!i&&(l=="number"||l!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return nb=n,nb}var rb,bM;function RS(){if(bM)return rb;bM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return rb=t,rb}var ab,jM;function lX(){if(jM)return ab;jM=1;var e=Ga(),t=RS(),n=Ka(),r="[object Arguments]",i="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",x="[object Object]",y="[object RegExp]",j="[object Set]",w="[object String]",S="[object WeakMap]",v="[object ArrayBuffer]",A="[object DataView]",O="[object Float32Array]",_="[object Float64Array]",T="[object Int8Array]",N="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",R="[object Uint8ClampedArray]",B="[object Uint16Array]",D="[object Uint32Array]",z={};z[O]=z[_]=z[T]=z[N]=z[E]=z[k]=z[R]=z[B]=z[D]=!0,z[r]=z[i]=z[v]=z[l]=z[A]=z[c]=z[d]=z[f]=z[h]=z[p]=z[x]=z[y]=z[j]=z[w]=z[S]=!1;function $(L){return n(L)&&t(L.length)&&!!z[e(L)]}return ab=$,ab}var ib,wM;function D6(){if(wM)return ib;wM=1;function e(t){return function(n){return t(n)}}return ib=e,ib}var Xc={exports:{}};Xc.exports;var SM;function cX(){return SM||(SM=1,(function(e,t){var n=t6(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===r,c=l&&n.process,d=(function(){try{var f=i&&i.require&&i.require("util").types;return f||c&&c.binding&&c.binding("util")}catch{}})();e.exports=d})(Xc,Xc.exports)),Xc.exports}var sb,NM;function z6(){if(NM)return sb;NM=1;var e=lX(),t=D6(),n=cX(),r=n&&n.isTypedArray,i=r?t(r):e;return sb=i,sb}var ob,AM;function uX(){if(AM)return ob;AM=1;var e=iX(),t=kS(),n=Dn(),r=R6(),i=PS(),l=z6(),c=Object.prototype,d=c.hasOwnProperty;function f(h,p){var x=n(h),y=!x&&t(h),j=!x&&!y&&r(h),w=!x&&!y&&!j&&l(h),S=x||y||j||w,v=S?e(h.length,String):[],A=v.length;for(var O in h)(p||d.call(h,O))&&!(S&&(O=="length"||j&&(O=="offset"||O=="parent")||w&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,A)))&&v.push(O);return v}return ob=f,ob}var lb,_M;function dX(){if(_M)return lb;_M=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return lb=t,lb}var cb,OM;function L6(){if(OM)return cb;OM=1;function e(t,n){return function(r){return t(n(r))}}return cb=e,cb}var ub,TM;function fX(){if(TM)return ub;TM=1;var e=L6(),t=e(Object.keys,Object);return ub=t,ub}var db,EM;function hX(){if(EM)return db;EM=1;var e=dX(),t=fX(),n=Object.prototype,r=n.hasOwnProperty;function i(l){if(!e(l))return t(l);var c=[];for(var d in Object(l))r.call(l,d)&&d!="constructor"&&c.push(d);return c}return db=i,db}var fb,CM;function id(){if(CM)return fb;CM=1;var e=gS(),t=RS();function n(r){return r!=null&&t(r.length)&&!e(r)}return fb=n,fb}var hb,MM;function tp(){if(MM)return hb;MM=1;var e=uX(),t=hX(),n=id();function r(i){return n(i)?e(i):t(i)}return hb=r,hb}var mb,kM;function mX(){if(kM)return mb;kM=1;var e=tX(),t=aX(),n=tp();function r(i){return e(i,n,t)}return mb=r,mb}var pb,PM;function pX(){if(PM)return pb;PM=1;var e=mX(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(l,c,d,f,h,p){var x=d&t,y=e(l),j=y.length,w=e(c),S=w.length;if(j!=S&&!x)return!1;for(var v=j;v--;){var A=y[v];if(!(x?A in c:r.call(c,A)))return!1}var O=p.get(l),_=p.get(c);if(O&&_)return O==c&&_==l;var T=!0;p.set(l,c),p.set(c,l);for(var N=x;++v<j;){A=y[v];var E=l[A],k=c[A];if(f)var R=x?f(k,E,A,c,l,p):f(E,k,A,l,c,p);if(!(R===void 0?E===k||h(E,k,d,f,p):R)){T=!1;break}N||(N=A=="constructor")}if(T&&!N){var B=l.constructor,D=c.constructor;B!=D&&"constructor"in l&&"constructor"in c&&!(typeof B=="function"&&B instanceof B&&typeof D=="function"&&D instanceof D)&&(T=!1)}return p.delete(l),p.delete(c),T}return pb=i,pb}var xb,RM;function xX(){if(RM)return xb;RM=1;var e=zs(),t=ia(),n=e(t,"DataView");return xb=n,xb}var yb,DM;function yX(){if(DM)return yb;DM=1;var e=zs(),t=ia(),n=e(t,"Promise");return yb=n,yb}var gb,zM;function $6(){if(zM)return gb;zM=1;var e=zs(),t=ia(),n=e(t,"Set");return gb=n,gb}var vb,LM;function gX(){if(LM)return vb;LM=1;var e=zs(),t=ia(),n=e(t,"WeakMap");return vb=n,vb}var bb,$M;function vX(){if($M)return bb;$M=1;var e=xX(),t=bS(),n=yX(),r=$6(),i=gX(),l=Ga(),c=n6(),d="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",x="[object WeakMap]",y="[object DataView]",j=c(e),w=c(t),S=c(n),v=c(r),A=c(i),O=l;return(e&&O(new e(new ArrayBuffer(1)))!=y||t&&O(new t)!=d||n&&O(n.resolve())!=h||r&&O(new r)!=p||i&&O(new i)!=x)&&(O=function(_){var T=l(_),N=T==f?_.constructor:void 0,E=N?c(N):"";if(E)switch(E){case j:return y;case w:return d;case S:return h;case v:return p;case A:return x}return T}),bb=O,bb}var jb,BM;function bX(){if(BM)return jb;BM=1;var e=T6(),t=k6(),n=eX(),r=pX(),i=vX(),l=Dn(),c=R6(),d=z6(),f=1,h="[object Arguments]",p="[object Array]",x="[object Object]",y=Object.prototype,j=y.hasOwnProperty;function w(S,v,A,O,_,T){var N=l(S),E=l(v),k=N?p:i(S),R=E?p:i(v);k=k==h?x:k,R=R==h?x:R;var B=k==x,D=R==x,z=k==R;if(z&&c(S)){if(!c(v))return!1;N=!0,B=!1}if(z&&!B)return T||(T=new e),N||d(S)?t(S,v,A,O,_,T):n(S,v,k,A,O,_,T);if(!(A&f)){var $=B&&j.call(S,"__wrapped__"),L=D&&j.call(v,"__wrapped__");if($||L){var K=$?S.value():S,H=L?v.value():v;return T||(T=new e),_(K,H,A,O,T)}}return z?(T||(T=new e),r(S,v,A,O,_,T)):!1}return jb=w,jb}var wb,IM;function DS(){if(IM)return wb;IM=1;var e=bX(),t=Ka();function n(r,i,l,c,d){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,l,c,n,d)}return wb=n,wb}var Sb,qM;function jX(){if(qM)return Sb;qM=1;var e=T6(),t=DS(),n=1,r=2;function i(l,c,d,f){var h=d.length,p=h,x=!f;if(l==null)return!p;for(l=Object(l);h--;){var y=d[h];if(x&&y[2]?y[1]!==l[y[0]]:!(y[0]in l))return!1}for(;++h<p;){y=d[h];var j=y[0],w=l[j],S=y[1];if(x&&y[2]){if(w===void 0&&!(j in l))return!1}else{var v=new e;if(f)var A=f(w,S,j,l,c,v);if(!(A===void 0?t(S,w,n|r,f,v):A))return!1}}return!0}return Sb=i,Sb}var Nb,UM;function B6(){if(UM)return Nb;UM=1;var e=Ii();function t(n){return n===n&&!e(n)}return Nb=t,Nb}var Ab,VM;function wX(){if(VM)return Ab;VM=1;var e=B6(),t=tp();function n(r){for(var i=t(r),l=i.length;l--;){var c=i[l],d=r[c];i[l]=[c,d,e(d)]}return i}return Ab=n,Ab}var _b,HM;function I6(){if(HM)return _b;HM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return _b=e,_b}var Ob,FM;function SX(){if(FM)return Ob;FM=1;var e=jX(),t=wX(),n=I6();function r(i){var l=t(i);return l.length==1&&l[0][2]?n(l[0][0],l[0][1]):function(c){return c===i||e(c,i,l)}}return Ob=r,Ob}var Tb,GM;function NX(){if(GM)return Tb;GM=1;function e(t,n){return t!=null&&n in Object(t)}return Tb=e,Tb}var Eb,KM;function AX(){if(KM)return Eb;KM=1;var e=i6(),t=kS(),n=Dn(),r=PS(),i=RS(),l=Wm();function c(d,f,h){f=e(f,d);for(var p=-1,x=f.length,y=!1;++p<x;){var j=l(f[p]);if(!(y=d!=null&&h(d,j)))break;d=d[j]}return y||++p!=x?y:(x=d==null?0:d.length,!!x&&i(x)&&r(j,x)&&(n(d)||t(d)))}return Eb=c,Eb}var Cb,YM;function _X(){if(YM)return Cb;YM=1;var e=NX(),t=AX();function n(r,i){return r!=null&&t(r,i,e)}return Cb=n,Cb}var Mb,XM;function OX(){if(XM)return Mb;XM=1;var e=DS(),t=s6(),n=_X(),r=yS(),i=B6(),l=I6(),c=Wm(),d=1,f=2;function h(p,x){return r(p)&&i(x)?l(c(p),x):function(y){var j=t(y,p);return j===void 0&&j===x?n(y,p):e(x,j,d|f)}}return Mb=h,Mb}var kb,WM;function Pl(){if(WM)return kb;WM=1;function e(t){return t}return kb=e,kb}var Pb,ZM;function TX(){if(ZM)return Pb;ZM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Pb=e,Pb}var Rb,QM;function EX(){if(QM)return Rb;QM=1;var e=SS();function t(n){return function(r){return e(r,n)}}return Rb=t,Rb}var Db,JM;function CX(){if(JM)return Db;JM=1;var e=TX(),t=EX(),n=yS(),r=Wm();function i(l){return n(l)?e(r(l)):t(l)}return Db=i,Db}var zb,ek;function sa(){if(ek)return zb;ek=1;var e=SX(),t=OX(),n=Pl(),r=Dn(),i=CX();function l(c){return typeof c=="function"?c:c==null?n:typeof c=="object"?r(c)?t(c[0],c[1]):e(c):i(c)}return zb=l,zb}var Lb,tk;function q6(){if(tk)return Lb;tk=1;function e(t,n,r,i){for(var l=t.length,c=r+(i?1:-1);i?c--:++c<l;)if(n(t[c],c,t))return c;return-1}return Lb=e,Lb}var $b,nk;function MX(){if(nk)return $b;nk=1;function e(t){return t!==t}return $b=e,$b}var Bb,rk;function kX(){if(rk)return Bb;rk=1;function e(t,n,r){for(var i=r-1,l=t.length;++i<l;)if(t[i]===n)return i;return-1}return Bb=e,Bb}var Ib,ak;function PX(){if(ak)return Ib;ak=1;var e=q6(),t=MX(),n=kX();function r(i,l,c){return l===l?n(i,l,c):e(i,t,c)}return Ib=r,Ib}var qb,ik;function RX(){if(ik)return qb;ik=1;var e=PX();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return qb=t,qb}var Ub,sk;function DX(){if(sk)return Ub;sk=1;function e(t,n,r){for(var i=-1,l=t==null?0:t.length;++i<l;)if(r(n,t[i]))return!0;return!1}return Ub=e,Ub}var Vb,ok;function zX(){if(ok)return Vb;ok=1;function e(){}return Vb=e,Vb}var Hb,lk;function LX(){if(lk)return Hb;lk=1;var e=$6(),t=zX(),n=MS(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(l){return new e(l)}:t;return Hb=i,Hb}var Fb,ck;function $X(){if(ck)return Fb;ck=1;var e=E6(),t=RX(),n=DX(),r=M6(),i=LX(),l=MS(),c=200;function d(f,h,p){var x=-1,y=t,j=f.length,w=!0,S=[],v=S;if(p)w=!1,y=n;else if(j>=c){var A=h?null:i(f);if(A)return l(A);w=!1,y=r,v=new e}else v=h?[]:S;e:for(;++x<j;){var O=f[x],_=h?h(O):O;if(O=p||O!==0?O:0,w&&_===_){for(var T=v.length;T--;)if(v[T]===_)continue e;h&&v.push(_),S.push(O)}else y(v,_,p)||(v!==S&&v.push(_),S.push(O))}return S}return Fb=d,Fb}var Gb,uk;function BX(){if(uk)return Gb;uk=1;var e=sa(),t=$X();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Gb=n,Gb}var IX=BX();const dk=st(IX);function U6(e,t,n){return t===!0?dk(e,n):Ee(t)?dk(e,t):e}function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}var qX=["ref"];function fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fk(Object(n),!0).forEach(function(r){np(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H6(r.key),r)}}function VX(e,t,n){return t&&hk(e.prototype,t),n&&hk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HX(e,t,n){return t=Vh(t),FX(e,V6()?Reflect.construct(t,n||[],Vh(e).constructor):t.apply(e,n))}function FX(e,t){if(t&&(Zo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GX(e)}function GX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V6=function(){return!!e})()}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vh(e)}function KX(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&&mj(e,t)}function mj(e,t){return mj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mj(e,t)}function np(e,t,n){return t=H6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H6(e){var t=YX(e,"string");return Zo(t)=="symbol"?t:t+""}function YX(e,t){if(Zo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function XX(e,t){if(e==null)return{};var n=WX(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZX(e){return e.value}function QX(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=XX(t,qX);return V.createElement(CS,n)}var mk=1,Ho=(function(e){function t(){var n;UX(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=HX(this,t,[].concat(i)),np(n,"lastBoundingBox",{width:-1,height:-1}),n}return KX(t,e),VX(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>mk||Math.abs(i.height-this.lastBoundingBox.height)>mk)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Oa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,l=i.layout,c=i.align,d=i.verticalAlign,f=i.margin,h=i.chartWidth,p=i.chartHeight,x,y;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(c==="center"&&l==="vertical"){var j=this.getBBoxSnapshot();x={left:((h||0)-j.width)/2}}else x=c==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(d==="middle"){var w=this.getBBoxSnapshot();y={top:((p||0)-w.height)/2}}else y=d==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Oa(Oa({},x),y)}},{key:"render",value:function(){var r=this,i=this.props,l=i.content,c=i.width,d=i.height,f=i.wrapperStyle,h=i.payloadUniqBy,p=i.payload,x=Oa(Oa({position:"absolute",width:c||"auto",height:d||"auto"},this.getDefaultPosition(f)),f);return V.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:function(j){r.wrapperNode=j}},QX(l,Oa(Oa({},this.props),{},{payload:U6(p,h,ZX)})))}}],[{key:"getWithHeight",value:function(r,i){var l=Oa(Oa({},this.defaultProps),r.props),c=l.layout;return c==="vertical"&&he(r.props.height)?{height:r.props.height}:c==="horizontal"?{width:r.props.width||i}:null}}])})(M.PureComponent);np(Ho,"displayName","Legend");np(Ho,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Kb,pk;function JX(){if(pk)return Kb;pk=1;var e=rd(),t=kS(),n=Dn(),r=e?e.isConcatSpreadable:void 0;function i(l){return n(l)||t(l)||!!(r&&l&&l[r])}return Kb=i,Kb}var Yb,xk;function F6(){if(xk)return Yb;xk=1;var e=P6(),t=JX();function n(r,i,l,c,d){var f=-1,h=r.length;for(l||(l=t),d||(d=[]);++f<h;){var p=r[f];i>0&&l(p)?i>1?n(p,i-1,l,c,d):e(d,p):c||(d[d.length]=p)}return d}return Yb=n,Yb}var Xb,yk;function eW(){if(yk)return Xb;yk=1;function e(t){return function(n,r,i){for(var l=-1,c=Object(n),d=i(n),f=d.length;f--;){var h=d[t?f:++l];if(r(c[h],h,c)===!1)break}return n}}return Xb=e,Xb}var Wb,gk;function tW(){if(gk)return Wb;gk=1;var e=eW(),t=e();return Wb=t,Wb}var Zb,vk;function G6(){if(vk)return Zb;vk=1;var e=tW(),t=tp();function n(r,i){return r&&e(r,i,t)}return Zb=n,Zb}var Qb,bk;function nW(){if(bk)return Qb;bk=1;var e=id();function t(n,r){return function(i,l){if(i==null)return i;if(!e(i))return n(i,l);for(var c=i.length,d=r?c:-1,f=Object(i);(r?d--:++d<c)&&l(f[d],d,f)!==!1;);return i}}return Qb=t,Qb}var Jb,jk;function zS(){if(jk)return Jb;jk=1;var e=G6(),t=nW(),n=t(e);return Jb=n,Jb}var e0,wk;function K6(){if(wk)return e0;wk=1;var e=zS(),t=id();function n(r,i){var l=-1,c=t(r)?Array(r.length):[];return e(r,function(d,f,h){c[++l]=i(d,f,h)}),c}return e0=n,e0}var t0,Sk;function rW(){if(Sk)return t0;Sk=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return t0=e,t0}var n0,Nk;function aW(){if(Nk)return n0;Nk=1;var e=Cl();function t(n,r){if(n!==r){var i=n!==void 0,l=n===null,c=n===n,d=e(n),f=r!==void 0,h=r===null,p=r===r,x=e(r);if(!h&&!x&&!d&&n>r||d&&f&&p&&!h&&!x||l&&f&&p||!i&&p||!c)return 1;if(!l&&!d&&!x&&n<r||x&&i&&c&&!l&&!d||h&&i&&c||!f&&c||!p)return-1}return 0}return n0=t,n0}var r0,Ak;function iW(){if(Ak)return r0;Ak=1;var e=aW();function t(n,r,i){for(var l=-1,c=n.criteria,d=r.criteria,f=c.length,h=i.length;++l<f;){var p=e(c[l],d[l]);if(p){if(l>=h)return p;var x=i[l];return p*(x=="desc"?-1:1)}}return n.index-r.index}return r0=t,r0}var a0,_k;function sW(){if(_k)return a0;_k=1;var e=wS(),t=SS(),n=sa(),r=K6(),i=rW(),l=D6(),c=iW(),d=Pl(),f=Dn();function h(p,x,y){x.length?x=e(x,function(S){return f(S)?function(v){return t(v,S.length===1?S[0]:S)}:S}):x=[d];var j=-1;x=e(x,l(n));var w=r(p,function(S,v,A){var O=e(x,function(_){return _(S)});return{criteria:O,index:++j,value:S}});return i(w,function(S,v){return c(S,v,y)})}return a0=h,a0}var i0,Ok;function oW(){if(Ok)return i0;Ok=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return i0=e,i0}var s0,Tk;function lW(){if(Tk)return s0;Tk=1;var e=oW(),t=Math.max;function n(r,i,l){return i=t(i===void 0?r.length-1:i,0),function(){for(var c=arguments,d=-1,f=t(c.length-i,0),h=Array(f);++d<f;)h[d]=c[i+d];d=-1;for(var p=Array(i+1);++d<i;)p[d]=c[d];return p[i]=l(h),e(r,this,p)}}return s0=n,s0}var o0,Ek;function cW(){if(Ek)return o0;Ek=1;function e(t){return function(){return t}}return o0=e,o0}var l0,Ck;function Y6(){if(Ck)return l0;Ck=1;var e=zs(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return l0=t,l0}var c0,Mk;function uW(){if(Mk)return c0;Mk=1;var e=cW(),t=Y6(),n=Pl(),r=t?function(i,l){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(l),writable:!0})}:n;return c0=r,c0}var u0,kk;function dW(){if(kk)return u0;kk=1;var e=800,t=16,n=Date.now;function r(i){var l=0,c=0;return function(){var d=n(),f=t-(d-c);if(c=d,f>0){if(++l>=e)return arguments[0]}else l=0;return i.apply(void 0,arguments)}}return u0=r,u0}var d0,Pk;function fW(){if(Pk)return d0;Pk=1;var e=uW(),t=dW(),n=t(e);return d0=n,d0}var f0,Rk;function hW(){if(Rk)return f0;Rk=1;var e=Pl(),t=lW(),n=fW();function r(i,l){return n(t(i,l,e),i+"")}return f0=r,f0}var h0,Dk;function rp(){if(Dk)return h0;Dk=1;var e=vS(),t=id(),n=PS(),r=Ii();function i(l,c,d){if(!r(d))return!1;var f=typeof c;return(f=="number"?t(d)&&n(c,d.length):f=="string"&&c in d)?e(d[c],l):!1}return h0=i,h0}var m0,zk;function mW(){if(zk)return m0;zk=1;var e=F6(),t=sW(),n=hW(),r=rp(),i=n(function(l,c){if(l==null)return[];var d=c.length;return d>1&&r(l,c[0],c[1])?c=[]:d>2&&r(c[0],c[1],c[2])&&(c=[c[0]]),t(l,e(c,1),[])});return m0=i,m0}var pW=mW();const LS=st(pW);function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function pj(){return pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pj.apply(this,arguments)}function xW(e,t){return bW(e)||vW(e,t)||gW(e,t)||yW()}function yW(){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 gW(e,t){if(e){if(typeof e=="string")return Lk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lk(e,t)}}function Lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function bW(e){if(Array.isArray(e))return e}function $k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$k(Object(n),!0).forEach(function(r){jW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$k(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jW(e,t,n){return t=wW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wW(e){var t=SW(e,"string");return yu(t)=="symbol"?t:t+""}function SW(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NW(e){return Array.isArray(e)&&Xt(e[0])&&Xt(e[1])?e.join(" ~ "):e}var AW=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,l=i===void 0?{}:i,c=t.itemStyle,d=c===void 0?{}:c,f=t.labelStyle,h=f===void 0?{}:f,p=t.payload,x=t.formatter,y=t.itemSorter,j=t.wrapperClassName,w=t.labelClassName,S=t.label,v=t.labelFormatter,A=t.accessibilityLayer,O=A===void 0?!1:A,_=function(){if(p&&p.length){var $={padding:0,margin:0},L=(y?LS(p,y):p).map(function(K,H){if(K.type==="none")return null;var I=p0({display:"block",paddingTop:4,paddingBottom:4,color:K.color||"#000"},d),F=K.formatter||x||NW,Z=K.value,ie=K.name,ce=Z,q=ie;if(F&&ce!=null&&q!=null){var Y=F(Z,ie,K,H,p);if(Array.isArray(Y)){var ae=xW(Y,2);ce=ae[0],q=ae[1]}else ce=Y}return V.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(H),style:I},Xt(q)?V.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Xt(q)?V.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,V.createElement("span",{className:"recharts-tooltip-item-value"},ce),V.createElement("span",{className:"recharts-tooltip-item-unit"},K.unit||""))});return V.createElement("ul",{className:"recharts-tooltip-item-list",style:$},L)}return null},T=p0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},l),N=p0({margin:0},h),E=!Pe(S),k=E?S:"",R=ze("recharts-default-tooltip",j),B=ze("recharts-tooltip-label",w);E&&v&&p!==void 0&&p!==null&&(k=v(S,p));var D=O?{role:"status","aria-live":"assertive"}:{};return V.createElement("div",pj({className:R,style:T},D),V.createElement("p",{className:B,style:N},V.isValidElement(k)?k:"".concat(k)),_())};function gu(e){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function Kf(e,t,n){return t=_W(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _W(e){var t=OW(e,"string");return gu(t)=="symbol"?t:t+""}function OW(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $c="recharts-tooltip-wrapper",TW={visibility:"hidden"};function EW(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ze($c,Kf(Kf(Kf(Kf({},"".concat($c,"-right"),he(n)&&t&&he(t.x)&&n>=t.x),"".concat($c,"-left"),he(n)&&t&&he(t.x)&&n<t.x),"".concat($c,"-bottom"),he(r)&&t&&he(t.y)&&r>=t.y),"".concat($c,"-top"),he(r)&&t&&he(t.y)&&r<t.y))}function Bk(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,l=e.position,c=e.reverseDirection,d=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(l&&he(l[r]))return l[r];var p=n[r]-d-i,x=n[r]+i;if(t[r])return c[r]?p:x;if(c[r]){var y=p,j=f[r];return y<j?Math.max(x,f[r]):Math.max(p,f[r])}var w=x+d,S=f[r]+h;return w>S?Math.max(p,f[r]):Math.max(x,f[r])}function CW(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function MW(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,l=e.reverseDirection,c=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,h,p,x;return c.height>0&&c.width>0&&n?(p=Bk({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),x=Bk({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),h=CW({translateX:p,translateY:x,useTranslate3d:d})):h=TW,{cssProperties:h,cssClasses:EW({translateX:p,translateY:x,coordinate:n})}}function Qo(e){"@babel/helpers - typeof";return Qo=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},Qo(e)}function Ik(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ik(Object(n),!0).forEach(function(r){yj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ik(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,W6(r.key),r)}}function RW(e,t,n){return t&&PW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DW(e,t,n){return t=Hh(t),zW(e,X6()?Reflect.construct(t,n||[],Hh(e).constructor):t.apply(e,n))}function zW(e,t){if(t&&(Qo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LW(e)}function LW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X6=function(){return!!e})()}function Hh(e){return Hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hh(e)}function $W(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&&xj(e,t)}function xj(e,t){return xj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xj(e,t)}function yj(e,t,n){return t=W6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W6(e){var t=BW(e,"string");return Qo(t)=="symbol"?t:t+""}function BW(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Uk=1,IW=(function(e){function t(){var n;kW(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=DW(this,t,[].concat(i)),yj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),yj(n,"handleKeyDown",function(c){if(c.key==="Escape"){var d,f,h,p;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(d=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&d!==void 0?d:0,y:(h=(p=n.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&h!==void 0?h:0}})}}),n}return $W(t,e),RW(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>Uk||Math.abs(r.height-this.state.lastBoundingBox.height)>Uk)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.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 r=this,i=this.props,l=i.active,c=i.allowEscapeViewBox,d=i.animationDuration,f=i.animationEasing,h=i.children,p=i.coordinate,x=i.hasPayload,y=i.isAnimationActive,j=i.offset,w=i.position,S=i.reverseDirection,v=i.useTranslate3d,A=i.viewBox,O=i.wrapperStyle,_=MW({allowEscapeViewBox:c,coordinate:p,offsetTopLeft:j,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:A}),T=_.cssClasses,N=_.cssProperties,E=qk(qk({transition:y&&l?"transform ".concat(d,"ms ").concat(f):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&l&&x?"visible":"hidden",position:"absolute",top:0,left:0},O);return V.createElement("div",{tabIndex:-1,className:T,style:E,ref:function(R){r.wrapperNode=R}},h)}}])})(M.PureComponent),qW=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ls={isSsr:qW()};function Jo(e){"@babel/helpers - typeof";return Jo=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},Jo(e)}function Vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(n),!0).forEach(function(r){$S(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q6(r.key),r)}}function HW(e,t,n){return t&&VW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FW(e,t,n){return t=Fh(t),GW(e,Z6()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function GW(e,t){if(t&&(Jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KW(e)}function KW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z6=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function YW(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&&gj(e,t)}function gj(e,t){return gj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gj(e,t)}function $S(e,t,n){return t=Q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q6(e){var t=XW(e,"string");return Jo(t)=="symbol"?t:t+""}function XW(e,t){if(Jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function WW(e){return e.dataKey}function ZW(e,t){return V.isValidElement(e)?V.cloneElement(e,t):typeof e=="function"?V.createElement(e,t):V.createElement(AW,t)}var hr=(function(e){function t(){return UW(this,t),FW(this,t,arguments)}return YW(t,e),HW(t,[{key:"render",value:function(){var r=this,i=this.props,l=i.active,c=i.allowEscapeViewBox,d=i.animationDuration,f=i.animationEasing,h=i.content,p=i.coordinate,x=i.filterNull,y=i.isAnimationActive,j=i.offset,w=i.payload,S=i.payloadUniqBy,v=i.position,A=i.reverseDirection,O=i.useTranslate3d,_=i.viewBox,T=i.wrapperStyle,N=w??[];x&&N.length&&(N=U6(w.filter(function(k){return k.value!=null&&(k.hide!==!0||r.props.includeHidden)}),S,WW));var E=N.length>0;return V.createElement(IW,{allowEscapeViewBox:c,animationDuration:d,animationEasing:f,isAnimationActive:y,active:l,coordinate:p,hasPayload:E,offset:j,position:v,reverseDirection:A,useTranslate3d:O,viewBox:_,wrapperStyle:T},ZW(h,Hk(Hk({},this.props),{},{payload:N})))}}])})(M.PureComponent);$S(hr,"displayName","Tooltip");$S(hr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ls.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 x0,Fk;function QW(){if(Fk)return x0;Fk=1;var e=ia(),t=function(){return e.Date.now()};return x0=t,x0}var y0,Gk;function JW(){if(Gk)return y0;Gk=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return y0=t,y0}var g0,Kk;function eZ(){if(Kk)return g0;Kk=1;var e=JW(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return g0=n,g0}var v0,Yk;function J6(){if(Yk)return v0;Yk=1;var e=eZ(),t=Ii(),n=Cl(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=t(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=e(h);var x=l.test(h);return x||c.test(h)?d(h.slice(2),x?2:8):i.test(h)?r:+h}return v0=f,v0}var b0,Xk;function tZ(){if(Xk)return b0;Xk=1;var e=Ii(),t=QW(),n=J6(),r="Expected a function",i=Math.max,l=Math.min;function c(d,f,h){var p,x,y,j,w,S,v=0,A=!1,O=!1,_=!0;if(typeof d!="function")throw new TypeError(r);f=n(f)||0,e(h)&&(A=!!h.leading,O="maxWait"in h,y=O?i(n(h.maxWait)||0,f):y,_="trailing"in h?!!h.trailing:_);function T(L){var K=p,H=x;return p=x=void 0,v=L,j=d.apply(H,K),j}function N(L){return v=L,w=setTimeout(R,f),A?T(L):j}function E(L){var K=L-S,H=L-v,I=f-K;return O?l(I,y-H):I}function k(L){var K=L-S,H=L-v;return S===void 0||K>=f||K<0||O&&H>=y}function R(){var L=t();if(k(L))return B(L);w=setTimeout(R,E(L))}function B(L){return w=void 0,_&&p?T(L):(p=x=void 0,j)}function D(){w!==void 0&&clearTimeout(w),v=0,p=S=x=w=void 0}function z(){return w===void 0?j:B(t())}function $(){var L=t(),K=k(L);if(p=arguments,x=this,S=L,K){if(w===void 0)return N(S);if(O)return clearTimeout(w),w=setTimeout(R,f),T(S)}return w===void 0&&(w=setTimeout(R,f)),j}return $.cancel=D,$.flush=z,$}return b0=c,b0}var j0,Wk;function nZ(){if(Wk)return j0;Wk=1;var e=tZ(),t=Ii(),n="Expected a function";function r(i,l,c){var d=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(c)&&(d="leading"in c?!!c.leading:d,f="trailing"in c?!!c.trailing:f),e(i,l,{leading:d,maxWait:l,trailing:f})}return j0=r,j0}var rZ=nZ();const ez=st(rZ);function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zk(Object(n),!0).forEach(function(r){aZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aZ(e,t,n){return t=iZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iZ(e){var t=sZ(e,"string");return vu(t)=="symbol"?t:t+""}function sZ(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oZ(e,t){return dZ(e)||uZ(e,t)||cZ(e,t)||lZ()}function lZ(){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 cZ(e,t){if(e){if(typeof e=="string")return Qk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qk(e,t)}}function Qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function dZ(e){if(Array.isArray(e))return e}var vj=M.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,l=e.width,c=l===void 0?"100%":l,d=e.height,f=d===void 0?"100%":d,h=e.minWidth,p=h===void 0?0:h,x=e.minHeight,y=e.maxHeight,j=e.children,w=e.debounce,S=w===void 0?0:w,v=e.id,A=e.className,O=e.onResize,_=e.style,T=_===void 0?{}:_,N=M.useRef(null),E=M.useRef();E.current=O,M.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 k=M.useState({containerWidth:i.width,containerHeight:i.height}),R=oZ(k,2),B=R[0],D=R[1],z=M.useCallback(function(L,K){D(function(H){var I=Math.round(L),F=Math.round(K);return H.containerWidth===I&&H.containerHeight===F?H:{containerWidth:I,containerHeight:F}})},[]);M.useEffect(function(){var L=function(ie){var ce,q=ie[0].contentRect,Y=q.width,ae=q.height;z(Y,ae),(ce=E.current)===null||ce===void 0||ce.call(E,Y,ae)};S>0&&(L=ez(L,S,{trailing:!0,leading:!1}));var K=new ResizeObserver(L),H=N.current.getBoundingClientRect(),I=H.width,F=H.height;return z(I,F),K.observe(N.current),function(){K.disconnect()}},[z,S]);var $=M.useMemo(function(){var L=B.containerWidth,K=B.containerHeight;if(L<0||K<0)return null;$r(bs(c)||bs(f),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,c,f),$r(!n||n>0,"The aspect(%s) must be greater than zero.",n);var H=bs(c)?L:c,I=bs(f)?K:f;n&&n>0&&(H?I=H/n:I&&(H=I*n),y&&I>y&&(I=y)),$r(H>0||I>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.`,H,I,c,f,p,x,n);var F=!Array.isArray(j)&&La(j.type).endsWith("Chart");return V.Children.map(j,function(Z){return V.isValidElement(Z)?M.cloneElement(Z,Yf({width:H,height:I},F?{style:Yf({height:"100%",width:"100%",maxHeight:I,maxWidth:H},Z.props.style)}:{})):Z})},[n,j,f,y,x,p,B,c]);return V.createElement("div",{id:v?"".concat(v):void 0,className:ze("recharts-responsive-container",A),style:Yf(Yf({},T),{},{width:c,height:f,minWidth:p,minHeight:x,maxHeight:y}),ref:N},$)}),ap=function(t){return null};ap.displayName="Cell";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 Jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jk(Object(n),!0).forEach(function(r){fZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fZ(e,t,n){return t=hZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hZ(e){var t=mZ(e,"string");return bu(t)=="symbol"?t:t+""}function mZ(e,t){if(bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _o={widthCache:{},cacheCount:0},pZ=2e3,xZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},eP="recharts_measurement_span";function yZ(e){var t=bj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var tu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ls.isSsr)return{width:0,height:0};var r=yZ(n),i=JSON.stringify({text:t,copyStyle:r});if(_o.widthCache[i])return _o.widthCache[i];try{var l=document.getElementById(eP);l||(l=document.createElement("span"),l.setAttribute("id",eP),l.setAttribute("aria-hidden","true"),document.body.appendChild(l));var c=bj(bj({},xZ),r);Object.assign(l.style,c),l.textContent="".concat(t);var d=l.getBoundingClientRect(),f={width:d.width,height:d.height};return _o.widthCache[i]=f,++_o.cacheCount>pZ&&(_o.cacheCount=0,_o.widthCache={}),f}catch{return{width:0,height:0}}},gZ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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)}function Gh(e,t){return wZ(e)||jZ(e,t)||bZ(e,t)||vZ()}function vZ(){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 bZ(e,t){if(e){if(typeof e=="string")return tP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tP(e,t)}}function tP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function wZ(e){if(Array.isArray(e))return e}function SZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AZ(r.key),r)}}function NZ(e,t,n){return t&&nP(e.prototype,t),n&&nP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function AZ(e){var t=_Z(e,"string");return ju(t)=="symbol"?t:t+""}function _Z(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,aP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OZ=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,TZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,tz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},EZ=Object.keys(tz),Ro="NaN";function CZ(e,t){return e*tz[t]}var Xf=(function(){function e(t,n){SZ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!OZ.test(n)&&(this.num=NaN,this.unit=""),EZ.includes(n)&&(this.num=CZ(t,n),this.unit="px")}return NZ(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=TZ.exec(n))!==null&&r!==void 0?r:[],l=Gh(i,3),c=l[1],d=l[2];return new e(parseFloat(c),d??"")}}])})();function nz(e){if(e.includes(Ro))return Ro;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=rP.exec(t))!==null&&n!==void 0?n:[],i=Gh(r,4),l=i[1],c=i[2],d=i[3],f=Xf.parse(l??""),h=Xf.parse(d??""),p=c==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return Ro;t=t.replace(rP,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,y=(x=aP.exec(t))!==null&&x!==void 0?x:[],j=Gh(y,4),w=j[1],S=j[2],v=j[3],A=Xf.parse(w??""),O=Xf.parse(v??""),_=S==="+"?A.add(O):A.subtract(O);if(_.isNaN())return Ro;t=t.replace(aP,_.toString())}return t}var iP=/\(([^()]*)\)/;function MZ(e){for(var t=e;t.includes("(");){var n=iP.exec(t),r=Gh(n,2),i=r[1];t=t.replace(iP,nz(i))}return t}function kZ(e){var t=e.replace(/\s+/g,"");return t=MZ(t),t=nz(t),t}function PZ(e){try{return kZ(e)}catch{return Ro}}function w0(e){var t=PZ(e.slice(5,-1));return t===Ro?"":t}var RZ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],DZ=["dx","dy","angle","className","breakAll"];function jj(){return jj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jj.apply(this,arguments)}function sP(e,t){if(e==null)return{};var n=zZ(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oP(e,t){return IZ(e)||BZ(e,t)||$Z(e,t)||LZ()}function LZ(){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 $Z(e,t){if(e){if(typeof e=="string")return lP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lP(e,t)}}function lP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function IZ(e){if(Array.isArray(e))return e}var rz=/[ \f\n\r\t\v\u2028\u2029]+/,az=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var l=[];Pe(n)||(r?l=n.toString().split(""):l=n.toString().split(rz));var c=l.map(function(f){return{word:f,width:tu(f,i).width}}),d=r?0:tu(" ",i).width;return{wordsWithComputedWidth:c,spaceWidth:d}}catch{return null}},qZ=function(t,n,r,i,l){var c=t.maxLines,d=t.children,f=t.style,h=t.breakAll,p=he(c),x=d,y=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(I,F){var Z=F.word,ie=F.width,ce=I[I.length-1];if(ce&&(i==null||l||ce.width+ie+r<Number(i)))ce.words.push(Z),ce.width+=ie+r;else{var q={words:[Z],width:ie};I.push(q)}return I},[])},j=y(n),w=function(H){return H.reduce(function(I,F){return I.width>F.width?I:F})};if(!p)return j;for(var S="…",v=function(H){var I=x.slice(0,H),F=az({breakAll:h,style:f,children:I+S}).wordsWithComputedWidth,Z=y(F),ie=Z.length>c||w(Z).width>Number(i);return[ie,Z]},A=0,O=x.length-1,_=0,T;A<=O&&_<=x.length-1;){var N=Math.floor((A+O)/2),E=N-1,k=v(E),R=oP(k,2),B=R[0],D=R[1],z=v(N),$=oP(z,1),L=$[0];if(!B&&!L&&(A=N+1),B&&L&&(O=N-1),!B&&L){T=D;break}_++}return T||j},cP=function(t){var n=Pe(t)?[]:t.toString().split(rz);return[{words:n}]},UZ=function(t){var n=t.width,r=t.scaleToFit,i=t.children,l=t.style,c=t.breakAll,d=t.maxLines;if((n||r)&&!Ls.isSsr){var f,h,p=az({breakAll:c,children:i,style:l});if(p){var x=p.wordsWithComputedWidth,y=p.spaceWidth;f=x,h=y}else return cP(i);return qZ({breakAll:c,children:i,maxLines:d,style:l},f,h,n,r)}return cP(i)},uP="#808080",Ms=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,l=i===void 0?0:i,c=t.lineHeight,d=c===void 0?"1em":c,f=t.capHeight,h=f===void 0?"0.71em":f,p=t.scaleToFit,x=p===void 0?!1:p,y=t.textAnchor,j=y===void 0?"start":y,w=t.verticalAnchor,S=w===void 0?"end":w,v=t.fill,A=v===void 0?uP:v,O=sP(t,RZ),_=M.useMemo(function(){return UZ({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:x,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,x,O.style,O.width]),T=O.dx,N=O.dy,E=O.angle,k=O.className,R=O.breakAll,B=sP(O,DZ);if(!Xt(r)||!Xt(l))return null;var D=r+(he(T)?T:0),z=l+(he(N)?N:0),$;switch(S){case"start":$=w0("calc(".concat(h,")"));break;case"middle":$=w0("calc(".concat((_.length-1)/2," * -").concat(d," + (").concat(h," / 2))"));break;default:$=w0("calc(".concat(_.length-1," * -").concat(d,")"));break}var L=[];if(x){var K=_[0].width,H=O.width;L.push("scale(".concat((he(H)?H/K:1)/K,")"))}return E&&L.push("rotate(".concat(E,", ").concat(D,", ").concat(z,")")),L.length&&(B.transform=L.join(" ")),V.createElement("text",jj({},je(B,!0),{x:D,y:z,className:ze("recharts-text",k),textAnchor:j,fill:A.includes("url")?uP:A}),_.map(function(I,F){var Z=I.words.join(R?"":" ");return V.createElement("tspan",{x:D,dy:F===0?$:d,key:"".concat(Z,"-").concat(F)},Z)}))};function Ci(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function VZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function BS(e){let t,n,r;e.length!==2?(t=Ci,n=(d,f)=>Ci(e(d),f),r=(d,f)=>e(d)-f):(t=e===Ci||e===VZ?e:HZ,n=e,r=e);function i(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const x=h+p>>>1;n(d[x],f)<0?h=x+1:p=x}while(h<p)}return h}function l(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const x=h+p>>>1;n(d[x],f)<=0?h=x+1:p=x}while(h<p)}return h}function c(d,f,h=0,p=d.length){const x=i(d,f,h,p-1);return x>h&&r(d[x-1],f)>-r(d[x],f)?x-1:x}return{left:i,center:c,right:l}}function HZ(){return 0}function iz(e){return e===null?NaN:+e}function*FZ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const GZ=BS(Ci),sd=GZ.right;BS(iz).center;class dP extends Map{constructor(t,n=XZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(fP(this,t))}has(t){return super.has(fP(this,t))}set(t,n){return super.set(KZ(this,t),n)}delete(t){return super.delete(YZ(this,t))}}function fP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function KZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function YZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function XZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function WZ(e=Ci){if(e===Ci)return sz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function sz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ZZ=Math.sqrt(50),QZ=Math.sqrt(10),JZ=Math.sqrt(2);function Kh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),l=r/Math.pow(10,i),c=l>=ZZ?10:l>=QZ?5:l>=JZ?2:1;let d,f,h;return i<0?(h=Math.pow(10,-i)/c,d=Math.round(e*h),f=Math.round(t*h),d/h<e&&++d,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*c,d=Math.round(e/h),f=Math.round(t/h),d*h<e&&++d,f*h>t&&--f),f<d&&.5<=n&&n<2?Kh(e,t,n*2):[d,f,h]}function wj(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,l,c]=r?Kh(t,e,n):Kh(e,t,n);if(!(l>=i))return[];const d=l-i+1,f=new Array(d);if(r)if(c<0)for(let h=0;h<d;++h)f[h]=(l-h)/-c;else for(let h=0;h<d;++h)f[h]=(l-h)*c;else if(c<0)for(let h=0;h<d;++h)f[h]=(i+h)/-c;else for(let h=0;h<d;++h)f[h]=(i+h)*c;return f}function Sj(e,t,n){return t=+t,e=+e,n=+n,Kh(e,t,n)[2]}function Nj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Sj(t,e,n):Sj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function hP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function mP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function oz(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?sz:WZ(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,p=Math.log(f),x=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*x*(f-x)/f)*(h-f/2<0?-1:1),j=Math.max(n,Math.floor(t-h*x/f+y)),w=Math.min(r,Math.floor(t+(f-h)*x/f+y));oz(e,t,j,w,i)}const l=e[t];let c=n,d=r;for(Bc(e,n,t),i(e[r],l)>0&&Bc(e,n,r);c<d;){for(Bc(e,c,d),++c,--d;i(e[c],l)<0;)++c;for(;i(e[d],l)>0;)--d}i(e[n],l)===0?Bc(e,n,d):(++d,Bc(e,d,r)),d<=t&&(n=d+1),t<=d&&(r=d-1)}return e}function Bc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function eQ(e,t,n){if(e=Float64Array.from(FZ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return mP(e);if(t>=1)return hP(e);var r,i=(r-1)*t,l=Math.floor(i),c=hP(oz(e,l).subarray(0,l+1)),d=mP(e.subarray(l+1));return c+(d-c)*(i-l)}}function tQ(e,t,n=iz){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,l=Math.floor(i),c=+n(e[l],l,e),d=+n(e[l+1],l+1,e);return c+(d-c)*(i-l)}}function nQ(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,l=new Array(i);++r<i;)l[r]=e+r*n;return l}function Sr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ya(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 Aj=Symbol("implicit");function IS(){var e=new dP,t=[],n=[],r=Aj;function i(l){let c=e.get(l);if(c===void 0){if(r!==Aj)return r;e.set(l,c=t.push(l)-1)}return n[c%n.length]}return i.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new dP;for(const c of l)e.has(c)||e.set(c,t.push(c)-1);return i},i.range=function(l){return arguments.length?(n=Array.from(l),i):n.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return IS(t,n).unknown(r)},Sr.apply(i,arguments),i}function wu(){var e=IS().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,l,c,d=!1,f=0,h=0,p=.5;delete e.unknown;function x(){var y=t().length,j=i<r,w=j?i:r,S=j?r:i;l=(S-w)/Math.max(1,y-f+h*2),d&&(l=Math.floor(l)),w+=(S-w-l*(y-f))*p,c=l*(1-f),d&&(w=Math.round(w),c=Math.round(c));var v=nQ(y).map(function(A){return w+l*A});return n(j?v.reverse():v)}return e.domain=function(y){return arguments.length?(t(y),x()):t()},e.range=function(y){return arguments.length?([r,i]=y,r=+r,i=+i,x()):[r,i]},e.rangeRound=function(y){return[r,i]=y,r=+r,i=+i,d=!0,x()},e.bandwidth=function(){return c},e.step=function(){return l},e.round=function(y){return arguments.length?(d=!!y,x()):d},e.padding=function(y){return arguments.length?(f=Math.min(1,h=+y),x()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),x()):f},e.paddingOuter=function(y){return arguments.length?(h=+y,x()):h},e.align=function(y){return arguments.length?(p=Math.max(0,Math.min(1,y)),x()):p},e.copy=function(){return wu(t(),[r,i]).round(d).paddingInner(f).paddingOuter(h).align(p)},Sr.apply(x(),arguments)}function lz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return lz(t())},e}function nu(){return lz(wu.apply(null,arguments).paddingInner(1))}function qS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function cz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function od(){}var Su=.7,Yh=1/Su,Fo="\\s*([+-]?\\d+)\\s*",Nu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rQ=/^#([0-9a-f]{3,8})$/,aQ=new RegExp(`^rgb\\(${Fo},${Fo},${Fo}\\)$`),iQ=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),sQ=new RegExp(`^rgba\\(${Fo},${Fo},${Fo},${Nu}\\)$`),oQ=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${Nu}\\)$`),lQ=new RegExp(`^hsl\\(${Nu},${Qr},${Qr}\\)$`),cQ=new RegExp(`^hsla\\(${Nu},${Qr},${Qr},${Nu}\\)$`),pP={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};qS(od,Au,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xP,formatHex:xP,formatHex8:uQ,formatHsl:dQ,formatRgb:yP,toString:yP});function xP(){return this.rgb().formatHex()}function uQ(){return this.rgb().formatHex8()}function dQ(){return uz(this).formatHsl()}function yP(){return this.rgb().formatRgb()}function Au(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rQ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?gP(t):n===3?new Rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Wf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Wf(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=aQ.exec(e))?new Rn(t[1],t[2],t[3],1):(t=iQ.exec(e))?new Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sQ.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=oQ.exec(e))?Wf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lQ.exec(e))?jP(t[1],t[2]/100,t[3]/100,1):(t=cQ.exec(e))?jP(t[1],t[2]/100,t[3]/100,t[4]):pP.hasOwnProperty(e)?gP(pP[e]):e==="transparent"?new Rn(NaN,NaN,NaN,0):null}function gP(e){return new Rn(e>>16&255,e>>8&255,e&255,1)}function Wf(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function fQ(e){return e instanceof od||(e=Au(e)),e?(e=e.rgb(),new Rn(e.r,e.g,e.b,e.opacity)):new Rn}function _j(e,t,n,r){return arguments.length===1?fQ(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}qS(Rn,_j,cz(od,{brighter(e){return e=e==null?Yh:Math.pow(Yh,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Su:Math.pow(Su,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(Os(this.r),Os(this.g),Os(this.b),Xh(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:vP,formatHex:vP,formatHex8:hQ,formatRgb:bP,toString:bP}));function vP(){return`#${js(this.r)}${js(this.g)}${js(this.b)}`}function hQ(){return`#${js(this.r)}${js(this.g)}${js(this.b)}${js((isNaN(this.opacity)?1:this.opacity)*255)}`}function bP(){const e=Xh(this.opacity);return`${e===1?"rgb(":"rgba("}${Os(this.r)}, ${Os(this.g)}, ${Os(this.b)}${e===1?")":`, ${e})`}`}function Xh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Os(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function js(e){return e=Os(e),(e<16?"0":"")+e.toString(16)}function jP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rr(e,t,n,r)}function uz(e){if(e instanceof Rr)return new Rr(e.h,e.s,e.l,e.opacity);if(e instanceof od||(e=Au(e)),!e)return new Rr;if(e instanceof Rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),l=Math.max(t,n,r),c=NaN,d=l-i,f=(l+i)/2;return d?(t===l?c=(n-r)/d+(n<r)*6:n===l?c=(r-t)/d+2:c=(t-n)/d+4,d/=f<.5?l+i:2-l-i,c*=60):d=f>0&&f<1?0:c,new Rr(c,d,f,e.opacity)}function mQ(e,t,n,r){return arguments.length===1?uz(e):new Rr(e,t,n,r??1)}function Rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}qS(Rr,mQ,cz(od,{brighter(e){return e=e==null?Yh:Math.pow(Yh,e),new Rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Su:Math.pow(Su,e),new Rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rn(S0(e>=240?e-240:e+120,i,r),S0(e,i,r),S0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Rr(wP(this.h),Zf(this.s),Zf(this.l),Xh(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=Xh(this.opacity);return`${e===1?"hsl(":"hsla("}${wP(this.h)}, ${Zf(this.s)*100}%, ${Zf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wP(e){return e=(e||0)%360,e<0?e+360:e}function Zf(e){return Math.max(0,Math.min(1,e||0))}function S0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const US=e=>()=>e;function pQ(e,t){return function(n){return e+n*t}}function xQ(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function yQ(e){return(e=+e)==1?dz:function(t,n){return n-t?xQ(t,n,e):US(isNaN(t)?n:t)}}function dz(e,t){var n=t-e;return n?pQ(e,n):US(isNaN(e)?t:e)}const SP=(function e(t){var n=yQ(t);function r(i,l){var c=n((i=_j(i)).r,(l=_j(l)).r),d=n(i.g,l.g),f=n(i.b,l.b),h=dz(i.opacity,l.opacity);return function(p){return i.r=c(p),i.g=d(p),i.b=f(p),i.opacity=h(p),i+""}}return r.gamma=e,r})(1);function gQ(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(l){for(i=0;i<n;++i)r[i]=e[i]*(1-l)+t[i]*l;return r}}function vQ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function bQ(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),l=new Array(n),c;for(c=0;c<r;++c)i[c]=Rl(e[c],t[c]);for(;c<n;++c)l[c]=t[c];return function(d){for(c=0;c<r;++c)l[c]=i[c](d);return l}}function jQ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wQ(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Rl(e[i],t[i]):r[i]=t[i];return function(l){for(i in n)r[i]=n[i](l);return r}}var Oj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,N0=new RegExp(Oj.source,"g");function SQ(e){return function(){return e}}function NQ(e){return function(t){return e(t)+""}}function AQ(e,t){var n=Oj.lastIndex=N0.lastIndex=0,r,i,l,c=-1,d=[],f=[];for(e=e+"",t=t+"";(r=Oj.exec(e))&&(i=N0.exec(t));)(l=i.index)>n&&(l=t.slice(n,l),d[c]?d[c]+=l:d[++c]=l),(r=r[0])===(i=i[0])?d[c]?d[c]+=i:d[++c]=i:(d[++c]=null,f.push({i:c,x:Wh(r,i)})),n=N0.lastIndex;return n<t.length&&(l=t.slice(n),d[c]?d[c]+=l:d[++c]=l),d.length<2?f[0]?NQ(f[0].x):SQ(t):(t=f.length,function(h){for(var p=0,x;p<t;++p)d[(x=f[p]).i]=x.x(h);return d.join("")})}function Rl(e,t){var n=typeof t,r;return t==null||n==="boolean"?US(t):(n==="number"?Wh:n==="string"?(r=Au(t))?(t=r,SP):AQ:t instanceof Au?SP:t instanceof Date?jQ:vQ(t)?gQ:Array.isArray(t)?bQ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?wQ:Wh)(e,t)}function VS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _Q(e,t){t===void 0&&(t=e,e=Rl);for(var n=0,r=t.length-1,i=t[0],l=new Array(r<0?0:r);n<r;)l[n]=e(i,i=t[++n]);return function(c){var d=Math.max(0,Math.min(r-1,Math.floor(c*=r)));return l[d](c-d)}}function OQ(e){return function(){return e}}function Zh(e){return+e}var NP=[0,1];function Nn(e){return e}function Tj(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:OQ(isNaN(t)?NaN:.5)}function TQ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function EQ(e,t,n){var r=e[0],i=e[1],l=t[0],c=t[1];return i<r?(r=Tj(i,r),l=n(c,l)):(r=Tj(r,i),l=n(l,c)),function(d){return l(r(d))}}function CQ(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),l=new Array(r),c=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++c<r;)i[c]=Tj(e[c],e[c+1]),l[c]=n(t[c],t[c+1]);return function(d){var f=sd(e,d,1,r)-1;return l[f](i[f](d))}}function ld(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ip(){var e=NP,t=NP,n=Rl,r,i,l,c=Nn,d,f,h;function p(){var y=Math.min(e.length,t.length);return c!==Nn&&(c=TQ(e[0],e[y-1])),d=y>2?CQ:EQ,f=h=null,x}function x(y){return y==null||isNaN(y=+y)?l:(f||(f=d(e.map(r),t,n)))(r(c(y)))}return x.invert=function(y){return c(i((h||(h=d(t,e.map(r),Wh)))(y)))},x.domain=function(y){return arguments.length?(e=Array.from(y,Zh),p()):e.slice()},x.range=function(y){return arguments.length?(t=Array.from(y),p()):t.slice()},x.rangeRound=function(y){return t=Array.from(y),n=VS,p()},x.clamp=function(y){return arguments.length?(c=y?!0:Nn,p()):c!==Nn},x.interpolate=function(y){return arguments.length?(n=y,p()):n},x.unknown=function(y){return arguments.length?(l=y,x):l},function(y,j){return r=y,i=j,p()}}function HS(){return ip()(Nn,Nn)}function MQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Qh(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function el(e){return e=Qh(Math.abs(e)),e?e[1]:NaN}function kQ(e,t){return function(n,r){for(var i=n.length,l=[],c=0,d=e[0],f=0;i>0&&d>0&&(f+d+1>r&&(d=Math.max(1,r-f)),l.push(n.substring(i-=d,i+d)),!((f+=d+1)>r));)d=e[c=(c+1)%e.length];return l.reverse().join(t)}}function PQ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var RQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _u(e){if(!(t=RQ.exec(e)))throw new Error("invalid format: "+e);var t;return new FS({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]})}_u.prototype=FS.prototype;function FS(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+""}FS.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 DQ(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Jh;function zQ(e,t){var n=Qh(e,t);if(!n)return Jh=void 0,e.toPrecision(t);var r=n[0],i=n[1],l=i-(Jh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=r.length;return l===c?r:l>c?r+new Array(l-c+1).join("0"):l>0?r.slice(0,l)+"."+r.slice(l):"0."+new Array(1-l).join("0")+Qh(e,Math.max(0,t+l-1))[0]}function AP(e,t){var n=Qh(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const _P={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:MQ,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)=>AP(e*100,t),r:AP,s:zQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function OP(e){return e}var TP=Array.prototype.map,EP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LQ(e){var t=e.grouping===void 0||e.thousands===void 0?OP:kQ(TP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",l=e.numerals===void 0?OP:PQ(TP.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",d=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(x,y){x=_u(x);var j=x.fill,w=x.align,S=x.sign,v=x.symbol,A=x.zero,O=x.width,_=x.comma,T=x.precision,N=x.trim,E=x.type;E==="n"?(_=!0,E="g"):_P[E]||(T===void 0&&(T=12),N=!0,E="g"),(A||j==="0"&&w==="=")&&(A=!0,j="0",w="=");var k=(y&&y.prefix!==void 0?y.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),R=(v==="$"?r:/[%p]/.test(E)?c:"")+(y&&y.suffix!==void 0?y.suffix:""),B=_P[E],D=/[defgprs%]/.test(E);T=T===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function z($){var L=k,K=R,H,I,F;if(E==="c")K=B($)+K,$="";else{$=+$;var Z=$<0||1/$<0;if($=isNaN($)?f:B(Math.abs($),T),N&&($=DQ($)),Z&&+$==0&&S!=="+"&&(Z=!1),L=(Z?S==="("?S:d:S==="-"||S==="("?"":S)+L,K=(E==="s"&&!isNaN($)&&Jh!==void 0?EP[8+Jh/3]:"")+K+(Z&&S==="("?")":""),D){for(H=-1,I=$.length;++H<I;)if(F=$.charCodeAt(H),48>F||F>57){K=(F===46?i+$.slice(H+1):$.slice(H))+K,$=$.slice(0,H);break}}}_&&!A&&($=t($,1/0));var ie=L.length+$.length+K.length,ce=ie<O?new Array(O-ie+1).join(j):"";switch(_&&A&&($=t(ce+$,ce.length?O-K.length:1/0),ce=""),w){case"<":$=L+$+K+ce;break;case"=":$=L+ce+$+K;break;case"^":$=ce.slice(0,ie=ce.length>>1)+L+$+K+ce.slice(ie);break;default:$=ce+L+$+K;break}return l($)}return z.toString=function(){return x+""},z}function p(x,y){var j=Math.max(-8,Math.min(8,Math.floor(el(y)/3)))*3,w=Math.pow(10,-j),S=h((x=_u(x),x.type="f",x),{suffix:EP[8+j/3]});return function(v){return S(w*v)}}return{format:h,formatPrefix:p}}var Qf,GS,fz;$Q({thousands:",",grouping:[3],currency:["$",""]});function $Q(e){return Qf=LQ(e),GS=Qf.format,fz=Qf.formatPrefix,Qf}function BQ(e){return Math.max(0,-el(Math.abs(e)))}function IQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(el(t)/3)))*3-el(Math.abs(e)))}function qQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,el(t)-el(e))+1}function hz(e,t,n,r){var i=Nj(e,t,n),l;switch(r=_u(r??",f"),r.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(l=IQ(i,c))&&(r.precision=l),fz(r,c)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(l=qQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=l-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(l=BQ(i))&&(r.precision=l-(r.type==="%")*2);break}}return GS(r)}function qi(e){var t=e.domain;return e.ticks=function(n){var r=t();return wj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return hz(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,l=r.length-1,c=r[i],d=r[l],f,h,p=10;for(d<c&&(h=c,c=d,d=h,h=i,i=l,l=h);p-- >0;){if(h=Sj(c,d,n),h===f)return r[i]=c,r[l]=d,t(r);if(h>0)c=Math.floor(c/h)*h,d=Math.ceil(d/h)*h;else if(h<0)c=Math.ceil(c*h)/h,d=Math.floor(d*h)/h;else break;f=h}return e},e}function em(){var e=HS();return e.copy=function(){return ld(e,em())},Sr.apply(e,arguments),qi(e)}function mz(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Zh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mz(e).unknown(t)},e=arguments.length?Array.from(e,Zh):[0,1],qi(n)}function pz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],l=e[r],c;return l<i&&(c=n,n=r,r=c,c=i,i=l,l=c),e[n]=t.floor(i),e[r]=t.ceil(l),e}function CP(e){return Math.log(e)}function MP(e){return Math.exp(e)}function UQ(e){return-Math.log(-e)}function VQ(e){return-Math.exp(-e)}function HQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function FQ(e){return e===10?HQ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function GQ(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 kP(e){return(t,n)=>-e(-t,n)}function KS(e){const t=e(CP,MP),n=t.domain;let r=10,i,l;function c(){return i=GQ(r),l=FQ(r),n()[0]<0?(i=kP(i),l=kP(l),e(UQ,VQ)):e(CP,MP),t}return t.base=function(d){return arguments.length?(r=+d,c()):r},t.domain=function(d){return arguments.length?(n(d),c()):n()},t.ticks=d=>{const f=n();let h=f[0],p=f[f.length-1];const x=p<h;x&&([h,p]=[p,h]);let y=i(h),j=i(p),w,S;const v=d==null?10:+d;let A=[];if(!(r%1)&&j-y<v){if(y=Math.floor(y),j=Math.ceil(j),h>0){for(;y<=j;++y)for(w=1;w<r;++w)if(S=y<0?w/l(-y):w*l(y),!(S<h)){if(S>p)break;A.push(S)}}else for(;y<=j;++y)for(w=r-1;w>=1;--w)if(S=y>0?w/l(-y):w*l(y),!(S<h)){if(S>p)break;A.push(S)}A.length*2<v&&(A=wj(h,p,v))}else A=wj(y,j,Math.min(j-y,v)).map(l);return x?A.reverse():A},t.tickFormat=(d,f)=>{if(d==null&&(d=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=_u(f)).precision==null&&(f.trim=!0),f=GS(f)),d===1/0)return f;const h=Math.max(1,r*d/t.ticks().length);return p=>{let x=p/l(Math.round(i(p)));return x*r<r-.5&&(x*=r),x<=h?f(p):""}},t.nice=()=>n(pz(n(),{floor:d=>l(Math.floor(i(d))),ceil:d=>l(Math.ceil(i(d)))})),t}function xz(){const e=KS(ip()).domain([1,10]);return e.copy=()=>ld(e,xz()).base(e.base()),Sr.apply(e,arguments),e}function PP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function RP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function YS(e){var t=1,n=e(PP(t),RP(t));return n.constant=function(r){return arguments.length?e(PP(t=+r),RP(t)):t},qi(n)}function yz(){var e=YS(ip());return e.copy=function(){return ld(e,yz()).constant(e.constant())},Sr.apply(e,arguments)}function DP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function KQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function YQ(e){return e<0?-e*e:e*e}function XS(e){var t=e(Nn,Nn),n=1;function r(){return n===1?e(Nn,Nn):n===.5?e(KQ,YQ):e(DP(n),DP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},qi(t)}function WS(){var e=XS(ip());return e.copy=function(){return ld(e,WS()).exponent(e.exponent())},Sr.apply(e,arguments),e}function XQ(){return WS.apply(null,arguments).exponent(.5)}function zP(e){return Math.sign(e)*e*e}function WQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function gz(){var e=HS(),t=[0,1],n=!1,r;function i(l){var c=WQ(e(l));return isNaN(c)?r:n?Math.round(c):c}return i.invert=function(l){return e.invert(zP(l))},i.domain=function(l){return arguments.length?(e.domain(l),i):e.domain()},i.range=function(l){return arguments.length?(e.range((t=Array.from(l,Zh)).map(zP)),i):t.slice()},i.rangeRound=function(l){return i.range(l).round(!0)},i.round=function(l){return arguments.length?(n=!!l,i):n},i.clamp=function(l){return arguments.length?(e.clamp(l),i):e.clamp()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return gz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Sr.apply(i,arguments),qi(i)}function vz(){var e=[],t=[],n=[],r;function i(){var c=0,d=Math.max(1,t.length);for(n=new Array(d-1);++c<d;)n[c-1]=tQ(e,c/d);return l}function l(c){return c==null||isNaN(c=+c)?r:t[sd(n,c)]}return l.invertExtent=function(c){var d=t.indexOf(c);return d<0?[NaN,NaN]:[d>0?n[d-1]:e[0],d<n.length?n[d]:e[e.length-1]]},l.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let d of c)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort(Ci),i()},l.range=function(c){return arguments.length?(t=Array.from(c),i()):t.slice()},l.unknown=function(c){return arguments.length?(r=c,l):r},l.quantiles=function(){return n.slice()},l.copy=function(){return vz().domain(e).range(t).unknown(r)},Sr.apply(l,arguments)}function bz(){var e=0,t=1,n=1,r=[.5],i=[0,1],l;function c(f){return f!=null&&f<=f?i[sd(r,f,0,n)]:l}function d(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return c}return c.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,d()):[e,t]},c.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,d()):i.slice()},c.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},c.unknown=function(f){return arguments.length&&(l=f),c},c.thresholds=function(){return r.slice()},c.copy=function(){return bz().domain([e,t]).range(i).unknown(l)},Sr.apply(qi(c),arguments)}function jz(){var e=[.5],t=[0,1],n,r=1;function i(l){return l!=null&&l<=l?t[sd(e,l,0,r)]:n}return i.domain=function(l){return arguments.length?(e=Array.from(l),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(l){return arguments.length?(t=Array.from(l),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(l){var c=t.indexOf(l);return[e[c-1],e[c]]},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return jz().domain(e).range(t).unknown(n)},Sr.apply(i,arguments)}const A0=new Date,_0=new Date;function Wt(e,t,n,r){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const c=i(l),d=i.ceil(l);return l-c<d-l?c:d},i.offset=(l,c)=>(t(l=new Date(+l),c==null?1:Math.floor(c)),l),i.range=(l,c,d)=>{const f=[];if(l=i.ceil(l),d=d==null?1:Math.floor(d),!(l<c)||!(d>0))return f;let h;do f.push(h=new Date(+l)),t(l,d),e(l);while(h<l&&l<c);return f},i.filter=l=>Wt(c=>{if(c>=c)for(;e(c),!l(c);)c.setTime(c-1)},(c,d)=>{if(c>=c)if(d<0)for(;++d<=0;)for(;t(c,-1),!l(c););else for(;--d>=0;)for(;t(c,1),!l(c););}),n&&(i.count=(l,c)=>(A0.setTime(+l),_0.setTime(+c),e(A0),e(_0),Math.floor(n(A0,_0))),i.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?i.filter(r?c=>r(c)%l===0:c=>i.count(0,c)%l===0):i)),i}const tm=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);tm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):tm);tm.range;const ka=1e3,yr=ka*60,Pa=yr*60,Va=Pa*24,ZS=Va*7,LP=Va*30,O0=Va*365,ws=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ka)},(e,t)=>(t-e)/ka,e=>e.getUTCSeconds());ws.range;const QS=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka)},(e,t)=>{e.setTime(+e+t*yr)},(e,t)=>(t-e)/yr,e=>e.getMinutes());QS.range;const JS=Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yr)},(e,t)=>(t-e)/yr,e=>e.getUTCMinutes());JS.range;const e2=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka-e.getMinutes()*yr)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getHours());e2.range;const t2=Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getUTCHours());t2.range;const cd=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yr)/Va,e=>e.getDate()-1);cd.range;const sp=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Va,e=>e.getUTCDate()-1);sp.range;const wz=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Va,e=>Math.floor(e/Va));wz.range;function $s(e){return Wt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yr)/ZS)}const op=$s(0),nm=$s(1),ZQ=$s(2),QQ=$s(3),tl=$s(4),JQ=$s(5),eJ=$s(6);op.range;nm.range;ZQ.range;QQ.range;tl.range;JQ.range;eJ.range;function Bs(e){return Wt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ZS)}const lp=Bs(0),rm=Bs(1),tJ=Bs(2),nJ=Bs(3),nl=Bs(4),rJ=Bs(5),aJ=Bs(6);lp.range;rm.range;tJ.range;nJ.range;nl.range;rJ.range;aJ.range;const n2=Wt(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());n2.range;const r2=Wt(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());r2.range;const Ha=Wt(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());Ha.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ha.range;const Fa=Wt(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());Fa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Fa.range;function Sz(e,t,n,r,i,l){const c=[[ws,1,ka],[ws,5,5*ka],[ws,15,15*ka],[ws,30,30*ka],[l,1,yr],[l,5,5*yr],[l,15,15*yr],[l,30,30*yr],[i,1,Pa],[i,3,3*Pa],[i,6,6*Pa],[i,12,12*Pa],[r,1,Va],[r,2,2*Va],[n,1,ZS],[t,1,LP],[t,3,3*LP],[e,1,O0]];function d(h,p,x){const y=p<h;y&&([h,p]=[p,h]);const j=x&&typeof x.range=="function"?x:f(h,p,x),w=j?j.range(h,+p+1):[];return y?w.reverse():w}function f(h,p,x){const y=Math.abs(p-h)/x,j=BS(([,,v])=>v).right(c,y);if(j===c.length)return e.every(Nj(h/O0,p/O0,x));if(j===0)return tm.every(Math.max(Nj(h,p,x),1));const[w,S]=c[y/c[j-1][2]<c[j][2]/y?j-1:j];return w.every(S)}return[d,f]}const[iJ,sJ]=Sz(Fa,r2,lp,wz,t2,JS),[oJ,lJ]=Sz(Ha,n2,op,cd,e2,QS);function T0(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 E0(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 Ic(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function cJ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,l=e.days,c=e.shortDays,d=e.months,f=e.shortMonths,h=qc(i),p=Uc(i),x=qc(l),y=Uc(l),j=qc(c),w=Uc(c),S=qc(d),v=Uc(d),A=qc(f),O=Uc(f),_={a:F,A:Z,b:ie,B:ce,c:null,d:VP,e:VP,f:kJ,g:UJ,G:HJ,H:EJ,I:CJ,j:MJ,L:Nz,m:PJ,M:RJ,p:q,q:Y,Q:GP,s:KP,S:DJ,u:zJ,U:LJ,V:$J,w:BJ,W:IJ,x:null,X:null,y:qJ,Y:VJ,Z:FJ,"%":FP},T={a:ae,A:fe,b:ye,B:we,c:null,d:HP,e:HP,f:XJ,g:iee,G:oee,H:GJ,I:KJ,j:YJ,L:_z,m:WJ,M:ZJ,p:Ie,q:et,Q:GP,s:KP,S:QJ,u:JJ,U:eee,V:tee,w:nee,W:ree,x:null,X:null,y:aee,Y:see,Z:lee,"%":FP},N={a:D,A:z,b:$,B:L,c:K,d:qP,e:qP,f:AJ,g:IP,G:BP,H:UP,I:UP,j:jJ,L:NJ,m:bJ,M:wJ,p:B,q:vJ,Q:OJ,s:TJ,S:SJ,u:mJ,U:pJ,V:xJ,w:hJ,W:yJ,x:H,X:I,y:IP,Y:BP,Z:gJ,"%":_J};_.x=E(n,_),_.X=E(r,_),_.c=E(t,_),T.x=E(n,T),T.X=E(r,T),T.c=E(t,T);function E(de,Oe){return function(Me){var ue=[],gt=-1,Le=0,Tt=de.length,Et,hn,Nr;for(Me instanceof Date||(Me=new Date(+Me));++gt<Tt;)de.charCodeAt(gt)===37&&(ue.push(de.slice(Le,gt)),(hn=$P[Et=de.charAt(++gt)])!=null?Et=de.charAt(++gt):hn=Et==="e"?" ":"0",(Nr=Oe[Et])&&(Et=Nr(Me,hn)),ue.push(Et),Le=gt+1);return ue.push(de.slice(Le,gt)),ue.join("")}}function k(de,Oe){return function(Me){var ue=Ic(1900,void 0,1),gt=R(ue,de,Me+="",0),Le,Tt;if(gt!=Me.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(Oe&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Le=E0(Ic(ue.y,0,1)),Tt=Le.getUTCDay(),Le=Tt>4||Tt===0?rm.ceil(Le):rm(Le),Le=sp.offset(Le,(ue.V-1)*7),ue.y=Le.getUTCFullYear(),ue.m=Le.getUTCMonth(),ue.d=Le.getUTCDate()+(ue.w+6)%7):(Le=T0(Ic(ue.y,0,1)),Tt=Le.getDay(),Le=Tt>4||Tt===0?nm.ceil(Le):nm(Le),Le=cd.offset(Le,(ue.V-1)*7),ue.y=Le.getFullYear(),ue.m=Le.getMonth(),ue.d=Le.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Tt="Z"in ue?E0(Ic(ue.y,0,1)).getUTCDay():T0(Ic(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Tt+5)%7:ue.w+ue.U*7-(Tt+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,E0(ue)):T0(ue)}}function R(de,Oe,Me,ue){for(var gt=0,Le=Oe.length,Tt=Me.length,Et,hn;gt<Le;){if(ue>=Tt)return-1;if(Et=Oe.charCodeAt(gt++),Et===37){if(Et=Oe.charAt(gt++),hn=N[Et in $P?Oe.charAt(gt++):Et],!hn||(ue=hn(de,Me,ue))<0)return-1}else if(Et!=Me.charCodeAt(ue++))return-1}return ue}function B(de,Oe,Me){var ue=h.exec(Oe.slice(Me));return ue?(de.p=p.get(ue[0].toLowerCase()),Me+ue[0].length):-1}function D(de,Oe,Me){var ue=j.exec(Oe.slice(Me));return ue?(de.w=w.get(ue[0].toLowerCase()),Me+ue[0].length):-1}function z(de,Oe,Me){var ue=x.exec(Oe.slice(Me));return ue?(de.w=y.get(ue[0].toLowerCase()),Me+ue[0].length):-1}function $(de,Oe,Me){var ue=A.exec(Oe.slice(Me));return ue?(de.m=O.get(ue[0].toLowerCase()),Me+ue[0].length):-1}function L(de,Oe,Me){var ue=S.exec(Oe.slice(Me));return ue?(de.m=v.get(ue[0].toLowerCase()),Me+ue[0].length):-1}function K(de,Oe,Me){return R(de,t,Oe,Me)}function H(de,Oe,Me){return R(de,n,Oe,Me)}function I(de,Oe,Me){return R(de,r,Oe,Me)}function F(de){return c[de.getDay()]}function Z(de){return l[de.getDay()]}function ie(de){return f[de.getMonth()]}function ce(de){return d[de.getMonth()]}function q(de){return i[+(de.getHours()>=12)]}function Y(de){return 1+~~(de.getMonth()/3)}function ae(de){return c[de.getUTCDay()]}function fe(de){return l[de.getUTCDay()]}function ye(de){return f[de.getUTCMonth()]}function we(de){return d[de.getUTCMonth()]}function Ie(de){return i[+(de.getUTCHours()>=12)]}function et(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Oe=E(de+="",_);return Oe.toString=function(){return de},Oe},parse:function(de){var Oe=k(de+="",!1);return Oe.toString=function(){return de},Oe},utcFormat:function(de){var Oe=E(de+="",T);return Oe.toString=function(){return de},Oe},utcParse:function(de){var Oe=k(de+="",!0);return Oe.toString=function(){return de},Oe}}}var $P={"-":"",_:" ",0:"0"},tn=/^\s*\d+/,uJ=/^%/,dJ=/[\\^$*+?|[\]().{}]/g;function Qe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",l=i.length;return r+(l<n?new Array(n-l+1).join(t)+i:i)}function fJ(e){return e.replace(dJ,"\\$&")}function qc(e){return new RegExp("^(?:"+e.map(fJ).join("|")+")","i")}function Uc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function hJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function mJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function yJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function BP(e,t,n){var r=tn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function IP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function gJ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function bJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function jJ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function UP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function SJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function NJ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function AJ(e,t,n){var r=tn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _J(e,t,n){var r=uJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function OJ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function TJ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function VP(e,t){return Qe(e.getDate(),t,2)}function EJ(e,t){return Qe(e.getHours(),t,2)}function CJ(e,t){return Qe(e.getHours()%12||12,t,2)}function MJ(e,t){return Qe(1+cd.count(Ha(e),e),t,3)}function Nz(e,t){return Qe(e.getMilliseconds(),t,3)}function kJ(e,t){return Nz(e,t)+"000"}function PJ(e,t){return Qe(e.getMonth()+1,t,2)}function RJ(e,t){return Qe(e.getMinutes(),t,2)}function DJ(e,t){return Qe(e.getSeconds(),t,2)}function zJ(e){var t=e.getDay();return t===0?7:t}function LJ(e,t){return Qe(op.count(Ha(e)-1,e),t,2)}function Az(e){var t=e.getDay();return t>=4||t===0?tl(e):tl.ceil(e)}function $J(e,t){return e=Az(e),Qe(tl.count(Ha(e),e)+(Ha(e).getDay()===4),t,2)}function BJ(e){return e.getDay()}function IJ(e,t){return Qe(nm.count(Ha(e)-1,e),t,2)}function qJ(e,t){return Qe(e.getFullYear()%100,t,2)}function UJ(e,t){return e=Az(e),Qe(e.getFullYear()%100,t,2)}function VJ(e,t){return Qe(e.getFullYear()%1e4,t,4)}function HJ(e,t){var n=e.getDay();return e=n>=4||n===0?tl(e):tl.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function FJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function HP(e,t){return Qe(e.getUTCDate(),t,2)}function GJ(e,t){return Qe(e.getUTCHours(),t,2)}function KJ(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function YJ(e,t){return Qe(1+sp.count(Fa(e),e),t,3)}function _z(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function XJ(e,t){return _z(e,t)+"000"}function WJ(e,t){return Qe(e.getUTCMonth()+1,t,2)}function ZJ(e,t){return Qe(e.getUTCMinutes(),t,2)}function QJ(e,t){return Qe(e.getUTCSeconds(),t,2)}function JJ(e){var t=e.getUTCDay();return t===0?7:t}function eee(e,t){return Qe(lp.count(Fa(e)-1,e),t,2)}function Oz(e){var t=e.getUTCDay();return t>=4||t===0?nl(e):nl.ceil(e)}function tee(e,t){return e=Oz(e),Qe(nl.count(Fa(e),e)+(Fa(e).getUTCDay()===4),t,2)}function nee(e){return e.getUTCDay()}function ree(e,t){return Qe(rm.count(Fa(e)-1,e),t,2)}function aee(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function iee(e,t){return e=Oz(e),Qe(e.getUTCFullYear()%100,t,2)}function see(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function oee(e,t){var n=e.getUTCDay();return e=n>=4||n===0?nl(e):nl.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function lee(){return"+0000"}function FP(){return"%"}function GP(e){return+e}function KP(e){return Math.floor(+e/1e3)}var Oo,Tz,Ez;cee({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 cee(e){return Oo=cJ(e),Tz=Oo.format,Oo.parse,Ez=Oo.utcFormat,Oo.utcParse,Oo}function uee(e){return new Date(e)}function dee(e){return e instanceof Date?+e:+new Date(+e)}function a2(e,t,n,r,i,l,c,d,f,h){var p=HS(),x=p.invert,y=p.domain,j=h(".%L"),w=h(":%S"),S=h("%I:%M"),v=h("%I %p"),A=h("%a %d"),O=h("%b %d"),_=h("%B"),T=h("%Y");function N(E){return(f(E)<E?j:d(E)<E?w:c(E)<E?S:l(E)<E?v:r(E)<E?i(E)<E?A:O:n(E)<E?_:T)(E)}return p.invert=function(E){return new Date(x(E))},p.domain=function(E){return arguments.length?y(Array.from(E,dee)):y().map(uee)},p.ticks=function(E){var k=y();return e(k[0],k[k.length-1],E??10)},p.tickFormat=function(E,k){return k==null?N:h(k)},p.nice=function(E){var k=y();return(!E||typeof E.range!="function")&&(E=t(k[0],k[k.length-1],E??10)),E?y(pz(k,E)):p},p.copy=function(){return ld(p,a2(e,t,n,r,i,l,c,d,f,h))},p}function fee(){return Sr.apply(a2(oJ,lJ,Ha,n2,op,cd,e2,QS,ws,Tz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function hee(){return Sr.apply(a2(iJ,sJ,Fa,r2,lp,sp,t2,JS,ws,Ez).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cp(){var e=0,t=1,n,r,i,l,c=Nn,d=!1,f;function h(x){return x==null||isNaN(x=+x)?f:c(i===0?.5:(x=(l(x)-n)*i,d?Math.max(0,Math.min(1,x)):x))}h.domain=function(x){return arguments.length?([e,t]=x,n=l(e=+e),r=l(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(x){return arguments.length?(d=!!x,h):d},h.interpolator=function(x){return arguments.length?(c=x,h):c};function p(x){return function(y){var j,w;return arguments.length?([j,w]=y,c=x(j,w),h):[c(0),c(1)]}}return h.range=p(Rl),h.rangeRound=p(VS),h.unknown=function(x){return arguments.length?(f=x,h):f},function(x){return l=x,n=x(e),r=x(t),i=n===r?0:1/(r-n),h}}function Ui(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Cz(){var e=qi(cp()(Nn));return e.copy=function(){return Ui(e,Cz())},Ya.apply(e,arguments)}function Mz(){var e=KS(cp()).domain([1,10]);return e.copy=function(){return Ui(e,Mz()).base(e.base())},Ya.apply(e,arguments)}function kz(){var e=YS(cp());return e.copy=function(){return Ui(e,kz()).constant(e.constant())},Ya.apply(e,arguments)}function i2(){var e=XS(cp());return e.copy=function(){return Ui(e,i2()).exponent(e.exponent())},Ya.apply(e,arguments)}function mee(){return i2.apply(null,arguments).exponent(.5)}function Pz(){var e=[],t=Nn;function n(r){if(r!=null&&!isNaN(r=+r))return t((sd(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ci),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,l)=>eQ(e,l/r))},n.copy=function(){return Pz(t).domain(e)},Ya.apply(n,arguments)}function up(){var e=0,t=.5,n=1,r=1,i,l,c,d,f,h=Nn,p,x=!1,y;function j(S){return isNaN(S=+S)?y:(S=.5+((S=+p(S))-l)*(r*S<r*l?d:f),h(x?Math.max(0,Math.min(1,S)):S))}j.domain=function(S){return arguments.length?([e,t,n]=S,i=p(e=+e),l=p(t=+t),c=p(n=+n),d=i===l?0:.5/(l-i),f=l===c?0:.5/(c-l),r=l<i?-1:1,j):[e,t,n]},j.clamp=function(S){return arguments.length?(x=!!S,j):x},j.interpolator=function(S){return arguments.length?(h=S,j):h};function w(S){return function(v){var A,O,_;return arguments.length?([A,O,_]=v,h=_Q(S,[A,O,_]),j):[h(0),h(.5),h(1)]}}return j.range=w(Rl),j.rangeRound=w(VS),j.unknown=function(S){return arguments.length?(y=S,j):y},function(S){return p=S,i=S(e),l=S(t),c=S(n),d=i===l?0:.5/(l-i),f=l===c?0:.5/(c-l),r=l<i?-1:1,j}}function Rz(){var e=qi(up()(Nn));return e.copy=function(){return Ui(e,Rz())},Ya.apply(e,arguments)}function Dz(){var e=KS(up()).domain([.1,1,10]);return e.copy=function(){return Ui(e,Dz()).base(e.base())},Ya.apply(e,arguments)}function zz(){var e=YS(up());return e.copy=function(){return Ui(e,zz()).constant(e.constant())},Ya.apply(e,arguments)}function s2(){var e=XS(up());return e.copy=function(){return Ui(e,s2()).exponent(e.exponent())},Ya.apply(e,arguments)}function pee(){return s2.apply(null,arguments).exponent(.5)}const YP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:wu,scaleDiverging:Rz,scaleDivergingLog:Dz,scaleDivergingPow:s2,scaleDivergingSqrt:pee,scaleDivergingSymlog:zz,scaleIdentity:mz,scaleImplicit:Aj,scaleLinear:em,scaleLog:xz,scaleOrdinal:IS,scalePoint:nu,scalePow:WS,scaleQuantile:vz,scaleQuantize:bz,scaleRadial:gz,scaleSequential:Cz,scaleSequentialLog:Mz,scaleSequentialPow:i2,scaleSequentialQuantile:Pz,scaleSequentialSqrt:mee,scaleSequentialSymlog:kz,scaleSqrt:XQ,scaleSymlog:yz,scaleThreshold:jz,scaleTime:fee,scaleUtc:hee,tickFormat:hz},Symbol.toStringTag,{value:"Module"}));var C0,XP;function dp(){if(XP)return C0;XP=1;var e=Cl();function t(n,r,i){for(var l=-1,c=n.length;++l<c;){var d=n[l],f=r(d);if(f!=null&&(h===void 0?f===f&&!e(f):i(f,h)))var h=f,p=d}return p}return C0=t,C0}var M0,WP;function Lz(){if(WP)return M0;WP=1;function e(t,n){return t>n}return M0=e,M0}var k0,ZP;function xee(){if(ZP)return k0;ZP=1;var e=dp(),t=Lz(),n=Pl();function r(i){return i&&i.length?e(i,n,t):void 0}return k0=r,k0}var yee=xee();const fp=st(yee);var P0,QP;function $z(){if(QP)return P0;QP=1;function e(t,n){return t<n}return P0=e,P0}var R0,JP;function gee(){if(JP)return R0;JP=1;var e=dp(),t=$z(),n=Pl();function r(i){return i&&i.length?e(i,n,t):void 0}return R0=r,R0}var vee=gee();const hp=st(vee);var D0,e3;function bee(){if(e3)return D0;e3=1;var e=wS(),t=sa(),n=K6(),r=Dn();function i(l,c){var d=r(l)?e:n;return d(l,t(c,3))}return D0=i,D0}var z0,t3;function jee(){if(t3)return z0;t3=1;var e=F6(),t=bee();function n(r,i){return e(t(r,i),1)}return z0=n,z0}var wee=jee();const See=st(wee);var L0,n3;function Nee(){if(n3)return L0;n3=1;var e=DS();function t(n,r){return e(n,r)}return L0=t,L0}var Aee=Nee();const ud=st(Aee);var Dl=1e9,_ee={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},l2,_t=!0,wr="[DecimalError] ",Ts=wr+"Invalid argument: ",o2=wr+"Exponent out of range: ",zl=Math.floor,xs=Math.pow,Oee=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Xn,Jt=1e7,St=7,Bz=9007199254740991,am=zl(Bz/St),me={};me.absoluteValue=me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};me.comparedTo=me.cmp=function(e){var t,n,r,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(r=l.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return r===i?0:r>i^l.s<0?1:-1};me.decimalPlaces=me.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*St;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};me.dividedBy=me.div=function(e){return $a(this,new this.constructor(e))};me.dividedToIntegerBy=me.idiv=function(e){var t=this,n=t.constructor;return mt($a(t,new n(e),0,1),n.precision)};me.equals=me.eq=function(e){return!this.cmp(e)};me.exponent=function(){return Vt(this)};me.greaterThan=me.gt=function(e){return this.cmp(e)>0};me.greaterThanOrEqualTo=me.gte=function(e){return this.cmp(e)>=0};me.isInteger=me.isint=function(){return this.e>this.d.length-2};me.isNegative=me.isneg=function(){return this.s<0};me.isPositive=me.ispos=function(){return this.s>0};me.isZero=function(){return this.s===0};me.lessThan=me.lt=function(e){return this.cmp(e)<0};me.lessThanOrEqualTo=me.lte=function(e){return this.cmp(e)<1};me.logarithm=me.log=function(e){var t,n=this,r=n.constructor,i=r.precision,l=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Xn))throw Error(wr+"NaN");if(n.s<1)throw Error(wr+(n.s?"NaN":"-Infinity"));return n.eq(Xn)?new r(0):(_t=!1,t=$a(Ou(n,l),Ou(e,l),l),_t=!0,mt(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Uz(t,e):Iz(t,(e.s=-e.s,e))};me.modulo=me.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(wr+"NaN");return n.s?(_t=!1,t=$a(n,e,0,1).times(e),_t=!0,n.minus(t)):mt(new r(n),i)};me.naturalExponential=me.exp=function(){return qz(this)};me.naturalLogarithm=me.ln=function(){return Ou(this)};me.negated=me.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};me.plus=me.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Iz(t,e):Uz(t,(e.s=-e.s,e))};me.precision=me.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ts+e);if(t=Vt(i)+1,r=i.d.length-1,n=r*St+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};me.squareRoot=me.sqrt=function(){var e,t,n,r,i,l,c,d=this,f=d.constructor;if(d.s<1){if(!d.s)return new f(0);throw Error(wr+"NaN")}for(e=Vt(d),_t=!1,i=Math.sqrt(+d),i==0||i==1/0?(t=Xr(d.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zl((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),r=new f(t)):r=new f(i.toString()),n=f.precision,i=c=n+3;;)if(l=r,r=l.plus($a(d,l,c+2)).times(.5),Xr(l.d).slice(0,c)===(t=Xr(r.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(mt(l,n+1,0),l.times(l).eq(d)){r=l;break}}else if(t!="9999")break;c+=4}return _t=!0,mt(r,n)};me.times=me.mul=function(e){var t,n,r,i,l,c,d,f,h,p=this,x=p.constructor,y=p.d,j=(e=new x(e)).d;if(!p.s||!e.s)return new x(0);for(e.s*=p.s,n=p.e+e.e,f=y.length,h=j.length,f<h&&(l=y,y=j,j=l,c=f,f=h,h=c),l=[],c=f+h,r=c;r--;)l.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)d=l[i]+j[r]*y[i-r-1]+t,l[i--]=d%Jt|0,t=d/Jt|0;l[i]=(l[i]+t)%Jt|0}for(;!l[--c];)l.pop();return t?++n:l.shift(),e.d=l,e.e=n,_t?mt(e,x.precision):e};me.toDecimalPlaces=me.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ra(e,0,Dl),t===void 0?t=r.rounding:ra(t,0,8),mt(n,e+Vt(n)+1,t))};me.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ks(r,!0):(ra(e,0,Dl),t===void 0?t=i.rounding:ra(t,0,8),r=mt(new i(r),e+1,t),n=ks(r,!0,e+1)),n};me.toFixed=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?ks(i):(ra(e,0,Dl),t===void 0?t=l.rounding:ra(t,0,8),r=mt(new l(i),e+Vt(i)+1,t),n=ks(r.abs(),!1,e+Vt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};me.toInteger=me.toint=function(){var e=this,t=e.constructor;return mt(new t(e),Vt(e)+1,t.rounding)};me.toNumber=function(){return+this};me.toPower=me.pow=function(e){var t,n,r,i,l,c,d=this,f=d.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Xn);if(d=new f(d),!d.s){if(e.s<1)throw Error(wr+"Infinity");return d}if(d.eq(Xn))return d;if(r=f.precision,e.eq(Xn))return mt(d,r);if(t=e.e,n=e.d.length-1,c=t>=n,l=d.s,c){if((n=p<0?-p:p)<=Bz){for(i=new f(Xn),t=Math.ceil(r/St+4),_t=!1;n%2&&(i=i.times(d),a3(i.d,t)),n=zl(n/2),n!==0;)d=d.times(d),a3(d.d,t);return _t=!0,e.s<0?new f(Xn).div(i):mt(i,r)}}else if(l<0)throw Error(wr+"NaN");return l=l<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,_t=!1,i=e.times(Ou(d,r+h)),_t=!0,i=qz(i),i.s=l,i};me.toPrecision=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?(n=Vt(i),r=ks(i,n<=l.toExpNeg||n>=l.toExpPos)):(ra(e,1,Dl),t===void 0?t=l.rounding:ra(t,0,8),i=mt(new l(i),e,t),n=Vt(i),r=ks(i,e<=n||n<=l.toExpNeg,e)),r};me.toSignificantDigits=me.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ra(e,1,Dl),t===void 0?t=r.rounding:ra(t,0,8)),mt(new r(n),e,t)};me.toString=me.valueOf=me.val=me.toJSON=me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Vt(e),n=e.constructor;return ks(e,t<=n.toExpNeg||t>=n.toExpPos)};function Iz(e,t){var n,r,i,l,c,d,f,h,p=e.constructor,x=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),_t?mt(t,x):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),l=c-i,l){for(l<0?(r=f,l=-l,d=h.length):(r=h,i=c,d=f.length),c=Math.ceil(x/St),d=c>d?c+1:d+1,l>d&&(l=d,r.length=1),r.reverse();l--;)r.push(0);r.reverse()}for(d=f.length,l=h.length,d-l<0&&(l=d,r=h,h=f,f=r),n=0;l;)n=(f[--l]=f[l]+h[l]+n)/Jt|0,f[l]%=Jt;for(n&&(f.unshift(n),++i),d=f.length;f[--d]==0;)f.pop();return t.d=f,t.e=i,_t?mt(t,x):t}function ra(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Ts+e)}function Xr(e){var t,n,r,i=e.length-1,l="",c=e[0];if(i>0){for(l+=c,t=1;t<i;t++)r=e[t]+"",n=St-r.length,n&&(l+=Ai(n)),l+=r;c=e[t],r=c+"",n=St-r.length,n&&(l+=Ai(n))}else if(c===0)return"0";for(;c%10===0;)c/=10;return l+c}var $a=(function(){function e(r,i){var l,c=0,d=r.length;for(r=r.slice();d--;)l=r[d]*i+c,r[d]=l%Jt|0,c=l/Jt|0;return c&&r.unshift(c),r}function t(r,i,l,c){var d,f;if(l!=c)f=l>c?1:-1;else for(d=f=0;d<l;d++)if(r[d]!=i[d]){f=r[d]>i[d]?1:-1;break}return f}function n(r,i,l){for(var c=0;l--;)r[l]-=c,c=r[l]<i[l]?1:0,r[l]=c*Jt+r[l]-i[l];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,l,c){var d,f,h,p,x,y,j,w,S,v,A,O,_,T,N,E,k,R,B=r.constructor,D=r.s==i.s?1:-1,z=r.d,$=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(wr+"Division by zero");for(f=r.e-i.e,k=$.length,N=z.length,j=new B(D),w=j.d=[],h=0;$[h]==(z[h]||0);)++h;if($[h]>(z[h]||0)&&--f,l==null?O=l=B.precision:c?O=l+(Vt(r)-Vt(i))+1:O=l,O<0)return new B(0);if(O=O/St+2|0,h=0,k==1)for(p=0,$=$[0],O++;(h<N||p)&&O--;h++)_=p*Jt+(z[h]||0),w[h]=_/$|0,p=_%$|0;else{for(p=Jt/($[0]+1)|0,p>1&&($=e($,p),z=e(z,p),k=$.length,N=z.length),T=k,S=z.slice(0,k),v=S.length;v<k;)S[v++]=0;R=$.slice(),R.unshift(0),E=$[0],$[1]>=Jt/2&&++E;do p=0,d=t($,S,k,v),d<0?(A=S[0],k!=v&&(A=A*Jt+(S[1]||0)),p=A/E|0,p>1?(p>=Jt&&(p=Jt-1),x=e($,p),y=x.length,v=S.length,d=t(x,S,y,v),d==1&&(p--,n(x,k<y?R:$,y))):(p==0&&(d=p=1),x=$.slice()),y=x.length,y<v&&x.unshift(0),n(S,x,v),d==-1&&(v=S.length,d=t($,S,k,v),d<1&&(p++,n(S,k<v?R:$,v))),v=S.length):d===0&&(p++,S=[0]),w[h++]=p,d&&S[0]?S[v++]=z[T]||0:(S=[z[T]],v=1);while((T++<N||S[0]!==void 0)&&O--)}return w[0]||w.shift(),j.e=f,mt(j,c?l+Vt(j)+1:l)}})();function qz(e,t){var n,r,i,l,c,d,f=0,h=0,p=e.constructor,x=p.precision;if(Vt(e)>16)throw Error(o2+Vt(e));if(!e.s)return new p(Xn);for(_t=!1,d=x,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(r=Math.log(xs(2,h))/Math.LN10*2+5|0,d+=r,n=i=l=new p(Xn),p.precision=d;;){if(i=mt(i.times(e),d),n=n.times(++f),c=l.plus($a(i,n,d)),Xr(c.d).slice(0,d)===Xr(l.d).slice(0,d)){for(;h--;)l=mt(l.times(l),d);return p.precision=x,t==null?(_t=!0,mt(l,x)):l}l=c}}function Vt(e){for(var t=e.e*St,n=e.d[0];n>=10;n/=10)t++;return t}function $0(e,t,n){if(t>e.LN10.sd())throw _t=!0,n&&(e.precision=n),Error(wr+"LN10 precision limit exceeded");return mt(new e(e.LN10),t)}function Ai(e){for(var t="";e--;)t+="0";return t}function Ou(e,t){var n,r,i,l,c,d,f,h,p,x=1,y=10,j=e,w=j.d,S=j.constructor,v=S.precision;if(j.s<1)throw Error(wr+(j.s?"NaN":"-Infinity"));if(j.eq(Xn))return new S(0);if(t==null?(_t=!1,h=v):h=t,j.eq(10))return t==null&&(_t=!0),$0(S,h);if(h+=y,S.precision=h,n=Xr(w),r=n.charAt(0),l=Vt(j),Math.abs(l)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)j=j.times(e),n=Xr(j.d),r=n.charAt(0),x++;l=Vt(j),r>1?(j=new S("0."+n),l++):j=new S(r+"."+n.slice(1))}else return f=$0(S,h+2,v).times(l+""),j=Ou(new S(r+"."+n.slice(1)),h-y).plus(f),S.precision=v,t==null?(_t=!0,mt(j,v)):j;for(d=c=j=$a(j.minus(Xn),j.plus(Xn),h),p=mt(j.times(j),h),i=3;;){if(c=mt(c.times(p),h),f=d.plus($a(c,new S(i),h)),Xr(f.d).slice(0,h)===Xr(d.d).slice(0,h))return d=d.times(2),l!==0&&(d=d.plus($0(S,h+2,v).times(l+""))),d=$a(d,new S(x),h),S.precision=v,t==null?(_t=!0,mt(d,v)):d;d=f,i+=2}}function r3(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=zl(n/St),e.d=[],r=(n+1)%St,n<0&&(r+=St),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=St;r<i;)e.d.push(+t.slice(r,r+=St));t=t.slice(r),r=St-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),_t&&(e.e>am||e.e<-am))throw Error(o2+n)}else e.s=0,e.e=0,e.d=[0];return e}function mt(e,t,n){var r,i,l,c,d,f,h,p,x=e.d;for(c=1,l=x[0];l>=10;l/=10)c++;if(r=t-c,r<0)r+=St,i=t,h=x[p=0];else{if(p=Math.ceil((r+1)/St),l=x.length,p>=l)return e;for(h=l=x[p],c=1;l>=10;l/=10)c++;r%=St,i=r-St+c}if(n!==void 0&&(l=xs(10,c-i-1),d=h/l%10|0,f=t<0||x[p+1]!==void 0||h%l,f=n<4?(d||f)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||f||n==6&&(r>0?i>0?h/xs(10,c-i):0:x[p-1])%10&1||n==(e.s<0?8:7))),t<1||!x[0])return f?(l=Vt(e),x.length=1,t=t-l-1,x[0]=xs(10,(St-t%St)%St),e.e=zl(-t/St)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(r==0?(x.length=p,l=1,p--):(x.length=p+1,l=xs(10,St-r),x[p]=i>0?(h/xs(10,c-i)%xs(10,i)|0)*l:0),f)for(;;)if(p==0){(x[0]+=l)==Jt&&(x[0]=1,++e.e);break}else{if(x[p]+=l,x[p]!=Jt)break;x[p--]=0,l=1}for(r=x.length;x[--r]===0;)x.pop();if(_t&&(e.e>am||e.e<-am))throw Error(o2+Vt(e));return e}function Uz(e,t){var n,r,i,l,c,d,f,h,p,x,y=e.constructor,j=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),_t?mt(t,j):t;if(f=e.d,x=t.d,r=t.e,h=e.e,f=f.slice(),c=h-r,c){for(p=c<0,p?(n=f,c=-c,d=x.length):(n=x,r=h,d=f.length),i=Math.max(Math.ceil(j/St),d)+2,c>i&&(c=i,n.length=1),n.reverse(),i=c;i--;)n.push(0);n.reverse()}else{for(i=f.length,d=x.length,p=i<d,p&&(d=i),i=0;i<d;i++)if(f[i]!=x[i]){p=f[i]<x[i];break}c=0}for(p&&(n=f,f=x,x=n,t.s=-t.s),d=f.length,i=x.length-d;i>0;--i)f[d++]=0;for(i=x.length;i>c;){if(f[--i]<x[i]){for(l=i;l&&f[--l]===0;)f[l]=Jt-1;--f[l],f[i]+=Jt}f[i]-=x[i]}for(;f[--d]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,_t?mt(t,j):t):new y(0)}function ks(e,t,n){var r,i=Vt(e),l=Xr(e.d),c=l.length;return t?(n&&(r=n-c)>0?l=l.charAt(0)+"."+l.slice(1)+Ai(r):c>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+Ai(-i-1)+l,n&&(r=n-c)>0&&(l+=Ai(r))):i>=c?(l+=Ai(i+1-c),n&&(r=n-i-1)>0&&(l=l+"."+Ai(r))):((r=i+1)<c&&(l=l.slice(0,r)+"."+l.slice(r)),n&&(r=n-c)>0&&(i+1===c&&(l+="."),l+=Ai(r))),e.s<0?"-"+l:l}function a3(e,t){if(e.length>t)return e.length=t,!0}function Vz(e){var t,n,r;function i(l){var c=this;if(!(c instanceof i))return new i(l);if(c.constructor=i,l instanceof i){c.s=l.s,c.e=l.e,c.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(Ts+l);if(l>0)c.s=1;else if(l<0)l=-l,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(l===~~l&&l<1e7){c.e=0,c.d=[l];return}return r3(c,l.toString())}else if(typeof l!="string")throw Error(Ts+l);if(l.charCodeAt(0)===45?(l=l.slice(1),c.s=-1):c.s=1,Oee.test(l))r3(c,l);else throw Error(Ts+l)}if(i.prototype=me,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=Vz,i.config=i.set=Tee,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Tee(e){if(!e||typeof e!="object")throw Error(wr+"Object expected");var t,n,r,i=["precision",1,Dl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(zl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Ts+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ts+n+": "+r);return this}var l2=Vz(_ee);Xn=new l2(1);const ut=l2;function Eee(e){return Pee(e)||kee(e)||Mee(e)||Cee()}function Cee(){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 Mee(e,t){if(e){if(typeof e=="string")return Ej(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ej(e,t)}}function kee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Pee(e){if(Array.isArray(e))return Ej(e)}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ree=function(t){return t},Hz={},Fz=function(t){return t===Hz},i3=function(t){return function n(){return arguments.length===0||arguments.length===1&&Fz(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Dee=function e(t,n){return t===1?n:i3(function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];var c=i.filter(function(d){return d!==Hz}).length;return c>=t?n.apply(void 0,i):e(t-c,i3(function(){for(var d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];var p=i.map(function(x){return Fz(x)?f.shift():x});return n.apply(void 0,Eee(p).concat(f))}))})},mp=function(t){return Dee(t.length,t)},Cj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},zee=mp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Lee=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Ree;var i=n.reverse(),l=i[0],c=i.slice(1);return function(){return c.reduce(function(d,f){return f(d)},l.apply(void 0,arguments))}},Mj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Gz=function(t){var n=null,r=null;return function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return n&&l.every(function(d,f){return d===n[f]})||(n=l,r=t.apply(void 0,l)),r}};function $ee(e){var t;return e===0?t=1:t=Math.floor(new ut(e).abs().log(10).toNumber())+1,t}function Bee(e,t,n){for(var r=new ut(e),i=0,l=[];r.lt(t)&&i<1e5;)l.push(r.toNumber()),r=r.add(n),i++;return l}var Iee=mp(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),qee=mp(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Uee=mp(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const pp={rangeStep:Bee,getDigitCount:$ee,interpolateNumber:Iee,uninterpolateNumber:qee,uninterpolateTruncation:Uee};function kj(e){return Fee(e)||Hee(e)||Kz(e)||Vee()}function Vee(){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 Hee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Fee(e){if(Array.isArray(e))return Pj(e)}function Tu(e,t){return Yee(e)||Kee(e,t)||Kz(e,t)||Gee()}function Gee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kz(e,t){if(e){if(typeof e=="string")return Pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pj(e,t)}}function Pj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kee(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,l=void 0;try{for(var c=e[Symbol.iterator](),d;!(r=(d=c.next()).done)&&(n.push(d.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,l=f}finally{try{!r&&c.return!=null&&c.return()}finally{if(i)throw l}}return n}}function Yee(e){if(Array.isArray(e))return e}function Yz(e){var t=Tu(e,2),n=t[0],r=t[1],i=n,l=r;return n>r&&(i=r,l=n),[i,l]}function Xz(e,t,n){if(e.lte(0))return new ut(0);var r=pp.getDigitCount(e.toNumber()),i=new ut(10).pow(r),l=e.div(i),c=r!==1?.05:.1,d=new ut(Math.ceil(l.div(c).toNumber())).add(n).mul(c),f=d.mul(i);return t?f:new ut(Math.ceil(f))}function Xee(e,t,n){var r=1,i=new ut(e);if(!i.isint()&&n){var l=Math.abs(e);l<1?(r=new ut(10).pow(pp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):l>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));var c=Math.floor((t-1)/2),d=Lee(zee(function(f){return i.add(new ut(f-c).mul(r)).toNumber()}),Cj);return d(0,t)}function Wz(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var l=Xz(new ut(t).sub(e).div(n-1),r,i),c;e<=0&&t>=0?c=new ut(0):(c=new ut(e).add(t).div(2),c=c.sub(new ut(c).mod(l)));var d=Math.ceil(c.sub(e).div(l).toNumber()),f=Math.ceil(new ut(t).sub(c).div(l).toNumber()),h=d+f+1;return h>n?Wz(e,t,n,r,i+1):(h<n&&(f=t>0?f+(n-h):f,d=t>0?d:d+(n-h)),{step:l,tickMin:c.sub(new ut(d).mul(l)),tickMax:c.add(new ut(f).mul(l))})}function Wee(e){var t=Tu(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Math.max(i,2),d=Yz([n,r]),f=Tu(d,2),h=f[0],p=f[1];if(h===-1/0||p===1/0){var x=p===1/0?[h].concat(kj(Cj(0,i-1).map(function(){return 1/0}))):[].concat(kj(Cj(0,i-1).map(function(){return-1/0})),[p]);return n>r?Mj(x):x}if(h===p)return Xee(h,i,l);var y=Wz(h,p,c,l),j=y.step,w=y.tickMin,S=y.tickMax,v=pp.rangeStep(w,S.add(new ut(.1).mul(j)),j);return n>r?Mj(v):v}function Zee(e,t){var n=Tu(e,2),r=n[0],i=n[1],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Yz([r,i]),d=Tu(c,2),f=d[0],h=d[1];if(f===-1/0||h===1/0)return[r,i];if(f===h)return[f];var p=Math.max(t,2),x=Xz(new ut(h).sub(f).div(p-1),l,0),y=[].concat(kj(pp.rangeStep(new ut(f),new ut(h).sub(new ut(.99).mul(x)),x)),[h]);return r>i?Mj(y):y}var Qee=Gz(Wee),Jee=Gz(Zee),ete="Invariant failed";function Ps(e,t){throw new Error(ete)}var tte=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}function im(){return im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},im.apply(this,arguments)}function nte(e,t){return ste(e)||ite(e,t)||ate(e,t)||rte()}function rte(){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 ate(e,t){if(e){if(typeof e=="string")return s3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s3(e,t)}}function s3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ite(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function ste(e){if(Array.isArray(e))return e}function ote(e,t){if(e==null)return{};var n=lte(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lte(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ute(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jz(r.key),r)}}function dte(e,t,n){return t&&ute(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fte(e,t,n){return t=sm(t),hte(e,Zz()?Reflect.construct(t,n||[],sm(e).constructor):t.apply(e,n))}function hte(e,t){if(t&&(rl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mte(e)}function mte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zz=function(){return!!e})()}function sm(e){return sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sm(e)}function pte(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&&Rj(e,t)}function Rj(e,t){return Rj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rj(e,t)}function Qz(e,t,n){return t=Jz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jz(e){var t=xte(e,"string");return rl(t)=="symbol"?t:t+""}function xte(e,t){if(rl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dd=(function(e){function t(){return cte(this,t),fte(this,t,arguments)}return pte(t,e),dte(t,[{key:"render",value:function(){var r=this.props,i=r.offset,l=r.layout,c=r.width,d=r.dataKey,f=r.data,h=r.dataPointFormatter,p=r.xAxis,x=r.yAxis,y=ote(r,tte),j=je(y,!1);this.props.direction==="x"&&p.type!=="number"&&Ps();var w=f.map(function(S){var v=h(S,d),A=v.x,O=v.y,_=v.value,T=v.errorVal;if(!T)return null;var N=[],E,k;if(Array.isArray(T)){var R=nte(T,2);E=R[0],k=R[1]}else E=k=T;if(l==="vertical"){var B=p.scale,D=O+i,z=D+c,$=D-c,L=B(_-E),K=B(_+k);N.push({x1:K,y1:z,x2:K,y2:$}),N.push({x1:L,y1:D,x2:K,y2:D}),N.push({x1:L,y1:z,x2:L,y2:$})}else if(l==="horizontal"){var H=x.scale,I=A+i,F=I-c,Z=I+c,ie=H(_-E),ce=H(_+k);N.push({x1:F,y1:ce,x2:Z,y2:ce}),N.push({x1:I,y1:ie,x2:I,y2:ce}),N.push({x1:F,y1:ie,x2:Z,y2:ie})}return V.createElement(Ze,im({className:"recharts-errorBar",key:"bar-".concat(N.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},j),N.map(function(q){return V.createElement("line",im({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return V.createElement(Ze,{className:"recharts-errorBars"},w)}}])})(V.Component);Qz(dd,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Qz(dd,"displayName","ErrorBar");function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}function o3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o3(Object(n),!0).forEach(function(r){yte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yte(e,t,n){return t=gte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gte(e){var t=vte(e,"string");return Eu(t)=="symbol"?t:t+""}function vte(e,t){if(Eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eL=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,l=t.legendContent,c=Kn(n,Ho);if(!c)return null;var d=Ho.defaultProps,f=d!==void 0?cs(cs({},d),c.props):{},h;return c.props&&c.props.payload?h=c.props&&c.props.payload:l==="children"?h=(r||[]).reduce(function(p,x){var y=x.item,j=x.props,w=j.sectors||j.data||[];return p.concat(w.map(function(S){return{type:c.props.iconType||y.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):h=(r||[]).map(function(p){var x=p.item,y=x.type.defaultProps,j=y!==void 0?cs(cs({},y),x.props):{},w=j.dataKey,S=j.name,v=j.legendType,A=j.hide;return{inactive:A,dataKey:w,type:f.iconType||v||"square",color:c2(x),value:S||w,payload:j}}),cs(cs(cs({},f),Ho.getWithHeight(c,i)),{},{payload:h,item:c})};function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function l3(e){return Ste(e)||wte(e)||jte(e)||bte()}function bte(){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 jte(e,t){if(e){if(typeof e=="string")return Dj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dj(e,t)}}function wte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ste(e){if(Array.isArray(e))return Dj(e)}function Dj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c3(Object(n),!0).forEach(function(r){Go(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Go(e,t,n){return t=Nte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nte(e){var t=Ate(e,"string");return Cu(t)=="symbol"?t:t+""}function Ate(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yt(e,t,n){return Pe(e)||Pe(t)?n:Xt(t)?Zn(e,t,n):Ee(t)?t(e):n}function ru(e,t,n,r){var i=See(e,function(d){return Yt(d,t)});if(n==="number"){var l=i.filter(function(d){return he(d)||parseFloat(d)});return l.length?[hp(l),fp(l)]:[1/0,-1/0]}var c=r?i.filter(function(d){return!Pe(d)}):i;return c.map(function(d){return Xt(d)||d instanceof Date?d:""})}var _te=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,c=-1,d=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(d<=1)return 0;if(l&&l.axisType==="angleAxis"&&Math.abs(Math.abs(l.range[1]-l.range[0])-360)<=1e-6)for(var f=l.range,h=0;h<d;h++){var p=h>0?i[h-1].coordinate:i[d-1].coordinate,x=i[h].coordinate,y=h>=d-1?i[0].coordinate:i[h+1].coordinate,j=void 0;if(wn(x-p)!==wn(y-x)){var w=[];if(wn(y-x)===wn(f[1]-f[0])){j=y;var S=x+f[1]-f[0];w[0]=Math.min(S,(S+p)/2),w[1]=Math.max(S,(S+p)/2)}else{j=p;var v=y+f[1]-f[0];w[0]=Math.min(x,(v+x)/2),w[1]=Math.max(x,(v+x)/2)}var A=[Math.min(x,(j+x)/2),Math.max(x,(j+x)/2)];if(t>A[0]&&t<=A[1]||t>=w[0]&&t<=w[1]){c=i[h].index;break}}else{var O=Math.min(p,y),_=Math.max(p,y);if(t>(O+x)/2&&t<=(_+x)/2){c=i[h].index;break}}}else for(var T=0;T<d;T++)if(T===0&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T>0&&T<d-1&&t>(r[T].coordinate+r[T-1].coordinate)/2&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T===d-1&&t>(r[T].coordinate+r[T-1].coordinate)/2){c=r[T].index;break}return c},c2=function(t){var n,r=t,i=r.type.displayName,l=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,c=l.stroke,d=l.fill,f;switch(i){case"Line":f=c;break;case"Area":case"Radar":f=c&&c!=="none"?c:d;break;default:f=d;break}return f},Ote=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,l=i===void 0?{}:i;if(!l)return{};for(var c={},d=Object.keys(l),f=0,h=d.length;f<h;f++)for(var p=l[d[f]].stackGroups,x=Object.keys(p),y=0,j=x.length;y<j;y++){var w=p[x[y]],S=w.items,v=w.cateAxisId,A=S.filter(function(k){return La(k.type).indexOf("Bar")>=0});if(A&&A.length){var O=A[0].type.defaultProps,_=O!==void 0?Pt(Pt({},O),A[0].props):A[0].props,T=_.barSize,N=_[v];c[N]||(c[N]=[]);var E=Pe(T)?n:T;c[N].push({item:A[0],stackList:A.slice(1),barSize:Pe(E)?void 0:Sn(E,r,0)})}}return c},Tte=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,l=t.sizeList,c=l===void 0?[]:l,d=t.maxBarSize,f=c.length;if(f<1)return null;var h=Sn(n,i,0,!0),p,x=[];if(c[0].barSize===+c[0].barSize){var y=!1,j=i/f,w=c.reduce(function(T,N){return T+N.barSize||0},0);w+=(f-1)*h,w>=i&&(w-=(f-1)*h,h=0),w>=i&&j>0&&(y=!0,j*=.9,w=f*j);var S=(i-w)/2>>0,v={offset:S-h,size:0};p=c.reduce(function(T,N){var E={item:N.item,position:{offset:v.offset+v.size+h,size:y?j:N.barSize}},k=[].concat(l3(T),[E]);return v=k[k.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){k.push({item:R,position:v})}),k},x)}else{var A=Sn(r,i,0,!0);i-2*A-(f-1)*h<=0&&(h=0);var O=(i-2*A-(f-1)*h)/f;O>1&&(O>>=0);var _=d===+d?Math.min(O,d):O;p=c.reduce(function(T,N,E){var k=[].concat(l3(T),[{item:N.item,position:{offset:A+(O+h)*E+(O-_)/2,size:_}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){k.push({item:R,position:k[k.length-1].position})}),k},x)}return p},Ete=function(t,n,r,i){var l=r.children,c=r.width,d=r.margin,f=c-(d.left||0)-(d.right||0),h=eL({children:l,legendWidth:f});if(h){var p=i||{},x=p.width,y=p.height,j=h.align,w=h.verticalAlign,S=h.layout;if((S==="vertical"||S==="horizontal"&&w==="middle")&&j!=="center"&&he(t[j]))return Pt(Pt({},t),{},Go({},j,t[j]+(x||0)));if((S==="horizontal"||S==="vertical"&&j==="center")&&w!=="middle"&&he(t[w]))return Pt(Pt({},t),{},Go({},w,t[w]+(y||0)))}return t},Cte=function(t,n,r){return Pe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},tL=function(t,n,r,i,l){var c=n.props.children,d=Qn(c,dd).filter(function(h){return Cte(i,l,h.props.direction)});if(d&&d.length){var f=d.map(function(h){return h.props.dataKey});return t.reduce(function(h,p){var x=Yt(p,r);if(Pe(x))return h;var y=Array.isArray(x)?[hp(x),fp(x)]:[x,x],j=f.reduce(function(w,S){var v=Yt(p,S,0),A=y[0]-Math.abs(Array.isArray(v)?v[0]:v),O=y[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(A,w[0]),Math.max(O,w[1])]},[1/0,-1/0]);return[Math.min(j[0],h[0]),Math.max(j[1],h[1])]},[1/0,-1/0])}return null},Mte=function(t,n,r,i,l){var c=n.map(function(d){return tL(t,d,r,l,i)}).filter(function(d){return!Pe(d)});return c&&c.length?c.reduce(function(d,f){return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]):null},nL=function(t,n,r,i,l){var c=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&tL(t,f,h,i)||ru(t,h,r,l)});if(r==="number")return c.reduce(function(f,h){return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);var d={};return c.reduce(function(f,h){for(var p=0,x=h.length;p<x;p++)d[h[p]]||(d[h[p]]=!0,f.push(h[p]));return f},[])},rL=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},aL=function(t,n,r,i){if(i)return t.map(function(f){return f.coordinate});var l,c,d=t.map(function(f){return f.coordinate===n&&(l=!0),f.coordinate===r&&(c=!0),f.coordinate});return l||d.push(n),c||d.push(r),d},Ra=function(t,n,r){if(!t)return null;var i=t.scale,l=t.duplicateDomain,c=t.type,d=t.range,f=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&c==="category"&&i.bandwidth?i.bandwidth()/f:0;if(h=t.axisType==="angleAxis"&&(d==null?void 0:d.length)>=2?wn(d[0]-d[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var p=(t.ticks||t.niceTicks).map(function(x){var y=l?l.indexOf(x):x;return{coordinate:i(y)+h,value:x,offset:h}});return p.filter(function(x){return!ad(x.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(x,y){return{coordinate:i(x)+h,value:x,index:y,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(x){return{coordinate:i(x)+h,value:x,offset:h}}):i.domain().map(function(x,y){return{coordinate:i(x)+h,value:l?l[x]:x,index:y,offset:h}})},B0=new WeakMap,Jf=function(t,n){if(typeof n!="function")return t;B0.has(t)||B0.set(t,new WeakMap);var r=B0.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},iL=function(t,n,r){var i=t.scale,l=t.type,c=t.layout,d=t.axisType;if(i==="auto")return c==="radial"&&d==="radiusAxis"?{scale:wu(),realScaleType:"band"}:c==="radial"&&d==="angleAxis"?{scale:em(),realScaleType:"linear"}:l==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:nu(),realScaleType:"point"}:l==="category"?{scale:wu(),realScaleType:"band"}:{scale:em(),realScaleType:"linear"};if(Es(i)){var f="scale".concat(Zm(i));return{scale:(YP[f]||nu)(),realScaleType:YP[f]?f:"point"}}return Ee(i)?{scale:i}:{scale:nu(),realScaleType:"point"}},u3=1e-4,sL=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),l=Math.min(i[0],i[1])-u3,c=Math.max(i[0],i[1])+u3,d=t(n[0]),f=t(n[r-1]);(d<l||d>c||f<l||f>c)&&t.domain([n[0],n[r-1]])}},kte=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},Pte=function(t,n){if(!n||n.length!==2||!he(n[0])||!he(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),l=[t[0],t[1]];return(!he(t[0])||t[0]<r)&&(l[0]=r),(!he(t[1])||t[1]>i)&&(l[1]=i),l[0]>i&&(l[0]=i),l[1]<r&&(l[1]=r),l},Rte=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var l=0,c=0,d=0;d<n;++d){var f=ad(t[d][r][1])?t[d][r][0]:t[d][r][1];f>=0?(t[d][r][0]=l,t[d][r][1]=l+f,l=t[d][r][1]):(t[d][r][0]=c,t[d][r][1]=c+f,c=t[d][r][1])}},Dte=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var l=0,c=0;c<n;++c){var d=ad(t[c][r][1])?t[c][r][0]:t[c][r][1];d>=0?(t[c][r][0]=l,t[c][r][1]=l+d,l=t[c][r][1]):(t[c][r][0]=0,t[c][r][1]=0)}},zte={sign:Rte,expand:SY,none:Xo,silhouette:NY,wiggle:AY,positive:Dte},Lte=function(t,n,r){var i=n.map(function(d){return d.props.dataKey}),l=zte[r],c=wY().keys(i).value(function(d,f){return+Yt(d,f,0)}).order(uj).offset(l);return c(t)},$te=function(t,n,r,i,l,c){if(!t)return null;var d=c?n.reverse():n,f={},h=d.reduce(function(x,y){var j,w=(j=y.type)!==null&&j!==void 0&&j.defaultProps?Pt(Pt({},y.type.defaultProps),y.props):y.props,S=w.stackId,v=w.hide;if(v)return x;var A=w[r],O=x[A]||{hasStack:!1,stackGroups:{}};if(Xt(S)){var _=O.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(y),O.hasStack=!0,O.stackGroups[S]=_}else O.stackGroups[kl("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[y]};return Pt(Pt({},x),{},Go({},A,O))},f),p={};return Object.keys(h).reduce(function(x,y){var j=h[y];if(j.hasStack){var w={};j.stackGroups=Object.keys(j.stackGroups).reduce(function(S,v){var A=j.stackGroups[v];return Pt(Pt({},S),{},Go({},v,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:Lte(t,A.items,l)}))},w)}return Pt(Pt({},x),{},Go({},y,j))},p)},oL=function(t,n){var r=n.realScaleType,i=n.type,l=n.tickCount,c=n.originalDomain,d=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(l&&i==="number"&&c&&(c[0]==="auto"||c[1]==="auto")){var h=t.domain();if(!h.length)return null;var p=Qee(h,l,d);return t.domain([hp(p),fp(p)]),{niceTicks:p}}if(l&&i==="number"){var x=t.domain(),y=Jee(x,l,d);return{niceTicks:y}}return null};function d3(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,l=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pe(i[t.dataKey])){var d=Dh(n,"value",i[t.dataKey]);if(d)return d.coordinate+r/2}return n[l]?n[l].coordinate+r/2:null}var f=Yt(i,Pe(c)?t.dataKey:c);return Pe(f)?null:t.scale(f)}var f3=function(t){var n=t.axis,r=t.ticks,i=t.offset,l=t.bandSize,c=t.entry,d=t.index;if(n.type==="category")return r[d]?r[d].coordinate+i:null;var f=Yt(c,n.dataKey,n.domain[d]);return Pe(f)?null:n.scale(f)-l/2+i},Bte=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),l=Math.max(r[0],r[1]);return i<=0&&l>=0?0:l<0?l:i}return r[0]},Ite=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,l=i.stackId;if(Xt(l)){var c=n[l];if(c){var d=c.items.indexOf(t);return d>=0?c.stackedData[d]:null}}return null},qte=function(t){return t.reduce(function(n,r){return[hp(r.concat([n[0]]).filter(he)),fp(r.concat([n[1]]).filter(he))]},[1/0,-1/0])},lL=function(t,n,r){return Object.keys(t).reduce(function(i,l){var c=t[l],d=c.stackedData,f=d.reduce(function(h,p){var x=qte(p.slice(n,r+1));return[Math.min(h[0],x[0]),Math.max(h[1],x[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},h3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zj=function(t,n,r){if(Ee(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(he(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(h3.test(t[0])){var l=+h3.exec(t[0])[1];i[0]=n[0]-l}else Ee(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(he(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(m3.test(t[1])){var c=+m3.exec(t[1])[1];i[1]=n[1]+c}else Ee(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},om=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var l=LS(n,function(x){return x.coordinate}),c=1/0,d=1,f=l.length;d<f;d++){var h=l[d],p=l[d-1];c=Math.min((h.coordinate||0)-(p.coordinate||0),c)}return c===1/0?0:c}return r?void 0:0},p3=function(t,n,r){return!t||!t.length||ud(t,Zn(r,"type.defaultProps.domain"))?n:t},cL=function(t,n){var r=t.type.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,l=r.name,c=r.unit,d=r.formatter,f=r.tooltipType,h=r.chartType,p=r.hide;return Pt(Pt({},je(t,!1)),{},{dataKey:i,unit:c,formatter:d,name:l||i,color:c2(t),value:Yt(n,i),type:f,payload:n,chartType:h,hide:p})};function Mu(e){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function x3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x3(Object(n),!0).forEach(function(r){uL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uL(e,t,n){return t=Ute(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ute(e){var t=Vte(e,"string");return Mu(t)=="symbol"?t:t+""}function Vte(e,t){if(Mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hte(e,t){return Yte(e)||Kte(e,t)||Gte(e,t)||Fte()}function Fte(){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 Gte(e,t){if(e){if(typeof e=="string")return y3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y3(e,t)}}function y3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Yte(e){if(Array.isArray(e))return e}var lm=Math.PI/180,Xte=function(t){return t*180/Math.PI},yt=function(t,n,r,i){return{x:t+Math.cos(-lm*i)*r,y:n+Math.sin(-lm*i)*r}},dL=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Wte=function(t,n,r,i,l){var c=t.width,d=t.height,f=t.startAngle,h=t.endAngle,p=Sn(t.cx,c,c/2),x=Sn(t.cy,d,d/2),y=dL(c,d,r),j=Sn(t.innerRadius,y,0),w=Sn(t.outerRadius,y,y*.8),S=Object.keys(n);return S.reduce(function(v,A){var O=n[A],_=O.domain,T=O.reversed,N;if(Pe(O.range))i==="angleAxis"?N=[f,h]:i==="radiusAxis"&&(N=[j,w]),T&&(N=[N[1],N[0]]);else{N=O.range;var E=N,k=Hte(E,2);f=k[0],h=k[1]}var R=iL(O,l),B=R.realScaleType,D=R.scale;D.domain(_).range(N),sL(D);var z=oL(D,Ea(Ea({},O),{},{realScaleType:B})),$=Ea(Ea(Ea({},O),z),{},{range:N,radius:w,realScaleType:B,scale:D,cx:p,cy:x,innerRadius:j,outerRadius:w,startAngle:f,endAngle:h});return Ea(Ea({},v),{},uL({},A,$))},{})},Zte=function(t,n){var r=t.x,i=t.y,l=n.x,c=n.y;return Math.sqrt(Math.pow(r-l,2)+Math.pow(i-c,2))},Qte=function(t,n){var r=t.x,i=t.y,l=n.cx,c=n.cy,d=Zte({x:r,y:i},{x:l,y:c});if(d<=0)return{radius:d};var f=(r-l)/d,h=Math.acos(f);return i>c&&(h=2*Math.PI-h),{radius:d,angle:Xte(h),angleInRadian:h}},Jte=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),l=Math.floor(r/360),c=Math.min(i,l);return{startAngle:n-c*360,endAngle:r-c*360}},ene=function(t,n){var r=n.startAngle,i=n.endAngle,l=Math.floor(r/360),c=Math.floor(i/360),d=Math.min(l,c);return t+d*360},g3=function(t,n){var r=t.x,i=t.y,l=Qte({x:r,y:i},n),c=l.radius,d=l.angle,f=n.innerRadius,h=n.outerRadius;if(c<f||c>h)return!1;if(c===0)return!0;var p=Jte(n),x=p.startAngle,y=p.endAngle,j=d,w;if(x<=y){for(;j>y;)j-=360;for(;j<x;)j+=360;w=j>=x&&j<=y}else{for(;j>x;)j-=360;for(;j<y;)j+=360;w=j>=y&&j<=x}return w?Ea(Ea({},n),{},{radius:c,angle:ene(j,n)}):null},fL=function(t){return!M.isValidElement(t)&&!Ee(t)&&typeof t!="boolean"?t.className:""};function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}var tne=["offset"];function nne(e){return sne(e)||ine(e)||ane(e)||rne()}function rne(){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 ane(e,t){if(e){if(typeof e=="string")return Lj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lj(e,t)}}function ine(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sne(e){if(Array.isArray(e))return Lj(e)}function Lj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function one(e,t){if(e==null)return{};var n=lne(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function v3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v3(Object(n),!0).forEach(function(r){cne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cne(e,t,n){return t=une(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function une(e){var t=dne(e,"string");return ku(t)=="symbol"?t:t+""}function dne(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pu.apply(this,arguments)}var fne=function(t){var n=t.value,r=t.formatter,i=Pe(t.children)?n:t.children;return Ee(r)?r(i):i},hne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},mne=function(t,n,r){var i=t.position,l=t.viewBox,c=t.offset,d=t.className,f=l,h=f.cx,p=f.cy,x=f.innerRadius,y=f.outerRadius,j=f.startAngle,w=f.endAngle,S=f.clockWise,v=(x+y)/2,A=hne(j,w),O=A>=0?1:-1,_,T;i==="insideStart"?(_=j+O*c,T=S):i==="insideEnd"?(_=w-O*c,T=!S):i==="end"&&(_=w+O*c,T=S),T=A<=0?T:!T;var N=yt(h,p,v,_),E=yt(h,p,v,_+(T?1:-1)*359),k="M".concat(N.x,",").concat(N.y,`
|
||
A`).concat(v,",").concat(v,",0,1,").concat(T?0:1,`,
|
||
`).concat(E.x,",").concat(E.y),R=Pe(t.id)?kl("recharts-radial-line-"):t.id;return V.createElement("text",Pu({},r,{dominantBaseline:"central",className:ze("recharts-radial-bar-label",d)}),V.createElement("defs",null,V.createElement("path",{id:R,d:k})),V.createElement("textPath",{xlinkHref:"#".concat(R)},n))},pne=function(t){var n=t.viewBox,r=t.offset,i=t.position,l=n,c=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,x=l.endAngle,y=(p+x)/2;if(i==="outside"){var j=yt(c,d,h+r,y),w=j.x,S=j.y;return{x:w,y:S,textAnchor:w>=c?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"end"};var v=(f+h)/2,A=yt(c,d,v,y),O=A.x,_=A.y;return{x:O,y:_,textAnchor:"middle",verticalAnchor:"middle"}},xne=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,l=t.position,c=n,d=c.x,f=c.y,h=c.width,p=c.height,x=p>=0?1:-1,y=x*i,j=x>0?"end":"start",w=x>0?"start":"end",S=h>=0?1:-1,v=S*i,A=S>0?"end":"start",O=S>0?"start":"end";if(l==="top"){var _={x:d+h/2,y:f-x*i,textAnchor:"middle",verticalAnchor:j};return Gt(Gt({},_),r?{height:Math.max(f-r.y,0),width:h}:{})}if(l==="bottom"){var T={x:d+h/2,y:f+p+y,textAnchor:"middle",verticalAnchor:w};return Gt(Gt({},T),r?{height:Math.max(r.y+r.height-(f+p),0),width:h}:{})}if(l==="left"){var N={x:d-v,y:f+p/2,textAnchor:A,verticalAnchor:"middle"};return Gt(Gt({},N),r?{width:Math.max(N.x-r.x,0),height:p}:{})}if(l==="right"){var E={x:d+h+v,y:f+p/2,textAnchor:O,verticalAnchor:"middle"};return Gt(Gt({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:p}:{})}var k=r?{width:h,height:p}:{};return l==="insideLeft"?Gt({x:d+v,y:f+p/2,textAnchor:O,verticalAnchor:"middle"},k):l==="insideRight"?Gt({x:d+h-v,y:f+p/2,textAnchor:A,verticalAnchor:"middle"},k):l==="insideTop"?Gt({x:d+h/2,y:f+y,textAnchor:"middle",verticalAnchor:w},k):l==="insideBottom"?Gt({x:d+h/2,y:f+p-y,textAnchor:"middle",verticalAnchor:j},k):l==="insideTopLeft"?Gt({x:d+v,y:f+y,textAnchor:O,verticalAnchor:w},k):l==="insideTopRight"?Gt({x:d+h-v,y:f+y,textAnchor:A,verticalAnchor:w},k):l==="insideBottomLeft"?Gt({x:d+v,y:f+p-y,textAnchor:O,verticalAnchor:j},k):l==="insideBottomRight"?Gt({x:d+h-v,y:f+p-y,textAnchor:A,verticalAnchor:j},k):Ml(l)&&(he(l.x)||bs(l.x))&&(he(l.y)||bs(l.y))?Gt({x:d+Sn(l.x,h),y:f+Sn(l.y,p),textAnchor:"end",verticalAnchor:"end"},k):Gt({x:d+h/2,y:f+p/2,textAnchor:"middle",verticalAnchor:"middle"},k)},yne=function(t){return"cx"in t&&he(t.cx)};function en(e){var t=e.offset,n=t===void 0?5:t,r=one(e,tne),i=Gt({offset:n},r),l=i.viewBox,c=i.position,d=i.value,f=i.children,h=i.content,p=i.className,x=p===void 0?"":p,y=i.textBreakAll;if(!l||Pe(d)&&Pe(f)&&!M.isValidElement(h)&&!Ee(h))return null;if(M.isValidElement(h))return M.cloneElement(h,i);var j;if(Ee(h)){if(j=M.createElement(h,i),M.isValidElement(j))return j}else j=fne(i);var w=yne(l),S=je(i,!0);if(w&&(c==="insideStart"||c==="insideEnd"||c==="end"))return mne(i,j,S);var v=w?pne(i):xne(i);return V.createElement(Ms,Pu({className:ze("recharts-label",x)},S,v,{breakAll:y}),j)}en.displayName="Label";var hL=function(t){var n=t.cx,r=t.cy,i=t.angle,l=t.startAngle,c=t.endAngle,d=t.r,f=t.radius,h=t.innerRadius,p=t.outerRadius,x=t.x,y=t.y,j=t.top,w=t.left,S=t.width,v=t.height,A=t.clockWise,O=t.labelViewBox;if(O)return O;if(he(S)&&he(v)){if(he(x)&&he(y))return{x,y,width:S,height:v};if(he(j)&&he(w))return{x:j,y:w,width:S,height:v}}return he(x)&&he(y)?{x,y,width:0,height:0}:he(n)&&he(r)?{cx:n,cy:r,startAngle:l||i||0,endAngle:c||i||0,innerRadius:h||0,outerRadius:p||f||d||0,clockWise:A}:t.viewBox?t.viewBox:{}},gne=function(t,n){return t?t===!0?V.createElement(en,{key:"label-implicit",viewBox:n}):Xt(t)?V.createElement(en,{key:"label-implicit",viewBox:n,value:t}):M.isValidElement(t)?t.type===en?M.cloneElement(t,{key:"label-implicit",viewBox:n}):V.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ee(t)?V.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ml(t)?V.createElement(en,Pu({viewBox:n},t,{key:"label-implicit"})):null:null},vne=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,l=hL(t),c=Qn(i,en).map(function(f,h){return M.cloneElement(f,{viewBox:n||l,key:"label-".concat(h)})});if(!r)return c;var d=gne(t.label,n||l);return[d].concat(nne(c))};en.parseViewBox=hL;en.renderCallByParent=vne;var I0,b3;function bne(){if(b3)return I0;b3=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return I0=e,I0}var jne=bne();const wne=st(jne);function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}var Sne=["valueAccessor"],Nne=["data","dataKey","clockWise","id","textBreakAll"];function Ane(e){return Ene(e)||Tne(e)||One(e)||_ne()}function _ne(){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 $j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $j(e,t)}}function Tne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ene(e){if(Array.isArray(e))return $j(e)}function $j(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cm.apply(this,arguments)}function j3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function w3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(n),!0).forEach(function(r){Cne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cne(e,t,n){return t=Mne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mne(e){var t=kne(e,"string");return Ru(t)=="symbol"?t:t+""}function kne(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S3(e,t){if(e==null)return{};var n=Pne(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Rne=function(t){return Array.isArray(t.value)?wne(t.value):t.value};function Ba(e){var t=e.valueAccessor,n=t===void 0?Rne:t,r=S3(e,Sne),i=r.data,l=r.dataKey,c=r.clockWise,d=r.id,f=r.textBreakAll,h=S3(r,Nne);return!i||!i.length?null:V.createElement(Ze,{className:"recharts-label-list"},i.map(function(p,x){var y=Pe(l)?n(p,x):Yt(p&&p.payload,l),j=Pe(d)?{}:{id:"".concat(d,"-").concat(x)};return V.createElement(en,cm({},je(p,!0),h,j,{parentViewBox:p.parentViewBox,value:y,textBreakAll:f,viewBox:en.parseViewBox(Pe(c)?p:w3(w3({},p),{},{clockWise:c})),key:"label-".concat(x),index:x}))}))}Ba.displayName="LabelList";function Dne(e,t){return e?e===!0?V.createElement(Ba,{key:"labelList-implicit",data:t}):V.isValidElement(e)||Ee(e)?V.createElement(Ba,{key:"labelList-implicit",data:t,content:e}):Ml(e)?V.createElement(Ba,cm({data:t},e,{key:"labelList-implicit"})):null:null}function zne(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Qn(r,Ba).map(function(c,d){return M.cloneElement(c,{data:t,key:"labelList-".concat(d)})});if(!n)return i;var l=Dne(e.label,t);return[l].concat(Ane(i))}Ba.renderCallByParent=zne;function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function Bj(){return Bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bj.apply(this,arguments)}function N3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function A3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N3(Object(n),!0).forEach(function(r){Lne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lne(e,t,n){return t=$ne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ne(e){var t=Bne(e,"string");return Du(t)=="symbol"?t:t+""}function Bne(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ine=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},eh=function(t){var n=t.cx,r=t.cy,i=t.radius,l=t.angle,c=t.sign,d=t.isExternal,f=t.cornerRadius,h=t.cornerIsExternal,p=f*(d?1:-1)+i,x=Math.asin(f/p)/lm,y=h?l:l+c*x,j=yt(n,r,p,y),w=yt(n,r,i,y),S=h?l-c*x:l,v=yt(n,r,p*Math.cos(x*lm),S);return{center:j,circleTangency:w,lineTangency:v,theta:x}},mL=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.startAngle,d=t.endAngle,f=Ine(c,d),h=c+f,p=yt(n,r,l,c),x=yt(n,r,l,h),y="M ".concat(p.x,",").concat(p.y,`
|
||
A `).concat(l,",").concat(l,`,0,
|
||
`).concat(+(Math.abs(f)>180),",").concat(+(c>h),`,
|
||
`).concat(x.x,",").concat(x.y,`
|
||
`);if(i>0){var j=yt(n,r,i,c),w=yt(n,r,i,h);y+="L ".concat(w.x,",").concat(w.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(f)>180),",").concat(+(c<=h),`,
|
||
`).concat(j.x,",").concat(j.y," Z")}else y+="L ".concat(n,",").concat(r," Z");return y},qne=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.cornerRadius,d=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,x=wn(p-h),y=eh({cx:n,cy:r,radius:l,angle:h,sign:x,cornerRadius:c,cornerIsExternal:f}),j=y.circleTangency,w=y.lineTangency,S=y.theta,v=eh({cx:n,cy:r,radius:l,angle:p,sign:-x,cornerRadius:c,cornerIsExternal:f}),A=v.circleTangency,O=v.lineTangency,_=v.theta,T=f?Math.abs(h-p):Math.abs(h-p)-S-_;if(T<0)return d?"M ".concat(w.x,",").concat(w.y,`
|
||
a`).concat(c,",").concat(c,",0,0,1,").concat(c*2,`,0
|
||
a`).concat(c,",").concat(c,",0,0,1,").concat(-c*2,`,0
|
||
`):mL({cx:n,cy:r,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p});var N="M ".concat(w.x,",").concat(w.y,`
|
||
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(j.x,",").concat(j.y,`
|
||
A`).concat(l,",").concat(l,",0,").concat(+(T>180),",").concat(+(x<0),",").concat(A.x,",").concat(A.y,`
|
||
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(O.x,",").concat(O.y,`
|
||
`);if(i>0){var E=eh({cx:n,cy:r,radius:i,angle:h,sign:x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),k=E.circleTangency,R=E.lineTangency,B=E.theta,D=eh({cx:n,cy:r,radius:i,angle:p,sign:-x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),z=D.circleTangency,$=D.lineTangency,L=D.theta,K=f?Math.abs(h-p):Math.abs(h-p)-B-L;if(K<0&&c===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat($.x,",").concat($.y,`
|
||
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(z.x,",").concat(z.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(K>180),",").concat(+(x>0),",").concat(k.x,",").concat(k.y,`
|
||
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(R.x,",").concat(R.y,"Z")}else N+="L".concat(n,",").concat(r,"Z");return N},Une={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},pL=function(t){var n=A3(A3({},Une),t),r=n.cx,i=n.cy,l=n.innerRadius,c=n.outerRadius,d=n.cornerRadius,f=n.forceCornerRadius,h=n.cornerIsExternal,p=n.startAngle,x=n.endAngle,y=n.className;if(c<l||p===x)return null;var j=ze("recharts-sector",y),w=c-l,S=Sn(d,w,0,!0),v;return S>0&&Math.abs(p-x)<360?v=qne({cx:r,cy:i,innerRadius:l,outerRadius:c,cornerRadius:Math.min(S,w/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:p,endAngle:x}):v=mL({cx:r,cy:i,innerRadius:l,outerRadius:c,startAngle:p,endAngle:x}),V.createElement("path",Bj({},je(n,!0),{className:j,d:v,role:"img"}))};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 Ij(){return Ij=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ij.apply(this,arguments)}function _3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_3(Object(n),!0).forEach(function(r){Vne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vne(e,t,n){return t=Hne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hne(e){var t=Fne(e,"string");return zu(t)=="symbol"?t:t+""}function Fne(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T3={curveBasisClosed:dY,curveBasisOpen:fY,curveBasis:uY,curveBumpX:WK,curveBumpY:ZK,curveLinearClosed:hY,curveLinear:Jm,curveMonotoneX:mY,curveMonotoneY:pY,curveNatural:xY,curveStep:yY,curveStepAfter:vY,curveStepBefore:gY},th=function(t){return t.x===+t.x&&t.y===+t.y},Vc=function(t){return t.x},Hc=function(t){return t.y},Gne=function(t,n){if(Ee(t))return t;var r="curve".concat(Zm(t));return(r==="curveMonotone"||r==="curveBump")&&n?T3["".concat(r).concat(n==="vertical"?"Y":"X")]:T3[r]||Jm},Kne=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,l=i===void 0?[]:i,c=t.baseLine,d=t.layout,f=t.connectNulls,h=f===void 0?!1:f,p=Gne(r,d),x=h?l.filter(function(S){return th(S)}):l,y;if(Array.isArray(c)){var j=h?c.filter(function(S){return th(S)}):c,w=x.map(function(S,v){return O3(O3({},S),{},{base:j[v]})});return d==="vertical"?y=Gf().y(Hc).x1(Vc).x0(function(S){return S.base.x}):y=Gf().x(Vc).y1(Hc).y0(function(S){return S.base.y}),y.defined(th).curve(p),y(w)}return d==="vertical"&&he(c)?y=Gf().y(Hc).x1(Vc).x0(c):he(c)?y=Gf().x(Vc).y1(Hc).y0(c):y=m6().x(Vc).y(Hc),y.defined(th).curve(p),y(x)},um=function(t){var n=t.className,r=t.points,i=t.path,l=t.pathRef;if((!r||!r.length)&&!i)return null;var c=r&&r.length?Kne(t):i;return M.createElement("path",Ij({},je(t,!1),zh(t),{className:ze("recharts-curve",n),d:c,ref:l}))},q0={exports:{}},U0,E3;function Yne(){if(E3)return U0;E3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return U0=e,U0}var V0,C3;function Xne(){if(C3)return V0;C3=1;var e=Yne();function t(){}function n(){}return n.resetWarningCache=t,V0=function(){function r(c,d,f,h,p,x){if(x!==e){var y=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 y.name="Invariant Violation",y}}r.isRequired=r;function i(){return r}var l={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},V0}var M3;function Wne(){return M3||(M3=1,q0.exports=Xne()()),q0.exports}var Zne=Wne();const nt=st(Zne),{getOwnPropertyNames:Qne,getOwnPropertySymbols:Jne}=Object,{hasOwnProperty:ere}=Object.prototype;function H0(e,t){return function(r,i,l){return e(r,i,l)&&t(r,i,l)}}function nh(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:l}=i,c=l.get(n),d=l.get(r);if(c&&d)return c===r&&d===n;l.set(n,r),l.set(r,n);const f=e(n,r,i);return l.delete(n),l.delete(r),f}}function tre(e){return e!=null?e[Symbol.toStringTag]:void 0}function k3(e){return Qne(e).concat(Jne(e))}const nre=Object.hasOwn||((e,t)=>ere.call(e,t));function Is(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const rre="__v",are="__o",ire="_owner",{getOwnPropertyDescriptor:P3,keys:R3}=Object;function sre(e,t){return e.byteLength===t.byteLength&&dm(new Uint8Array(e),new Uint8Array(t))}function ore(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function lre(e,t){return e.byteLength===t.byteLength&&dm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function cre(e,t){return Is(e.getTime(),t.getTime())}function ure(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function dre(e,t){return e===t}function D3(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),l=e.entries();let c,d,f=0;for(;(c=l.next())&&!c.done;){const h=t.entries();let p=!1,x=0;for(;(d=h.next())&&!d.done;){if(i[x]){x++;continue}const y=c.value,j=d.value;if(n.equals(y[0],j[0],f,x,e,t,n)&&n.equals(y[1],j[1],y[0],j[0],e,t,n)){p=i[x]=!0;break}x++}if(!p)return!1;f++}return!0}const fre=Is;function hre(e,t,n){const r=R3(e);let i=r.length;if(R3(t).length!==i)return!1;for(;i-- >0;)if(!xL(e,t,n,r[i]))return!1;return!0}function Fc(e,t,n){const r=k3(e);let i=r.length;if(k3(t).length!==i)return!1;let l,c,d;for(;i-- >0;)if(l=r[i],!xL(e,t,n,l)||(c=P3(e,l),d=P3(t,l),(c||d)&&(!c||!d||c.configurable!==d.configurable||c.enumerable!==d.enumerable||c.writable!==d.writable)))return!1;return!0}function mre(e,t){return Is(e.valueOf(),t.valueOf())}function pre(e,t){return e.source===t.source&&e.flags===t.flags}function z3(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),l=e.values();let c,d;for(;(c=l.next())&&!c.done;){const f=t.values();let h=!1,p=0;for(;(d=f.next())&&!d.done;){if(!i[p]&&n.equals(c.value,d.value,c.value,d.value,e,t,n)){h=i[p]=!0;break}p++}if(!h)return!1}return!0}function dm(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function xre(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 xL(e,t,n,r){return(r===ire||r===are||r===rre)&&(e.$$typeof||t.$$typeof)?!0:nre(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const yre="[object ArrayBuffer]",gre="[object Arguments]",vre="[object Boolean]",bre="[object DataView]",jre="[object Date]",wre="[object Error]",Sre="[object Map]",Nre="[object Number]",Are="[object Object]",_re="[object RegExp]",Ore="[object Set]",Tre="[object String]",Ere={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Cre="[object URL]",Mre=Object.prototype.toString;function kre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:d,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:p,areSetsEqual:x,areTypedArraysEqual:y,areUrlsEqual:j,unknownTagComparators:w}){return function(v,A,O){if(v===A)return!0;if(v==null||A==null)return!1;const _=typeof v;if(_!==typeof A)return!1;if(_!=="object")return _==="number"?d(v,A,O):_==="function"?l(v,A,O):!1;const T=v.constructor;if(T!==A.constructor)return!1;if(T===Object)return f(v,A,O);if(Array.isArray(v))return t(v,A,O);if(T===Date)return r(v,A,O);if(T===RegExp)return p(v,A,O);if(T===Map)return c(v,A,O);if(T===Set)return x(v,A,O);const N=Mre.call(v);if(N===jre)return r(v,A,O);if(N===_re)return p(v,A,O);if(N===Sre)return c(v,A,O);if(N===Ore)return x(v,A,O);if(N===Are)return typeof v.then!="function"&&typeof A.then!="function"&&f(v,A,O);if(N===Cre)return j(v,A,O);if(N===wre)return i(v,A,O);if(N===gre)return f(v,A,O);if(Ere[N])return y(v,A,O);if(N===yre)return e(v,A,O);if(N===bre)return n(v,A,O);if(N===vre||N===Nre||N===Tre)return h(v,A,O);if(w){let E=w[N];if(!E){const k=tre(v);k&&(E=w[k])}if(E)return E(v,A,O)}return!1}}function Pre({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:sre,areArraysEqual:n?Fc:ore,areDataViewsEqual:lre,areDatesEqual:cre,areErrorsEqual:ure,areFunctionsEqual:dre,areMapsEqual:n?H0(D3,Fc):D3,areNumbersEqual:fre,areObjectsEqual:n?Fc:hre,arePrimitiveWrappersEqual:mre,areRegExpsEqual:pre,areSetsEqual:n?H0(z3,Fc):z3,areTypedArraysEqual:n?H0(dm,Fc):dm,areUrlsEqual:xre,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=nh(r.areArraysEqual),l=nh(r.areMapsEqual),c=nh(r.areObjectsEqual),d=nh(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:d})}return r}function Rre(e){return function(t,n,r,i,l,c,d){return e(t,n,d)}}function Dre({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(d,f){const{cache:h=e?new WeakMap:void 0,meta:p}=n();return t(d,f,{cache:h,equals:r,meta:p,strict:i})};if(e)return function(d,f){return t(d,f,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const l={cache:void 0,equals:r,meta:void 0,strict:i};return function(d,f){return t(d,f,l)}}const zre=Vi();Vi({strict:!0});Vi({circular:!0});Vi({circular:!0,strict:!0});Vi({createInternalComparator:()=>Is});Vi({strict:!0,createInternalComparator:()=>Is});Vi({circular:!0,createInternalComparator:()=>Is});Vi({circular:!0,createInternalComparator:()=>Is,strict:!0});function Vi(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,l=Pre(e),c=kre(l),d=n?n(c):Rre(c);return Dre({circular:t,comparator:c,createState:r,equals:d,strict:i})}function Lre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function L3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(l){n<0&&(n=l),l-n>t?(e(l),n=-1):Lre(i)};requestAnimationFrame(r)}function qj(e){"@babel/helpers - typeof";return qj=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},qj(e)}function $re(e){return Ure(e)||qre(e)||Ire(e)||Bre()}function Bre(){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 Ire(e,t){if(e){if(typeof e=="string")return $3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $3(e,t)}}function $3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ure(e){if(Array.isArray(e))return e}function Vre(){var e={},t=function(){return null},n=!1,r=function i(l){if(!n){if(Array.isArray(l)){if(!l.length)return;var c=l,d=$re(c),f=d[0],h=d.slice(1);if(typeof f=="number"){L3(i.bind(null,h),f);return}i(f),L3(i.bind(null,h));return}qj(l)==="object"&&(e=l,t(e)),typeof l=="function"&&l()}};return{stop:function(){n=!0},start:function(l){n=!1,r(l)},subscribe:function(l){return t=l,function(){t=function(){return null}}}}}function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function B3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B3(Object(n),!0).forEach(function(r){yL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yL(e,t,n){return t=Hre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hre(e){var t=Fre(e,"string");return Lu(t)==="symbol"?t:String(t)}function Fre(e,t){if(Lu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gre=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(l){return i.includes(l)})})},Kre=function(t){return t},Yre=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},au=function(t,n){return Object.keys(n).reduce(function(r,i){return I3(I3({},r),{},yL({},i,t(i,n[i])))},{})},q3=function(t,n,r){return t.map(function(i){return"".concat(Yre(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Xre(e,t){return Qre(e)||Zre(e,t)||gL(e,t)||Wre()}function Wre(){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 Zre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Qre(e){if(Array.isArray(e))return e}function Jre(e){return nae(e)||tae(e)||gL(e)||eae()}function eae(){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 gL(e,t){if(e){if(typeof e=="string")return Uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uj(e,t)}}function tae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nae(e){if(Array.isArray(e))return Uj(e)}function Uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fm=1e-4,vL=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},bL=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},U3=function(t,n){return function(r){var i=vL(t,n);return bL(i,r)}},rae=function(t,n){return function(r){var i=vL(t,n),l=[].concat(Jre(i.map(function(c,d){return c*d}).slice(1)),[0]);return bL(l,r)}},V3=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],l=n[1],c=n[2],d=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,l=0,c=1,d=1;break;case"ease":i=.25,l=.1,c=.25,d=1;break;case"ease-in":i=.42,l=0,c=1,d=1;break;case"ease-out":i=.42,l=0,c=.58,d=1;break;case"ease-in-out":i=0,l=0,c=.58,d=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var h=f[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),p=Xre(h,4);i=p[0],l=p[1],c=p[2],d=p[3]}}}var x=U3(i,c),y=U3(l,d),j=rae(i,c),w=function(A){return A>1?1:A<0?0:A},S=function(A){for(var O=A>1?1:A,_=O,T=0;T<8;++T){var N=x(_)-O,E=j(_);if(Math.abs(N-O)<fm||E<fm)return y(_);_=w(_-N/E)}return y(_)};return S.isStepper=!1,S},aae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,l=i===void 0?8:i,c=t.dt,d=c===void 0?17:c,f=function(p,x,y){var j=-(p-x)*r,w=y*l,S=y+(j-w)*d/1e3,v=y*d/1e3+p;return Math.abs(v-x)<fm&&Math.abs(S)<fm?[x,0]:[v,S]};return f.isStepper=!0,f.dt=d,f},iae=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return V3(i);case"spring":return aae();default:if(i.split("(")[0]==="cubic-bezier")return V3(i)}return typeof i=="function"?i:null};function $u(e){"@babel/helpers - typeof";return $u=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},$u(e)}function H3(e){return lae(e)||oae(e)||jL(e)||sae()}function sae(){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 oae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lae(e){if(Array.isArray(e))return Hj(e)}function F3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F3(Object(n),!0).forEach(function(r){Vj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vj(e,t,n){return t=cae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cae(e){var t=uae(e,"string");return $u(t)==="symbol"?t:String(t)}function uae(e,t){if($u(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dae(e,t){return mae(e)||hae(e,t)||jL(e,t)||fae()}function fae(){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 jL(e,t){if(e){if(typeof e=="string")return Hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hj(e,t)}}function Hj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function mae(e){if(Array.isArray(e))return e}var hm=function(t,n,r){return t+(n-t)*r},Fj=function(t){var n=t.from,r=t.to;return n!==r},pae=function e(t,n,r){var i=au(function(l,c){if(Fj(c)){var d=t(c.from,c.to,c.velocity),f=dae(d,2),h=f[0],p=f[1];return ln(ln({},c),{},{from:h,velocity:p})}return c},n);return r<1?au(function(l,c){return Fj(c)?ln(ln({},c),{},{velocity:hm(c.velocity,i[l].velocity,r),from:hm(c.from,i[l].from,r)}):c},n):e(t,i,r-1)};const xae=(function(e,t,n,r,i){var l=Gre(e,t),c=l.reduce(function(v,A){return ln(ln({},v),{},Vj({},A,[e[A],t[A]]))},{}),d=l.reduce(function(v,A){return ln(ln({},v),{},Vj({},A,{from:e[A],velocity:0,to:t[A]}))},{}),f=-1,h,p,x=function(){return null},y=function(){return au(function(A,O){return O.from},d)},j=function(){return!Object.values(d).filter(Fj).length},w=function(A){h||(h=A);var O=A-h,_=O/n.dt;d=pae(n,d,_),i(ln(ln(ln({},e),t),y())),h=A,j()||(f=requestAnimationFrame(x))},S=function(A){p||(p=A);var O=(A-p)/r,_=au(function(N,E){return hm.apply(void 0,H3(E).concat([n(O)]))},c);if(i(ln(ln(ln({},e),t),_)),O<1)f=requestAnimationFrame(x);else{var T=au(function(N,E){return hm.apply(void 0,H3(E).concat([n(1)]))},c);i(ln(ln(ln({},e),t),T))}};return x=n.isStepper?w:S,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(f)}}});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)}var yae=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function gae(e,t){if(e==null)return{};var n=vae(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vae(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l<r.length;l++)i=r[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function F0(e){return Sae(e)||wae(e)||jae(e)||bae()}function bae(){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 jae(e,t){if(e){if(typeof e=="string")return Gj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gj(e,t)}}function wae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sae(e){if(Array.isArray(e))return Gj(e)}function Gj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G3(Object(n),!0).forEach(function(r){Wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wc(e,t,n){return t=wL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wL(r.key),r)}}function _ae(e,t,n){return t&&Aae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wL(e){var t=Oae(e,"string");return al(t)==="symbol"?t:String(t)}function Oae(e,t){if(al(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(al(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tae(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&&Kj(e,t)}function Kj(e,t){return Kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Kj(e,t)}function Eae(e){var t=Cae();return function(){var r=mm(e),i;if(t){var l=mm(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Yj(this,i)}}function Yj(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 Xj(e)}function Xj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cae(){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 mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mm(e)}var aa=(function(e){Tae(n,e);var t=Eae(n);function n(r,i){var l;Nae(this,n),l=t.call(this,r,i);var c=l.props,d=c.isActive,f=c.attributeName,h=c.from,p=c.to,x=c.steps,y=c.children,j=c.duration;if(l.handleStyleChange=l.handleStyleChange.bind(Xj(l)),l.changeStyle=l.changeStyle.bind(Xj(l)),!d||j<=0)return l.state={style:{}},typeof y=="function"&&(l.state={style:p}),Yj(l);if(x&&x.length)l.state={style:x[0].style};else if(h){if(typeof y=="function")return l.state={style:h},Yj(l);l.state={style:f?Wc({},f,h):h}}else l.state={style:{}};return l}return _ae(n,[{key:"componentDidMount",value:function(){var i=this.props,l=i.isActive,c=i.canBegin;this.mounted=!0,!(!l||!c)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var l=this.props,c=l.isActive,d=l.canBegin,f=l.attributeName,h=l.shouldReAnimate,p=l.to,x=l.from,y=this.state.style;if(d){if(!c){var j={style:f?Wc({},f,p):p};this.state&&y&&(f&&y[f]!==p||!f&&y!==p)&&this.setState(j);return}if(!(zre(i.to,p)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=w||h?x:i.to;if(this.state&&y){var v={style:f?Wc({},f,S):S};(f&&y[f]!==S||!f&&y!==S)&&this.setState(v)}this.runAnimation(Cr(Cr({},this.props),{},{from:S,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 l=this,c=i.from,d=i.to,f=i.duration,h=i.easing,p=i.begin,x=i.onAnimationEnd,y=i.onAnimationStart,j=xae(c,d,iae(h),f,this.changeStyle),w=function(){l.stopJSAnimation=j()};this.manager.start([y,p,w,f,x])}},{key:"runStepAnimation",value:function(i){var l=this,c=i.steps,d=i.begin,f=i.onAnimationStart,h=c[0],p=h.style,x=h.duration,y=x===void 0?0:x,j=function(S,v,A){if(A===0)return S;var O=v.duration,_=v.easing,T=_===void 0?"ease":_,N=v.style,E=v.properties,k=v.onAnimationEnd,R=A>0?c[A-1]:v,B=E||Object.keys(N);if(typeof T=="function"||T==="spring")return[].concat(F0(S),[l.runJSAnimation.bind(l,{from:R.style,to:N,duration:O,easing:T}),O]);var D=q3(B,O,T),z=Cr(Cr(Cr({},R.style),N),{},{transition:D});return[].concat(F0(S),[z,O,k]).filter(Kre)};return this.manager.start([f].concat(F0(c.reduce(j,[p,Math.max(y,d)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Vre());var l=i.begin,c=i.duration,d=i.attributeName,f=i.to,h=i.easing,p=i.onAnimationStart,x=i.onAnimationEnd,y=i.steps,j=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof h=="function"||typeof j=="function"||h==="spring"){this.runJSAnimation(i);return}if(y.length>1){this.runStepAnimation(i);return}var S=d?Wc({},d,f):f,v=q3(Object.keys(S),c,h);w.start([p,l,Cr(Cr({},S),{},{transition:v}),c,x])}},{key:"render",value:function(){var i=this.props,l=i.children;i.begin;var c=i.duration;i.attributeName,i.easing;var d=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=gae(i,yae),h=M.Children.count(l),p=this.state.style;if(typeof l=="function")return l(p);if(!d||h===0||c<=0)return l;var x=function(j){var w=j.props,S=w.style,v=S===void 0?{}:S,A=w.className,O=M.cloneElement(j,Cr(Cr({},f),{},{style:Cr(Cr({},v),p),className:A}));return O};return h===1?x(M.Children.only(l)):V.createElement("div",null,M.Children.map(l,function(y){return x(y)}))}}]),n})(M.PureComponent);aa.displayName="Animate";aa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};aa.propTypes={from:nt.oneOfType([nt.object,nt.string]),to:nt.oneOfType([nt.object,nt.string]),attributeName:nt.string,duration:nt.number,begin:nt.number,easing:nt.oneOfType([nt.string,nt.func]),steps:nt.arrayOf(nt.shape({duration:nt.number.isRequired,style:nt.object.isRequired,easing:nt.oneOfType([nt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),nt.func]),properties:nt.arrayOf("string"),onAnimationEnd:nt.func})),children:nt.oneOfType([nt.node,nt.func]),isActive:nt.bool,canBegin:nt.bool,onAnimationEnd:nt.func,shouldReAnimate:nt.bool,onAnimationStart:nt.func,onAnimationReStart:nt.func};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 pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pm.apply(this,arguments)}function Mae(e,t){return Dae(e)||Rae(e,t)||Pae(e,t)||kae()}function kae(){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 Pae(e,t){if(e){if(typeof e=="string")return K3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K3(e,t)}}function K3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Dae(e){if(Array.isArray(e))return e}function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y3(Object(n),!0).forEach(function(r){zae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zae(e,t,n){return t=Lae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lae(e){var t=$ae(e,"string");return Bu(t)=="symbol"?t:t+""}function $ae(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W3=function(t,n,r,i,l){var c=Math.min(Math.abs(r)/2,Math.abs(i)/2),d=i>=0?1:-1,f=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,p;if(c>0&&l instanceof Array){for(var x=[0,0,0,0],y=0,j=4;y<j;y++)x[y]=l[y]>c?c:l[y];p="M".concat(t,",").concat(n+d*x[0]),x[0]>0&&(p+="A ".concat(x[0],",").concat(x[0],",0,0,").concat(h,",").concat(t+f*x[0],",").concat(n)),p+="L ".concat(t+r-f*x[1],",").concat(n),x[1]>0&&(p+="A ".concat(x[1],",").concat(x[1],",0,0,").concat(h,`,
|
||
`).concat(t+r,",").concat(n+d*x[1])),p+="L ".concat(t+r,",").concat(n+i-d*x[2]),x[2]>0&&(p+="A ".concat(x[2],",").concat(x[2],",0,0,").concat(h,`,
|
||
`).concat(t+r-f*x[2],",").concat(n+i)),p+="L ".concat(t+f*x[3],",").concat(n+i),x[3]>0&&(p+="A ".concat(x[3],",").concat(x[3],",0,0,").concat(h,`,
|
||
`).concat(t,",").concat(n+i-d*x[3])),p+="Z"}else if(c>0&&l===+l&&l>0){var w=Math.min(c,l);p="M ".concat(t,",").concat(n+d*w,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+f*w,",").concat(n,`
|
||
L `).concat(t+r-f*w,",").concat(n,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r,",").concat(n+d*w,`
|
||
L `).concat(t+r,",").concat(n+i-d*w,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r-f*w,",").concat(n+i,`
|
||
L `).concat(t+f*w,",").concat(n+i,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t,",").concat(n+i-d*w," Z")}else p="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return p},Bae=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,l=n.x,c=n.y,d=n.width,f=n.height;if(Math.abs(d)>0&&Math.abs(f)>0){var h=Math.min(l,l+d),p=Math.max(l,l+d),x=Math.min(c,c+f),y=Math.max(c,c+f);return r>=h&&r<=p&&i>=x&&i<=y}return!1},Iae={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},u2=function(t){var n=X3(X3({},Iae),t),r=M.useRef(),i=M.useState(-1),l=Mae(i,2),c=l[0],d=l[1];M.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&d(T)}catch{}},[]);var f=n.x,h=n.y,p=n.width,x=n.height,y=n.radius,j=n.className,w=n.animationEasing,S=n.animationDuration,v=n.animationBegin,A=n.isAnimationActive,O=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||p===0||x===0)return null;var _=ze("recharts-rectangle",j);return O?V.createElement(aa,{canBegin:c>0,from:{width:p,height:x,x:f,y:h},to:{width:p,height:x,x:f,y:h},duration:S,animationEasing:w,isActive:O},function(T){var N=T.width,E=T.height,k=T.x,R=T.y;return V.createElement(aa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,isActive:A,easing:w},V.createElement("path",pm({},je(n,!0),{className:_,d:W3(k,R,N,E,y),ref:r})))}):V.createElement("path",pm({},je(n,!0),{className:_,d:W3(f,h,p,x,y)}))},qae=["points","className","baseLinePoints","connectNulls"];function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}function Uae(e,t){if(e==null)return{};var n=Vae(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Z3(e){return Kae(e)||Gae(e)||Fae(e)||Hae()}function Hae(){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 Fae(e,t){if(e){if(typeof e=="string")return Wj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wj(e,t)}}function Gae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kae(e){if(Array.isArray(e))return Wj(e)}function Wj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q3=function(t){return t&&t.x===+t.x&&t.y===+t.y},Yae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Q3(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Q3(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},iu=function(t,n){var r=Yae(t);n&&(r=[r.reduce(function(l,c){return[].concat(Z3(l),Z3(c))},[])]);var i=r.map(function(l){return l.reduce(function(c,d,f){return"".concat(c).concat(f===0?"M":"L").concat(d.x,",").concat(d.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Xae=function(t,n,r){var i=iu(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(iu(n.reverse(),r).slice(1))},Wae=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,l=t.connectNulls,c=Uae(t,qae);if(!n||!n.length)return null;var d=ze("recharts-polygon",r);if(i&&i.length){var f=c.stroke&&c.stroke!=="none",h=Xae(n,i,l);return V.createElement("g",{className:d},V.createElement("path",Do({},je(c,!0),{fill:h.slice(-1)==="Z"?c.fill:"none",stroke:"none",d:h})),f?V.createElement("path",Do({},je(c,!0),{fill:"none",d:iu(n,l)})):null,f?V.createElement("path",Do({},je(c,!0),{fill:"none",d:iu(i,l)})):null)}var p=iu(n,l);return V.createElement("path",Do({},je(c,!0),{fill:p.slice(-1)==="Z"?c.fill:"none",className:d,d:p}))};function Zj(){return Zj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zj.apply(this,arguments)}var xp=function(t){var n=t.cx,r=t.cy,i=t.r,l=t.className,c=ze("recharts-dot",l);return n===+n&&r===+r&&i===+i?M.createElement("circle",Zj({},je(t,!1),zh(t),{className:c,cx:n,cy:r,r:i})):null};function Iu(e){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}var Zae=["x","y","top","left","width","height","className"];function Qj(){return Qj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qj.apply(this,arguments)}function J3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J3(Object(n),!0).forEach(function(r){Jae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jae(e,t,n){return t=eie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eie(e){var t=tie(e,"string");return Iu(t)=="symbol"?t:t+""}function tie(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nie(e,t){if(e==null)return{};var n=rie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var aie=function(t,n,r,i,l,c){return"M".concat(t,",").concat(l,"v").concat(i,"M").concat(c,",").concat(n,"h").concat(r)},iie=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,l=i===void 0?0:i,c=t.top,d=c===void 0?0:c,f=t.left,h=f===void 0?0:f,p=t.width,x=p===void 0?0:p,y=t.height,j=y===void 0?0:y,w=t.className,S=nie(t,Zae),v=Qae({x:r,y:l,top:d,left:h,width:x,height:j},S);return!he(r)||!he(l)||!he(x)||!he(j)||!he(d)||!he(h)?null:V.createElement("path",Qj({},je(v,!0),{className:ze("recharts-cross",w),d:aie(r,l,x,j,d,h)}))},G0,e4;function sie(){if(e4)return G0;e4=1;var e=dp(),t=Lz(),n=sa();function r(i,l){return i&&i.length?e(i,n(l,2),t):void 0}return G0=r,G0}var oie=sie();const lie=st(oie);var K0,t4;function cie(){if(t4)return K0;t4=1;var e=dp(),t=sa(),n=$z();function r(i,l){return i&&i.length?e(i,t(l,2),n):void 0}return K0=r,K0}var uie=cie();const die=st(uie);var fie=["cx","cy","angle","ticks","axisLine"],hie=["ticks","tick","angle","tickFormatter","stroke"];function il(e){"@babel/helpers - typeof";return il=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},il(e)}function su(){return su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},su.apply(this,arguments)}function n4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function us(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n4(Object(n),!0).forEach(function(r){yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r4(e,t){if(e==null)return{};var n=mie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NL(r.key),r)}}function xie(e,t,n){return t&&a4(e.prototype,t),n&&a4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yie(e,t,n){return t=xm(t),gie(e,SL()?Reflect.construct(t,n||[],xm(e).constructor):t.apply(e,n))}function gie(e,t){if(t&&(il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vie(e)}function vie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SL=function(){return!!e})()}function xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xm(e)}function bie(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&&Jj(e,t)}function Jj(e,t){return Jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Jj(e,t)}function yp(e,t,n){return t=NL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NL(e){var t=jie(e,"string");return il(t)=="symbol"?t:t+""}function jie(e,t){if(il(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(il(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gp=(function(e){function t(){return pie(this,t),yie(this,t,arguments)}return bie(t,e),xie(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,l=this.props,c=l.angle,d=l.cx,f=l.cy;return yt(d,f,i,c)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,l=r.cy,c=r.angle,d=r.ticks,f=lie(d,function(p){return p.coordinate||0}),h=die(d,function(p){return p.coordinate||0});return{cx:i,cy:l,startAngle:c,endAngle:c,innerRadius:h.coordinate||0,outerRadius:f.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,l=r.cy,c=r.angle,d=r.ticks,f=r.axisLine,h=r4(r,fie),p=d.reduce(function(w,S){return[Math.min(w[0],S.coordinate),Math.max(w[1],S.coordinate)]},[1/0,-1/0]),x=yt(i,l,p[0],c),y=yt(i,l,p[1],c),j=us(us(us({},je(h,!1)),{},{fill:"none"},je(f,!1)),{},{x1:x.x,y1:x.y,x2:y.x,y2:y.y});return V.createElement("line",su({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var r=this,i=this.props,l=i.ticks,c=i.tick,d=i.angle,f=i.tickFormatter,h=i.stroke,p=r4(i,hie),x=this.getTickTextAnchor(),y=je(p,!1),j=je(c,!1),w=l.map(function(S,v){var A=r.getTickValueCoord(S),O=us(us(us(us({textAnchor:x,transform:"rotate(".concat(90-d,", ").concat(A.x,", ").concat(A.y,")")},y),{},{stroke:"none",fill:h},j),{},{index:v},A),{},{payload:S});return V.createElement(Ze,su({className:ze("recharts-polar-radius-axis-tick",fL(c)),key:"tick-".concat(S.coordinate)},Cs(r.props,S,v)),t.renderTickItem(c,O,f?f(S.value,v):S.value))});return V.createElement(Ze,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var r=this.props,i=r.ticks,l=r.axisLine,c=r.tick;return!i||!i.length?null:V.createElement(Ze,{className:ze("recharts-polar-radius-axis",this.props.className)},l&&this.renderAxisLine(),c&&this.renderTicks(),en.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,l){var c;return V.isValidElement(r)?c=V.cloneElement(r,i):Ee(r)?c=r(i):c=V.createElement(Ms,su({},i,{className:"recharts-polar-radius-axis-tick-value"}),l),c}}])})(M.PureComponent);yp(gp,"displayName","PolarRadiusAxis");yp(gp,"axisType","radiusAxis");yp(gp,"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 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 ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ys.apply(this,arguments)}function i4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i4(Object(n),!0).forEach(function(r){vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_L(r.key),r)}}function Sie(e,t,n){return t&&s4(e.prototype,t),n&&s4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nie(e,t,n){return t=ym(t),Aie(e,AL()?Reflect.construct(t,n||[],ym(e).constructor):t.apply(e,n))}function Aie(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 _ie(e)}function _ie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AL=function(){return!!e})()}function ym(e){return ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ym(e)}function Oie(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&&ew(e,t)}function ew(e,t){return ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ew(e,t)}function vp(e,t,n){return t=_L(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _L(e){var t=Tie(e,"string");return sl(t)=="symbol"?t:t+""}function Tie(e,t){if(sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eie=Math.PI/180,o4=1e-5,bp=(function(e){function t(){return wie(this,t),Nie(this,t,arguments)}return Oie(t,e),Sie(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,l=i.cx,c=i.cy,d=i.radius,f=i.orientation,h=i.tickSize,p=h||8,x=yt(l,c,d,r.coordinate),y=yt(l,c,d+(f==="inner"?-1:1)*p,r.coordinate);return{x1:x.x,y1:x.y,x2:y.x,y2:y.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,l=Math.cos(-r.coordinate*Eie),c;return l>o4?c=i==="outer"?"start":"end":l<-o4?c=i==="outer"?"end":"start":c="middle",c}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,l=r.cy,c=r.radius,d=r.axisLine,f=r.axisLineType,h=ds(ds({},je(this.props,!1)),{},{fill:"none"},je(d,!1));if(f==="circle")return V.createElement(xp,ys({className:"recharts-polar-angle-axis-line"},h,{cx:i,cy:l,r:c}));var p=this.props.ticks,x=p.map(function(y){return yt(i,l,c,y.coordinate)});return V.createElement(Wae,ys({className:"recharts-polar-angle-axis-line"},h,{points:x}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,l=i.ticks,c=i.tick,d=i.tickLine,f=i.tickFormatter,h=i.stroke,p=je(this.props,!1),x=je(c,!1),y=ds(ds({},p),{},{fill:"none"},je(d,!1)),j=l.map(function(w,S){var v=r.getTickLineCoord(w),A=r.getTickTextAnchor(w),O=ds(ds(ds({textAnchor:A},p),{},{stroke:"none",fill:h},x),{},{index:S,payload:w,x:v.x2,y:v.y2});return V.createElement(Ze,ys({className:ze("recharts-polar-angle-axis-tick",fL(c)),key:"tick-".concat(w.coordinate)},Cs(r.props,w,S)),d&&V.createElement("line",ys({className:"recharts-polar-angle-axis-tick-line"},y,v)),c&&t.renderTickItem(c,O,f?f(w.value,S):w.value))});return V.createElement(Ze,{className:"recharts-polar-angle-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,i=r.ticks,l=r.radius,c=r.axisLine;return l<=0||!i||!i.length?null:V.createElement(Ze,{className:ze("recharts-polar-angle-axis",this.props.className)},c&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,l){var c;return V.isValidElement(r)?c=V.cloneElement(r,i):Ee(r)?c=r(i):c=V.createElement(Ms,ys({},i,{className:"recharts-polar-angle-axis-tick-value"}),l),c}}])})(M.PureComponent);vp(bp,"displayName","PolarAngleAxis");vp(bp,"axisType","angleAxis");vp(bp,"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 Y0,l4;function Cie(){if(l4)return Y0;l4=1;var e=L6(),t=e(Object.getPrototypeOf,Object);return Y0=t,Y0}var X0,c4;function Mie(){if(c4)return X0;c4=1;var e=Ga(),t=Cie(),n=Ka(),r="[object Object]",i=Function.prototype,l=Object.prototype,c=i.toString,d=l.hasOwnProperty,f=c.call(Object);function h(p){if(!n(p)||e(p)!=r)return!1;var x=t(p);if(x===null)return!0;var y=d.call(x,"constructor")&&x.constructor;return typeof y=="function"&&y instanceof y&&c.call(y)==f}return X0=h,X0}var kie=Mie();const Pie=st(kie);var W0,u4;function Rie(){if(u4)return W0;u4=1;var e=Ga(),t=Ka(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return W0=r,W0}var Die=Rie();const zie=st(Die);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 gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gm.apply(this,arguments)}function Lie(e,t){return qie(e)||Iie(e,t)||Bie(e,t)||$ie()}function $ie(){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 Bie(e,t){if(e){if(typeof e=="string")return d4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d4(e,t)}}function d4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Iie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function qie(e){if(Array.isArray(e))return e}function f4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f4(Object(n),!0).forEach(function(r){Uie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uie(e,t,n){return t=Vie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vie(e){var t=Hie(e,"string");return qu(t)=="symbol"?t:t+""}function Hie(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var m4=function(t,n,r,i,l){var c=r-i,d;return d="M ".concat(t,",").concat(n),d+="L ".concat(t+r,",").concat(n),d+="L ".concat(t+r-c/2,",").concat(n+l),d+="L ".concat(t+r-c/2-i,",").concat(n+l),d+="L ".concat(t,",").concat(n," Z"),d},Fie={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Gie=function(t){var n=h4(h4({},Fie),t),r=M.useRef(),i=M.useState(-1),l=Lie(i,2),c=l[0],d=l[1];M.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&d(_)}catch{}},[]);var f=n.x,h=n.y,p=n.upperWidth,x=n.lowerWidth,y=n.height,j=n.className,w=n.animationEasing,S=n.animationDuration,v=n.animationBegin,A=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||y!==+y||p===0&&x===0||y===0)return null;var O=ze("recharts-trapezoid",j);return A?V.createElement(aa,{canBegin:c>0,from:{upperWidth:0,lowerWidth:0,height:y,x:f,y:h},to:{upperWidth:p,lowerWidth:x,height:y,x:f,y:h},duration:S,animationEasing:w,isActive:A},function(_){var T=_.upperWidth,N=_.lowerWidth,E=_.height,k=_.x,R=_.y;return V.createElement(aa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,easing:w},V.createElement("path",gm({},je(n,!0),{className:O,d:m4(k,R,T,N,E),ref:r})))}):V.createElement("g",null,V.createElement("path",gm({},je(n,!0),{className:O,d:m4(f,h,p,x,y)})))},Kie=["option","shapeType","propTransformer","activeClassName","isActive"];function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function Yie(e,t){if(e==null)return{};var n=Xie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function p4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p4(Object(n),!0).forEach(function(r){Wie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wie(e,t,n){return t=Zie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zie(e){var t=Qie(e,"string");return Uu(t)=="symbol"?t:t+""}function Qie(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jie(e,t){return vm(vm({},t),e)}function ese(e,t){return e==="symbols"}function x4(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return V.createElement(u2,n);case"trapezoid":return V.createElement(Gie,n);case"sector":return V.createElement(pL,n);case"symbols":if(ese(t))return V.createElement(ES,n);break;default:return null}}function tse(e){return M.isValidElement(e)?e.props:e}function OL(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Jie:r,l=e.activeClassName,c=l===void 0?"recharts-active-shape":l,d=e.isActive,f=Yie(e,Kie),h;if(M.isValidElement(t))h=M.cloneElement(t,vm(vm({},f),tse(t)));else if(Ee(t))h=t(f);else if(Pie(t)&&!zie(t)){var p=i(t,f);h=V.createElement(x4,{shapeType:n,elementProps:p})}else{var x=f;h=V.createElement(x4,{shapeType:n,elementProps:x})}return d?V.createElement(Ze,{className:c},h):h}function jp(e,t){return t!=null&&"trapezoids"in e.props}function wp(e,t){return t!=null&&"sectors"in e.props}function Vu(e,t){return t!=null&&"points"in e.props}function nse(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,l=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&l}function rse(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function ase(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function ise(e,t){var n;return jp(e,t)?n=nse:wp(e,t)?n=rse:Vu(e,t)&&(n=ase),n}function sse(e,t){var n;return jp(e,t)?n="trapezoids":wp(e,t)?n="sectors":Vu(e,t)&&(n="points"),n}function ose(e,t){if(jp(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(wp(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Vu(e,t)?t.payload:{}}function lse(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=sse(n,t),l=ose(n,t),c=r.filter(function(f,h){var p=ud(l,f),x=n.props[i].filter(function(w){var S=ise(n,t);return S(w,t)}),y=n.props[i].indexOf(x[x.length-1]),j=h===y;return p&&j}),d=r.indexOf(c[c.length-1]);return d}var yh;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 zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(this,arguments)}function y4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y4(Object(n),!0).forEach(function(r){mr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EL(r.key),r)}}function use(e,t,n){return t&&g4(e.prototype,t),n&&g4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dse(e,t,n){return t=bm(t),fse(e,TL()?Reflect.construct(t,n||[],bm(e).constructor):t.apply(e,n))}function fse(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 hse(e)}function hse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TL=function(){return!!e})()}function bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bm(e)}function mse(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&&tw(e,t)}function tw(e,t){return tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tw(e,t)}function mr(e,t,n){return t=EL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EL(e){var t=pse(e,"string");return ol(t)=="symbol"?t:t+""}function pse(e,t){if(ol(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xa=(function(e){function t(n){var r;return cse(this,t),r=dse(this,t,[n]),mr(r,"pieRef",null),mr(r,"sectorRefs",[]),mr(r,"id",kl("recharts-pie-")),mr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ee(i)&&i()}),mr(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ee(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return mse(t,e),use(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.label,d=l.labelLine,f=l.dataKey,h=l.valueKey,p=je(this.props,!1),x=je(c,!1),y=je(d,!1),j=c&&c.offsetRadius||20,w=r.map(function(S,v){var A=(S.startAngle+S.endAngle)/2,O=yt(S.cx,S.cy,S.outerRadius+j,A),_=pt(pt(pt(pt({},p),S),{},{stroke:"none"},x),{},{index:v,textAnchor:t.getTextAnchor(O.x,S.cx)},O),T=pt(pt(pt(pt({},p),S),{},{fill:"none",stroke:S.fill},y),{},{index:v,points:[yt(S.cx,S.cy,S.outerRadius,A),O]}),N=f;return Pe(f)&&Pe(h)?N="value":Pe(f)&&(N=h),V.createElement(Ze,{key:"label-".concat(S.startAngle,"-").concat(S.endAngle,"-").concat(S.midAngle,"-").concat(v)},d&&t.renderLabelLineItem(d,T,"line"),t.renderLabelItem(c,_,Yt(S,N)))});return V.createElement(Ze,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(r){var i=this,l=this.props,c=l.activeShape,d=l.blendStroke,f=l.inactiveShape;return r.map(function(h,p){if((h==null?void 0:h.startAngle)===0&&(h==null?void 0:h.endAngle)===0&&r.length!==1)return null;var x=i.isActiveIndex(p),y=f&&i.hasActiveIndex()?f:null,j=x?c:y,w=pt(pt({},h),{},{stroke:d?h.fill:h.stroke,tabIndex:-1});return V.createElement(Ze,zo({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Cs(i.props,h,p),{key:"sector-".concat(h==null?void 0:h.startAngle,"-").concat(h==null?void 0:h.endAngle,"-").concat(h.midAngle,"-").concat(p)}),V.createElement(OL,zo({option:j,isActive:x,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,l=i.sectors,c=i.isAnimationActive,d=i.animationBegin,f=i.animationDuration,h=i.animationEasing,p=i.animationId,x=this.state,y=x.prevSectors,j=x.prevIsAnimationActive;return V.createElement(aa,{begin:d,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(j),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var S=w.t,v=[],A=l&&l[0],O=A.startAngle;return l.forEach(function(_,T){var N=y&&y[T],E=T>0?Zn(_,"paddingAngle",0):0;if(N){var k=Yn(N.endAngle-N.startAngle,_.endAngle-_.startAngle),R=pt(pt({},_),{},{startAngle:O+E,endAngle:O+k(S)+E});v.push(R),O=R.endAngle}else{var B=_.endAngle,D=_.startAngle,z=Yn(0,B-D),$=z(S),L=pt(pt({},_),{},{startAngle:O+E,endAngle:O+$+E});v.push(L),O=L.endAngle}}),V.createElement(Ze,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(l){if(!l.altKey)switch(l.key){case"ArrowLeft":{var c=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[c].focus(),i.setState({sectorToFocus:c});break}case"ArrowRight":{var d=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[d].focus(),i.setState({sectorToFocus:d});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,l=r.isAnimationActive,c=this.state.prevSectors;return l&&i&&i.length&&(!c||!ud(c,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,l=i.hide,c=i.sectors,d=i.className,f=i.label,h=i.cx,p=i.cy,x=i.innerRadius,y=i.outerRadius,j=i.isAnimationActive,w=this.state.isAnimationFinished;if(l||!c||!c.length||!he(h)||!he(p)||!he(x)||!he(y))return null;var S=ze("recharts-pie",d);return V.createElement(Ze,{tabIndex:this.props.rootTabIndex,className:S,ref:function(A){r.pieRef=A}},this.renderSectors(),f&&this.renderLabels(c),en.renderCallByParent(this.props,null,!1),(!j||w)&&Ba.renderCallByParent(this.props,c,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,l){if(V.isValidElement(r))return V.cloneElement(r,i);if(Ee(r))return r(i);var c=ze("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return V.createElement(um,zo({},i,{key:l,type:"linear",className:c}))}},{key:"renderLabelItem",value:function(r,i,l){if(V.isValidElement(r))return V.cloneElement(r,i);var c=l;if(Ee(r)&&(c=r(i),V.isValidElement(c)))return c;var d=ze("recharts-pie-label-text",typeof r!="boolean"&&!Ee(r)?r.className:"");return V.createElement(Ms,zo({},i,{alignmentBaseline:"middle",className:d}),c)}}])})(M.PureComponent);yh=Xa;mr(Xa,"displayName","Pie");mr(Xa,"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:!Ls.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});mr(Xa,"parseDeltaAngle",function(e,t){var n=wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});mr(Xa,"getRealPieData",function(e){var t=e.data,n=e.children,r=je(e,!1),i=Qn(n,ap);return t&&t.length?t.map(function(l,c){return pt(pt(pt({payload:l},r),l),i&&i[c]&&i[c].props)}):i&&i.length?i.map(function(l){return pt(pt({},r),l.props)}):[]});mr(Xa,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,l=t.height,c=dL(i,l),d=r+Sn(e.cx,i,i/2),f=n+Sn(e.cy,l,l/2),h=Sn(e.innerRadius,c,0),p=Sn(e.outerRadius,c,c*.8),x=e.maxRadius||Math.sqrt(i*i+l*l)/2;return{cx:d,cy:f,innerRadius:h,outerRadius:p,maxRadius:x}});mr(Xa,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?pt(pt({},t.type.defaultProps),t.props):t.props,i=yh.getRealPieData(r);if(!i||!i.length)return null;var l=r.cornerRadius,c=r.startAngle,d=r.endAngle,f=r.paddingAngle,h=r.dataKey,p=r.nameKey,x=r.valueKey,y=r.tooltipType,j=Math.abs(r.minAngle),w=yh.parseCoordinateOfPie(r,n),S=yh.parseDeltaAngle(c,d),v=Math.abs(S),A=h;Pe(h)&&Pe(x)?($r(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),A="value"):Pe(h)&&($r(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),A=x);var O=i.filter(function(R){return Yt(R,A,0)!==0}).length,_=(v>=360?O:O-1)*f,T=v-O*j-_,N=i.reduce(function(R,B){var D=Yt(B,A,0);return R+(he(D)?D:0)},0),E;if(N>0){var k;E=i.map(function(R,B){var D=Yt(R,A,0),z=Yt(R,p,B),$=(he(D)?D:0)/N,L;B?L=k.endAngle+wn(S)*f*(D!==0?1:0):L=c;var K=L+wn(S)*((D!==0?j:0)+$*T),H=(L+K)/2,I=(w.innerRadius+w.outerRadius)/2,F=[{name:z,value:D,payload:R,dataKey:A,type:y}],Z=yt(w.cx,w.cy,I,H);return k=pt(pt(pt({percent:$,cornerRadius:l,name:z,tooltipPayload:F,midAngle:H,middleRadius:I,tooltipPosition:Z},R),w),{},{value:Yt(R,A),startAngle:L,endAngle:K,payload:R,paddingAngle:wn(S)*f}),k})}return pt(pt({},w),{},{sectors:E,data:i})});var Z0,v4;function xse(){if(v4)return Z0;v4=1;var e=Math.ceil,t=Math.max;function n(r,i,l,c){for(var d=-1,f=t(e((i-r)/(l||1)),0),h=Array(f);f--;)h[c?f:++d]=r,r+=l;return h}return Z0=n,Z0}var Q0,b4;function CL(){if(b4)return Q0;b4=1;var e=J6(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var l=i<0?-1:1;return l*n}return i===i?i:0}return Q0=r,Q0}var J0,j4;function yse(){if(j4)return J0;j4=1;var e=xse(),t=rp(),n=CL();function r(i){return function(l,c,d){return d&&typeof d!="number"&&t(l,c,d)&&(c=d=void 0),l=n(l),c===void 0?(c=l,l=0):c=n(c),d=d===void 0?l<c?1:-1:n(d),e(l,c,d,i)}}return J0=r,J0}var e1,w4;function gse(){if(w4)return e1;w4=1;var e=yse(),t=e();return e1=t,e1}var vse=gse();const jm=st(vse);function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function S4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function N4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S4(Object(n),!0).forEach(function(r){ML(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ML(e,t,n){return t=bse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bse(e){var t=jse(e,"string");return Hu(t)=="symbol"?t:t+""}function jse(e,t){if(Hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wse=["Webkit","Moz","O","ms"],Sse=function(t,n){var r=t.replace(/(\w)/,function(l){return l.toUpperCase()}),i=wse.reduce(function(l,c){return N4(N4({},l),{},ML({},c+r,n))},{});return i[t]=n,i};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 wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wm.apply(this,arguments)}function A4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A4(Object(n),!0).forEach(function(r){Gn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PL(r.key),r)}}function Ase(e,t,n){return t&&_4(e.prototype,t),n&&_4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _se(e,t,n){return t=Sm(t),Ose(e,kL()?Reflect.construct(t,n||[],Sm(e).constructor):t.apply(e,n))}function Ose(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 Tse(e)}function Tse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kL=function(){return!!e})()}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sm(e)}function Ese(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&&nw(e,t)}function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nw(e,t)}function Gn(e,t,n){return t=PL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PL(e){var t=Cse(e,"string");return ll(t)=="symbol"?t:t+""}function Cse(e,t){if(ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mse=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,l=t.x,c=t.width,d=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,h=nu().domain(jm(0,f)).range([l,l+c-d]),p=h.domain().map(function(x){return h(x)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:p}},O4=function(t){return t.changedTouches&&!!t.changedTouches.length},cl=(function(e){function t(n){var r;return Nse(this,t),r=_se(this,t,[n]),Gn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Gn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Gn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,l=i.endIndex,c=i.onDragEnd,d=i.startIndex;c==null||c({endIndex:l,startIndex:d})}),r.detachDragEndListener()}),Gn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Gn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Gn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Gn(r,"handleSlideDragStart",function(i){var l=O4(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:l.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Ese(t,e),Ase(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,l=r.endX,c=this.state.scaleValues,d=this.props,f=d.gap,h=d.data,p=h.length-1,x=Math.min(i,l),y=Math.max(i,l),j=t.getIndexInRange(c,x),w=t.getIndexInRange(c,y);return{startIndex:j-j%f,endIndex:w===p?p:w-w%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,l=i.data,c=i.tickFormatter,d=i.dataKey,f=Yt(l[r],d,r);return Ee(c)?c(f,r):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,l=i.slideMoveStartX,c=i.startX,d=i.endX,f=this.props,h=f.x,p=f.width,x=f.travellerWidth,y=f.startIndex,j=f.endIndex,w=f.onChange,S=r.pageX-l;S>0?S=Math.min(S,h+p-x-d,h+p-x-c):S<0&&(S=Math.max(S,h-c,h-d));var v=this.getIndex({startX:c+S,endX:d+S});(v.startIndex!==y||v.endIndex!==j)&&w&&w(v),this.setState({startX:c+S,endX:d+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var l=O4(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:l.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,l=i.brushMoveStartX,c=i.movingTravellerId,d=i.endX,f=i.startX,h=this.state[c],p=this.props,x=p.x,y=p.width,j=p.travellerWidth,w=p.onChange,S=p.gap,v=p.data,A={startX:this.state.startX,endX:this.state.endX},O=r.pageX-l;O>0?O=Math.min(O,x+y-j-h):O<0&&(O=Math.max(O,x-h)),A[c]=h+O;var _=this.getIndex(A),T=_.startIndex,N=_.endIndex,E=function(){var R=v.length-1;return c==="startX"&&(d>f?T%S===0:N%S===0)||d<f&&N===R||c==="endX"&&(d>f?N%S===0:T%S===0)||d>f&&N===R};this.setState(Gn(Gn({},c,h+O),"brushMoveStartX",r.pageX),function(){w&&E()&&w(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var l=this,c=this.state,d=c.scaleValues,f=c.startX,h=c.endX,p=this.state[i],x=d.indexOf(p);if(x!==-1){var y=x+r;if(!(y===-1||y>=d.length)){var j=d[y];i==="startX"&&j>=h||i==="endX"&&j<=f||this.setState(Gn({},i,j),function(){l.props.onChange(l.getIndex({startX:l.state.startX,endX:l.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.fill,h=r.stroke;return V.createElement("rect",{stroke:h,fill:f,x:i,y:l,width:c,height:d})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.data,h=r.children,p=r.padding,x=M.Children.only(h);return x?V.cloneElement(x,{x:i,y:l,width:c,height:d,margin:p,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,i){var l,c,d=this,f=this.props,h=f.y,p=f.travellerWidth,x=f.height,y=f.traveller,j=f.ariaLabel,w=f.data,S=f.startIndex,v=f.endIndex,A=Math.max(r,this.props.x),O=t1(t1({},je(this.props,!1)),{},{x:A,y:h,width:p,height:x}),_=j||"Min value: ".concat((l=w[S])===null||l===void 0?void 0:l.name,", Max value: ").concat((c=w[v])===null||c===void 0?void 0:c.name);return V.createElement(Ze,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,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(),d.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,i))},onFocus:function(){d.setState({isTravellerFocused:!0})},onBlur:function(){d.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(y,O))}},{key:"renderSlide",value:function(r,i){var l=this.props,c=l.y,d=l.height,f=l.stroke,h=l.travellerWidth,p=Math.min(r,i)+h,x=Math.max(Math.abs(i-r)-h,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:f,fillOpacity:.2,x:p,y:c,width:x,height:d})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,l=r.endIndex,c=r.y,d=r.height,f=r.travellerWidth,h=r.stroke,p=this.state,x=p.startX,y=p.endX,j=5,w={pointerEvents:"none",fill:h};return V.createElement(Ze,{className:"recharts-brush-texts"},V.createElement(Ms,wm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(x,y)-j,y:c+d/2},w),this.getTextOfTick(i)),V.createElement(Ms,wm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(x,y)+f+j,y:c+d/2},w),this.getTextOfTick(l)))}},{key:"render",value:function(){var r=this.props,i=r.data,l=r.className,c=r.children,d=r.x,f=r.y,h=r.width,p=r.height,x=r.alwaysShowText,y=this.state,j=y.startX,w=y.endX,S=y.isTextActive,v=y.isSlideMoving,A=y.isTravellerMoving,O=y.isTravellerFocused;if(!i||!i.length||!he(d)||!he(f)||!he(h)||!he(p)||h<=0||p<=0)return null;var _=ze("recharts-brush",l),T=V.Children.count(c)===1,N=Sse("userSelect","none");return V.createElement(Ze,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(j,w),this.renderTravellerLayer(j,"startX"),this.renderTravellerLayer(w,"endX"),(S||v||A||O||x)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,l=r.y,c=r.width,d=r.height,f=r.stroke,h=Math.floor(l+d/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:l,width:c,height:d,fill:f,stroke:"none"}),V.createElement("line",{x1:i+1,y1:h,x2:i+c-1,y2:h,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:i+1,y1:h+2,x2:i+c-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var l;return V.isValidElement(r)?l=V.cloneElement(r,i):Ee(r)?l=r(i):l=t.renderDefaultTraveller(i),l}},{key:"getDerivedStateFromProps",value:function(r,i){var l=r.data,c=r.width,d=r.x,f=r.travellerWidth,h=r.updateId,p=r.startIndex,x=r.endIndex;if(l!==i.prevData||h!==i.prevUpdateId)return t1({prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c},l&&l.length?Mse({data:l,width:c,x:d,travellerWidth:f,startIndex:p,endIndex:x}):{scale:null,scaleValues:null});if(i.scale&&(c!==i.prevWidth||d!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([d,d+c-f]);var y=i.scale.domain().map(function(j){return i.scale(j)});return{prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:y}}return null}},{key:"getIndexInRange",value:function(r,i){for(var l=r.length,c=0,d=l-1;d-c>1;){var f=Math.floor((c+d)/2);r[f]>i?d=f:c=f}return i>=r[d]?d:c}}])})(M.PureComponent);Gn(cl,"displayName","Brush");Gn(cl,"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 n1,T4;function kse(){if(T4)return n1;T4=1;var e=zS();function t(n,r){var i;return e(n,function(l,c,d){return i=r(l,c,d),!i}),!!i}return n1=t,n1}var r1,E4;function Pse(){if(E4)return r1;E4=1;var e=C6(),t=sa(),n=kse(),r=Dn(),i=rp();function l(c,d,f){var h=r(c)?e:n;return f&&i(c,d,f)&&(d=void 0),h(c,t(d,3))}return r1=l,r1}var Rse=Pse();const Dse=st(Rse);var Jr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},a1,C4;function zse(){if(C4)return a1;C4=1;var e=Y6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return a1=t,a1}var i1,M4;function Lse(){if(M4)return i1;M4=1;var e=zse(),t=G6(),n=sa();function r(i,l){var c={};return l=n(l,3),t(i,function(d,f,h){e(c,f,l(d,f,h))}),c}return i1=r,i1}var $se=Lse();const Bse=st($se);var s1,k4;function Ise(){if(k4)return s1;k4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return s1=e,s1}var o1,P4;function qse(){if(P4)return o1;P4=1;var e=zS();function t(n,r){var i=!0;return e(n,function(l,c,d){return i=!!r(l,c,d),i}),i}return o1=t,o1}var l1,R4;function Use(){if(R4)return l1;R4=1;var e=Ise(),t=qse(),n=sa(),r=Dn(),i=rp();function l(c,d,f){var h=r(c)?e:t;return f&&i(c,d,f)&&(d=void 0),h(c,n(d,3))}return l1=l,l1}var Vse=Use();const RL=st(Vse);var Hse=["x","y"];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 rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rw.apply(this,arguments)}function D4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D4(Object(n),!0).forEach(function(r){Fse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fse(e,t,n){return t=Gse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gse(e){var t=Kse(e,"string");return Fu(t)=="symbol"?t:t+""}function Kse(e,t){if(Fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yse(e,t){if(e==null)return{};var n=Xse(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Wse(e,t){var n=e.x,r=e.y,i=Yse(e,Hse),l="".concat(n),c=parseInt(l,10),d="".concat(r),f=parseInt(d,10),h="".concat(t.height||i.height),p=parseInt(h,10),x="".concat(t.width||i.width),y=parseInt(x,10);return Gc(Gc(Gc(Gc(Gc({},t),i),c?{x:c}:{}),f?{y:f}:{}),{},{height:p,width:y,name:t.name,radius:t.radius})}function z4(e){return V.createElement(OL,rw({shapeType:"rectangle",propTransformer:Wse,activeClassName:"recharts-active-bar"},e))}var Zse=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var l=he(r)||yK(r);return l?t(r,i):(l||Ps(),n)}},Qse=["value","background"],DL;function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function Jse(e,t){if(e==null)return{};var n=eoe(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nm(){return Nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nm.apply(this,arguments)}function L4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L4(Object(n),!0).forEach(function(r){Ti(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function toe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LL(r.key),r)}}function noe(e,t,n){return t&&$4(e.prototype,t),n&&$4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function roe(e,t,n){return t=Am(t),aoe(e,zL()?Reflect.construct(t,n||[],Am(e).constructor):t.apply(e,n))}function aoe(e,t){if(t&&(ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ioe(e)}function ioe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zL=function(){return!!e})()}function Am(e){return Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Am(e)}function soe(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&&aw(e,t)}function aw(e,t){return aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aw(e,t)}function Ti(e,t,n){return t=LL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LL(e){var t=ooe(e,"string");return ul(t)=="symbol"?t:t+""}function ooe(e,t){if(ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Li=(function(e){function t(){var n;toe(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=roe(this,t,[].concat(i)),Ti(n,"state",{isAnimationFinished:!1}),Ti(n,"id",kl("recharts-bar-")),Ti(n,"handleAnimationEnd",function(){var c=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),c&&c()}),Ti(n,"handleAnimationStart",function(){var c=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),c&&c()}),n}return soe(t,e),noe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,l=this.props,c=l.shape,d=l.dataKey,f=l.activeIndex,h=l.activeBar,p=je(this.props,!1);return r&&r.map(function(x,y){var j=y===f,w=j?h:c,S=qt(qt(qt({},p),x),{},{isActive:j,option:w,index:y,dataKey:d,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return V.createElement(Ze,Nm({className:"recharts-bar-rectangle"},Cs(i.props,x,y),{key:"rectangle-".concat(x==null?void 0:x.x,"-").concat(x==null?void 0:x.y,"-").concat(x==null?void 0:x.value,"-").concat(y)}),V.createElement(z4,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,l=i.data,c=i.layout,d=i.isAnimationActive,f=i.animationBegin,h=i.animationDuration,p=i.animationEasing,x=i.animationId,y=this.state.prevData;return V.createElement(aa,{begin:f,duration:h,isActive:d,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var w=j.t,S=l.map(function(v,A){var O=y&&y[A];if(O){var _=Yn(O.x,v.x),T=Yn(O.y,v.y),N=Yn(O.width,v.width),E=Yn(O.height,v.height);return qt(qt({},v),{},{x:_(w),y:T(w),width:N(w),height:E(w)})}if(c==="horizontal"){var k=Yn(0,v.height),R=k(w);return qt(qt({},v),{},{y:v.y+v.height-R,height:R})}var B=Yn(0,v.width),D=B(w);return qt(qt({},v),{},{width:D})});return V.createElement(Ze,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,l=r.isAnimationActive,c=this.state.prevData;return l&&i&&i.length&&(!c||!ud(c,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,l=i.data,c=i.dataKey,d=i.activeIndex,f=je(this.props.background,!1);return l.map(function(h,p){h.value;var x=h.background,y=Jse(h,Qse);if(!x)return null;var j=qt(qt(qt(qt(qt({},y),{},{fill:"#eee"},x),f),Cs(r.props,h,p)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:c,index:p,className:"recharts-bar-background-rectangle"});return V.createElement(z4,Nm({key:"background-bar-".concat(p),option:r.props.background,isActive:p===d},j))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.data,d=l.xAxis,f=l.yAxis,h=l.layout,p=l.children,x=Qn(p,dd);if(!x)return null;var y=h==="vertical"?c[0].height/2:c[0].width/2,j=function(v,A){var O=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:O,errorVal:Yt(v,A)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Ze,w,x.map(function(S){return V.cloneElement(S,{key:"error-bar-".concat(i,"-").concat(S.props.dataKey),data:c,xAxis:d,yAxis:f,layout:h,offset:y,dataPointFormatter:j})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,l=r.data,c=r.className,d=r.xAxis,f=r.yAxis,h=r.left,p=r.top,x=r.width,y=r.height,j=r.isAnimationActive,w=r.background,S=r.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,A=ze("recharts-bar",c),O=d&&d.allowDataOverflow,_=f&&f.allowDataOverflow,T=O||_,N=Pe(S)?this.id:S;return V.createElement(Ze,{className:A},O||_?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(N)},V.createElement("rect",{x:O?h:h-x/2,y:_?p:p-y/2,width:O?x:x*2,height:_?y:y*2}))):null,V.createElement(Ze,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(N,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,N),(!j||v)&&Ba.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(M.PureComponent);DL=Li;Ti(Li,"displayName","Bar");Ti(Li,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ls.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ti(Li,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,l=e.xAxis,c=e.yAxis,d=e.xAxisTicks,f=e.yAxisTicks,h=e.stackedData,p=e.dataStartIndex,x=e.displayedData,y=e.offset,j=kte(r,n);if(!j)return null;var w=t.layout,S=n.type.defaultProps,v=S!==void 0?qt(qt({},S),n.props):n.props,A=v.dataKey,O=v.children,_=v.minPointSize,T=w==="horizontal"?c:l,N=h?T.scale.domain():null,E=Bte({numericAxis:T}),k=Qn(O,ap),R=x.map(function(B,D){var z,$,L,K,H,I;h?z=Pte(h[p+D],N):(z=Yt(B,A),Array.isArray(z)||(z=[E,z]));var F=Zse(_,DL.defaultProps.minPointSize)(z[1],D);if(w==="horizontal"){var Z,ie=[c.scale(z[0]),c.scale(z[1])],ce=ie[0],q=ie[1];$=f3({axis:l,ticks:d,bandSize:i,offset:j.offset,entry:B,index:D}),L=(Z=q??ce)!==null&&Z!==void 0?Z:void 0,K=j.size;var Y=ce-q;if(H=Number.isNaN(Y)?0:Y,I={x:$,y:c.y,width:K,height:c.height},Math.abs(F)>0&&Math.abs(H)<Math.abs(F)){var ae=wn(H||F)*(Math.abs(F)-Math.abs(H));L-=ae,H+=ae}}else{var fe=[l.scale(z[0]),l.scale(z[1])],ye=fe[0],we=fe[1];if($=ye,L=f3({axis:c,ticks:f,bandSize:i,offset:j.offset,entry:B,index:D}),K=we-ye,H=j.size,I={x:l.x,y:L,width:l.width,height:H},Math.abs(F)>0&&Math.abs(K)<Math.abs(F)){var Ie=wn(K||F)*(Math.abs(F)-Math.abs(K));K+=Ie}}return qt(qt(qt({},B),{},{x:$,y:L,width:K,height:H,value:h?z:z[1],payload:B,background:I},k&&k[D]&&k[D].props),{},{tooltipPayload:[cL(n,B)],tooltipPosition:{x:$+K/2,y:L+H/2}})});return qt({data:R,layout:w},y)});function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function loe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$L(r.key),r)}}function coe(e,t,n){return t&&B4(e.prototype,t),n&&B4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I4(Object(n),!0).forEach(function(r){Sp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sp(e,t,n){return t=$L(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $L(e){var t=uoe(e,"string");return Gu(t)=="symbol"?t:t+""}function uoe(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BL=function(t,n,r,i,l){var c=t.width,d=t.height,f=t.layout,h=t.children,p=Object.keys(n),x={left:r.left,leftMirror:r.left,right:c-r.right,rightMirror:c-r.right,top:r.top,topMirror:r.top,bottom:d-r.bottom,bottomMirror:d-r.bottom},y=!!Kn(h,Li);return p.reduce(function(j,w){var S=n[w],v=S.orientation,A=S.domain,O=S.padding,_=O===void 0?{}:O,T=S.mirror,N=S.reversed,E="".concat(v).concat(T?"Mirror":""),k,R,B,D,z;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var $=A[1]-A[0],L=1/0,K=S.categoricalDomain.sort(bK);if(K.forEach(function(fe,ye){ye>0&&(L=Math.min((fe||0)-(K[ye-1]||0),L))}),Number.isFinite(L)){var H=L/$,I=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(k=H*I/2),S.padding==="no-gap"){var F=Sn(t.barCategoryGap,H*I),Z=H*I/2;k=Z-F-(Z-F)/I*F}}}i==="xAxis"?R=[r.left+(_.left||0)+(k||0),r.left+r.width-(_.right||0)-(k||0)]:i==="yAxis"?R=f==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(k||0),r.top+r.height-(_.bottom||0)-(k||0)]:R=S.range,N&&(R=[R[1],R[0]]);var ie=iL(S,l,y),ce=ie.scale,q=ie.realScaleType;ce.domain(A).range(R),sL(ce);var Y=oL(ce,kr(kr({},S),{},{realScaleType:q}));i==="xAxis"?(z=v==="top"&&!T||v==="bottom"&&T,B=r.left,D=x[E]-z*S.height):i==="yAxis"&&(z=v==="left"&&!T||v==="right"&&T,B=x[E]-z*S.width,D=r.top);var ae=kr(kr(kr({},S),Y),{},{realScaleType:q,x:B,y:D,scale:ce,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return ae.bandSize=om(ae,Y),!S.hide&&i==="xAxis"?x[E]+=(z?-1:1)*ae.height:S.hide||(x[E]+=(z?-1:1)*ae.width),kr(kr({},j),{},Sp({},w,ae))},{})},IL=function(t,n){var r=t.x,i=t.y,l=n.x,c=n.y;return{x:Math.min(r,l),y:Math.min(i,c),width:Math.abs(l-r),height:Math.abs(c-i)}},doe=function(t){var n=t.x1,r=t.y1,i=t.x2,l=t.y2;return IL({x:n,y:r},{x:i,y:l})},qL=(function(){function e(t){loe(this,e),this.scale=t}return coe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,l=r.position;if(n!==void 0){if(l)switch(l){case"start":return this.scale(n);case"middle":{var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}case"end":{var d=this.bandwidth?this.bandwidth():0;return this.scale(n)+d}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],l=r[r.length-1];return i<=l?n>=i&&n<=l:n>=l&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Sp(qL,"EPS",1e-4);var d2=function(t){var n=Object.keys(t).reduce(function(r,i){return kr(kr({},r),{},Sp({},i,qL.create(t[i])))},{});return kr(kr({},n),{},{apply:function(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.bandAware,d=l.position;return Bse(i,function(f,h){return n[h].apply(f,{bandAware:c,position:d})})},isInRange:function(i){return RL(i,function(l,c){return n[c].isInRange(l)})}})};function foe(e){return(e%180+180)%180}var hoe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=foe(i),c=l*Math.PI/180,d=Math.atan(r/n),f=c>d&&c<Math.PI-d?r/Math.sin(c):n/Math.cos(c);return Math.abs(f)},c1,q4;function moe(){if(q4)return c1;q4=1;var e=sa(),t=id(),n=tp();function r(i){return function(l,c,d){var f=Object(l);if(!t(l)){var h=e(c,3);l=n(l),c=function(x){return h(f[x],x,f)}}var p=i(l,c,d);return p>-1?f[h?l[p]:p]:void 0}}return c1=r,c1}var u1,U4;function poe(){if(U4)return u1;U4=1;var e=CL();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return u1=t,u1}var d1,V4;function xoe(){if(V4)return d1;V4=1;var e=q6(),t=sa(),n=poe(),r=Math.max;function i(l,c,d){var f=l==null?0:l.length;if(!f)return-1;var h=d==null?0:n(d);return h<0&&(h=r(f+h,0)),e(l,t(c,3),h)}return d1=i,d1}var f1,H4;function yoe(){if(H4)return f1;H4=1;var e=moe(),t=xoe(),n=e(t);return f1=n,f1}var goe=yoe();const voe=st(goe);var boe=r6();const joe=st(boe);var woe=joe(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("")}),f2=M.createContext(void 0),h2=M.createContext(void 0),UL=M.createContext(void 0),VL=M.createContext({}),HL=M.createContext(void 0),FL=M.createContext(0),GL=M.createContext(0),F4=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,l=n.offset,c=t.clipPathId,d=t.children,f=t.width,h=t.height,p=woe(l);return V.createElement(f2.Provider,{value:r},V.createElement(h2.Provider,{value:i},V.createElement(VL.Provider,{value:l},V.createElement(UL.Provider,{value:p},V.createElement(HL.Provider,{value:c},V.createElement(FL.Provider,{value:h},V.createElement(GL.Provider,{value:f},d)))))))},Soe=function(){return M.useContext(HL)},KL=function(t){var n=M.useContext(f2);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},Noe=function(){var t=M.useContext(f2);return _i(t)},Aoe=function(){var t=M.useContext(h2),n=voe(t,function(r){return RL(r.domain,Number.isFinite)});return n||_i(t)},YL=function(t){var n=M.useContext(h2);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},_oe=function(){var t=M.useContext(UL);return t},Ooe=function(){return M.useContext(VL)},m2=function(){return M.useContext(GL)},p2=function(){return M.useContext(FL)};function dl(e){"@babel/helpers - typeof";return dl=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},dl(e)}function Toe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eoe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WL(r.key),r)}}function Coe(e,t,n){return t&&Eoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Moe(e,t,n){return t=_m(t),koe(e,XL()?Reflect.construct(t,n||[],_m(e).constructor):t.apply(e,n))}function koe(e,t){if(t&&(dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Poe(e)}function Poe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XL=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_m(e)}function Roe(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&&iw(e,t)}function iw(e,t){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iw(e,t)}function G4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G4(Object(n),!0).forEach(function(r){x2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x2(e,t,n){return t=WL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WL(e){var t=Doe(e,"string");return dl(t)=="symbol"?t:t+""}function Doe(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zoe(e,t){return Ioe(e)||Boe(e,t)||$oe(e,t)||Loe()}function Loe(){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){if(e){if(typeof e=="string")return Y4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y4(e,t)}}function Y4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Boe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Ioe(e){if(Array.isArray(e))return e}function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sw.apply(this,arguments)}var qoe=function(t,n){var r;return V.isValidElement(t)?r=V.cloneElement(t,n):Ee(t)?r=t(n):r=V.createElement("line",sw({},n,{className:"recharts-reference-line-line"})),r},Uoe=function(t,n,r,i,l,c,d,f,h){var p=l.x,x=l.y,y=l.width,j=l.height;if(r){var w=h.y,S=t.y.apply(w,{position:c});if(Jr(h,"discard")&&!t.y.isInRange(S))return null;var v=[{x:p+y,y:S},{x:p,y:S}];return f==="left"?v.reverse():v}if(n){var A=h.x,O=t.x.apply(A,{position:c});if(Jr(h,"discard")&&!t.x.isInRange(O))return null;var _=[{x:O,y:x+j},{x:O,y:x}];return d==="top"?_.reverse():_}if(i){var T=h.segment,N=T.map(function(E){return t.apply(E,{position:c})});return Jr(h,"discard")&&Dse(N,function(E){return!t.isInRange(E)})?null:N}return null};function Voe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,l=e.yAxisId,c=e.shape,d=e.className,f=e.alwaysShow,h=Soe(),p=KL(i),x=YL(l),y=_oe();if(!h||!y)return null;$r(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=d2({x:p.scale,y:x.scale}),w=Xt(t),S=Xt(n),v=r&&r.length===2,A=Uoe(j,w,S,v,y,e.position,p.orientation,x.orientation,e);if(!A)return null;var O=zoe(A,2),_=O[0],T=_.x,N=_.y,E=O[1],k=E.x,R=E.y,B=Jr(e,"hidden")?"url(#".concat(h,")"):void 0,D=K4(K4({clipPath:B},je(e,!0)),{},{x1:T,y1:N,x2:k,y2:R});return V.createElement(Ze,{className:ze("recharts-reference-line",d)},qoe(c,D),en.renderCallByParent(e,doe({x1:T,y1:N,x2:k,y2:R})))}var y2=(function(e){function t(){return Toe(this,t),Moe(this,t,arguments)}return Roe(t,e),Coe(t,[{key:"render",value:function(){return V.createElement(Voe,this.props)}}])})(V.Component);x2(y2,"displayName","ReferenceLine");x2(y2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ow.apply(this,arguments)}function fl(e){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(e)}function X4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X4(Object(n),!0).forEach(function(r){Np(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Foe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QL(r.key),r)}}function Goe(e,t,n){return t&&Foe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Koe(e,t,n){return t=Om(t),Yoe(e,ZL()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function Yoe(e,t){if(t&&(fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xoe(e)}function Xoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZL=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Om(e)}function Woe(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&&lw(e,t)}function lw(e,t){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lw(e,t)}function Np(e,t,n){return t=QL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QL(e){var t=Zoe(e,"string");return fl(t)=="symbol"?t:t+""}function Zoe(e,t){if(fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qoe=function(t){var n=t.x,r=t.y,i=t.xAxis,l=t.yAxis,c=d2({x:i.scale,y:l.scale}),d=c.apply({x:n,y:r},{bandAware:!0});return Jr(t,"discard")&&!c.isInRange(d)?null:d},Ap=(function(e){function t(){return Hoe(this,t),Koe(this,t,arguments)}return Woe(t,e),Goe(t,[{key:"render",value:function(){var r=this.props,i=r.x,l=r.y,c=r.r,d=r.alwaysShow,f=r.clipPathId,h=Xt(i),p=Xt(l);if($r(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!p)return null;var x=Qoe(this.props);if(!x)return null;var y=x.x,j=x.y,w=this.props,S=w.shape,v=w.className,A=Jr(this.props,"hidden")?"url(#".concat(f,")"):void 0,O=W4(W4({clipPath:A},je(this.props,!0)),{},{cx:y,cy:j});return V.createElement(Ze,{className:ze("recharts-reference-dot",v)},t.renderDot(S,O),en.renderCallByParent(this.props,{x:y-c,y:j-c,width:2*c,height:2*c}))}}])})(V.Component);Np(Ap,"displayName","ReferenceDot");Np(Ap,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Np(Ap,"renderDot",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):Ee(e)?n=e(t):n=V.createElement(xp,ow({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cw.apply(this,arguments)}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 Z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Q4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z4(Object(n),!0).forEach(function(r){_p(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Joe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ele(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e8(r.key),r)}}function tle(e,t,n){return t&&ele(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nle(e,t,n){return t=Tm(t),rle(e,JL()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function rle(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 ale(e)}function ale(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JL=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}function ile(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&&uw(e,t)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uw(e,t)}function _p(e,t,n){return t=e8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e8(e){var t=sle(e,"string");return hl(t)=="symbol"?t:t+""}function sle(e,t){if(hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ole=function(t,n,r,i,l){var c=l.x1,d=l.x2,f=l.y1,h=l.y2,p=l.xAxis,x=l.yAxis;if(!p||!x)return null;var y=d2({x:p.scale,y:x.scale}),j={x:t?y.x.apply(c,{position:"start"}):y.x.rangeMin,y:r?y.y.apply(f,{position:"start"}):y.y.rangeMin},w={x:n?y.x.apply(d,{position:"end"}):y.x.rangeMax,y:i?y.y.apply(h,{position:"end"}):y.y.rangeMax};return Jr(l,"discard")&&(!y.isInRange(j)||!y.isInRange(w))?null:IL(j,w)},Op=(function(e){function t(){return Joe(this,t),nle(this,t,arguments)}return ile(t,e),tle(t,[{key:"render",value:function(){var r=this.props,i=r.x1,l=r.x2,c=r.y1,d=r.y2,f=r.className,h=r.alwaysShow,p=r.clipPathId;$r(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=Xt(i),y=Xt(l),j=Xt(c),w=Xt(d),S=this.props.shape;if(!x&&!y&&!j&&!w&&!S)return null;var v=ole(x,y,j,w,this.props);if(!v&&!S)return null;var A=Jr(this.props,"hidden")?"url(#".concat(p,")"):void 0;return V.createElement(Ze,{className:ze("recharts-reference-area",f)},t.renderRect(S,Q4(Q4({clipPath:A},je(this.props,!0)),v)),en.renderCallByParent(this.props,v))}}])})(V.Component);_p(Op,"displayName","ReferenceArea");_p(Op,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});_p(Op,"renderRect",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):Ee(e)?n=e(t):n=V.createElement(u2,cw({},t,{className:"recharts-reference-area-rect"})),n});function t8(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function lle(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return hoe(r,n)}function cle(e,t,n){var r=n==="width",i=e.x,l=e.y,c=e.width,d=e.height;return t===1?{start:r?i:l,end:r?i+c:l+d}:{start:r?i+c:l+d,end:r?i:l}}function Em(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var l=n();return e*(t-e*l/2-r)>=0&&e*(t+e*l/2-i)<=0}function ule(e,t){return t8(e,t+1)}function dle(e,t,n,r,i){for(var l=(r||[]).slice(),c=t.start,d=t.end,f=0,h=1,p=c,x=function(){var w=r==null?void 0:r[f];if(w===void 0)return{v:t8(r,h)};var S=f,v,A=function(){return v===void 0&&(v=n(w,S)),v},O=w.coordinate,_=f===0||Em(e,O,A,p,d);_||(f=0,p=c,h+=1),_&&(p=O+e*(A()/2+i),f+=h)},y;h<=l.length;)if(y=x(),y)return y.v;return[]}function Ku(e){"@babel/helpers - typeof";return Ku=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},Ku(e)}function J4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J4(Object(n),!0).forEach(function(r){fle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fle(e,t,n){return t=hle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hle(e){var t=mle(e,"string");return Ku(t)=="symbol"?t:t+""}function mle(e,t){if(Ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ple(e,t,n,r,i){for(var l=(r||[]).slice(),c=l.length,d=t.start,f=t.end,h=function(y){var j=l[y],w,S=function(){return w===void 0&&(w=n(j,y)),w};if(y===c-1){var v=e*(j.coordinate+e*S()/2-f);l[y]=j=xn(xn({},j),{},{tickCoord:v>0?j.coordinate-v*e:j.coordinate})}else l[y]=j=xn(xn({},j),{},{tickCoord:j.coordinate});var A=Em(e,j.tickCoord,S,d,f);A&&(f=j.tickCoord-e*(S()/2+i),l[y]=xn(xn({},j),{},{isShow:!0}))},p=c-1;p>=0;p--)h(p);return l}function xle(e,t,n,r,i,l){var c=(r||[]).slice(),d=c.length,f=t.start,h=t.end;if(l){var p=r[d-1],x=n(p,d-1),y=e*(p.coordinate+e*x/2-h);c[d-1]=p=xn(xn({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate});var j=Em(e,p.tickCoord,function(){return x},f,h);j&&(h=p.tickCoord-e*(x/2+i),c[d-1]=xn(xn({},p),{},{isShow:!0}))}for(var w=l?d-1:d,S=function(O){var _=c[O],T,N=function(){return T===void 0&&(T=n(_,O)),T};if(O===0){var E=e*(_.coordinate-e*N()/2-f);c[O]=_=xn(xn({},_),{},{tickCoord:E<0?_.coordinate-E*e:_.coordinate})}else c[O]=_=xn(xn({},_),{},{tickCoord:_.coordinate});var k=Em(e,_.tickCoord,N,f,h);k&&(f=_.tickCoord+e*(N()/2+i),c[O]=xn(xn({},_),{},{isShow:!0}))},v=0;v<w;v++)S(v);return c}function g2(e,t,n){var r=e.tick,i=e.ticks,l=e.viewBox,c=e.minTickGap,d=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,x=e.angle;if(!i||!i.length||!r)return[];if(he(f)||Ls.isSsr)return ule(i,typeof f=="number"&&he(f)?f:0);var y=[],j=d==="top"||d==="bottom"?"width":"height",w=p&&j==="width"?tu(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(_,T){var N=Ee(h)?h(_.value,T):_.value;return j==="width"?lle(tu(N,{fontSize:t,letterSpacing:n}),w,x):tu(N,{fontSize:t,letterSpacing:n})[j]},v=i.length>=2?wn(i[1].coordinate-i[0].coordinate):1,A=cle(l,v,j);return f==="equidistantPreserveStart"?dle(v,A,S,i,c):(f==="preserveStart"||f==="preserveStartEnd"?y=xle(v,A,S,i,c,f==="preserveStartEnd"):y=ple(v,A,S,i,c),y.filter(function(O){return O.isShow}))}var yle=["viewBox"],gle=["viewBox"],vle=["ticks"];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 Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lo.apply(this,arguments)}function eR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eR(Object(n),!0).forEach(function(r){v2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h1(e,t){if(e==null)return{};var n=ble(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ble(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r8(r.key),r)}}function wle(e,t,n){return t&&tR(e.prototype,t),n&&tR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sle(e,t,n){return t=Cm(t),Nle(e,n8()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function Nle(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 Ale(e)}function Ale(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n8=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(e)}function _le(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&&dw(e,t)}function dw(e,t){return dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dw(e,t)}function v2(e,t,n){return t=r8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r8(e){var t=Ole(e,"string");return ml(t)=="symbol"?t:t+""}function Ole(e,t){if(ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ll=(function(e){function t(n){var r;return jle(this,t),r=Sle(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return _le(t,e),wle(t,[{key:"shouldComponentUpdate",value:function(r,i){var l=r.viewBox,c=h1(r,yle),d=this.props,f=d.viewBox,h=h1(d,gle);return!Vo(l,f)||!Vo(c,h)||!Vo(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,l=i.x,c=i.y,d=i.width,f=i.height,h=i.orientation,p=i.tickSize,x=i.mirror,y=i.tickMargin,j,w,S,v,A,O,_=x?-1:1,T=r.tickSize||p,N=he(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":j=w=r.coordinate,v=c+ +!x*f,S=v-_*T,O=S-_*y,A=N;break;case"left":S=v=r.coordinate,w=l+ +!x*d,j=w-_*T,A=j-_*y,O=N;break;case"right":S=v=r.coordinate,w=l+ +x*d,j=w+_*T,A=j+_*y,O=N;break;default:j=w=r.coordinate,v=c+ +x*f,S=v+_*T,O=S+_*y,A=N;break}return{line:{x1:j,y1:S,x2:w,y2:v},tick:{x:A,y:O}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,l=r.mirror,c;switch(i){case"left":c=l?"start":"end";break;case"right":c=l?"end":"start";break;default:c="middle";break}return c}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,l=r.mirror,c="end";switch(i){case"left":case"right":c="middle";break;case"top":c=l?"start":"end";break;default:c=l?"end":"start";break}return c}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.orientation,h=r.mirror,p=r.axisLine,x=Ft(Ft(Ft({},je(this.props,!1)),je(p,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var y=+(f==="top"&&!h||f==="bottom"&&h);x=Ft(Ft({},x),{},{x1:i,y1:l+y*d,x2:i+c,y2:l+y*d})}else{var j=+(f==="left"&&!h||f==="right"&&h);x=Ft(Ft({},x),{},{x1:i+j*c,y1:l,x2:i+j*c,y2:l+d})}return V.createElement("line",Lo({},x,{className:ze("recharts-cartesian-axis-line",Zn(p,"className"))}))}},{key:"renderTicks",value:function(r,i,l){var c=this,d=this.props,f=d.tickLine,h=d.stroke,p=d.tick,x=d.tickFormatter,y=d.unit,j=g2(Ft(Ft({},this.props),{},{ticks:r}),i,l),w=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),v=je(this.props,!1),A=je(p,!1),O=Ft(Ft({},v),{},{fill:"none"},je(f,!1)),_=j.map(function(T,N){var E=c.getTickLineCoord(T),k=E.line,R=E.tick,B=Ft(Ft(Ft(Ft({textAnchor:w,verticalAnchor:S},v),{},{stroke:"none",fill:h},A),R),{},{index:N,payload:T,visibleTicksCount:j.length,tickFormatter:x});return V.createElement(Ze,Lo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Cs(c.props,T,N)),f&&V.createElement("line",Lo({},O,k,{className:ze("recharts-cartesian-axis-tick-line",Zn(f,"className"))})),p&&t.renderTickItem(p,B,"".concat(Ee(x)?x(T.value,N):T.value).concat(y||"")))});return V.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,l=i.axisLine,c=i.width,d=i.height,f=i.ticksGenerator,h=i.className,p=i.hide;if(p)return null;var x=this.props,y=x.ticks,j=h1(x,vle),w=y;return Ee(f)&&(w=y&&y.length>0?f(this.props):f(j)),c<=0||d<=0||!w||!w.length?null:V.createElement(Ze,{className:ze("recharts-cartesian-axis",h),ref:function(v){r.layerReference=v}},l&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),en.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,l){var c,d=ze(i.className,"recharts-cartesian-axis-tick-value");return V.isValidElement(r)?c=V.cloneElement(r,Ft(Ft({},i),{},{className:d})):Ee(r)?c=r(Ft(Ft({},i),{},{className:d})):c=V.createElement(Ms,Lo({},i,{className:"recharts-cartesian-axis-tick-value"}),l),c}}])})(M.Component);v2(Ll,"displayName","CartesianAxis");v2(Ll,"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 Tle=["x1","y1","x2","y2","key"],Ele=["offset"];function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function nR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(n),!0).forEach(function(r){Cle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cle(e,t,n){return t=Mle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mle(e){var t=kle(e,"string");return Rs(t)=="symbol"?t:t+""}function kle(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ss(){return Ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ss.apply(this,arguments)}function rR(e,t){if(e==null)return{};var n=Ple(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ple(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Rle=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,l=t.y,c=t.width,d=t.height,f=t.ry;return V.createElement("rect",{x:i,y:l,ry:f,width:c,height:d,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function a8(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ee(e))n=e(t);else{var r=t.x1,i=t.y1,l=t.x2,c=t.y2,d=t.key,f=rR(t,Tle),h=je(f,!1);h.offset;var p=rR(h,Ele);n=V.createElement("line",Ss({},p,{x1:r,y1:i,x2:l,y2:c,fill:"none",key:d}))}return n}function Dle(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,l=e.horizontalPoints;if(!i||!l||!l.length)return null;var c=l.map(function(d,f){var h=yn(yn({},e),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(f),index:f});return a8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function zle(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,l=e.verticalPoints;if(!i||!l||!l.length)return null;var c=l.map(function(d,f){var h=yn(yn({},e),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(f),index:f});return a8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function Lle(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,l=e.width,c=e.height,d=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length)return null;var p=d.map(function(y){return Math.round(y+i-i)}).sort(function(y,j){return y-j});i!==p[0]&&p.unshift(0);var x=p.map(function(y,j){var w=!p[j+1],S=w?i+c-y:p[j+1]-y;if(S<=0)return null;var v=j%t.length;return V.createElement("rect",{key:"react-".concat(j),y,x:r,height:S,width:l,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},x)}function $le(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,l=e.x,c=e.y,d=e.width,f=e.height,h=e.verticalPoints;if(!n||!r||!r.length)return null;var p=h.map(function(y){return Math.round(y+l-l)}).sort(function(y,j){return y-j});l!==p[0]&&p.unshift(0);var x=p.map(function(y,j){var w=!p[j+1],S=w?l+d-y:p[j+1]-y;if(S<=0)return null;var v=j%r.length;return V.createElement("rect",{key:"react-".concat(j),x:y,y:c,width:S,height:f,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},x)}var Ble=function(t,n){var r=t.xAxis,i=t.width,l=t.height,c=t.offset;return aL(g2(yn(yn(yn({},Ll.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.left,c.left+c.width,n)},Ile=function(t,n){var r=t.yAxis,i=t.width,l=t.height,c=t.offset;return aL(g2(yn(yn(yn({},Ll.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.top,c.top+c.height,n)},To={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function fw(e){var t,n,r,i,l,c,d=m2(),f=p2(),h=Ooe(),p=yn(yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:To.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:To.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:To.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:To.horizontalFill,vertical:(l=e.vertical)!==null&&l!==void 0?l:To.vertical,verticalFill:(c=e.verticalFill)!==null&&c!==void 0?c:To.verticalFill,x:he(e.x)?e.x:h.left,y:he(e.y)?e.y:h.top,width:he(e.width)?e.width:h.width,height:he(e.height)?e.height:h.height}),x=p.x,y=p.y,j=p.width,w=p.height,S=p.syncWithTicks,v=p.horizontalValues,A=p.verticalValues,O=Noe(),_=Aoe();if(!he(j)||j<=0||!he(w)||w<=0||!he(x)||x!==+x||!he(y)||y!==+y)return null;var T=p.verticalCoordinatesGenerator||Ble,N=p.horizontalCoordinatesGenerator||Ile,E=p.horizontalPoints,k=p.verticalPoints;if((!E||!E.length)&&Ee(N)){var R=v&&v.length,B=N({yAxis:_?yn(yn({},_),{},{ticks:R?v:_.ticks}):void 0,width:d,height:f,offset:h},R?!0:S);$r(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(B),"]")),Array.isArray(B)&&(E=B)}if((!k||!k.length)&&Ee(T)){var D=A&&A.length,z=T({xAxis:O?yn(yn({},O),{},{ticks:D?A:O.ticks}):void 0,width:d,height:f,offset:h},D?!0:S);$r(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(z),"]")),Array.isArray(z)&&(k=z)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(Rle,{fill:p.fill,fillOpacity:p.fillOpacity,x:p.x,y:p.y,width:p.width,height:p.height,ry:p.ry}),V.createElement(Dle,Ss({},p,{offset:h,horizontalPoints:E,xAxis:O,yAxis:_})),V.createElement(zle,Ss({},p,{offset:h,verticalPoints:k,xAxis:O,yAxis:_})),V.createElement(Lle,Ss({},p,{horizontalPoints:E})),V.createElement($le,Ss({},p,{verticalPoints:k})))}fw.displayName="CartesianGrid";var qle=["type","layout","connectNulls","ref"],Ule=["key"];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 aR(e,t){if(e==null)return{};var n=Vle(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ou.apply(this,arguments)}function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){Pr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e){return Kle(e)||Gle(e)||Fle(e)||Hle()}function Hle(){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 Fle(e,t){if(e){if(typeof e=="string")return hw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hw(e,t)}}function Gle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kle(e){if(Array.isArray(e))return hw(e)}function hw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s8(r.key),r)}}function Xle(e,t,n){return t&&sR(e.prototype,t),n&&sR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wle(e,t,n){return t=Mm(t),Zle(e,i8()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function Zle(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 Qle(e)}function Qle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i8=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(e)}function Jle(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&&mw(e,t)}function mw(e,t){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mw(e,t)}function Pr(e,t,n){return t=s8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s8(e){var t=ece(e,"string");return pl(t)=="symbol"?t:t+""}function ece(e,t){if(pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fd=(function(e){function t(){var n;Yle(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=Wle(this,t,[].concat(i)),Pr(n,"state",{isAnimationFinished:!0,totalLength:0}),Pr(n,"generateSimpleStrokeDasharray",function(c,d){return"".concat(d,"px ").concat(c-d,"px")}),Pr(n,"getStrokeDasharray",function(c,d,f){var h=f.reduce(function(A,O){return A+O});if(!h)return n.generateSimpleStrokeDasharray(d,c);for(var p=Math.floor(c/h),x=c%h,y=d-c,j=[],w=0,S=0;w<f.length;S+=f[w],++w)if(S+f[w]>x){j=[].concat(Eo(f.slice(0,w)),[x-S]);break}var v=j.length%2===0?[0,y]:[y];return[].concat(Eo(t.repeat(f,p)),Eo(j),v).map(function(A){return"".concat(A,"px")}).join(", ")}),Pr(n,"id",kl("recharts-line-")),Pr(n,"pathRef",function(c){n.mainCurve=c}),Pr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Pr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Jle(t,e),Xle(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.points,d=l.xAxis,f=l.yAxis,h=l.layout,p=l.children,x=Qn(p,dd);if(!x)return null;var y=function(S,v){return{x:S.x,y:S.y,value:S.value,errorVal:Yt(S.payload,v)}},j={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Ze,j,x.map(function(w){return V.cloneElement(w,{key:"bar-".concat(w.props.dataKey),data:c,xAxis:d,yAxis:f,layout:h,dataPointFormatter:y})}))}},{key:"renderDots",value:function(r,i,l){var c=this.props.isAnimationActive;if(c&&!this.state.isAnimationFinished)return null;var d=this.props,f=d.dot,h=d.points,p=d.dataKey,x=je(this.props,!1),y=je(f,!0),j=h.map(function(S,v){var A=Fn(Fn(Fn({key:"dot-".concat(v),r:3},x),y),{},{index:v,cx:S.x,cy:S.y,value:S.value,dataKey:p,payload:S.payload,points:h});return t.renderDotItem(f,A)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(l,")"):null};return V.createElement(Ze,ou({className:"recharts-line-dots",key:"dots"},w),j)}},{key:"renderCurveStatically",value:function(r,i,l,c){var d=this.props,f=d.type,h=d.layout,p=d.connectNulls;d.ref;var x=aR(d,qle),y=Fn(Fn(Fn({},je(x,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(l,")"):null,points:r},c),{},{type:f,layout:h,connectNulls:p});return V.createElement(um,ou({},y,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var l=this,c=this.props,d=c.points,f=c.strokeDasharray,h=c.isAnimationActive,p=c.animationBegin,x=c.animationDuration,y=c.animationEasing,j=c.animationId,w=c.animateNewValues,S=c.width,v=c.height,A=this.state,O=A.prevPoints,_=A.totalLength;return V.createElement(aa,{begin:p,duration:x,isActive:h,easing:y,from:{t:0},to:{t:1},key:"line-".concat(j),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var N=T.t;if(O){var E=O.length/d.length,k=d.map(function($,L){var K=Math.floor(L*E);if(O[K]){var H=O[K],I=Yn(H.x,$.x),F=Yn(H.y,$.y);return Fn(Fn({},$),{},{x:I(N),y:F(N)})}if(w){var Z=Yn(S*2,$.x),ie=Yn(v/2,$.y);return Fn(Fn({},$),{},{x:Z(N),y:ie(N)})}return Fn(Fn({},$),{},{x:$.x,y:$.y})});return l.renderCurveStatically(k,r,i)}var R=Yn(0,_),B=R(N),D;if(f){var z="".concat(f).split(/[,\s]+/gim).map(function($){return parseFloat($)});D=l.getStrokeDasharray(B,_,z)}else D=l.generateSimpleStrokeDasharray(_,B);return l.renderCurveStatically(d,r,i,{strokeDasharray:D})})}},{key:"renderCurve",value:function(r,i){var l=this.props,c=l.points,d=l.isAnimationActive,f=this.state,h=f.prevPoints,p=f.totalLength;return d&&c&&c.length&&(!h&&p>0||!ud(h,c))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(c,r,i)}},{key:"render",value:function(){var r,i=this.props,l=i.hide,c=i.dot,d=i.points,f=i.className,h=i.xAxis,p=i.yAxis,x=i.top,y=i.left,j=i.width,w=i.height,S=i.isAnimationActive,v=i.id;if(l||!d||!d.length)return null;var A=this.state.isAnimationFinished,O=d.length===1,_=ze("recharts-line",f),T=h&&h.allowDataOverflow,N=p&&p.allowDataOverflow,E=T||N,k=Pe(v)?this.id:v,R=(r=je(c,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},B=R.r,D=B===void 0?3:B,z=R.strokeWidth,$=z===void 0?2:z,L=EK(c)?c:{},K=L.clipDot,H=K===void 0?!0:K,I=D*2+$;return V.createElement(Ze,{className:_},T||N?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(k)},V.createElement("rect",{x:T?y:y-j/2,y:N?x:x-w/2,width:T?j:j*2,height:N?w:w*2})),!H&&V.createElement("clipPath",{id:"clipPath-dots-".concat(k)},V.createElement("rect",{x:y-I/2,y:x-I/2,width:j+I,height:w+I}))):null,!O&&this.renderCurve(E,k),this.renderErrorBar(E,k),(O||c)&&this.renderDots(E,H,k),(!S||A)&&Ba.renderCallByParent(this.props,d))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var l=r.length%2!==0?[].concat(Eo(r),[0]):r,c=[],d=0;d<i;++d)c=[].concat(Eo(c),Eo(l));return c}},{key:"renderDotItem",value:function(r,i){var l;if(V.isValidElement(r))l=V.cloneElement(r,i);else if(Ee(r))l=r(i);else{var c=i.key,d=aR(i,Ule),f=ze("recharts-line-dot",typeof r!="boolean"?r.className:"");l=V.createElement(xp,ou({key:c},d,{className:f}))}return l}}])})(M.PureComponent);Pr(fd,"displayName","Line");Pr(fd,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ls.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Pr(fd,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,c=e.dataKey,d=e.bandSize,f=e.displayedData,h=e.offset,p=t.layout,x=f.map(function(y,j){var w=Yt(y,c);return p==="horizontal"?{x:d3({axis:n,ticks:i,bandSize:d,entry:y,index:j}),y:Pe(w)?null:r.scale(w),value:w,payload:y}:{x:Pe(w)?null:n.scale(w),y:d3({axis:r,ticks:l,bandSize:d,entry:y,index:j}),value:w,payload:y}});return Fn({points:x,layout:p},h)});function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function tce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c8(r.key),r)}}function rce(e,t,n){return t&&nce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ace(e,t,n){return t=km(t),ice(e,o8()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function ice(e,t){if(t&&(xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sce(e)}function sce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o8=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function oce(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&&pw(e,t)}function pw(e,t){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pw(e,t)}function l8(e,t,n){return t=c8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c8(e){var t=lce(e,"string");return xl(t)=="symbol"?t:t+""}function lce(e,t){if(xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xw.apply(this,arguments)}function cce(e){var t=e.xAxisId,n=m2(),r=p2(),i=KL(t);return i==null?null:M.createElement(Ll,xw({},i,{className:ze("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(c){return Ra(c,!0)}}))}var yl=(function(e){function t(){return tce(this,t),ace(this,t,arguments)}return oce(t,e),rce(t,[{key:"render",value:function(){return M.createElement(cce,this.props)}}])})(M.Component);l8(yl,"displayName","XAxis");l8(yl,"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 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 uce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f8(r.key),r)}}function fce(e,t,n){return t&&dce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hce(e,t,n){return t=Pm(t),mce(e,u8()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function mce(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 pce(e)}function pce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u8=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function xce(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&&yw(e,t)}function yw(e,t){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yw(e,t)}function d8(e,t,n){return t=f8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f8(e){var t=yce(e,"string");return gl(t)=="symbol"?t:t+""}function yce(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gw.apply(this,arguments)}var gce=function(t){var n=t.yAxisId,r=m2(),i=p2(),l=YL(n);return l==null?null:M.createElement(Ll,gw({},l,{className:ze("recharts-".concat(l.axisType," ").concat(l.axisType),l.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(d){return Ra(d,!0)}}))},vl=(function(e){function t(){return uce(this,t),hce(this,t,arguments)}return xce(t,e),fce(t,[{key:"render",value:function(){return M.createElement(gce,this.props)}}])})(M.Component);d8(vl,"displayName","YAxis");d8(vl,"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 oR(e){return wce(e)||jce(e)||bce(e)||vce()}function vce(){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 bce(e,t){if(e){if(typeof e=="string")return vw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vw(e,t)}}function jce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wce(e){if(Array.isArray(e))return vw(e)}function vw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bw=function(t,n,r,i,l){var c=Qn(t,y2),d=Qn(t,Ap),f=[].concat(oR(c),oR(d)),h=Qn(t,Op),p="".concat(i,"Id"),x=i[0],y=n;if(f.length&&(y=f.reduce(function(S,v){if(v.props[p]===r&&Jr(v.props,"extendDomain")&&he(v.props[x])){var A=v.props[x];return[Math.min(S[0],A),Math.max(S[1],A)]}return S},y)),h.length){var j="".concat(x,"1"),w="".concat(x,"2");y=h.reduce(function(S,v){if(v.props[p]===r&&Jr(v.props,"extendDomain")&&he(v.props[j])&&he(v.props[w])){var A=v.props[j],O=v.props[w];return[Math.min(S[0],A,O),Math.max(S[1],A,O)]}return S},y)}return l&&l.length&&(y=l.reduce(function(S,v){return he(v)?[Math.min(S[0],v),Math.max(S[1],v)]:S},y)),y},m1={exports:{}},lR;function Sce(){return lR||(lR=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function l(f,h,p,x,y){if(typeof p!="function")throw new TypeError("The listener must be a function");var j=new i(p,x||f,y),w=n?n+h:h;return f._events[w]?f._events[w].fn?f._events[w]=[f._events[w],j]:f._events[w].push(j):(f._events[w]=j,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function d(){this._events=new r,this._eventsCount=0}d.prototype.eventNames=function(){var h=[],p,x;if(this._eventsCount===0)return h;for(x in p=this._events)t.call(p,x)&&h.push(n?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},d.prototype.listeners=function(h){var p=n?n+h:h,x=this._events[p];if(!x)return[];if(x.fn)return[x.fn];for(var y=0,j=x.length,w=new Array(j);y<j;y++)w[y]=x[y].fn;return w},d.prototype.listenerCount=function(h){var p=n?n+h:h,x=this._events[p];return x?x.fn?1:x.length:0},d.prototype.emit=function(h,p,x,y,j,w){var S=n?n+h:h;if(!this._events[S])return!1;var v=this._events[S],A=arguments.length,O,_;if(v.fn){switch(v.once&&this.removeListener(h,v.fn,void 0,!0),A){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,p),!0;case 3:return v.fn.call(v.context,p,x),!0;case 4:return v.fn.call(v.context,p,x,y),!0;case 5:return v.fn.call(v.context,p,x,y,j),!0;case 6:return v.fn.call(v.context,p,x,y,j,w),!0}for(_=1,O=new Array(A-1);_<A;_++)O[_-1]=arguments[_];v.fn.apply(v.context,O)}else{var T=v.length,N;for(_=0;_<T;_++)switch(v[_].once&&this.removeListener(h,v[_].fn,void 0,!0),A){case 1:v[_].fn.call(v[_].context);break;case 2:v[_].fn.call(v[_].context,p);break;case 3:v[_].fn.call(v[_].context,p,x);break;case 4:v[_].fn.call(v[_].context,p,x,y);break;default:if(!O)for(N=1,O=new Array(A-1);N<A;N++)O[N-1]=arguments[N];v[_].fn.apply(v[_].context,O)}}return!0},d.prototype.on=function(h,p,x){return l(this,h,p,x,!1)},d.prototype.once=function(h,p,x){return l(this,h,p,x,!0)},d.prototype.removeListener=function(h,p,x,y){var j=n?n+h:h;if(!this._events[j])return this;if(!p)return c(this,j),this;var w=this._events[j];if(w.fn)w.fn===p&&(!y||w.once)&&(!x||w.context===x)&&c(this,j);else{for(var S=0,v=[],A=w.length;S<A;S++)(w[S].fn!==p||y&&!w[S].once||x&&w[S].context!==x)&&v.push(w[S]);v.length?this._events[j]=v.length===1?v[0]:v:c(this,j)}return this},d.prototype.removeAllListeners=function(h){var p;return h?(p=n?n+h:h,this._events[p]&&c(this,p)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,e.exports=d})(m1)),m1.exports}var Nce=Sce();const Ace=st(Nce);var p1=new Ace,x1="recharts.syncMouseEvents";function Yu(e){"@babel/helpers - typeof";return Yu=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},Yu(e)}function _ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h8(r.key),r)}}function Tce(e,t,n){return t&&Oce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y1(e,t,n){return t=h8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h8(e){var t=Ece(e,"string");return Yu(t)=="symbol"?t:t+""}function Ece(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cce=(function(){function e(){_ce(this,e),y1(this,"activeIndex",0),y1(this,"coordinateList",[]),y1(this,"layout","horizontal")}return Tce(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,l=i===void 0?null:i,c=n.container,d=c===void 0?null:c,f=n.layout,h=f===void 0?null:f,p=n.offset,x=p===void 0?null:p,y=n.mouseHandlerCallback,j=y===void 0?null:y;this.coordinateList=(r=l??this.coordinateList)!==null&&r!==void 0?r:[],this.container=d??this.container,this.layout=h??this.layout,this.offset=x??this.offset,this.mouseHandlerCallback=j??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),l=i.x,c=i.y,d=i.height,f=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,p=((r=window)===null||r===void 0?void 0:r.scrollY)||0,x=l+f+h,y=c+this.offset.top+d/2+p;this.mouseHandlerCallback({pageX:x,pageY:y})}}}])})();function Mce(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&he(r)&&he(i))return!0}return!1}function kce(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function m8(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,l=e.endAngle,c=yt(t,n,r,i),d=yt(t,n,r,l);return{points:[c,d],cx:t,cy:n,radius:r,startAngle:i,endAngle:l}}function Pce(e,t,n){var r,i,l,c;if(e==="horizontal")r=t.x,l=r,i=n.top,c=n.top+n.height;else if(e==="vertical")i=t.y,c=i,r=n.left,l=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var d=t.cx,f=t.cy,h=t.innerRadius,p=t.outerRadius,x=t.angle,y=yt(d,f,h,x),j=yt(d,f,p,x);r=y.x,i=y.y,l=j.x,c=j.y}else return m8(t);return[{x:r,y:i},{x:l,y:c}]}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 cR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cR(Object(n),!0).forEach(function(r){Rce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rce(e,t,n){return t=Dce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dce(e){var t=zce(e,"string");return Xu(t)=="symbol"?t:t+""}function zce(e,t){if(Xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lce(e){var t,n,r=e.element,i=e.tooltipEventType,l=e.isActive,c=e.activeCoordinate,d=e.activePayload,f=e.offset,h=e.activeTooltipIndex,p=e.tooltipAxisBandSize,x=e.layout,y=e.chartName,j=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!j||!l||!c||y!=="ScatterChart"&&i!=="axis")return null;var w,S=um;if(y==="ScatterChart")w=c,S=iie;else if(y==="BarChart")w=kce(x,c,f,p),S=u2;else if(x==="radial"){var v=m8(c),A=v.cx,O=v.cy,_=v.radius,T=v.startAngle,N=v.endAngle;w={cx:A,cy:O,startAngle:T,endAngle:N,innerRadius:_,outerRadius:_},S=pL}else w={points:Pce(x,c,f)},S=um;var E=rh(rh(rh(rh({stroke:"#ccc",pointerEvents:"none"},f),w),je(j,!1)),{},{payload:d,payloadIndex:h,className:ze("recharts-tooltip-cursor",j.className)});return M.isValidElement(j)?M.cloneElement(j,E):M.createElement(S,E)}var $ce=["item"],Bce=["children","className","width","height","style","compact","title","desc"];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 $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}function uR(e,t){return Uce(e)||qce(e,t)||x8(e,t)||Ice()}function Ice(){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 qce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Uce(e){if(Array.isArray(e))return e}function dR(e,t){if(e==null)return{};var n=Vce(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y8(r.key),r)}}function Gce(e,t,n){return t&&Fce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kce(e,t,n){return t=Rm(t),Yce(e,p8()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function Yce(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 Xce(e)}function Xce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p8=function(){return!!e})()}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rm(e)}function Wce(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&&jw(e,t)}function jw(e,t){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jw(e,t)}function jl(e){return Jce(e)||Qce(e)||x8(e)||Zce()}function Zce(){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 x8(e,t){if(e){if(typeof e=="string")return ww(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ww(e,t)}}function Qce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jce(e){if(Array.isArray(e))return ww(e)}function ww(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){Ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e,t,n){return t=y8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y8(e){var t=eue(e,"string");return bl(t)=="symbol"?t:t+""}function eue(e,t){if(bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tue={xAxis:["bottom","top"],yAxis:["left","right"]},nue={width:"100%",height:"100%"},g8={x:0,y:0};function ah(e){return e}var rue=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},aue=function(t,n,r,i){var l=n.find(function(p){return p&&p.index===r});if(l){if(t==="horizontal")return{x:l.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:l.coordinate};if(t==="centric"){var c=l.coordinate,d=i.radius;return re(re(re({},i),yt(i.cx,i.cy,d,c)),{},{angle:c,radius:d})}var f=l.coordinate,h=i.angle;return re(re(re({},i),yt(i.cx,i.cy,f,h)),{},{angle:h,radius:f})}return g8},Tp=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,l=n.dataEndIndex,c=(r??[]).reduce(function(d,f){var h=f.props.data;return h&&h.length?[].concat(jl(d),jl(h)):d},[]);return c.length>0?c:t&&t.length&&he(i)&&he(l)?t.slice(i,l+1):[]};function v8(e){return e==="number"?[0,"auto"]:void 0}var Sw=function(t,n,r,i){var l=t.graphicalItems,c=t.tooltipAxis,d=Tp(n,t);return r<0||!l||!l.length||r>=d.length?null:l.reduce(function(f,h){var p,x=(p=h.props.data)!==null&&p!==void 0?p:n;x&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(x=x.slice(t.dataStartIndex,t.dataEndIndex+1));var y;if(c.dataKey&&!c.allowDuplicatedCategory){var j=x===void 0?d:x;y=Dh(j,c.dataKey,i)}else y=x&&x[r]||d[r];return y?[].concat(jl(f),[cL(h,y)]):f},[])},hR=function(t,n,r,i){var l=i||{x:t.chartX,y:t.chartY},c=rue(l,r),d=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,p=_te(c,d,h,f);if(p>=0&&h){var x=h[p]&&h[p].value,y=Sw(t,n,p,x),j=aue(r,d,p,l);return{activeTooltipIndex:p,activeLabel:x,activePayload:y,activeCoordinate:j}}return null},iue=function(t,n){var r=n.axes,i=n.graphicalItems,l=n.axisType,c=n.axisIdKey,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,x=t.children,y=t.stackOffset,j=rL(p,l);return r.reduce(function(w,S){var v,A=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,O=A.type,_=A.dataKey,T=A.allowDataOverflow,N=A.allowDuplicatedCategory,E=A.scale,k=A.ticks,R=A.includeHidden,B=A[c];if(w[B])return w;var D=Tp(t.data,{graphicalItems:i.filter(function(Y){var ae,fe=c in Y.props?Y.props[c]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[c];return fe===B}),dataStartIndex:f,dataEndIndex:h}),z=D.length,$,L,K;Mce(A.domain,T,O)&&($=zj(A.domain,null,T),j&&(O==="number"||E!=="auto")&&(K=ru(D,_,"category")));var H=v8(O);if(!$||$.length===0){var I,F=(I=A.domain)!==null&&I!==void 0?I:H;if(_){if($=ru(D,_,O),O==="category"&&j){var Z=vK($);N&&Z?(L=$,$=jm(0,z)):N||($=p3(F,$,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0?Y:[].concat(jl(Y),[ae])},[]))}else if(O==="category")N?$=$.filter(function(Y){return Y!==""&&!Pe(Y)}):$=p3(F,$,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0||ae===""||Pe(ae)?Y:[].concat(jl(Y),[ae])},[]);else if(O==="number"){var ie=Mte(D,i.filter(function(Y){var ae,fe,ye=c in Y.props?Y.props[c]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[c],we="hide"in Y.props?Y.props.hide:(fe=Y.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return ye===B&&(R||!we)}),_,l,p);ie&&($=ie)}j&&(O==="number"||E!=="auto")&&(K=ru(D,_,"category"))}else j?$=jm(0,z):d&&d[B]&&d[B].hasStack&&O==="number"?$=y==="expand"?[0,1]:lL(d[B].stackGroups,f,h):$=nL(D,i.filter(function(Y){var ae=c in Y.props?Y.props[c]:Y.type.defaultProps[c],fe="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return ae===B&&(R||!fe)}),O,p,!0);if(O==="number")$=bw(x,$,B,l,k),F&&($=zj(F,$,T));else if(O==="category"&&F){var ce=F,q=$.every(function(Y){return ce.indexOf(Y)>=0});q&&($=ce)}}return re(re({},w),{},Ne({},B,re(re({},A),{},{axisType:l,domain:$,categoricalDomain:K,duplicateDomain:L,originalDomain:(v=A.domain)!==null&&v!==void 0?v:H,isCategorical:j,layout:p})))},{})},sue=function(t,n){var r=n.graphicalItems,i=n.Axis,l=n.axisType,c=n.axisIdKey,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,x=t.children,y=Tp(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),j=y.length,w=rL(p,l),S=-1;return r.reduce(function(v,A){var O=A.type.defaultProps!==void 0?re(re({},A.type.defaultProps),A.props):A.props,_=O[c],T=v8("number");if(!v[_]){S++;var N;return w?N=jm(0,j):d&&d[_]&&d[_].hasStack?(N=lL(d[_].stackGroups,f,h),N=bw(x,N,_,l)):(N=zj(T,nL(y,r.filter(function(E){var k,R,B=c in E.props?E.props[c]:(k=E.type.defaultProps)===null||k===void 0?void 0:k[c],D="hide"in E.props?E.props.hide:(R=E.type.defaultProps)===null||R===void 0?void 0:R.hide;return B===_&&!D}),"number",p),i.defaultProps.allowDataOverflow),N=bw(x,N,_,l)),re(re({},v),{},Ne({},_,re(re({axisType:l},i.defaultProps),{},{hide:!0,orientation:Zn(tue,"".concat(l,".").concat(S%2),null),domain:N,originalDomain:T,isCategorical:w,layout:p})))}return v},{})},oue=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,l=n.AxisComp,c=n.graphicalItems,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.children,x="".concat(i,"Id"),y=Qn(p,l),j={};return y&&y.length?j=iue(t,{axes:y,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h}):c&&c.length&&(j=sue(t,{Axis:l,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h})),j},lue=function(t){var n=_i(t),r=Ra(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:LS(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:om(n,r)}},mR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Kn(n,cl),l=0,c=0;return t.data&&t.data.length!==0&&(c=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(l=i.props.startIndex),i.props.endIndex>=0&&(c=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:l,dataEndIndex:c,activeTooltipIndex:-1,isTooltipActive:!!r}},cue=function(t){return!t||!t.length?!1:t.some(function(n){var r=La(n&&n.type);return r&&r.indexOf("Bar")>=0})},pR=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"}},uue=function(t,n){var r=t.props,i=t.graphicalItems,l=t.xAxisMap,c=l===void 0?{}:l,d=t.yAxisMap,f=d===void 0?{}:d,h=r.width,p=r.height,x=r.children,y=r.margin||{},j=Kn(x,cl),w=Kn(x,Ho),S=Object.keys(f).reduce(function(N,E){var k=f[E],R=k.orientation;return!k.mirror&&!k.hide?re(re({},N),{},Ne({},R,N[R]+k.width)):N},{left:y.left||0,right:y.right||0}),v=Object.keys(c).reduce(function(N,E){var k=c[E],R=k.orientation;return!k.mirror&&!k.hide?re(re({},N),{},Ne({},R,Zn(N,"".concat(R))+k.height)):N},{top:y.top||0,bottom:y.bottom||0}),A=re(re({},v),S),O=A.bottom;j&&(A.bottom+=j.props.height||cl.defaultProps.height),w&&n&&(A=Ete(A,i,r,n));var _=h-A.left-A.right,T=p-A.top-A.bottom;return re(re({brushBottom:O},A),{},{width:Math.max(_,0),height:Math.max(T,0)})},due=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},b2=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,l=i===void 0?"axis":i,c=t.validateTooltipEventTypes,d=c===void 0?["axis"]:c,f=t.axisComponents,h=t.legendContent,p=t.formatAxisMap,x=t.defaultProps,y=function(A,O){var _=O.graphicalItems,T=O.stackGroups,N=O.offset,E=O.updateId,k=O.dataStartIndex,R=O.dataEndIndex,B=A.barSize,D=A.layout,z=A.barGap,$=A.barCategoryGap,L=A.maxBarSize,K=pR(D),H=K.numericAxisName,I=K.cateAxisName,F=cue(_),Z=[];return _.forEach(function(ie,ce){var q=Tp(A.data,{graphicalItems:[ie],dataStartIndex:k,dataEndIndex:R}),Y=ie.type.defaultProps!==void 0?re(re({},ie.type.defaultProps),ie.props):ie.props,ae=Y.dataKey,fe=Y.maxBarSize,ye=Y["".concat(H,"Id")],we=Y["".concat(I,"Id")],Ie={},et=f.reduce(function(Ar,oa){var $l=O["".concat(oa.axisType,"Map")],mn=Y["".concat(oa.axisType,"Id")];$l&&$l[mn]||oa.axisType==="zAxis"||Ps();var hd=$l[mn];return re(re({},Ar),{},Ne(Ne({},oa.axisType,hd),"".concat(oa.axisType,"Ticks"),Ra(hd)))},Ie),de=et[I],Oe=et["".concat(I,"Ticks")],Me=T&&T[ye]&&T[ye].hasStack&&Ite(ie,T[ye].stackGroups),ue=La(ie.type).indexOf("Bar")>=0,gt=om(de,Oe),Le=[],Tt=F&&Ote({barSize:B,stackGroups:T,totalSize:due(et,I)});if(ue){var Et,hn,Nr=Pe(fe)?L:fe,Ur=(Et=(hn=om(de,Oe,!0))!==null&&hn!==void 0?hn:Nr)!==null&&Et!==void 0?Et:0;Le=Tte({barGap:z,barCategoryGap:$,bandSize:Ur!==gt?Ur:gt,sizeList:Tt[we],maxBarSize:Nr}),Ur!==gt&&(Le=Le.map(function(Ar){return re(re({},Ar),{},{position:re(re({},Ar.position),{},{offset:Ar.position.offset-Ur/2})})}))}var Wa=ie&&ie.type&&ie.type.getComposedData;Wa&&Z.push({props:re(re({},Wa(re(re({},et),{},{displayedData:q,props:A,dataKey:ae,item:ie,bandSize:gt,barPosition:Le,offset:N,stackedData:Me,layout:D,dataStartIndex:k,dataEndIndex:R}))),{},Ne(Ne(Ne({key:ie.key||"item-".concat(ce)},H,et[H]),I,et[I]),"animationId",E)),childIndex:kK(ie,A.children),item:ie})}),Z},j=function(A,O){var _=A.props,T=A.dataStartIndex,N=A.dataEndIndex,E=A.updateId;if(!EC({props:_}))return null;var k=_.children,R=_.layout,B=_.stackOffset,D=_.data,z=_.reverseStackOrder,$=pR(R),L=$.numericAxisName,K=$.cateAxisName,H=Qn(k,r),I=$te(D,H,"".concat(L,"Id"),"".concat(K,"Id"),B,z),F=f.reduce(function(Y,ae){var fe="".concat(ae.axisType,"Map");return re(re({},Y),{},Ne({},fe,oue(_,re(re({},ae),{},{graphicalItems:H,stackGroups:ae.axisType===L&&I,dataStartIndex:T,dataEndIndex:N}))))},{}),Z=uue(re(re({},F),{},{props:_,graphicalItems:H}),O==null?void 0:O.legendBBox);Object.keys(F).forEach(function(Y){F[Y]=p(_,F[Y],Z,Y.replace("Map",""),n)});var ie=F["".concat(K,"Map")],ce=lue(ie),q=y(_,re(re({},F),{},{dataStartIndex:T,dataEndIndex:N,updateId:E,graphicalItems:H,stackGroups:I,offset:Z}));return re(re({formattedGraphicalItems:q,graphicalItems:H,offset:Z,stackGroups:I},ce),F)},w=(function(v){function A(O){var _,T,N;return Hce(this,A),N=Kce(this,A,[O]),Ne(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(N,"accessibilityManager",new Cce),Ne(N,"handleLegendBBoxUpdate",function(E){if(E){var k=N.state,R=k.dataStartIndex,B=k.dataEndIndex,D=k.updateId;N.setState(re({legendBBox:E},j({props:N.props,dataStartIndex:R,dataEndIndex:B,updateId:D},re(re({},N.state),{},{legendBBox:E}))))}}),Ne(N,"handleReceiveSyncEvent",function(E,k,R){if(N.props.syncId===E){if(R===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(k)}}),Ne(N,"handleBrushChange",function(E){var k=E.startIndex,R=E.endIndex;if(k!==N.state.dataStartIndex||R!==N.state.dataEndIndex){var B=N.state.updateId;N.setState(function(){return re({dataStartIndex:k,dataEndIndex:R},j({props:N.props,dataStartIndex:k,dataEndIndex:R,updateId:B},N.state))}),N.triggerSyncEvent({dataStartIndex:k,dataEndIndex:R})}}),Ne(N,"handleMouseEnter",function(E){var k=N.getMouseInfo(E);if(k){var R=re(re({},k),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var B=N.props.onMouseEnter;Ee(B)&&B(R,E)}}),Ne(N,"triggeredAfterMouseMove",function(E){var k=N.getMouseInfo(E),R=k?re(re({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(R),N.triggerSyncEvent(R);var B=N.props.onMouseMove;Ee(B)&&B(R,E)}),Ne(N,"handleItemMouseEnter",function(E){N.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ne(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Ne(N,"handleMouseMove",function(E){E.persist(),N.throttleTriggeredAfterMouseMove(E)}),Ne(N,"handleMouseLeave",function(E){N.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};N.setState(k),N.triggerSyncEvent(k);var R=N.props.onMouseLeave;Ee(R)&&R(k,E)}),Ne(N,"handleOuterEvent",function(E){var k=MK(E),R=Zn(N.props,"".concat(k));if(k&&Ee(R)){var B,D;/.*touch.*/i.test(k)?D=N.getMouseInfo(E.changedTouches[0]):D=N.getMouseInfo(E),R((B=D)!==null&&B!==void 0?B:{},E)}}),Ne(N,"handleClick",function(E){var k=N.getMouseInfo(E);if(k){var R=re(re({},k),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var B=N.props.onClick;Ee(B)&&B(R,E)}}),Ne(N,"handleMouseDown",function(E){var k=N.props.onMouseDown;if(Ee(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleMouseUp",function(E){var k=N.props.onMouseUp;if(Ee(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ne(N,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseDown(E.changedTouches[0])}),Ne(N,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseUp(E.changedTouches[0])}),Ne(N,"handleDoubleClick",function(E){var k=N.props.onDoubleClick;if(Ee(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleContextMenu",function(E){var k=N.props.onContextMenu;if(Ee(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"triggerSyncEvent",function(E){N.props.syncId!==void 0&&p1.emit(x1,N.props.syncId,E,N.eventEmitterSymbol)}),Ne(N,"applySyncEvent",function(E){var k=N.props,R=k.layout,B=k.syncMethod,D=N.state.updateId,z=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)N.setState(re({dataStartIndex:z,dataEndIndex:$},j({props:N.props,dataStartIndex:z,dataEndIndex:$,updateId:D},N.state)));else if(E.activeTooltipIndex!==void 0){var L=E.chartX,K=E.chartY,H=E.activeTooltipIndex,I=N.state,F=I.offset,Z=I.tooltipTicks;if(!F)return;if(typeof B=="function")H=B(Z,E);else if(B==="value"){H=-1;for(var ie=0;ie<Z.length;ie++)if(Z[ie].value===E.activeLabel){H=ie;break}}var ce=re(re({},F),{},{x:F.left,y:F.top}),q=Math.min(L,ce.x+ce.width),Y=Math.min(K,ce.y+ce.height),ae=Z[H]&&Z[H].value,fe=Sw(N.state,N.props.data,H),ye=Z[H]?{x:R==="horizontal"?Z[H].coordinate:q,y:R==="horizontal"?Y:Z[H].coordinate}:g8;N.setState(re(re({},E),{},{activeLabel:ae,activeCoordinate:ye,activePayload:fe,activeTooltipIndex:H}))}else N.setState(E)}),Ne(N,"renderCursor",function(E){var k,R=N.state,B=R.isTooltipActive,D=R.activeCoordinate,z=R.activePayload,$=R.offset,L=R.activeTooltipIndex,K=R.tooltipAxisBandSize,H=N.getTooltipEventType(),I=(k=E.props.active)!==null&&k!==void 0?k:B,F=N.props.layout,Z=E.key||"_recharts-cursor";return V.createElement(Lce,{key:Z,activeCoordinate:D,activePayload:z,activeTooltipIndex:L,chartName:n,element:E,isActive:I,layout:F,offset:$,tooltipAxisBandSize:K,tooltipEventType:H})}),Ne(N,"renderPolarAxis",function(E,k,R){var B=Zn(E,"type.axisType"),D=Zn(N.state,"".concat(B,"Map")),z=E.type.defaultProps,$=z!==void 0?re(re({},z),E.props):E.props,L=D&&D[$["".concat(B,"Id")]];return M.cloneElement(E,re(re({},L),{},{className:ze(B,L.className),key:E.key||"".concat(k,"-").concat(R),ticks:Ra(L,!0)}))}),Ne(N,"renderPolarGrid",function(E){var k=E.props,R=k.radialLines,B=k.polarAngles,D=k.polarRadius,z=N.state,$=z.radiusAxisMap,L=z.angleAxisMap,K=_i($),H=_i(L),I=H.cx,F=H.cy,Z=H.innerRadius,ie=H.outerRadius;return M.cloneElement(E,{polarAngles:Array.isArray(B)?B:Ra(H,!0).map(function(ce){return ce.coordinate}),polarRadius:Array.isArray(D)?D:Ra(K,!0).map(function(ce){return ce.coordinate}),cx:I,cy:F,innerRadius:Z,outerRadius:ie,key:E.key||"polar-grid",radialLines:R})}),Ne(N,"renderLegend",function(){var E=N.state.formattedGraphicalItems,k=N.props,R=k.children,B=k.width,D=k.height,z=N.props.margin||{},$=B-(z.left||0)-(z.right||0),L=eL({children:R,formattedGraphicalItems:E,legendWidth:$,legendContent:h});if(!L)return null;var K=L.item,H=dR(L,$ce);return M.cloneElement(K,re(re({},H),{},{chartWidth:B,chartHeight:D,margin:z,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Ne(N,"renderTooltip",function(){var E,k=N.props,R=k.children,B=k.accessibilityLayer,D=Kn(R,hr);if(!D)return null;var z=N.state,$=z.isTooltipActive,L=z.activeCoordinate,K=z.activePayload,H=z.activeLabel,I=z.offset,F=(E=D.props.active)!==null&&E!==void 0?E:$;return M.cloneElement(D,{viewBox:re(re({},I),{},{x:I.left,y:I.top}),active:F,label:H,payload:F?K:[],coordinate:L,accessibilityLayer:B})}),Ne(N,"renderBrush",function(E){var k=N.props,R=k.margin,B=k.data,D=N.state,z=D.offset,$=D.dataStartIndex,L=D.dataEndIndex,K=D.updateId;return M.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Jf(N.handleBrushChange,E.props.onChange),data:B,x:he(E.props.x)?E.props.x:z.left,y:he(E.props.y)?E.props.y:z.top+z.height+z.brushBottom-(R.bottom||0),width:he(E.props.width)?E.props.width:z.width,startIndex:$,endIndex:L,updateId:"brush-".concat(K)})}),Ne(N,"renderReferenceElement",function(E,k,R){if(!E)return null;var B=N,D=B.clipPathId,z=N.state,$=z.xAxisMap,L=z.yAxisMap,K=z.offset,H=E.type.defaultProps||{},I=E.props,F=I.xAxisId,Z=F===void 0?H.xAxisId:F,ie=I.yAxisId,ce=ie===void 0?H.yAxisId:ie;return M.cloneElement(E,{key:E.key||"".concat(k,"-").concat(R),xAxis:$[Z],yAxis:L[ce],viewBox:{x:K.left,y:K.top,width:K.width,height:K.height},clipPathId:D})}),Ne(N,"renderActivePoints",function(E){var k=E.item,R=E.activePoint,B=E.basePoint,D=E.childIndex,z=E.isRange,$=[],L=k.props.key,K=k.item.type.defaultProps!==void 0?re(re({},k.item.type.defaultProps),k.item.props):k.item.props,H=K.activeDot,I=K.dataKey,F=re(re({index:D,dataKey:I,cx:R.x,cy:R.y,r:4,fill:c2(k.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},je(H,!1)),zh(H));return $.push(A.renderActiveDot(H,F,"".concat(L,"-activePoint-").concat(D))),B?$.push(A.renderActiveDot(H,re(re({},F),{},{cx:B.x,cy:B.y}),"".concat(L,"-basePoint-").concat(D))):z&&$.push(null),$}),Ne(N,"renderGraphicChild",function(E,k,R){var B=N.filterFormatItem(E,k,R);if(!B)return null;var D=N.getTooltipEventType(),z=N.state,$=z.isTooltipActive,L=z.tooltipAxis,K=z.activeTooltipIndex,H=z.activeLabel,I=N.props.children,F=Kn(I,hr),Z=B.props,ie=Z.points,ce=Z.isRange,q=Z.baseLine,Y=B.item.type.defaultProps!==void 0?re(re({},B.item.type.defaultProps),B.item.props):B.item.props,ae=Y.activeDot,fe=Y.hide,ye=Y.activeBar,we=Y.activeShape,Ie=!!(!fe&&$&&F&&(ae||ye||we)),et={};D!=="axis"&&F&&F.props.trigger==="click"?et={onClick:Jf(N.handleItemMouseEnter,E.props.onClick)}:D!=="axis"&&(et={onMouseLeave:Jf(N.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Jf(N.handleItemMouseEnter,E.props.onMouseEnter)});var de=M.cloneElement(E,re(re({},B.props),et));function Oe(oa){return typeof L.dataKey=="function"?L.dataKey(oa.payload):null}if(Ie)if(K>=0){var Me,ue;if(L.dataKey&&!L.allowDuplicatedCategory){var gt=typeof L.dataKey=="function"?Oe:"payload.".concat(L.dataKey.toString());Me=Dh(ie,gt,H),ue=ce&&q&&Dh(q,gt,H)}else Me=ie==null?void 0:ie[K],ue=ce&&q&&q[K];if(we||ye){var Le=E.props.activeIndex!==void 0?E.props.activeIndex:K;return[M.cloneElement(E,re(re(re({},B.props),et),{},{activeIndex:Le})),null,null]}if(!Pe(Me))return[de].concat(jl(N.renderActivePoints({item:B,activePoint:Me,basePoint:ue,childIndex:K,isRange:ce})))}else{var Tt,Et=(Tt=N.getItemByXY(N.state.activeCoordinate))!==null&&Tt!==void 0?Tt:{graphicalItem:de},hn=Et.graphicalItem,Nr=hn.item,Ur=Nr===void 0?E:Nr,Wa=hn.childIndex,Ar=re(re(re({},B.props),et),{},{activeIndex:Wa});return[M.cloneElement(Ur,Ar),null,null]}return ce?[de,null,null]:[de,null]}),Ne(N,"renderCustomized",function(E,k,R){return M.cloneElement(E,re(re({key:"recharts-customized-".concat(R)},N.props),N.state))}),Ne(N,"renderMap",{CartesianGrid:{handler:ah,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:ah},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:ah},YAxis:{handler:ah},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((_=O.id)!==null&&_!==void 0?_:kl("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=ez(N.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),N.state={},N}return Wce(A,v),Gce(A,[{key:"componentDidMount",value:function(){var _,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,T=_.children,N=_.data,E=_.height,k=_.layout,R=Kn(T,hr);if(R){var B=R.props.defaultIndex;if(!(typeof B!="number"||B<0||B>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[B]&&this.state.tooltipTicks[B].value,z=Sw(this.state,N,B,D),$=this.state.tooltipTicks[B].coordinate,L=(this.state.offset.top+E)/2,K=k==="horizontal",H=K?{x:$,y:L}:{y:$,x:L},I=this.state.formattedGraphicalItems.find(function(Z){var ie=Z.item;return ie.type.name==="Scatter"});I&&(H=re(re({},H),I.props.points[B].tooltipPosition),z=I.props.points[B].tooltipPayload);var F={activeTooltipIndex:B,isTooltipActive:!0,activeLabel:D,activePayload:z,activeCoordinate:H};this.setState(F),this.renderCursor(R),this.accessibilityManager.setIndex(B)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.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(_){rj([Kn(_.children,hr)],[Kn(this.props.children,hr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Kn(this.props.children,hr);if(_&&typeof _.props.shared=="boolean"){var T=_.props.shared?"axis":"item";return d.indexOf(T)>=0?T:l}return l}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var T=this.container,N=T.getBoundingClientRect(),E=gZ(N),k={chartX:Math.round(_.pageX-E.left),chartY:Math.round(_.pageY-E.top)},R=N.width/T.offsetWidth||1,B=this.inRange(k.chartX,k.chartY,R);if(!B)return null;var D=this.state,z=D.xAxisMap,$=D.yAxisMap,L=this.getTooltipEventType(),K=hR(this.state,this.props.data,this.props.layout,B);if(L!=="axis"&&z&&$){var H=_i(z).scale,I=_i($).scale,F=H&&H.invert?H.invert(k.chartX):null,Z=I&&I.invert?I.invert(k.chartY):null;return re(re({},k),{},{xValue:F,yValue:Z},K)}return K?re(re({},k),K):null}},{key:"inRange",value:function(_,T){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,k=_/N,R=T/N;if(E==="horizontal"||E==="vertical"){var B=this.state.offset,D=k>=B.left&&k<=B.left+B.width&&R>=B.top&&R<=B.top+B.height;return D?{x:k,y:R}:null}var z=this.state,$=z.angleAxisMap,L=z.radiusAxisMap;if($&&L){var K=_i($);return g3({x:k,y:R},K)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,T=this.getTooltipEventType(),N=Kn(_,hr),E={};N&&T==="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 k=zh(this.props,this.handleOuterEvent);return re(re({},k),E)}},{key:"addListener",value:function(){p1.on(x1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){p1.removeListener(x1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,T,N){for(var E=this.state.formattedGraphicalItems,k=0,R=E.length;k<R;k++){var B=E[k];if(B.item===_||B.props.key===_.key||T===La(B.item.type)&&N===B.childIndex)return B}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,T=this.state.offset,N=T.left,E=T.top,k=T.height,R=T.width;return V.createElement("defs",null,V.createElement("clipPath",{id:_},V.createElement("rect",{x:N,y:E,height:k,width:R})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(T,N){var E=uR(N,2),k=E[0],R=E[1];return re(re({},T),{},Ne({},k,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(T,N){var E=uR(N,2),k=E[0],R=E[1];return re(re({},T),{},Ne({},k,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(_){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(_){var T=this.state,N=T.formattedGraphicalItems,E=T.activeItem;if(N&&N.length)for(var k=0,R=N.length;k<R;k++){var B=N[k],D=B.props,z=B.item,$=z.type.defaultProps!==void 0?re(re({},z.type.defaultProps),z.props):z.props,L=La(z.type);if(L==="Bar"){var K=(D.data||[]).find(function(Z){return Bae(_,Z)});if(K)return{graphicalItem:B,payload:K}}else if(L==="RadialBar"){var H=(D.data||[]).find(function(Z){return g3(_,Z)});if(H)return{graphicalItem:B,payload:H}}else if(jp(B,E)||wp(B,E)||Vu(B,E)){var I=lse({graphicalItem:B,activeTooltipItem:E,itemData:$.data}),F=$.activeIndex===void 0?I:$.activeIndex;return{graphicalItem:re(re({},B),{},{childIndex:F}),payload:Vu(B,E)?$.data[I]:B.props.data[I]}}}return null}},{key:"render",value:function(){var _=this;if(!EC(this))return null;var T=this.props,N=T.children,E=T.className,k=T.width,R=T.height,B=T.style,D=T.compact,z=T.title,$=T.desc,L=dR(T,Bce),K=je(L,!1);if(D)return V.createElement(F4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement(ij,$o({},K,{width:k,height:R,title:z,desc:$}),this.renderClipPath(),MC(N,this.renderMap)));if(this.props.accessibilityLayer){var H,I;K.tabIndex=(H=this.props.tabIndex)!==null&&H!==void 0?H:0,K.role=(I=this.props.role)!==null&&I!==void 0?I:"application",K.onKeyDown=function(Z){_.accessibilityManager.keyboardEvent(Z)},K.onFocus=function(){_.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return V.createElement(F4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement("div",$o({className:ze("recharts-wrapper",E),style:re({position:"relative",cursor:"default",width:k,height:R},B)},F,{ref:function(ie){_.container=ie}}),V.createElement(ij,$o({},K,{width:k,height:R,title:z,desc:$,style:nue}),this.renderClipPath(),MC(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(M.Component);Ne(w,"displayName",n),Ne(w,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},x)),Ne(w,"getDerivedStateFromProps",function(v,A){var O=v.dataKey,_=v.data,T=v.children,N=v.width,E=v.height,k=v.layout,R=v.stackOffset,B=v.margin,D=A.dataStartIndex,z=A.dataEndIndex;if(A.updateId===void 0){var $=mR(v);return re(re(re({},$),{},{updateId:0},j(re(re({props:v},$),{},{updateId:0}),A)),{},{prevDataKey:O,prevData:_,prevWidth:N,prevHeight:E,prevLayout:k,prevStackOffset:R,prevMargin:B,prevChildren:T})}if(O!==A.prevDataKey||_!==A.prevData||N!==A.prevWidth||E!==A.prevHeight||k!==A.prevLayout||R!==A.prevStackOffset||!Vo(B,A.prevMargin)){var L=mR(v),K={chartX:A.chartX,chartY:A.chartY,isTooltipActive:A.isTooltipActive},H=re(re({},hR(A,_,k)),{},{updateId:A.updateId+1}),I=re(re(re({},L),K),H);return re(re(re({},I),j(re({props:v},I),A)),{},{prevDataKey:O,prevData:_,prevWidth:N,prevHeight:E,prevLayout:k,prevStackOffset:R,prevMargin:B,prevChildren:T})}if(!rj(T,A.prevChildren)){var F,Z,ie,ce,q=Kn(T,cl),Y=q&&(F=(Z=q.props)===null||Z===void 0?void 0:Z.startIndex)!==null&&F!==void 0?F:D,ae=q&&(ie=(ce=q.props)===null||ce===void 0?void 0:ce.endIndex)!==null&&ie!==void 0?ie:z,fe=Y!==D||ae!==z,ye=!Pe(_),we=ye&&!fe?A.updateId:A.updateId+1;return re(re({updateId:we},j(re(re({props:v},A),{},{updateId:we,dataStartIndex:Y,dataEndIndex:ae}),A)),{},{prevChildren:T,dataStartIndex:Y,dataEndIndex:ae})}return null}),Ne(w,"renderActiveDot",function(v,A,O){var _;return M.isValidElement(v)?_=M.cloneElement(v,A):Ee(v)?_=v(A):_=V.createElement(xp,A),V.createElement(Ze,{className:"recharts-active-dot",key:O},_)});var S=M.forwardRef(function(A,O){return V.createElement(w,$o({},A,{ref:O}))});return S.displayName=w.displayName,S},fue=b2({chartName:"LineChart",GraphicalChild:fd,axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:BL}),hue=b2({chartName:"BarChart",GraphicalChild:Li,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:BL}),mue=b2({chartName:"PieChart",GraphicalChild:Xa,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:bp},{axisType:"radiusAxis",AxisComp:gp}],formatAxisMap:Wte,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const pue=["Deals","Products","MRR","ARR"];function xue(){const[e,t]=M.useState("Deals"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState([]),[w,S]=M.useState([]),[v,A]=M.useState(0);M.useEffect(()=>{async function N(){l(!0),d("");try{const[E,k,R,B]=await Promise.all([Uf.deals(),Uf.products(),Uf.mrr(),Uf.arr()]);h(E.deals||[]),x(k.products||[]),A(R.mrr||0),j([]);const z=B;S([])}catch(E){d(E instanceof Error?E.message:"Failed to load sales data")}finally{l(!1)}}N()},[]);const O=f.reduce((N,E)=>N+(E.value||0),0),_=f.filter(N=>N.stage==="Closed Won").reduce((N,E)=>N+(E.value||0),0),T=p.filter(N=>N.active).length;return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Sales"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Deals, products, and revenue metrics"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"New Deal"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(hS,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(O)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Pipeline"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(_)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Closed Won"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(iF,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:T}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Products"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:pue.map(N=>s.jsx("button",{onClick:()=>t(N),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===N?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:N},N))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:N=>r(N.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Deals"&&s.jsx(te,{children:s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Deal"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{align:"right",children:"Value"}),s.jsx(Ae,{children:"Stage"}),s.jsx(Ae,{align:"right",children:"Probability"}),s.jsx(Ae,{children:"Owner"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[f.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:7,className:"text-center text-text-secondary py-8",children:"No deals found"})}),f.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:N.company}),s.jsx(be,{align:"right",children:Te(N.value)}),s.jsx(be,{children:s.jsx(_e,{variant:N.stage==="Closed Won"?"success":N.stage==="Negotiation"?"primary":"default",children:N.stage})}),s.jsxs(be,{align:"right",children:[N.probability,"%"]}),s.jsx(be,{children:N.owner}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},N.id))]})]})}),e==="Products"&&s.jsx(te,{children:s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Product"}),s.jsx(Ae,{children:"SKU"}),s.jsx(Ae,{align:"right",children:"Price"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[p.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No products found"})}),p.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:N.sku})}),s.jsx(be,{align:"right",children:Te(N.price)}),s.jsx(be,{children:s.jsx(_e,{variant:N.recurring?"primary":"default",children:N.recurring?"Recurring":"One-time"})}),s.jsx(be,{children:s.jsx(_e,{variant:N.active?"success":"danger",children:N.active?"Active":"Inactive"})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},N.id))]})]})}),e==="MRR"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${Te(v)}`}),y.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(hue,{data:y,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(fw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(yl,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(vl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(hr,{content:({active:N,payload:E,label:k})=>!N||!(E!=null&&E.length)?null:s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:k}),E.map((R,B)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}}),s.jsxs("span",{className:"text-text-secondary",children:[R.name,":"]}),s.jsx("span",{className:"font-semibold text-text-primary",children:Te(Number(R.value))})]},B))]})}),s.jsx(Li,{dataKey:"mrr",fill:"#2563EB",radius:[4,4,0,0]}),s.jsx(Li,{dataKey:"arr",fill:"#16A34A",radius:[4,4,0,0]})]})})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No MRR history data available"})]}),e==="ARR"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Annual Recurring Revenue",subtitle:"ARR growth by quarter"}),w.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(fue,{data:w,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(fw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(yl,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(vl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(hr,{content:({active:N,payload:E,label:k})=>!N||!(E!=null&&E.length)?null:s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary mb-1",children:k}),s.jsx("p",{className:"text-sm font-semibold text-text-primary",children:Te(Number(E[0].value))})]})}),s.jsx(fd,{type:"monotone",dataKey:"arr",stroke:"#2563EB",strokeWidth:2,dot:{r:4,strokeWidth:0,fill:"#2563EB"},activeDot:{r:6}})]})})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No ARR history data available"})]})]})}const yue=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],xR=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function gue(){var R,B;const e=_n(),[t,n]=M.useState(()=>{var D;return((D=e.state)==null?void 0:D.activeTab)||"Balance"}),[r,i]=M.useState(""),[l,c]=M.useState(!0),[d,f]=M.useState(""),[h,p]=M.useState(null),[x,y]=M.useState(null),[j,w]=M.useState(null),[S,v]=M.useState([]),[A,O]=M.useState([]),[_,T]=M.useState(null);M.useEffect(()=>{async function D(){var z,$;c(!0),f("");try{const[L,K,H,I,F,Z]=await Promise.all([ms.balance(),ms.income(),ms.moms(),ms.accounts(),ms.invoices(),ms.cashflow()]);p(L.report||L),y(K.report||K),w(H.report||H),v(((z=I.report)==null?void 0:z.accounts)||I.accounts||[]),O((($=F.report)==null?void 0:$.invoices)||F.invoices||[]),T(Z.report||Z)}catch(L){f(L instanceof Error?L.message:"Failed to load finance data")}finally{c(!1)}}D()},[]);const N=S.filter(D=>D.name.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),E=A.filter(D=>D.customer.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),k=(x==null?void 0:x.expenses.map((D,z)=>({name:D.name||D.account,value:D.amount??D.balance??0,color:xR[z%xR.length]})))||[];return l?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{className:"h-[400px]"})]}):d?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:d})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Finance"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Financial reports and accounting"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"New Invoice"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((h==null?void 0:h.total_assets)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Assets"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((x==null?void 0:x.total_revenue)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Revenue"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(G5,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((x==null?void 0:x.total_expense)||(x==null?void 0:x.total_expenses)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Expenses"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:yue.map(D=>s.jsx("button",{onClick:()=>n(D),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${t===D?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:D},D))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:r,onChange:D=>i(D.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),t==="Balance"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Assets"}),s.jsx(Y1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((h==null?void 0:h.total_assets)||0)})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Liabilities"}),s.jsx(IH,{size:14,className:"text-danger"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((h==null?void 0:h.total_liabilities)||0)})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Equity"}),s.jsx(Y1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((h==null?void 0:h.total_equity)||0)})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Balance Sheet",subtitle:`Period: ${(h==null?void 0:h.period)||""}`}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Assets"}),s.jsxs("div",{className:"space-y-2",children:[h==null?void 0:h.assets.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.assets)||h.assets.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No asset accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Liabilities"}),s.jsxs("div",{className:"space-y-2",children:[h==null?void 0:h.liabilities.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.liabilities)||h.liabilities.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No liability accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Equity"}),s.jsxs("div",{className:"space-y-2",children:[(R=h==null?void 0:h.equity)==null?void 0:R.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.equity)||((B=h.equity)==null?void 0:B.length)===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No equity accounts"})]})]})]})]})]}),t==="Income"&&s.jsx("div",{className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[s.jsxs(te,{className:"lg:col-span-2",children:[s.jsx(Ge,{title:"Income Statement",subtitle:`Period: ${(x==null?void 0:x.period)||""}`}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Revenue"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te((x==null?void 0:x.total_revenue)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Expenses"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te((x==null?void 0:x.total_expense)||(x==null?void 0:x.total_expenses)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net Income"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Te((x==null?void 0:x.net_income)||0)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Revenue Accounts"}),x==null?void 0:x.revenue.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z))]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Expense Accounts"}),x==null?void 0:x.expenses.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z))]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Expense Breakdown",subtitle:"By category"}),k.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-[220px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(mue,{children:[s.jsx(Xa,{data:k,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:k.map((D,z)=>s.jsx(ap,{fill:D.color},`cell-${z}`))}),s.jsx(hr,{content:({active:D,payload:z})=>{if(!D||!(z!=null&&z.length))return null;const $=z[0].payload;return s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-3 py-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:$.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:Te($.value)})]})}})]})})}),s.jsx("div",{className:"space-y-2 mt-2",children:k.map(D=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:D.color}}),s.jsx("span",{className:"text-text-secondary",children:D.name})]}),s.jsx("span",{className:"font-medium text-text-primary",children:Te(D.value)})]},D.name))})]}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No expense data"})]})]})}),t==="MOMS"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"MOMS Report",subtitle:`Period: ${(j==null?void 0:j.period)||""}`}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS In (Input VAT)"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te((j==null?void 0:j.moms_in)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS Ut (Output VAT)"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te((j==null?void 0:j.moms_ut)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS att betala"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Te((j==null?void 0:j.moms_att_betala)||0)})]})]})]}),t==="Accounts"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Chart of Accounts",subtitle:"General ledger accounts"}),s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Account"}),s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{align:"right",children:"Balance"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[N.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:D.id})}),s.jsx(be,{children:s.jsx(_e,{variant:D.type==="asset"?"success":D.type==="equity"?"primary":"warning",children:D.type})}),s.jsx(be,{align:"right",children:Te(D.balance)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},D.id)),N.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:5,className:"text-center text-text-secondary py-8",children:"No accounts found"})})]})]})]}),t==="Invoices"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Invoices",subtitle:"All invoices"}),s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{align:"right",children:"Amount"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Due Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[E.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.id})}),s.jsx(be,{children:D.customer}),s.jsx(be,{align:"right",children:Te(D.amount)}),s.jsx(be,{children:s.jsx(_e,{variant:D.status==="paid"?"success":D.status==="overdue"?"danger":D.status==="sent"||D.status==="pending"?"primary":"default",children:D.status})}),s.jsx(be,{children:Nt(D.due_date)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},D.id)),E.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No invoices found"})})]})]})]}),t==="Cashflow"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Cash Flow",subtitle:`Period: ${(_==null?void 0:_.period)||""}`}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Inflow"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Te((_==null?void 0:_.inflow)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Outflow"}),s.jsx("p",{className:"text-lg font-semibold text-danger",children:Te((_==null?void 0:_.outflow)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te((_==null?void 0:_.net)||0)})]})]})]})]})}const vue=["Employees","Leaves"],bue={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function jue(){const[e,t]=M.useState("Employees"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]);M.useEffect(()=>{async function O(){l(!0),d("");try{const[_,T]=await Promise.all([vE.employees(),vE.leaves()]);h(_.employees||[]),x(T.leaves||[])}catch(_){d(_ instanceof Error?_.message:"Failed to load HR data")}finally{l(!1)}}O()},[]);const y=f.filter(O=>O.status==="active").length,j=f.filter(O=>O.status==="on_leave").length,w=p.filter(O=>O.status==="pending").length,v=f.filter(O=>O.status!=="deleted").filter(O=>(O.name||`${O.first_name} ${O.last_name}`).toLowerCase().includes(n.toLowerCase())||O.department.toLowerCase().includes(n.toLowerCase())||(O.role||O.position).toLowerCase().includes(n.toLowerCase())),A=p.filter(O=>O.employeeName.toLowerCase().includes(n.toLowerCase())||O.type.toLowerCase().includes(n.toLowerCase()));return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"HR"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Employees and leave management"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"Add Employee"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:y}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Employees"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:j}),s.jsx("p",{className:"text-xs text-text-secondary",children:"On Leave"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(hu,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:w}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pending Requests"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:vue.map(O=>s.jsx("button",{onClick:()=>t(O),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===O?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:O},O))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:O=>r(O.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Employees"&&s.jsx(te,{children:s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Department"}),s.jsx(Ae,{children:"Role"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Start Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[v.map(O=>{const _=O.name||`${O.first_name} ${O.last_name}`,T=O.role||O.position,N=O.startDate||O.start_date;return s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.split(" ").map(E=>E[0]).join("")}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_}),s.jsx("p",{className:"text-xs text-text-secondary",children:O.email})]})]})}),s.jsx(be,{children:s.jsx(_e,{variant:bue[O.department]||"default",children:O.department})}),s.jsx(be,{children:T}),s.jsx(be,{children:s.jsx(_e,{variant:O.status==="active"?"success":O.status==="on_leave"?"warning":"danger",children:O.status.replace("_"," ")})}),s.jsx(be,{children:Nt(N||"")}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},O.id)}),v.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No employees found"})})]})]})}),e==="Leaves"&&s.jsx(te,{children:s.jsxs(Ri,{children:[s.jsx(Di,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Period"}),s.jsx(Ae,{align:"right",children:"Days"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(zi,{children:[A.map(O=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:O.employeeName.split(" ").map(_=>_[0]).join("")}),s.jsx("span",{className:"font-medium text-text-primary",children:O.employeeName})]})}),s.jsx(be,{children:s.jsx(_e,{variant:O.type==="vacation"?"primary":O.type==="sick"?"warning":"default",children:O.type})}),s.jsx(be,{children:s.jsxs("span",{className:"text-sm text-text-primary",children:[Nt(O.startDate)," — ",Nt(O.endDate)]})}),s.jsx(be,{align:"right",children:s.jsx("span",{className:"font-medium",children:O.days})}),s.jsx(be,{children:s.jsx(_e,{variant:O.status==="approved"?"success":O.status==="pending"?"warning":"danger",children:O.status})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Pi,{size:16})})})]},O.id)),A.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No leave requests found"})})]})]})})]})}const g1={draft:{variant:"default",icon:dn},pending_signature:{variant:"warning",icon:dn},active:{variant:"success",icon:xr},expired:{variant:"danger",icon:fn},terminated:{variant:"default",icon:fn},disputed:{variant:"danger",icon:fn}},yR={pending:"warning",partially_signed:"primary",signed:"success",rejected:"danger"};function wue(){var $;const[e,t]=M.useState("contracts"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState(null),[w,S]=M.useState(!1),[v,A]=M.useState(!1),[O,_]=M.useState(!1),{token:T}=ea(),[N,E]=M.useState({template_type:"",title:"",counterparty:"",counterparty_org:"",counterparty_email:"",start_date:"",end_date:"",value:"",currency:"SEK",variables:{},terms:{}}),k=async()=>{l(!0),d("");try{const L={};T&&(L.Authorization=`Bearer ${T}`);const[K,H]=await Promise.all([fetch("/api/v1/legal/contracts",{headers:L}),fetch("/api/v1/legal/templates",{headers:L})]),I=await K.json(),F=await H.json();h(I.contracts||[]),x(F.templates||[])}catch(L){d(L instanceof Error?L.message:"Failed to load legal data")}finally{l(!1)}};M.useEffect(()=>{k()},[T]);const R=async(L,K)=>{try{const H={"Content-Type":"application/json"};if(T&&(H.Authorization=`Bearer ${T}`),(await fetch(`/api/v1/legal/contracts/${L}/sign`,{method:"POST",headers:H,body:JSON.stringify({party:K})})).ok&&(k(),(y==null?void 0:y.id)===L)){const F=await fetch(`/api/v1/legal/contracts/${L}`,{headers:H}).then(Z=>Z.json());j(F)}}catch(H){console.error("Sign failed:",H)}},B=async()=>{if(!(!N.title||!N.counterparty||!N.template_type)){_(!0);try{const L={"Content-Type":"application/json"};T&&(L.Authorization=`Bearer ${T}`);const K={...N,value:N.value?parseFloat(N.value):0},H=await fetch("/api/v1/legal/contracts",{method:"POST",headers:L,body:JSON.stringify(K)});if(!H.ok)throw new Error(`Failed: ${H.status}`);A(!1),E({template_type:"",title:"",counterparty:"",counterparty_org:"",counterparty_email:"",start_date:"",end_date:"",value:"",currency:"SEK",variables:{},terms:{}}),k()}catch(L){d(L instanceof Error?L.message:"Failed to create")}finally{_(!1)}}},D=f.filter(L=>(L.title||L.name||"").toLowerCase().includes(n.toLowerCase())||L.counterparty.toLowerCase().includes(n.toLowerCase())||L.template_type.toLowerCase().includes(n.toLowerCase())),z=(L,K)=>{if(!K)return L;let H=L;return Object.entries(K).forEach(([I,F])=>{H=H.replace(new RegExp(`\\{\\{${I}\\}\\}`,"g"),`<strong>${F}</strong>`),H=H.replace(new RegExp(`\\$\\{${I}\\}`,"g"),`<strong>${F}</strong>`)}),H=H.replace(/\{\{(\w+)\}\}/g,'<span class="text-warning bg-warning/10 px-1 rounded">{{$1}}</span>'),H};return i?s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:Array.from({length:4}).map((L,K)=>s.jsx(Re,{className:"h-[80px]"},K))}),s.jsx(Re,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Legal"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Avtal, mallar och produktkopplingar"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),onClick:()=>A(!0),children:"Nytt avtal"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(jr,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Totalt avtal"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success/10 text-success flex items-center justify-center",children:s.jsx(xr,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(L=>L.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning/10 text-warning flex items-center justify-center",children:s.jsx(dn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(L=>L.signature_status==="pending").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Väntar signering"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger/10 text-danger flex items-center justify-center",children:s.jsx(fn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(L=>L.status==="expired"||L.status==="terminated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(Tl,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Sök avtal, motpart eller typ...",value:n,onChange:L=>r(L.target.value),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Avtal"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Motpart"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Signering"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Värde"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),s.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3"})]})}),s.jsxs("tbody",{className:"divide-y divide-border",children:[D.map(L=>{const K=g1[L.status]||g1.draft,H=K.icon;return s.jsxs("tr",{className:"hover:bg-bg transition-colors cursor-pointer",onClick:()=>{j(L),S(!0)},children:[s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(jr,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:L.title||L.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:L.template_type})]})]})}),s.jsxs("td",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm text-text-primary",children:L.counterparty}),L.counterparty_org&&s.jsx("p",{className:"text-xs text-text-secondary",children:L.counterparty_org})]}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs(_e,{variant:K.variant,className:"text-xs flex items-center gap-1",children:[s.jsx(H,{size:12}),L.status]})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(_e,{variant:yR[L.signature_status||"pending"],className:"text-xs",children:L.signature_status||"pending"})}),s.jsx("td",{className:"px-4 py-3",children:L.value?s.jsxs("p",{className:"text-sm font-medium",children:[Te(L.value)," ",L.currency]}):s.jsx("p",{className:"text-sm text-text-secondary",children:"—"})}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("p",{className:"text-sm text-text-secondary",children:[L.start_date?Nt(L.start_date):"—",L.end_date&&` → ${Nt(L.end_date)}`]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx(Bo,{size:16,className:"text-text-tertiary inline"})})]},L.id)}),D.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"text-center text-text-secondary py-8",children:"Inga avtal hittades"})})]})]})})}),w&&y&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:s.jsxs("div",{className:"w-full max-w-4xl max-h-[90vh] overflow-y-auto bg-surface rounded-2xl shadow-xl",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:y.title||y.name}),s.jsxs("p",{className:"text-text-secondary",children:[y.counterparty," ",y.counterparty_org&&`• ${y.counterparty_org}`]})]}),s.jsx("button",{onClick:()=>S(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Ua,{size:18})})]}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx(_e,{variant:(($=g1[y.status])==null?void 0:$.variant)||"default",children:y.status}),s.jsxs(_e,{variant:yR[y.signature_status||"pending"],children:["Signering: ",y.signature_status||"pending"]}),y.value&&y.currency&&s.jsxs(_e,{variant:"default",children:[s.jsx(hS,{size:12,className:"mr-1"}),Te(y.value)," ",y.currency]})]}),y.signature_status!=="signed"&&s.jsxs("div",{className:"flex gap-3 p-4 bg-bg rounded-xl",children:[s.jsxs(Ye,{variant:"secondary",onClick:()=>R(y.id,"tenant"),disabled:y.signature_status==="partially_signed",children:[s.jsx(oE,{size:16,className:"mr-2"}),"Signera som LandveX"]}),s.jsxs(Ye,{variant:"secondary",onClick:()=>R(y.id,"counterparty"),children:[s.jsx(oE,{size:16,className:"mr-2"}),"Signera som ",y.counterparty]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(qa,{size:14}),s.jsx("span",{className:"text-xs",children:"Motpart"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.counterparty})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(hu,{size:14}),s.jsx("span",{className:"text-xs",children:"Startdatum"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.start_date?Nt(y.start_date):"—"})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(hu,{size:14}),s.jsx("span",{className:"text-xs",children:"Slutdatum"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.end_date?Nt(y.end_date):"—"})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(An,{size:14}),s.jsx("span",{className:"text-xs",children:"E-post"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.counterparty_org||"—"})]})]}),y.variables&&Object.keys(y.variables).length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Avtalsvariabler"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(y.variables).map(([L,K])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:L.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:K})]},L))})]}),y.sections&&y.sections.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Avtalssektioner"}),s.jsx("div",{className:"space-y-3",children:y.sections.map((L,K)=>s.jsxs("div",{className:"p-4 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:[L.order,"."]}),s.jsx("p",{className:"font-medium text-sm",children:L.title}),L.required&&s.jsx(_e,{variant:"danger",className:"text-xs",children:"Krävs"})]}),s.jsx("div",{className:"text-sm text-text-secondary",dangerouslySetInnerHTML:{__html:z(L.content,y.variables||{})}}),L.variables&&L.variables.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:L.variables.map(H=>s.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+H+"}}"},H))})]},L.id||K))})]}),y.terms&&Object.keys(y.terms).length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Villkor"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(y.terms).map(([L,K])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:L.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:String(K)})]},L))})]})]})]})}),v&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:s.jsxs("div",{className:"w-full max-w-lg bg-surface rounded-2xl shadow-xl max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Nytt avtal"}),s.jsx("button",{onClick:()=>A(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Ua,{size:18})})]}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Mall"}),s.jsxs("select",{value:N.template_type,onChange:L=>E({...N,template_type:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"",children:"Välj mall..."}),p.map(L=>s.jsx("option",{value:L.type,children:L.name},L.id))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Titel"}),s.jsx("input",{type:"text",value:N.title,onChange:L=>E({...N,title:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"t.ex. Anställningsavtal - CTO"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Motpart"}),s.jsx("input",{type:"text",value:N.counterparty,onChange:L=>E({...N,counterparty:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Företag eller person"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Organisation"}),s.jsx("input",{type:"text",value:N.counterparty_org,onChange:L=>E({...N,counterparty_org:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Org-namn"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Startdatum"}),s.jsx("input",{type:"date",value:N.start_date,onChange:L=>E({...N,start_date:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Slutdatum"}),s.jsx("input",{type:"date",value:N.end_date,onChange:L=>E({...N,end_date:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Värde"}),s.jsx("input",{type:"number",value:N.value,onChange:L=>E({...N,value:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"0"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Valuta"}),s.jsxs("select",{value:N.currency,onChange:L=>E({...N,currency:L.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"SEK",children:"SEK"}),s.jsx("option",{value:"EUR",children:"EUR"}),s.jsx("option",{value:"USD",children:"USD"}),s.jsx("option",{value:"NOK",children:"NOK"})]})]})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Ye,{className:"flex-1",onClick:B,disabled:O||!N.title||!N.counterparty||!N.template_type,children:O?"Skapar...":"Skapa avtal"}),s.jsx(Ye,{variant:"secondary",onClick:()=>A(!1),children:"Avbryt"})]})]})})]})}const Sue=[{id:"c1",name:"Vinterservice Kampanj",description:"Komplett vinterservice för bilägare",strategy:"Fokus på säkerhet och förebyggande underhåll",targetAudience:"Bilägare i Sverige",cta:"Boka vinterservice nu",status:"active",startDate:"2024-01-15",endDate:"2024-03-15",budget:5e4,goals:[{metric:"bookings",target:200,current:145},{metric:"reach",target:5e4,current:42e3}],activities:[]},{id:"c2",name:"ALVA Launch",description:"Lansering av ALVA diagnosplattform",strategy:"B2B-fokus på verkstäder och fordonsbolag",targetAudience:"Fordonsverkstäder",cta:"Ansök om demo",status:"active",startDate:"2024-02-01",endDate:"2024-04-30",budget:1e5,goals:[{metric:"demos",target:50,current:32},{metric:"signups",target:20,current:12}],activities:[]},{id:"c3",name:"Sommar Erbjudande",description:"Sommarcheck och AC-service",strategy:"Säsongserbjudande för sommarförberedelser",targetAudience:"Bilägare",cta:"Boka sommarcheck",status:"planned",startDate:"2024-05-01",endDate:"2024-07-31",budget:4e4,goals:[{metric:"bookings",target:300},{metric:"revenue",target:15e4}],activities:[]}],b8=[{id:"a1",date:"2024-08-12",time:"09:00",channel:"instagram",activityType:"reel",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Bilägare 25-45",purpose:"Öka medvetenhet om vinterservice",cta:"Boka nu",status:"approved",assignee:"Anna Lind",publicationStatus:"scheduled",publicationDestination:"Instagram",metadata:{hashtags:"#vinterservice #bilservice #säkerhet"}},{id:"a2",date:"2024-08-12",time:"14:00",channel:"linkedin",activityType:"article",campaign:"ALVA Launch",product:"ALVA",targetAudience:"Verkstadsägare",purpose:"Positionera ALVA som branschlösning",cta:"Läs mer",status:"in_production",assignee:"Erik Svensson",publicationStatus:"draft",publicationDestination:"LinkedIn",metadata:{topic:"Digitalisering av fordonsbranschen"}},{id:"a3",date:"2024-08-13",time:"10:00",channel:"newsletter",activityType:"newsletter",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Befintliga kunder",purpose:"Driva bokningar för vinterservice",cta:"Boka online",status:"scheduled",assignee:"Johan Berg",publicationStatus:"scheduled",publicationDestination:"Email",metadata:{segment:"kunder_senaste_12_manader"}},{id:"a4",date:"2024-08-14",time:"11:00",channel:"facebook",activityType:"carousel",campaign:"Sommar Erbjudande",product:"AC-service",targetAudience:"Bilägare 30-55",purpose:"Visa fördelar med AC-service",cta:"Se erbjudande",status:"planned",assignee:"Anna Lind",publicationStatus:"draft",publicationDestination:"Facebook",metadata:{images:5,format:"carousel"}},{id:"a5",date:"2024-08-15",time:"08:00",channel:"google_business",activityType:"post",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Lokal målgrupp",purpose:"Lokal synlighet",cta:"Ring oss",status:"published",assignee:"Johan Berg",publicationStatus:"published",publicationDestination:"Google Business Profile",result:{impressions:1200,engagement:45,clicks:12},metadata:{}}],Nue=[{id:"b1",name:"Vinterservice - Instagram Reel",type:"template",content:{format:"reel",duration:"15-30s",hook:"Visa isig bilruta",cta:"Boka vinterservice"},tags:["vinterservice","instagram","reel","video"],usageCount:12},{id:"b2",name:"ALVA - LinkedIn Article",type:"template",content:{format:"article",length:"800-1200 words",structure:["problem","solution","proof","cta"],tone:"professional"},tags:["alva","linkedin","article","b2b"],usageCount:8},{id:"b3",name:"Sommarcheck - Newsletter",type:"template",content:{format:"newsletter",sections:["header","offer","benefits","testimonial","cta"],subject_line_templates:["Förbered bilen för sommaren","Sommarcheck - 20% rabatt"]},tags:["sommar","newsletter","email","erbjudande"],usageCount:15}],Ep={instagram:z5,facebook:R5,linkedin:L5,newsletter:An,website:gn,google_business:W1,youtube:hF,tiktok:K5,email:An},Ds={planned:"bg-gray-100 text-gray-600",brief_created:"bg-blue-50 text-blue-600",in_production:"bg-yellow-50 text-yellow-600",generated:"bg-purple-50 text-purple-600",review_required:"bg-orange-50 text-orange-600",approved:"bg-green-50 text-green-600",scheduled:"bg-cyan-50 text-cyan-600",publishing:"bg-indigo-50 text-indigo-600",published:"bg-emerald-50 text-emerald-600",verified:"bg-teal-50 text-teal-600",failed:"bg-red-50 text-red-600",paused:"bg-amber-50 text-amber-600",cancelled:"bg-slate-50 text-slate-600"},j2={planned:dn,brief_created:dn,in_production:dn,generated:xr,review_required:Zr,approved:xr,scheduled:dn,publishing:Q1,published:xr,verified:xr,failed:Zr,paused:Z1,cancelled:Zr};function Aue(){const[e,t]=M.useState(new Date),[n,r]=M.useState("month"),[i,l]=M.useState(null),[c,d]=M.useState("all"),[f,h]=M.useState("all"),x=b8.filter(w=>!(c!=="all"&&w.channel!==c||f!=="all"&&w.status!==f)),y=w=>{const S=new Date(e);switch(n){case"year":S.setFullYear(S.getFullYear()+(w==="next"?1:-1));break;case"quarter":S.setMonth(S.getMonth()+(w==="next"?3:-3));break;case"month":S.setMonth(S.getMonth()+(w==="next"?1:-1));break;case"week":S.setDate(S.getDate()+(w==="next"?7:-7));break;case"day":S.setDate(S.getDate()+(w==="next"?1:-1));break}t(S)},j=()=>{switch(n){case"year":return e.getFullYear().toString();case"quarter":return`Q${Math.floor(e.getMonth()/3)+1} ${e.getFullYear()}`;case"month":return e.toLocaleDateString("sv-SE",{month:"long",year:"numeric"});case"week":const S=new Date(e);S.setDate(e.getDate()-e.getDay());const v=new Date(S);return v.setDate(S.getDate()+6),`${S.toLocaleDateString("sv-SE")} - ${v.toLocaleDateString("sv-SE")}`;case"day":return e.toLocaleDateString("sv-SE",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Calendar"}),s.jsx("div",{className:"flex items-center gap-2 bg-gray-100 rounded-lg p-1",children:["year","quarter","month","week","day"].map(w=>s.jsx("button",{onClick:()=>r(w),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors capitalize ${n===w?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:w},w))})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>y("prev"),className:"p-2 hover:bg-gray-100 rounded-lg",children:s.jsx(M5,{size:20})}),s.jsx("span",{className:"text-lg font-semibold min-w-[200px] text-center",children:j()}),s.jsx("button",{onClick:()=>y("next"),className:"p-2 hover:bg-gray-100 rounded-lg",children:s.jsx(Bo,{size:20})}),s.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:[s.jsx(Br,{size:18}),"New Activity"]})]})]}),s.jsxs("div",{className:"flex items-center gap-4 p-4 border-b bg-gray-50",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nd,{size:16,className:"text-gray-500"}),s.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),s.jsxs("select",{value:c,onChange:w=>d(w.target.value),className:"px-3 py-1.5 text-sm border rounded-lg bg-white",children:[s.jsx("option",{value:"all",children:"All Channels"}),s.jsx("option",{value:"instagram",children:"Instagram"}),s.jsx("option",{value:"facebook",children:"Facebook"}),s.jsx("option",{value:"linkedin",children:"LinkedIn"}),s.jsx("option",{value:"newsletter",children:"Newsletter"}),s.jsx("option",{value:"website",children:"Website"}),s.jsx("option",{value:"google_business",children:"Google Business"})]}),s.jsxs("select",{value:f,onChange:w=>h(w.target.value),className:"px-3 py-1.5 text-sm border rounded-lg bg-white",children:[s.jsx("option",{value:"all",children:"All Status"}),s.jsx("option",{value:"planned",children:"Planned"}),s.jsx("option",{value:"in_production",children:"In Production"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"scheduled",children:"Scheduled"}),s.jsx("option",{value:"published",children:"Published"})]})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[n==="month"&&s.jsx(_ue,{date:e,activities:x,onSelect:l}),n==="week"&&s.jsx(Oue,{date:e,activities:x,onSelect:l}),n==="day"&&s.jsx(Tue,{date:e,activities:x,onSelect:l}),n==="year"&&s.jsx(Eue,{year:e.getFullYear(),activities:x,onSelect:l}),n==="quarter"&&s.jsx(Cue,{date:e,activities:x,onSelect:l})]}),s.jsx(Ma,{children:i&&s.jsx(Mue,{activity:i,onClose:()=>l(null)})})]})}function _ue({date:e,activities:t,onSelect:n}){const r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=new Date(e.getFullYear(),e.getMonth(),1).getDay(),l=Array.from({length:r},(d,f)=>f+1),c=Array.from({length:i===0?6:i-1},(d,f)=>f);return s.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(d=>s.jsx("div",{className:"p-2 text-center text-sm font-medium text-gray-500",children:d},d)),c.map(d=>s.jsx("div",{className:"min-h-[100px] bg-gray-50 rounded-lg"},`empty-${d}`)),l.map(d=>{const f=t.filter(h=>{const p=new Date(h.date);return p.getDate()===d&&p.getMonth()===e.getMonth()});return s.jsxs("div",{className:"min-h-[100px] bg-white border rounded-lg p-2 hover:shadow-md transition-shadow",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700",children:d}),s.jsx("div",{className:"mt-1 space-y-1",children:f.map(h=>{const p=Ep[h.channel],x=j2[h.status];return s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(h),className:`w-full text-left px-2 py-1 rounded text-xs flex items-center gap-1.5 ${Ds[h.status]}`,children:[p&&s.jsx(p,{size:12}),s.jsx("span",{className:"truncate flex-1",children:h.activityType}),s.jsx(x,{size:10})]},h.id)})})]},d)})]})}function Oue({date:e,activities:t,onSelect:n}){const r=new Date(e);r.setDate(e.getDate()-e.getDay()+1);const i=Array.from({length:7},(l,c)=>{const d=new Date(r);return d.setDate(r.getDate()+c),d});return s.jsx("div",{className:"grid grid-cols-7 gap-2",children:i.map((l,c)=>{const d=t.filter(f=>new Date(f.date).toDateString()===l.toDateString());return s.jsxs("div",{className:"bg-white border rounded-lg p-3 min-h-[400px]",children:[s.jsxs("div",{className:"text-center mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 uppercase",children:l.toLocaleDateString("sv-SE",{weekday:"short"})}),s.jsx("div",{className:"text-lg font-bold",children:l.getDate()})]}),s.jsx("div",{className:"space-y-2",children:d.map(f=>{const h=Ep[f.channel];return s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded-lg text-xs ${Ds[f.status]}`,children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[h&&s.jsx(h,{size:12}),s.jsx("span",{className:"font-medium",children:f.time})]}),s.jsx("div",{className:"truncate",children:f.campaign}),s.jsx("div",{className:"truncate text-gray-600",children:f.purpose})]},f.id)})})]},c)})})}function Tue({date:e,activities:t,onSelect:n}){const r=t.filter(l=>new Date(l.date).toDateString()===e.toDateString()).sort((l,c)=>(l.time||"").localeCompare(c.time||"")),i=Array.from({length:24},(l,c)=>`${String(c).padStart(2,"0")}:00`);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-center mb-4",children:s.jsx("h2",{className:"text-xl font-bold",children:e.toLocaleDateString("sv-SE",{weekday:"long",day:"numeric",month:"long"})})}),i.map(l=>{const c=r.filter(d=>{var f;return(f=d.time)==null?void 0:f.startsWith(l.split(":")[0])});return s.jsxs("div",{className:"flex gap-4 min-h-[60px]",children:[s.jsx("div",{className:"w-16 text-right text-sm text-gray-500 pt-2",children:l}),s.jsx("div",{className:"flex-1 border-l-2 border-gray-200 pl-4 space-y-2",children:c.map(d=>{const f=Ep[d.channel],h=j2[d.status];return s.jsxs(Ke.button,{whileHover:{scale:1.01},onClick:()=>n(d),className:`w-full text-left p-3 rounded-lg ${Ds[d.status]}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[f&&s.jsx(f,{size:16}),s.jsx("span",{className:"font-medium",children:d.campaign})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs",children:d.time}),s.jsx(h,{size:14})]})]}),s.jsx("div",{className:"mt-1 text-sm",children:d.purpose}),s.jsxs("div",{className:"mt-1 text-xs opacity-75",children:[d.channel," → ",d.publicationDestination]})]},d.id)})})]},l)})]})}function Eue({year:e,activities:t,onSelect:n}){const r=Array.from({length:12},(i,l)=>l);return s.jsx("div",{className:"grid grid-cols-4 gap-4",children:r.map(i=>{const l=t.filter(d=>{const f=new Date(d.date);return f.getMonth()===i&&f.getFullYear()===e}),c=new Date(e,i).toLocaleDateString("sv-SE",{month:"long"});return s.jsxs("div",{className:"bg-white border rounded-lg p-4",children:[s.jsx("h3",{className:"font-bold text-lg mb-3 capitalize",children:c}),s.jsxs("div",{className:"space-y-2",children:[l.slice(0,5).map(d=>s.jsx(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(d),className:`w-full text-left px-2 py-1.5 rounded text-xs ${Ds[d.status]}`,children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-medium",children:new Date(d.date).getDate()}),s.jsx("span",{className:"truncate",children:d.campaign})]})},d.id)),l.length>5&&s.jsxs("div",{className:"text-xs text-gray-500 text-center",children:["+",l.length-5," more"]})]})]},i)})})}function Cue({date:e,activities:t,onSelect:n}){const r=Math.floor(e.getMonth()/3)+1,i=Array.from({length:3},(l,c)=>r*3-3+c);return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"text-center",children:s.jsxs("h2",{className:"text-2xl font-bold",children:["Q",r," ",e.getFullYear()]})}),s.jsx("div",{className:"grid grid-cols-3 gap-4",children:i.map(l=>{const c=t.filter(f=>new Date(f.date).getMonth()===l),d=new Date(e.getFullYear(),l).toLocaleDateString("sv-SE",{month:"long"});return s.jsxs("div",{className:"bg-white border rounded-lg p-4",children:[s.jsx("h3",{className:"font-bold text-lg mb-3 capitalize",children:d}),s.jsx("div",{className:"space-y-2 max-h-[400px] overflow-auto",children:c.map(f=>s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded text-xs ${Ds[f.status]}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium",children:f.campaign}),s.jsx("span",{children:new Date(f.date).getDate()})]}),s.jsx("div",{className:"mt-1",children:f.purpose})]},f.id))})]},l)})})]})}function Mue({activity:e,onClose:t}){const n=Ep[e.channel],r=j2[e.status];return s.jsx(Ke.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:t,children:s.jsxs(Ke.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},onClick:i=>i.stopPropagation(),className:"bg-white rounded-xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-auto",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[n&&s.jsx(n,{size:24,className:"text-blue-600"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold",children:e.campaign}),s.jsxs("p",{className:"text-sm text-gray-500",children:[e.activityType," on ",e.channel]})]})]}),s.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg",children:"✕"})]})}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${Ds[e.status]}`,children:[s.jsx(r,{size:14,className:"inline mr-1"}),e.status.replace("_"," ")]}),s.jsxs("span",{className:"text-sm text-gray-500",children:[e.date," ",e.time]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Purpose"}),s.jsx("p",{className:"text-gray-900",children:e.purpose})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Call to Action"}),s.jsx("p",{className:"text-blue-600 font-medium",children:e.cta})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Target Audience"}),s.jsx("p",{children:e.targetAudience})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Product"}),s.jsx("p",{children:e.product})]})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-2",children:"Publication"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gn,{size:16}),s.jsx("span",{children:e.publicationDestination}),s.jsx("span",{className:"text-gray-400",children:"→"}),s.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${Ds[e.publicationStatus]}`,children:e.publicationStatus})]})]}),e.result&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-2",children:"Results"}),s.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[e.result.impressions!==void 0&&s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.result.impressions.toLocaleString()}),s.jsx("div",{className:"text-xs text-blue-600",children:"Impressions"})]}),e.result.engagement!==void 0&&s.jsxs("div",{className:"green-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.result.engagement}),s.jsx("div",{className:"text-xs text-green-600",children:"Engagement"})]}),e.result.clicks!==void 0&&s.jsxs("div",{className:"bg-purple-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-purple-600",children:e.result.clicks}),s.jsx("div",{className:"text-xs text-purple-600",children:"Clicks"})]}),e.result.conversions!==void 0&&s.jsxs("div",{className:"bg-orange-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-orange-600",children:e.result.conversions}),s.jsx("div",{className:"text-xs text-orange-600",children:"Conversions"})]})]})]}),e.assignee&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Assigned to"}),s.jsx("p",{children:e.assignee})]}),s.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[s.jsx("button",{className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"Edit Activity"}),s.jsx("button",{className:"flex-1 px-4 py-2 border rounded-lg hover:bg-gray-50",children:"Preview Content"}),s.jsx("button",{className:"flex-1 px-4 py-2 border rounded-lg hover:bg-gray-50",children:"Publish Now"})]})]})]})})}function kue(){const[e,t]=M.useState("30d"),n=Sue,r=b8,i={activeCampaigns:n.filter(c=>c.status==="active").length,plannedActivities:r.filter(c=>c.status==="planned").length,inProduction:r.filter(c=>c.status==="in_production").length,scheduled:r.filter(c=>c.status==="scheduled").length,published:r.filter(c=>c.status==="published").length,failed:r.filter(c=>c.status==="failed").length,totalImpressions:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.impressions)||0)},0),totalEngagement:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.engagement)||0)},0),totalClicks:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.clicks)||0)},0),totalConversions:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.conversions)||0)},0)},l=r.filter(c=>new Date(c.date)>=new Date).sort((c,d)=>new Date(c.date).getTime()-new Date(d.date).getTime()).slice(0,5);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Control Tower"}),s.jsx("p",{className:"text-gray-500",children:"Real-time overview of all marketing operations"})]}),s.jsx("div",{className:"flex items-center gap-2 bg-gray-100 rounded-lg p-1",children:["7d","30d","90d","year"].map(c=>s.jsx("button",{onClick:()=>t(c),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${e===c?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,children:c==="7d"?"7 days":c==="30d"?"30 days":c==="90d"?"90 days":"Year"},c))})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx(qo,{size:20,className:"text-blue-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.activeCampaigns}),s.jsx("div",{className:"text-sm text-gray-500",children:"Active Campaigns"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-yellow-100 rounded-lg flex items-center justify-center",children:s.jsx(dn,{size:20,className:"text-yellow-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.inProduction}),s.jsx("div",{className:"text-sm text-gray-500",children:"In Production"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:s.jsx(xr,{size:20,className:"text-green-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.published}),s.jsx("div",{className:"text-sm text-gray-500",children:"Published"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-lg flex items-center justify-center",children:s.jsx(Zr,{size:20,className:"text-red-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.failed}),s.jsx("div",{className:"text-sm text-gray-500",children:"Failed"})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(P5,{size:16,className:"text-blue-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Impressions"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalImpressions.toLocaleString()})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(aF,{size:16,className:"text-green-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Engagement"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalEngagement})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(UH,{size:16,className:"text-purple-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Clicks"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalClicks})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(cF,{size:16,className:"text-orange-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Conversions"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalConversions})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Active Campaigns"}),s.jsx("div",{className:"space-y-4",children:n.filter(c=>c.status==="active").map(c=>{var d;return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-medium",children:c.name}),s.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 text-xs rounded-full",children:"Active"})]}),s.jsx("p",{className:"text-sm text-gray-500 mb-3",children:c.description}),s.jsx("div",{className:"space-y-2",children:(d=c.goals)==null?void 0:d.map((f,h)=>{var p;return s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:f.metric}),s.jsxs("span",{children:[(p=f.current)==null?void 0:p.toLocaleString()," / ",f.target.toLocaleString()]})]}),s.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:s.jsx(Ke.div,{initial:{width:0},animate:{width:`${(f.current||0)/f.target*100}%`},className:"h-full bg-blue-600 rounded-full"})})]},h)})})]},c.id)})})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Upcoming Activities"}),s.jsx("div",{className:"space-y-3",children:l.map(c=>s.jsxs("div",{className:"flex items-center gap-4 p-3 border rounded-lg",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-50 rounded-lg flex items-center justify-center",children:s.jsx(hu,{size:20,className:"text-blue-600"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-medium",children:c.campaign}),s.jsx("p",{className:"text-sm text-gray-500",children:c.purpose})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-sm font-medium",children:c.date}),s.jsx("div",{className:"text-xs text-gray-500",children:c.time})]})]},c.id))})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Channel Performance"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:["instagram","facebook","linkedin","newsletter"].map(c=>{const d=r.filter(p=>p.channel===c),f=d.filter(p=>p.status==="published").length,h=d.reduce((p,x)=>{var y;return p+(((y=x.result)==null?void 0:y.impressions)||0)},0);return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium capitalize mb-2",children:c}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Activities"}),s.jsx("span",{children:d.length})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Published"}),s.jsx("span",{children:f})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Impressions"}),s.jsx("span",{children:h.toLocaleString()})]})]})]},c)})})]})]})}const Pue={campaign:sF,template:jr,cta:Br,image_format:WH,video_format:K5,text_template:jr};function Rue(){const[e]=M.useState(Nue),[t,n]=M.useState("all"),r=t==="all"?e:e.filter(i=>i.type===t);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Battery"}),s.jsx("p",{className:"text-gray-500",children:"Reusable campaigns, templates, and content formats"})]}),s.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:[s.jsx(Br,{size:18}),"Add Asset"]})]}),s.jsx("div",{className:"flex items-center gap-2",children:["all","campaign","template","cta","image_format","video_format"].map(i=>s.jsx("button",{onClick:()=>n(i),className:`px-3 py-1.5 text-sm font-medium rounded-lg transition-colors capitalize ${t===i?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:i.replace("_"," ")},i))}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(i=>{const l=Pue[i.type]||E5;return s.jsxs(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-50 rounded-lg flex items-center justify-center",children:s.jsx(l,{size:20,className:"text-blue-600"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:i.name}),s.jsx("span",{className:"text-xs text-gray-500 capitalize",children:i.type.replace("_"," ")})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(HH,{size:14})}),s.jsx("button",{className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(uF,{size:14})})]})]}),s.jsx("div",{className:"bg-gray-50 rounded-lg p-3 mb-3",children:s.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(i.content,null,2)})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex gap-1",children:i.tags.map(c=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 text-xs rounded",children:c},c))}),s.jsxs("span",{className:"text-xs text-gray-500",children:["Used ",i.usageCount," times"]})]})]},i.id)})})]})}function Due(){const[e,t]=M.useState("control-tower"),n=[{id:"control-tower",label:"Control Tower",icon:mS},{id:"calendar",label:"Calendar",icon:hu},{id:"battery",label:"Battery",icon:E5},{id:"settings",label:"Settings",icon:V5}];return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsx("div",{className:"flex items-center gap-1 bg-gray-100 rounded-xl p-1 mb-6",children:n.map(r=>{const i=r.icon;return s.jsxs("button",{onClick:()=>t(r.id),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===r.id?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[s.jsx(i,{size:16}),r.label]},r.id)})}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(Ma,{mode:"wait",children:s.jsxs(Ke.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e==="calendar"&&s.jsx(Aue,{}),e==="control-tower"&&s.jsx(kue,{}),e==="battery"&&s.jsx(Rue,{}),e==="settings"&&s.jsx(zue,{})]},e)})})]})}function zue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Settings"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Company Profile"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Company Name"}),s.jsx("input",{type:"text",defaultValue:"Landvex Inc",className:"w-full px-3 py-2 border rounded-lg"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Industry"}),s.jsx("input",{type:"text",defaultValue:"Automotive Technology",className:"w-full px-3 py-2 border rounded-lg"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Brand Voice"}),s.jsx("textarea",{defaultValue:"Professional, innovative, customer-focused",className:"w-full px-3 py-2 border rounded-lg",rows:3})]})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Channels"}),s.jsx("div",{className:"space-y-3",children:[{name:"Instagram",connected:!0,followers:"2.4K"},{name:"Facebook",connected:!0,followers:"1.8K"},{name:"LinkedIn",connected:!0,followers:"856"},{name:"Newsletter",connected:!0,subscribers:"3.2K"},{name:"YouTube",connected:!1}].map(e=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:e.name}),e.followers&&s.jsxs("span",{className:"text-sm text-gray-500",children:[e.followers," followers"]}),e.subscribers&&s.jsxs("span",{className:"text-sm text-gray-500",children:[e.subscribers," subscribers"]})]}),s.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${e.connected?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:e.connected?"Connected":"Disconnected"})]},e.name))})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Publishing Schedule"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Instagram"}),s.jsx("span",{className:"text-sm text-gray-500",children:"3 posts per week"})]}),s.jsx(Bo,{size:16,className:"text-gray-400"})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"LinkedIn"}),s.jsx("span",{className:"text-sm text-gray-500",children:"2 articles per week"})]}),s.jsx(Bo,{size:16,className:"text-gray-400"})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Newsletter"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Weekly on Tuesdays"})]}),s.jsx(Bo,{size:16,className:"text-gray-400"})]})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Automation"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-publish approved content"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Publish when approved and scheduled"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-generate reports"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Weekly performance reports"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-reschedule failed posts"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Retry failed publications"})]}),s.jsx("div",{className:"w-12 h-6 bg-gray-300 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute left-0.5 top-0.5"})})]})]})]})]})]})}function Lue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Support"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Support tickets coming soon..."})})]})}const $ue={send_email:s.jsx(An,{size:12}),slack_message:s.jsx(xh,{size:12}),create_task:s.jsx(jr,{size:12}),add_to_crm:s.jsx(uE,{size:12}),update_hr:s.jsx(uE,{size:12})},Bue={send_email:"Send Email",slack_message:"Slack Message",create_task:"Create Task",add_to_crm:"Add to CRM",update_hr:"Update HR"};function Iue(e){if(!e)return"Never";const t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r<3600?`${Math.floor(r/60)} min ago`:r<86400?`${Math.floor(r/3600)} hours ago`:r<604800?`${Math.floor(r/86400)} days ago`:t.toLocaleDateString()}function que(e){return Array.isArray(e)?e.map(t=>{if(typeof t=="object"&&t!==null){const n=t.type;return Bue[n]||n}return String(t)}):[]}function Uue(){const[e,t]=M.useState([]),[n,r]=M.useState(!0),[i,l]=M.useState(""),[c,d]=M.useState(!1),[f,h]=M.useState(!1),{token:p}=ea(),[x,y]=M.useState({name:"",description:"",trigger_type:"schedule",trigger_config:{cron:"0 9 * * *"},actions:[{type:"send_email",to:"",subject:"",body:""}]}),j=async()=>{r(!0),l("");try{const A={};p&&(A.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{headers:A});if(!O.ok)throw new Error(`Failed to fetch workflows: ${O.status}`);const _=await O.json();t(_.workflows||[])}catch(A){l(A instanceof Error?A.message:"Failed to load workflows")}finally{r(!1)}};M.useEffect(()=>{j()},[p]);const w=async()=>{if(!(!x.name||!x.description)){h(!0);try{const A={"Content-Type":"application/json"};p&&(A.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{method:"POST",headers:A,body:JSON.stringify(x)});if(!O.ok)throw new Error(`Failed to create: ${O.status}`);d(!1),y({name:"",description:"",trigger_type:"schedule",trigger_config:{cron:"0 9 * * *"},actions:[{type:"send_email",to:"",subject:"",body:""}]}),j()}catch(A){l(A instanceof Error?A.message:"Failed to create workflow")}finally{h(!1)}}},S=e.filter(A=>A.status==="active").length,v=e.reduce((A,O)=>A+(O.run_count||0),0);return n?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-12"}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:Array.from({length:4}).map((A,O)=>s.jsx(Re,{className:"h-[80px]"},O))}),s.jsx(Re,{className:"h-[400px]"})]}):i&&e.length===0?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-danger mb-4",children:i}),s.jsx(Ye,{onClick:j,children:"Retry"})]})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Automation"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Workflows and automated tasks"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),onClick:()=>d(!0),children:"New Workflow"})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(qo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Workflows"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(Q1,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:S}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(Z1,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e.length-S}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Paused"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(xr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:v.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Runs"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Workflows",subtitle:"Automated processes and triggers"}),s.jsx("div",{className:"space-y-3",children:e.length===0?s.jsxs("div",{className:"text-center py-12 text-text-secondary",children:[s.jsx(qo,{size:48,className:"mx-auto mb-4 text-text-tertiary"}),s.jsx("p",{children:"No workflows yet. Create your first workflow to get started."})]}):e.map(A=>{const O=que(A.actions);return s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${A.status==="active"?"bg-success-light text-success":"bg-warning-light text-warning"}`,children:A.status==="active"?s.jsx(Q1,{size:18}):s.jsx(Z1,{size:18})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium text-text-primary",children:A.name}),s.jsx(_e,{variant:A.status==="active"?"success":"warning",size:"sm",children:A.status})]}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:A.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(YH,{size:12,className:"text-text-secondary/60"}),s.jsx("span",{className:"text-[11px] text-text-secondary",children:A.trigger_type})]}),O.length>0&&s.jsx("div",{className:"flex items-center gap-1",children:O.map((_,T)=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-bg rounded text-[10px] text-text-secondary",children:[$ue[_]||s.jsx(qo,{size:12}),_]},T))})]})]})]}),s.jsxs("div",{className:"flex items-center gap-6 text-right",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:(A.run_count||0).toLocaleString()}),s.jsx("p",{className:"text-[11px] text-text-secondary",children:"runs"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Iue(A.last_run_at)}),s.jsx("p",{className:"text-[11px] text-text-secondary",children:"last run"})]}),s.jsx("div",{className:"flex items-center",children:s.jsx("div",{className:`w-9 h-5 rounded-full relative cursor-pointer transition-colors ${A.status==="active"?"bg-success/20":"bg-warning/20"}`,children:s.jsx("div",{className:`absolute top-0.5 w-4 h-4 rounded-full transition-all ${A.status==="active"?"right-0.5 bg-success":"left-0.5 bg-warning"}`})})})]})]},A.id)})})]}),c&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:s.jsxs("div",{className:"w-full max-w-lg bg-surface rounded-2xl shadow-xl",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"New Workflow"}),s.jsx("button",{onClick:()=>d(!1),className:"p-2 hover:bg-bg rounded-lg transition-colors",children:s.jsx(Ua,{size:18})})]}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Name"}),s.jsx("input",{type:"text",value:x.name,onChange:A=>y({...x,name:A.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"e.g. Invoice Reminder"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Description"}),s.jsx("textarea",{value:x.description,onChange:A=>y({...x,description:A.target.value}),className:"w-full h-20 px-3 py-2 rounded-lg border bg-bg text-sm resize-none",placeholder:"What does this workflow do?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Trigger Type"}),s.jsxs("select",{value:x.trigger_type,onChange:A=>y({...x,trigger_type:A.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"schedule",children:"Schedule (Cron)"}),s.jsx("option",{value:"webhook",children:"Webhook"}),s.jsx("option",{value:"event",children:"Event"})]})]}),x.trigger_type==="schedule"&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Cron Expression"}),s.jsx("input",{type:"text",value:x.trigger_config.cron||"",onChange:A=>y({...x,trigger_config:{cron:A.target.value}}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"0 9 * * *"}),s.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:"e.g. 0 9 * * * = daily at 9:00"})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Ye,{className:"flex-1",onClick:w,disabled:f||!x.name||!x.description,children:f?"Creating...":"Create Workflow"}),s.jsx(Ye,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"})]})]})})]})}function Vue(){const[e,t]=M.useState([]),[n,r]=M.useState(null),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState(null);M.useEffect(()=>{p()},[]);async function p(){l(!0),d("");try{const w=await gE.engines();t(w.engines||[]),r(w.summary||null)}catch(w){d(w instanceof Error?w.message:"Failed to load engines")}finally{l(!1)}}async function x(w){h(w);try{await gE.restartEngine(w),setTimeout(p,2e3)}catch(S){console.error("Restart failed:",S)}finally{h(null)}}function y(w){switch(w){case"healthy":return"success";case"warning":return"warning";case"critical":return"danger";case"maintenance":return"default";default:return"default"}}function j(w){switch(w){case"healthy":return s.jsx(vr,{size:16,className:"text-success"});case"warning":return s.jsx(fn,{size:16,className:"text-warning"});case"critical":return s.jsx(Mh,{size:16,className:"text-danger"});case"maintenance":return s.jsx(dn,{size:16,className:"text-text-secondary"});default:return s.jsx($H,{size:16,className:"text-text-secondary"})}}if(i)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:Array.from({length:6}).map((w,S)=>s.jsx(Re,{className:"h-[200px]"},S))})]});if(c){const w=c.includes("authorization")||c.includes("unauthorized")||c.includes("missing authorization");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md px-4",children:w?s.jsxs(s.Fragment,{children:[s.jsx(Rh,{size:48,className:"mx-auto text-warning mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Authentication required"}),s.jsx("p",{className:"text-text-secondary mb-4",children:"Please log in to access AMOS Control Panel"}),s.jsx("button",{onClick:()=>window.location.href="/login",className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:"Log in"})]}):s.jsxs(s.Fragment,{children:[s.jsx(fn,{size:48,className:"text-danger mx-auto mb-4"}),s.jsx("p",{className:"text-danger font-medium",children:c}),s.jsx(Ye,{onClick:p,className:"mt-4",icon:s.jsx(Da,{size:16}),children:"Retry"})]})})})}return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"AMOS Control Panel"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Monitor and control all AMOS engines"})]}),s.jsx(Ye,{onClick:p,icon:s.jsx(Da,{size:16}),children:"Refresh"})]}),n&&s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Rh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.total}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Engines"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.healthy}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Healthy"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.warning}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Warning"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(Mh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.critical+n.maintenance}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Critical/Maintenance"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:e.map(w=>s.jsx(te,{className:"relative",children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j(w.health),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:w.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:w.version})]})]}),s.jsx(_e,{variant:y(w.health),children:w.health})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Requests (24h)"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.requests_24h.toLocaleString()})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Latency"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[w.latency_ms.toFixed(1)," ms"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Error Rate"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[(w.error_rate*100).toFixed(1),"%"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Uptime"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.uptime})]})]}),w.models&&w.models.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase",children:"Models"}),w.models.map(S=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fS,{size:14,className:"text-text-secondary"}),s.jsx("span",{className:"text-text-primary",children:S.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-text-secondary",children:[(S.accuracy*100).toFixed(0),"%"]}),s.jsx(_e,{variant:S.status==="active"?"success":"warning",size:"sm",children:S.status})]})]},S.id))]}),s.jsx("div",{className:"pt-2 border-t border-border/40",children:s.jsx(Ye,{variant:"secondary",size:"sm",className:"w-full",icon:s.jsx(Da,{size:14}),disabled:f===w.id,onClick:()=>x(w.id),children:f===w.id?"Restarting...":"Restart Engine"})})]})},w.id))})]})}function Hue(){var A,O;const[e,t]=M.useState("zoomers"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState(null),[p,x]=M.useState(!0),[y,j]=M.useState(""),w=[{key:"zoomers",label:"Zoomers",icon:Lr},{key:"field-data",label:"Field Data",icon:ph},{key:"payouts",label:"Payouts",icon:Io},{key:"insights",label:"Insights",icon:nE}];M.useEffect(()=>{S()},[]);async function S(){x(!0),j("");try{const[_,T,N,E]=await Promise.all([Vf.zoomers(),Vf.fieldData(),Vf.payouts(),Vf.insights()]);r(_.zoomers||[]),l(T.fieldData||[]),d(N.payouts||[]),h(E.insights||null)}catch(_){const T=_ instanceof Error?_.message:"Failed to load data";T.includes("not configured"),j(T)}finally{x(!1)}}function v(_){switch(_){case"active":case"completed":case"processed":return"success";case"pending":case"processing":return"warning";case"inactive":case"failed":return"danger";default:return"default"}}if(p)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[400px]"})]});if(y){const _=y.includes("not configured");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md",children:_?s.jsxs(s.Fragment,{children:[s.jsx(gn,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"quiXzoom not configured"}),s.jsx("p",{className:"text-text-secondary mb-4",children:y}),s.jsx("p",{className:"text-sm text-text-tertiary",children:"Contact your administrator to set up quiXzoom integration."})]}):s.jsx("p",{className:"text-danger",children:y})})})}return s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"quiXzoom"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Field intelligence network and zoomer management"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:w.map(_=>s.jsxs("button",{onClick:()=>t(_.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===_.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(_.icon,{size:16}),_.label]},_.key))}),e==="zoomers"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Zoomers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(_=>_.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(n.reduce((_,T)=>_+T.earnings,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Earnings"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Zoomers",subtitle:"All field intelligence agents"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Name"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Location"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Tasks"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Rating"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Earnings"})]})}),s.jsx("tbody",{children:n.map(_=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-1 text-sm text-text-primary",children:[s.jsx(W1,{size:14,className:"text-text-secondary"}),_.city,", ",_.country]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:v(_.status),children:_.status})}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[_.completed_tasks,"/",_.total_tasks]}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[_.rating.toFixed(1)," ★"]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-text-primary",children:Te(_.earnings)})]},_.id))})]})})]})]}),e==="field-data"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ph,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Observations"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(_=>_.status==="processed").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Processed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(_=>_.status==="pending").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pending"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:i.map(_=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:_.type}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.zoomer_name})]}),s.jsx(_e,{variant:v(_.status),children:_.status})]}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-text-secondary",children:[s.jsx(W1,{size:14}),_.location.address,", ",_.location.city]}),_.ai_result&&s.jsxs("div",{className:"p-3 bg-bg rounded-lg space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nE,{size:14,className:"text-primary"}),s.jsxs("span",{className:"text-xs font-medium text-text-primary",children:["AI Analysis (",_.ai_result.engine,")"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-2 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-2 bg-primary rounded-full",style:{width:`${_.ai_result.confidence*100}%`}})}),s.jsxs("span",{className:"text-xs text-text-secondary",children:[(_.ai_result.confidence*100).toFixed(0),"%"]})]}),_.ai_result.detections.map((T,N)=>s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-text-secondary",children:T.label}),s.jsxs("span",{className:"text-text-primary",children:[(T.confidence*100).toFixed(0),"%"]})]},N))]}),s.jsx("p",{className:"text-xs text-text-secondary",children:Nt(_.created_at)})]})},_.id))})]}),e==="payouts"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Payouts"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(_=>_.status==="completed").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Completed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(c.reduce((_,T)=>_+T.amount,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Amount"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Payouts",subtitle:"All zoomer payments"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Zoomer"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Period"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Method"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Amount"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Net"})]})}),s.jsx("tbody",{children:c.map(_=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:_.zoomer_name}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:_.period}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:v(_.status),children:_.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:_.method}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[Te(_.amount)," ",_.currency]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-success",children:Te(_.net_amount)})]},_.id))})]})})]})]}),e==="insights"&&f&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ph,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:(A=f.total_observations)==null?void 0:A.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Observations"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.active_zoomers}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Zoomers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(gn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.cities_covered}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Cities"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(gn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.countries_covered}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Countries"})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[f.urban_sanitation_index&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Urban Sanitation Index",subtitle:`Score: ${f.urban_sanitation_index.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-primary rounded-full",style:{width:`${f.urban_sanitation_index.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.urban_sanitation_index.score})]}),s.jsx("div",{className:"space-y-2",children:(O=f.urban_sanitation_index.cities)==null?void 0:O.map((_,T)=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsx("span",{className:"text-text-secondary",children:_.city}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-24 h-2 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-2 bg-primary rounded-full",style:{width:`${_.score/10*100}%`}})}),s.jsx("span",{className:"text-text-primary",children:_.score})]})]},T))})]})]}),f.reality_gap_index&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Reality Gap Index",subtitle:`Score: ${f.reality_gap_index.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-danger rounded-full",style:{width:`${f.reality_gap_index.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.reality_gap_index.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.reality_gap_index.trend]})]})]}),f.reality_contradiction_score&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Reality Contradiction Score",subtitle:`Score: ${f.reality_contradiction_score.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-warning rounded-full",style:{width:`${f.reality_contradiction_score.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.reality_contradiction_score.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.reality_contradiction_score.trend]})]})]}),f.implementation_gap_score&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Implementation Gap Score",subtitle:`Score: ${f.implementation_gap_score.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-success rounded-full",style:{width:`${f.implementation_gap_score.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.implementation_gap_score.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.implementation_gap_score.trend]})]})]})]})]})]})}function Fue(){var T;const[e,t]=M.useState("entities"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState(null),[p,x]=M.useState(null),[y,j]=M.useState(!0),[w,S]=M.useState(""),v=[{key:"entities",label:"Entities",icon:qa},{key:"ownership",label:"Ownership",icon:na},{key:"documents",label:"Documents",icon:jr},{key:"compliance",label:"Compliance",icon:za}];M.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[N,E,k,R]=await Promise.all([Hf.entities(),Hf.documents(),Hf.compliance(),Hf.ownership()]);r(N.entities||[]),l(E.documents||[]),d(k.compliance_items||[]),h(k.summary||null),x(R.ownership||null)}catch(N){S(N instanceof Error?N.message:"Failed to load data")}finally{j(!1)}}function O(N){switch(N){case"active":case"completed":case"signed":return"success";case"pending":case"in_progress":case"draft":return"warning";case"inactive":case"failed":return"danger";default:return"default"}}function _(N){switch(N){case"completed":return s.jsx(vr,{size:16,className:"text-success"});case"in_progress":return s.jsx(dn,{size:16,className:"text-warning"});case"pending":return s.jsx(fn,{size:16,className:"text-danger"});default:return s.jsx(Mh,{size:16,className:"text-text-secondary"})}}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[400px]"})]}):w?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:w})}):s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Landvex Control"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Corporate structure, ownership & compliance"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:v.map(N=>s.jsxs("button",{onClick:()=>t(N.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===N.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(N.icon,{size:16}),N.label]},N.key))}),e==="entities"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(qa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Entities"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(gn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Set(n.map(N=>N.country)).size}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Countries"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.reduce((N,E)=>N+E.employees,0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Employees"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:n.map(N=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:N.name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[N.org_number," • ",N.city,", ",N.country]})]}),s.jsx(_e,{variant:O(N.status),children:N.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Type"}),s.jsx("p",{className:"text-text-primary",children:N.type})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"CEO"}),s.jsx("p",{className:"text-text-primary",children:N.ceo})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Founded"}),s.jsx("p",{className:"text-text-primary",children:Nt(N.founded_at)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Employees"}),s.jsx("p",{className:"text-text-primary",children:N.employees})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Board"}),s.jsx("div",{className:"space-y-2",children:N.board_members.map(E=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-text-primary",children:E.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:E.role})]}),s.jsx("span",{className:"text-xs text-text-secondary",children:E.since})]},E.id))})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border/40",children:[s.jsx(za,{size:14,className:N.compliance_status==="compliant"?"text-success":"text-warning"}),s.jsxs("span",{className:"text-xs text-text-secondary",children:["Compliance: ",N.compliance_status]})]})]})},N.id))})]}),e==="ownership"&&p&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Ownership Structure",subtitle:"Ultimate Beneficial Owner"}),s.jsxs("div",{className:"p-5",children:[p.ultimate_beneficial_owner&&s.jsxs("div",{className:"flex items-center gap-4 p-4 bg-bg rounded-xl mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary text-lg font-semibold",children:p.ultimate_beneficial_owner.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:p.ultimate_beneficial_owner.name}),s.jsxs("p",{className:"text-sm text-text-secondary",children:[p.ultimate_beneficial_owner.ownership,"% ownership •"," ",p.ultimate_beneficial_owner.nationality]})]})]}),s.jsx("div",{className:"space-y-3",children:(T=p.entities)==null?void 0:T.map((N,E)=>s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary text-xs font-medium",children:N.jurisdiction}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:N.name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[N.type," • ",N.jurisdiction]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[N.ownership,"%"]}),s.jsx("p",{className:"text-xs text-text-secondary",children:N.owner})]})]},E))})]})]})}),e==="documents"&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Documents",subtitle:"Corporate documents & agreements"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Title"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Type"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Signed By"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Date"})]})}),s.jsx("tbody",{children:i.map(N=>{var E;return s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(jr,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:N.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.type}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:((E=N.signed_by)==null?void 0:E.join(", "))||"-"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-secondary",children:Nt(N.created_at)})]},N.id)})})]})})]})}),e==="compliance"&&s.jsxs("div",{className:"space-y-6",children:[f&&s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(za,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.total}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Items"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.completed}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Completed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.in_progress}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.overdue}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Overdue"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Compliance Items",subtitle:"Regulatory requirements & deadlines"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Item"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Type"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Due Date"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Responsible"})]})}),s.jsx("tbody",{children:c.map(N=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[_(N.status),s.jsx("span",{className:"text-sm text-text-primary",children:N.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.type}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:Nt(N.due_date)}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.responsible})]},N.id))})]})})]})]})]})}function Gue(){const[e,t]=M.useState("iso"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState(!0),[w,S]=M.useState(""),v=[{key:"iso",label:"ISO Certifications",icon:rE},{key:"gdpr",label:"GDPR / Privacy",icon:$5},{key:"risks",label:"Risk Register",icon:fn},{key:"legal",label:"Legal Cases",icon:cE},{key:"policies",label:"Policies",icon:Ch}];M.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[T,N,E,k,R]=await Promise.all([Lc.iso(),Lc.gdpr(),Lc.risks(),Lc.legalCases(),Lc.policies()]);r(T.certifications||[]),l(N.records||[]),d(E.risks||[]),h(k.cases||[]),x(R.policies||[])}catch(T){S(T instanceof Error?T.message:"Failed to load compliance data")}finally{j(!1)}}function O(T){switch(T){case"active":case"completed":case"signed":case"mitigated":return"success";case"in_progress":case"pending":case"draft":return"warning";case"critical":case"failed":case"high":return"danger";default:return"default"}}function _(T){return T>=15?"text-danger":T>=10?"text-warning":"text-success"}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[400px]"})]}):w?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:w})}):s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Compliance & Legal"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"ISO, GDPR, risk management, legal cases & policies"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:v.map(T=>s.jsxs("button",{onClick:()=>t(T.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===T.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(T.icon,{size:16}),T.label]},T.key))}),e==="iso"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(rE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="in_progress").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.reduce((T,N)=>T+N.major_findings,0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Major Findings"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:n.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.standard}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.name})]}),s.jsx(_e,{variant:O(T.status),children:T.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issuer"}),s.jsx("p",{className:"text-text-primary",children:T.issuer})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Auditor"}),s.jsx("p",{className:"text-text-primary",children:T.auditor})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issued"}),s.jsx("p",{className:"text-text-primary",children:T.issued_at?Nt(T.issued_at):"N/A"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Expires"}),s.jsx("p",{className:"text-text-primary",children:T.expires_at?Nt(T.expires_at):"N/A"})]})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Scope"}),s.jsx("p",{className:"text-sm text-text-primary",children:T.scope})]}),T.findings>0&&s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:"text-text-secondary",children:["Findings: ",T.findings]}),T.major_findings>0&&s.jsxs("span",{className:"text-danger",children:["Major: ",T.major_findings]})]})]})},T.id))})]}),e==="gdpr"&&s.jsx("div",{className:"space-y-6",children:i.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.purpose}),s.jsx(_e,{variant:T.impact_assessment?"success":"warning",children:T.impact_assessment?"DPIA Done":"No DPIA"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Legal Basis"}),s.jsx("p",{className:"text-text-primary",children:T.legal_basis})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Retention"}),s.jsx("p",{className:"text-text-primary",children:T.retention})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Data Types"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.data_types.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Processors"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.processors.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:T.dpa_exists?"text-success":"text-danger",children:["DPA: ",T.dpa_exists?"✓":"✗"]}),s.jsxs("span",{className:T.cross_border?"text-warning":"text-text-secondary",children:["Cross-border: ",T.cross_border?"Yes":"No"]})]})]})},T.id))}),e==="risks"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Risks"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="mitigated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Mitigated"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="monitored").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Monitored"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Risk Register",subtitle:"Identified risks and mitigations"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Risk"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Category"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"P"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"I"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"Score"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Owner"})]})}),s.jsx("tbody",{children:c.map(T=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-text-primary",children:T.description}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.mitigation})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.category}),s.jsx("td",{className:"py-3.5 px-4 text-center text-sm text-text-primary",children:T.probability}),s.jsx("td",{className:"py-3.5 px-4 text-center text-sm text-text-primary",children:T.impact}),s.jsx("td",{className:"py-3.5 px-4 text-center",children:s.jsx("span",{className:`text-sm font-semibold ${_(T.score)}`,children:T.score})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.owner})]},T.id))})]})})]})]}),e==="legal"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(cE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Cases"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-2xl font-semibold text-text-primary",children:[f.reduce((T,N)=>T+N.value,0).toLocaleString()," SEK"]}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Exposure"})]})]})})]}),s.jsx("div",{className:"space-y-4",children:f.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.title}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.opposing_party})]}),s.jsx(_e,{variant:O(T.status),children:T.status})]}),s.jsx("p",{className:"text-sm text-text-secondary",children:T.description}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:"text-text-secondary",children:["Type: ",T.type]}),s.jsxs("span",{className:"text-text-secondary",children:["Lawyer: ",T.lawyer]}),s.jsxs("span",{className:"text-text-secondary",children:["Opened: ",Nt(T.opened_at)]})]}),T.value>0&&s.jsxs("p",{className:"text-sm font-medium text-danger",children:["Exposure: ",T.value.toLocaleString()," ",T.currency]})]})},T.id))})]}),e==="policies"&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Policies",subtitle:"Corporate policies and procedures"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Policy"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Category"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Version"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Approved"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Review"})]})}),s.jsx("tbody",{children:p.map(T=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ch,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:T.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.category}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.version}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.approved_by||"Not approved"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:Nt(T.review_date)})]},T.id))})]})})]})})]})}function Kue({account:e,onSync:t,onConnect:n}){const r={revolut:"bg-blue-50 border-blue-200",nordea:"bg-red-50 border-red-200",other:"bg-gray-50 border-gray-200"},i={revolut:"🔵",nordea:"🔴",other:"⚪"};return s.jsxs(te,{className:`p-5 ${r[e.bank]} border`,children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-white flex items-center justify-center text-xl shadow-sm",children:i[e.bank]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900",children:e.name}),s.jsx("p",{className:"text-sm text-gray-500",children:e.accountNumber}),e.iban&&s.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:["IBAN: ",e.iban]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:e.apiConnected?s.jsx("button",{onClick:()=>t(e.id),className:"p-2 rounded-lg bg-white hover:bg-gray-50 text-green-600 transition-colors",title:"Synka nu",children:s.jsx(Da,{size:16})}):s.jsx("button",{onClick:()=>n(e.id),className:"p-2 rounded-lg bg-white hover:bg-gray-50 text-gray-400 hover:text-blue-600 transition-colors",title:"Koppla API",children:s.jsx(QH,{size:16})})})]}),s.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200/60",children:[s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Saldo"}),s.jsx("span",{className:"text-2xl font-bold text-gray-900",children:e.balance.toLocaleString("sv-SE",{style:"currency",currency:e.currency})})]}),e.lastSync&&s.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Senast synkad: ",new Date(e.lastSync).toLocaleString("sv-SE")]}),e.apiConnected&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-green-600 mt-2",children:[s.jsx(JH,{size:12}),"API kopplad"]})]})]})}function Yue({transactions:e,onMatch:t}){return s.jsx("div",{className:"space-y-2",children:e.map(n=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-white border border-gray-100 hover:border-gray-200 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${n.type==="credit"?"bg-green-50 text-green-600":"bg-red-50 text-red-600"}`,children:n.type==="credit"?s.jsx(BH,{size:16}):s.jsx(Y1,{size:16})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:n.description}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("span",{children:n.date}),n.counterparty&&s.jsxs("span",{children:["• ",n.counterparty]}),n.category&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-gray-100",children:n.category})]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:`text-sm font-semibold ${n.type==="credit"?"text-green-600":"text-red-600"}`,children:[n.type==="credit"?"+":"-",Math.abs(n.amount).toLocaleString("sv-SE",{style:"currency",currency:n.currency})]}),n.matchedJournalEntryId?s.jsxs("span",{className:"text-xs text-green-600 flex items-center gap-1 justify-end mt-1",children:[s.jsx(jr,{size:10}),"Bokförd"]}):t&&s.jsx("button",{onClick:()=>t(n.id),className:"text-xs text-blue-600 hover:text-blue-700 mt-1",children:"Matcha med verifikat"})]})]},n.id))})}function Xue({accountId:e,accountName:t,onUpload:n}){const[r,i]=M.useState(!1),[l,c]=M.useState(null),d=M.useRef(null),f=w=>{w.preventDefault(),i(!0)},h=()=>{i(!1)},p=w=>{w.preventDefault(),i(!1);const S=w.dataTransfer.files[0];S&&c(S)},x=w=>{var v;const S=(v=w.target.files)==null?void 0:v[0];S&&c(S)},y=()=>{l&&(n(l,e),c(null))},j=w=>w.endsWith(".csv")?s.jsx(KH,{size:24,className:"text-green-600"}):w.endsWith(".pdf")?s.jsx(jr,{size:24,className:"text-red-600"}):s.jsx(jr,{size:24,className:"text-gray-600"});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h4",{className:"font-medium text-gray-900",children:["Ladda upp kontoutdrag - ",t]}),l?s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[j(l.name),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:l.name}),s.jsxs("p",{className:"text-xs text-gray-500",children:[(l.size/1024).toFixed(1)," KB"]})]})]}),s.jsx("button",{onClick:()=>c(null),className:"p-1 rounded hover:bg-gray-100 text-gray-400",children:s.jsx(Ua,{size:16})})]}),s.jsx("button",{onClick:y,className:"w-full mt-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium",children:"Importera kontoutrag"})]}):s.jsxs("div",{onDragOver:f,onDragLeave:h,onDrop:p,onClick:()=>{var w;return(w=d.current)==null?void 0:w.click()},className:`border-2 border-dashed rounded-xl p-8 text-center cursor-pointer transition-colors ${r?"border-blue-400 bg-blue-50":"border-gray-300 hover:border-gray-400 bg-gray-50"}`,children:[s.jsx(J1,{size:32,className:"mx-auto text-gray-400 mb-3"}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Dra och släpp fil här, eller ",s.jsx("span",{className:"text-blue-600",children:"klicka för att välja"})]}),s.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"Stödjer CSV, PDF, XLSX"}),s.jsx("input",{ref:d,type:"file",accept:".csv,.pdf,.xlsx",onChange:x,className:"hidden"})]})]})}const fs=[{id:"revolut-main",name:"Revolut Business",bank:"revolut",accountNumber:"1234 5678 9012 3456",iban:"GB29 NWBK 6016 1331 9268 19",currency:"SEK",balance:125430.5,status:"active",lastSync:"2026-08-08T22:00:00Z",apiConnected:!1},{id:"nordea-checking",name:"Nordea Företagskonto",bank:"nordea",accountNumber:"3456 7890 1234 5678",iban:"SE45 5000 0000 0583 9825 7466",currency:"SEK",balance:89200,status:"active",lastSync:"2026-08-08T22:00:00Z",apiConnected:!1},{id:"nordea-savings",name:"Nordea Sparkonto",bank:"nordea",accountNumber:"9876 5432 1098 7654",currency:"SEK",balance:25e4,status:"active",apiConnected:!1}],gR=[{id:"tx-001",accountId:"revolut-main",date:"2026-08-08",description:"Atlas Capture AB - Månadsavgift",amount:-299,currency:"SEK",type:"debit",category:"Programvara",counterparty:"Atlas Capture AB",importedFrom:"manual"},{id:"tx-002",accountId:"revolut-main",date:"2026-08-07",description:"Kundbetalning - Faktura #1001",amount:15e3,currency:"SEK",type:"credit",category:"Försäljning",counterparty:"Kund AB",importedFrom:"manual"},{id:"tx-003",accountId:"nordea-checking",date:"2026-08-06",description:"Lön - Johan Berglund",amount:-45e3,currency:"SEK",type:"debit",category:"Lönekostnad",counterparty:"Johan Berglund",importedFrom:"manual"},{id:"tx-004",accountId:"nordea-checking",date:"2026-08-05",description:"Hyra kontor - Wavult Group",amount:-8500,currency:"SEK",type:"debit",category:"Lokalhyra",counterparty:"Wavult Group",importedFrom:"manual"}],Wue=[{id:"stmt-001",accountId:"revolut-main",fileName:"revolut_2026-07.csv",fileType:"csv",uploadDate:"2026-08-01T10:00:00Z",periodStart:"2026-07-01",periodEnd:"2026-07-31",transactionCount:45,status:"completed"},{id:"stmt-002",accountId:"nordea-checking",fileName:"nordea_juli_2026.pdf",fileType:"pdf",uploadDate:"2026-08-02T14:30:00Z",periodStart:"2026-07-01",periodEnd:"2026-07-31",transactionCount:32,status:"completed"}];function Zue(){var E;const[e,t]=M.useState("banks"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState(!0),[f,h]=M.useState(""),[p,x]=M.useState(null),[y,j]=M.useState(!1);M.useEffect(()=>{w()},[]);async function w(){d(!0),h("");try{const[k,R]=await Promise.all([dG.entries(),ms.accounts()]);r(k.entries||[]),l(R.accounts||[])}catch(k){h(k instanceof Error?k.message:"Failed to load data")}finally{d(!1)}}const S=k=>{alert(`Synkar konto ${k}... (API-koppling krävs)`)},v=k=>{alert(`Kopplar API för konto ${k}...`)},A=(k,R)=>{alert(`Laddar upp ${k.name} för konto ${R}...`)},O=k=>{alert(`Matchar transaktion ${k} med verifikat...`)};if(c)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[400px]"})]});if(f)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:f})});const _=n.filter(k=>k.status==="posted").length;i.reduce((k,R)=>k+R.balance,0);const T=fs.reduce((k,R)=>k+R.balance,0),N=[{id:"banks",label:"Bankkonton",icon:qa},{id:"transactions",label:"Transaktioner",icon:qH},{id:"ledger",label:"Huvudbok",icon:Ch},{id:"accounts",label:"Konton",icon:vr}];return s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Accounting"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Bankkoppling, dubbel bokföring — riktig data från aamos-ledger"})]})}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(qa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Bankkonton"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:fs.length})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Banktotalt"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Te(T)})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Ch,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Verifikat"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:n.length})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Bokfört"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_})]})]})})]}),s.jsx("div",{className:"border-b border-border",children:s.jsx("div",{className:"flex gap-1",children:N.map(k=>{const R=k.icon;return s.jsxs("button",{onClick:()=>t(k.id),className:`flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-t-lg transition-colors ${e===k.id?"text-primary bg-primary-light border-b-2 border-primary":"text-text-secondary hover:text-text-primary hover:bg-bg"}`,children:[s.jsx(R,{size:16}),k.label]},k.id)})})}),e==="banks"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Bankkonton"}),s.jsxs("button",{onClick:()=>j(!y),className:"flex items-center gap-2 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors text-sm",children:[s.jsx(J1,{size:16}),"Ladda upp kontoutdrag"]})]}),y&&s.jsx(te,{className:"p-6",children:s.jsx(Xue,{accountId:p||fs[0].id,accountName:((E=fs.find(k=>k.id===(p||fs[0].id)))==null?void 0:E.name)||"",onUpload:A})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:fs.map(k=>s.jsx(Kue,{account:k,onSync:S,onConnect:v},k.id))}),s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(XH,{size:18,className:"text-text-secondary"}),s.jsx("h3",{className:"font-semibold text-text-primary",children:"Importerade kontoutdrag"})]}),s.jsx("div",{className:"space-y-2",children:Wue.map(k=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border hover:border-primary/30 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary-light flex items-center justify-center text-primary",children:s.jsx(J1,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:k.fileName}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[k.periodStart," — ",k.periodEnd," • ",k.transactionCount," transaktioner"]})]})]}),s.jsx(_e,{variant:k.status==="completed"?"default":"warning",children:k.status==="completed"?"Klart":"Bearbetar"})]},k.id))})]})]}),e==="transactions"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Senaste transaktioner"}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("select",{value:p||"",onChange:k=>x(k.target.value||null),className:"px-3 py-2 rounded-lg border border-border bg-white text-sm",children:[s.jsx("option",{value:"",children:"Alla konton"}),fs.map(k=>s.jsx("option",{value:k.id,children:k.name},k.id))]})})]}),s.jsx(Yue,{transactions:p?gR.filter(k=>k.accountId===p):gR,onMatch:O})]}),e==="ledger"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Huvudbok"}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Ver.nr"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Beskrivning"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Datum"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:n.map(k=>s.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[s.jsx("td",{className:"px-4 py-3 text-sm font-medium text-text-primary",children:k.entry_number}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:k.description}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:Nt(k.entry_date)}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:k.period}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(_e,{variant:k.status==="posted"?"default":"warning",children:k.status==="posted"?"Bokförd":"Utkast"})})]},k.id))})]})})})]}),e==="accounts"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Konton"}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Kod"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Namn"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Typ"}),s.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Saldo"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:i.map(k=>s.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[s.jsx("td",{className:"px-4 py-3 text-sm font-medium text-text-primary",children:k.code}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:k.name}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:k.type}),s.jsx("td",{className:"px-4 py-3 text-sm text-right font-medium text-text-primary",children:Te(k.balance)})]},k.code))})]})})})]})]})}function vR({isOpen:e,onClose:t,replyTo:n,onSent:r}){const[i,l]=M.useState(n?A(n.from):""),[c,d]=M.useState(n?`Re: ${n.subject.replace(/^Re: /i,"")}`:""),[f,h]=M.useState(n?`
|
||
|
||
---
|
||
${n.body.substring(0,500)}`:""),[p,x]=M.useState(!1),[y,j]=M.useState(!1),[w,S]=M.useState([]),v=M.useRef(null);if(!e)return null;function A(N){const E=N.match(/<([^>]+)>/);return E?E[1]:N}async function O(){if(!(!i||!c||!f)){x(!0);try{const N=localStorage.getItem("amos_token"),k=await(await fetch("/api/v1/mail/send",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${N}`},body:JSON.stringify({to:[i],subject:c,body:f,reply_to:n==null?void 0:n.from})})).json();k.ok?(l(""),d(""),h(""),S([]),r==null||r(),t()):alert(k.error||"Failed to send")}catch{alert("Failed to send email")}finally{x(!1)}}}async function _(){if(f.trim()){j(!0);try{const N=localStorage.getItem("amos_token"),k=await(await fetch("/api/v1/mail/ai-assist",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${N}`},body:JSON.stringify({context:f,tone:"professional",language:"sv"})})).json();k.ok&&k.improved&&h(k.improved)}catch(N){console.error("AI assist failed:",N)}finally{j(!1)}}}function T(N){N.target.files&&S(Array.from(N.target.files))}return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50",children:s.jsxs(te,{className:"w-full max-w-2xl max-h-[90vh] flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:n?"Svara":"Nytt meddelande"}),s.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Ua,{size:20})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Till"}),s.jsx("input",{type:"email",value:i,onChange:N=>l(N.target.value),className:"w-full h-10 px-3 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"email@example.com"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Ämne"}),s.jsx("input",{type:"text",value:c,onChange:N=>d(N.target.value),className:"w-full h-10 px-3 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Ämne"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Meddelande"}),s.jsx("textarea",{value:f,onChange:N=>h(N.target.value),rows:12,className:"w-full px-3 py-2 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none",placeholder:"Skriv ditt meddelande..."})]}),w.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-secondary",children:"Bilagor"}),w.map((N,E)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-bg rounded-lg",children:[s.jsx(sE,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:N.name}),s.jsxs("span",{className:"text-xs text-text-secondary",children:["(",(N.size/1024).toFixed(0)," KB)"]})]},E))]})]}),s.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"file",ref:v,onChange:T,multiple:!0,className:"hidden"}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(sE,{size:16}),onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},children:"Bifoga"}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:y?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(H5,{size:16}),onClick:_,disabled:y||!f.trim(),children:"AI-hjälp"})]}),s.jsx(Ye,{icon:p?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(Fm,{size:16}),onClick:O,disabled:p||!i||!c||!f,children:p?"Skickar...":"Skicka"})]})]})})}function Que(){const[e,t]=M.useState([]),[n,r]=M.useState(!0),[i,l]=M.useState(""),[c,d]=M.useState(null),[f,h]=M.useState(0),[p,x]=M.useState([]),[y,j]=M.useState("all"),[w,S]=M.useState(!1),[v,A]=M.useState(!1),[O,_]=M.useState(void 0),{token:T}=ea(),{user:N}=ea(),E=async()=>{try{if(!T)return;const z={Authorization:`Bearer ${T}`},$=await fetch("/api/v1/mail/mailboxes",{headers:z});if($.ok){const L=await $.json();if(L.ok&&L.mailboxes){const K=(N==null?void 0:N.email)||"",H=(N==null?void 0:N.role)||"";let I;K.includes("erik")||H==="ceo"?I=L.mailboxes.filter(F=>F.startsWith("erik@")||F==="info@landvex.com"||F==="invoice@landvex.com"||F==="hello@quixzoom.com"||F==="finance@quixzoom.com"||F==="cfo@aamos.systems"||F.startsWith("recovery@")||F.startsWith("social@")):K.includes("johan")||H==="cto"?I=L.mailboxes.filter(F=>F.startsWith("johan@")||F==="cto@aamos.systems"||F==="info@aamos.systems"||F==="dev@hypbit.com"||F.startsWith("recovery@")||F.startsWith("social@")):I=L.mailboxes,x(I)}}}catch(z){console.error("Failed to fetch mailboxes:",z)}},k=async()=>{r(!0),l("");try{if(!T){l("Please log in to access mail"),t([]),h(0);return}const z={Authorization:`Bearer ${T}`},[$,L]=await Promise.all([fetch("/api/v1/mail/inbox?limit=50",{headers:z}),fetch("/api/v1/mail/unread-count",{headers:z})]),K=await $.json();if($.status===503){l(K.error||"Mail integration not configured"),t([]),h(0);return}if(!$.ok){if($.status===401){l("Please log in to access mail"),t([]),h(0);return}throw new Error(K.error||"Failed to fetch inbox")}if(K.ok&&t(K.messages||[]),L.ok){const H=await L.json();H.ok&&h(H.count||0)}}catch(z){l(z instanceof Error?z.message:"Failed to load mail")}finally{r(!1)}};M.useEffect(()=>{E(),k()},[]);const R=async z=>{try{if(!T)return;const $={Authorization:`Bearer ${T}`};await fetch(`/api/v1/mail/message/${z}/read`,{method:"POST",headers:$}),t(L=>L.map(K=>K.uid===z?{...K,read:!0}:K)),h(L=>Math.max(0,L-1))}catch($){console.error("Failed to mark as read:",$)}},B=z=>{d(z),z.read||R(z.uid)},D=y==="all"?e:e.filter(z=>z.to.some($=>$.includes(y)));if(n)return s.jsxs("div",{className:"space-y-4",children:[s.jsx(Re,{className:"h-12"}),Array.from({length:5}).map((z,$)=>s.jsx(Re,{className:"h-20"},$))]});if(i){const z=i.includes("not configured")||i.includes("IMAP"),$=i.includes("log in")||i.includes("authorization")||i.includes("missing authorization");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md px-4",children:z?s.jsxs(s.Fragment,{children:[s.jsx(hg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Mail not configured"}),s.jsx("p",{className:"text-text-secondary mb-4",children:i}),s.jsx("p",{className:"text-sm text-text-tertiary",children:"Contact your administrator to set up IMAP integration."})]}):$?s.jsxs(s.Fragment,{children:[s.jsx(Bf,{size:48,className:"mx-auto text-warning mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Authentication required"}),s.jsx("p",{className:"text-text-secondary mb-4",children:i}),s.jsx("button",{onClick:()=>window.location.href="/login",className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:"Log in"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Bf,{size:48,className:"mx-auto text-danger mb-4"}),s.jsx("p",{className:"text-danger mb-4",children:i}),s.jsxs("button",{onClick:k,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:[s.jsx(Da,{size:16}),"Retry"]})]})})})}return c?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("button",{onClick:()=>d(null),className:"p-2 hover:bg-surface rounded-lg",children:"← Back"}),s.jsx(Ye,{icon:s.jsx(oF,{size:16}),onClick:()=>{_(c),A(!0)},children:"Svara"})]}),s.jsx(te,{children:s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:c.subject}),s.jsxs("p",{className:"text-sm text-text-secondary",children:["From: ",c.from]}),s.jsxs("p",{className:"text-sm text-text-secondary",children:["To: ",c.to.join(", ")]}),s.jsx("p",{className:"text-sm text-text-secondary",children:Nt(c.date)})]}),!c.read&&s.jsx(_e,{variant:"primary",children:"New"})]}),s.jsx("div",{className:"border-t border-border-subtle pt-4",children:s.jsx("p",{className:"text-text-primary whitespace-pre-wrap",children:c.body})})]})}),s.jsx(vR,{isOpen:v,onClose:()=>{A(!1),_(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{k()}})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Mail"}),s.jsx(Ye,{icon:s.jsx(Fm,{size:16}),onClick:()=>{_(void 0),A(!0)},children:"Nytt meddelande"})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>S(!w),className:"w-full flex items-center justify-between p-3 bg-surface rounded-lg border border-border hover:border-border-hover transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{size:18,className:"text-text-secondary"}),s.jsx("span",{className:"font-medium",children:y==="all"?"All Mailboxes":y})]}),s.jsx(dS,{size:18,className:`text-text-secondary transition-transform ${w?"rotate-180":""}`})]}),w&&s.jsxs("div",{className:"absolute top-full left-0 right-0 mt-1 bg-surface border border-border rounded-lg shadow-lg z-50 max-h-64 overflow-y-auto",children:[s.jsx("button",{onClick:()=>{j("all"),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y==="all"?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bf,{size:16}),s.jsx("span",{children:"All Mailboxes"}),s.jsx(_e,{variant:"default",className:"ml-auto",children:e.length})]})}),p.map(z=>s.jsx("button",{onClick:()=>{j(z),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y===z?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{size:16}),s.jsx("span",{className:"text-sm",children:z})]})},z))]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bf,{size:18,className:"text-text-secondary"}),s.jsxs("span",{className:"text-sm text-text-secondary",children:[D.length," messages"]})]}),f>0&&s.jsxs(_e,{variant:"primary",children:[f," unread"]})]}),s.jsx("button",{onClick:k,className:"p-2 hover:bg-surface rounded-lg transition-colors",title:"Refresh",children:s.jsx(Da,{size:18,className:"text-text-secondary"})})]}),s.jsx("div",{className:"space-y-2",children:D.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(hg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("p",{className:"text-text-secondary",children:"No messages"})]}):D.map(z=>s.jsx("button",{onClick:()=>B(z),className:`w-full text-left p-4 rounded-lg border transition-colors hover:bg-surface-hover ${z.read?"bg-surface border-border-subtle":"bg-surface border-border hover:border-border-hover"}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-1",children:z.read?s.jsx(hg,{size:18,className:"text-text-tertiary"}):s.jsx(An,{size:18,className:"text-accent"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[!z.read&&s.jsx(_e,{variant:"primary",className:"shrink-0",children:"New"}),s.jsx("span",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.from}),s.jsx("span",{className:"text-text-tertiary text-sm shrink-0",children:Nt(z.date)})]}),s.jsx("p",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.subject}),s.jsx("p",{className:"text-sm text-text-tertiary truncate",children:z.preview}),z.attachments>0&&s.jsx("div",{className:"flex items-center gap-1 mt-1",children:s.jsxs("span",{className:"text-xs text-text-tertiary",children:[z.attachments," attachment",z.attachments>1?"s":""]})})]})]})},z.uid))}),s.jsx(vR,{isOpen:v,onClose:()=>{A(!1),_(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{k()}})]})}function Jue(){const[e,t]=M.useState({email:"erik@aamos.systems",password:"",server:"mail.aamos.systems",port:993,useTLS:!0}),[n,r]=M.useState(!1),[i,l]=M.useState(!1),[c,d]=M.useState("idle"),[f,h]=M.useState(""),p=async()=>{r(!0),d("idle");try{(await fetch("/api/v1/mail/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok?(d("success"),h("Mail configuration saved successfully")):(d("error"),h("Failed to save configuration"))}catch{d("error"),h("Network error")}finally{r(!1)}},x=async()=>{l(!0),d("idle");try{const j=await(await fetch("/api/v1/mail/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();j.ok?(d("success"),h(`Connection successful! ${j.messageCount||0} unread messages.`)):(d("error"),h(j.error||"Connection failed"))}catch{d("error"),h("Network error")}finally{l(!1)}};return s.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(An,{size:24,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Mail Settings"}),s.jsx("p",{className:"text-text-secondary",children:"Connect your IMAP inbox"})]})]}),c!=="idle"&&s.jsxs("div",{className:`p-4 rounded-xl flex items-center gap-3 ${c==="success"?"bg-success-light text-success":"bg-danger-light text-danger"}`,children:[c==="success"?s.jsx(VH,{size:20}):s.jsx(Zr,{size:20}),s.jsx("p",{children:f})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"IMAP Configuration",subtitle:"Enter your mail credentials"}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Email Address"}),s.jsxs("select",{className:"w-full h-10 px-3 rounded-xl border border-border bg-surface text-text-primary",value:e.email,onChange:y=>t({...e,email:y.target.value}),children:[s.jsx("option",{value:"erik@aamos.systems",children:"erik@aamos.systems"}),s.jsx("option",{value:"erik@landvex.com",children:"erik@landvex.com"}),s.jsx("option",{value:"erik@wavult.com",children:"erik@wavult.com"}),s.jsx("option",{value:"erik@hypbit.com",children:"erik@hypbit.com"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Password"}),s.jsx(_s,{type:"password",placeholder:"Enter your mail password",value:e.password,onChange:y=>t({...e,password:y.target.value})}),s.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Don't remember your password? Contact your admin to reset it."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Server"}),s.jsxs("div",{className:"relative",children:[s.jsx(Rh,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary"}),s.jsx(_s,{className:"pl-10",value:e.server,onChange:y=>t({...e,server:y.target.value})})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Port"}),s.jsx(_s,{type:"number",value:e.port,onChange:y=>t({...e,port:parseInt(y.target.value)||993})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-bg rounded-xl",children:[s.jsx(za,{size:20,className:"text-primary"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium",children:"Use TLS/SSL"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Encrypt connection to mail server"})]}),s.jsx("button",{onClick:()=>t({...e,useTLS:!e.useTLS}),className:`w-12 h-7 rounded-full transition-colors ${e.useTLS?"bg-primary":"bg-text-tertiary"}`,children:s.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${e.useTLS?"translate-x-6":"translate-x-1"}`})})]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Forgot Password?",subtitle:"Reset your mail password"}),s.jsx("div",{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(ZH,{size:24,className:"text-warning shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-text-secondary mb-3",children:"If you've forgotten your mail password, you can reset it through the Mailu admin panel or contact your system administrator."}),s.jsx("a",{href:"https://mail.aamos.systems/admin",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm",children:"Open Mailu Admin →"})]})]})})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx(Ye,{onClick:x,disabled:i||!e.email||!e.password,variant:"secondary",className:"flex-1",children:i?"Testing...":"Test Connection"}),s.jsx(Ye,{onClick:p,disabled:n||!e.email||!e.password,className:"flex-1",children:n?"Saving...":"Save Configuration"})]})]})}const bR={instagram:s.jsx(z5,{size:20}),twitter:s.jsx(fF,{size:20}),facebook:s.jsx(R5,{size:20}),linkedin:s.jsx(L5,{size:20}),tiktok:s.jsx(gn,{size:20})},jR={instagram:"bg-gradient-to-br from-purple-500 to-pink-500",twitter:"bg-blue-500",facebook:"bg-blue-600",linkedin:"bg-blue-700",tiktok:"bg-black"};function ede(){var j,w,S;const[e,t]=M.useState([]),[n,r]=M.useState([]),[i,l]=M.useState(null),[c,d]=M.useState(!0),[f,h]=M.useState(""),[p,x]=M.useState("accounts");M.useEffect(()=>{y()},[]);async function y(){d(!0),h("");try{const A=await(await fetch("/api/v1/social/accounts")).json();A.ok&&t(A.accounts||[]);const _=await(await fetch("/api/v1/social/stats")).json();_.ok&&l(_.stats);const N=await(await fetch("/api/v1/social/posts")).json();N.ok&&r(N.posts||[])}catch(v){h(v instanceof Error?v.message:"Failed to load data")}finally{d(!1)}}return c?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{className:"h-[400px]"})]}):f?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:f})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Social Media"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Hantera alla sociala media-konton"})]}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"Add Account"})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((j=i==null?void 0:i.total_followers)==null?void 0:j.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Followers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(xh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((w=i==null?void 0:i.total_posts)==null?void 0:w.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Posts"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(aE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((S=i==null?void 0:i.total_engagement)==null?void 0:S.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Engagement"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-info-light flex items-center justify-center text-info",children:s.jsx(gn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:(i==null?void 0:i.accounts)||0}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Accounts"})]})]})})]}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:["accounts","posts","analytics"].map(v=>s.jsx("button",{onClick:()=>x(v),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${p===v?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))}),p==="accounts"&&s.jsx("div",{className:"space-y-4",children:e.length===0?s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(gn,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Inga konton kopplade"}),s.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Lägg till dina sociala media-konton för att se statistik och hantera inlägg"}),s.jsx(Ye,{icon:s.jsx(Br,{size:16}),children:"Add First Account"})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:e.map(v=>s.jsxs(te,{className:"relative",children:[s.jsxs("div",{className:"flex items-start justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-12 h-12 rounded-xl ${jR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white`,children:bR[v.platform]||s.jsx(gn,{size:20})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-text-primary",children:v.display_name||v.account_name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["@",v.account_name]})]})]}),s.jsx(_e,{variant:v.is_connected?"success":"default",children:v.is_connected?"Connected":"Disconnected"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.followers.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Followers"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.following.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Following"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.posts.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Posts"})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:["Last synced: ",v.last_synced?new Date(v.last_synced).toLocaleDateString():"Never"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",onClick:()=>window.open(v.profile_url,"_blank"),children:s.jsx(FH,{size:16})}),s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Da,{size:16})})]})]})]},v.id))})}),p==="posts"&&s.jsx("div",{className:"space-y-4",children:n.length===0?s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(xh,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Inga inlägg än"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Inlägg visas här när du har kopplat konton"})]}):s.jsx("div",{className:"space-y-4",children:n.map(v=>s.jsx(te,{children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`w-10 h-10 rounded-lg ${jR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white flex-shrink-0`,children:bR[v.platform]||s.jsx(gn,{size:16})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm text-text-primary mb-2",children:v.content}),v.media_url&&s.jsx("img",{src:v.media_url,alt:"Post media",className:"rounded-lg max-h-48 object-cover mb-3"}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(aE,{size:14}),v.likes]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(xh,{size:14}),v.comments]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(pS,{size:14}),v.shares]}),s.jsxs("span",{children:[v.reach.toLocaleString()," reach"]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:new Date(v.posted_at).toLocaleDateString()})]})]})]})},v.id))})}),p==="analytics"&&s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(Da,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Analytics kommer snart"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Detaljerad analys av dina sociala media-kanaler"})]})]})}function tde(){const[e,t]=M.useState([{id:"1",role:"assistant",content:`Hej! Jag är Alva, din AI-assistent. Jag kan hjälpa dig med:
|
||
|
||
• Analysera data och rapporter
|
||
• Skriva och granska avtal
|
||
• Besvara frågor om BOC
|
||
• Hjälpa med email och kommunikation
|
||
• Ge råd om affärsbeslut
|
||
|
||
Vad kan jag hjälpa dig med idag?`,timestamp:new Date}]),[n,r]=M.useState(""),[i,l]=M.useState(!1),c=M.useRef(null),d=()=>{var p;(p=c.current)==null||p.scrollIntoView({behavior:"smooth"})};M.useEffect(()=>{d()},[e]);const f=async()=>{if(!n.trim())return;const p={id:Date.now().toString(),role:"user",content:n,timestamp:new Date};t(x=>[...x,p]),r(""),l(!0),setTimeout(()=>{const x={id:(Date.now()+1).toString(),role:"assistant",content:h(n),timestamp:new Date};t(y=>[...y,x]),l(!1)},1500)},h=p=>{const x=p.toLowerCase();return x.includes("hej")||x.includes("hallå")?"Hej! Vad kan jag hjälpa dig med?":x.includes("avtal")||x.includes("kontrakt")?"Jag kan hjälpa dig att granska avtal, skapa nya mallar, eller analysera befintliga kontrakt. Vill du att jag tittar på ett specifikt avtal?":x.includes("mail")||x.includes("email")?"Jag kan hjälpa dig att skriva professionella mail, förbättra befintliga utkast, eller analysera inkommande meddelanden. Vad behöver du hjälp med?":x.includes("rapport")||x.includes("analys")?"Jag kan analysera data, skapa rapporter, eller hjälpa dig tolka finansiella siffror. Vilken typ av analys behöver du?":"Jag förstår. Jag kan hjälpa dig med detta. Kan du ge mig mer kontext eller specificera vad du vill ha hjälp med?"};return s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(Ei,{size:20,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Alva"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Din AI-assistent"})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto space-y-4 mb-4 pr-2",children:[e.map(p=>s.jsxs("div",{className:`flex gap-3 ${p.role==="user"?"flex-row-reverse":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 ${p.role==="assistant"?"bg-primary/10 text-primary":"bg-surface text-text-secondary"}`,children:p.role==="assistant"?s.jsx(Ei,{size:16}):s.jsx(mu,{size:16})}),s.jsx(te,{className:`max-w-[80%] ${p.role==="user"?"bg-primary text-white":""}`,padding:"sm",children:s.jsx("p",{className:"text-sm whitespace-pre-wrap",children:p.content})})]},p.id)),i&&s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Ei,{size:16,className:"text-primary"})}),s.jsx(te,{className:"max-w-[80%]",padding:"sm",children:s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary",children:[s.jsx(Ph,{size:16,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Tänker..."})]})})]}),s.jsx("div",{ref:c})]}),s.jsxs("div",{className:"flex gap-2 pt-4 border-t border-border",children:[s.jsx(_s,{value:n,onChange:p=>r(p.target.value),onKeyDown:p=>p.key==="Enter"&&f(),placeholder:"Skriv ett meddelande...",className:"flex-1"}),s.jsx(Ye,{icon:i?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(Fm,{size:16}),onClick:f,disabled:i||!n.trim(),children:"Skicka"})]})]})}function nde(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Project management coming soon..."})})]})}function rde({children:e}){const{isAuthenticated:t}=ea();return t?s.jsx(s.Fragment,{children:e}):s.jsx(Cw,{to:"/login",replace:!0})}function ade({children:e}){const{isAuthenticated:t}=ea();return t?s.jsx(Cw,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:e})}function ide(){return s.jsxs(ZI,{children:[s.jsx(wt,{path:"/login",element:s.jsx(ade,{children:s.jsx(fG,{})})}),s.jsxs(wt,{element:s.jsx(rde,{children:s.jsx(lG,{})}),children:[s.jsx(wt,{path:"/",element:s.jsx(AG,{})}),s.jsx(wt,{path:"/dashboard",element:s.jsx(gG,{})}),s.jsx(wt,{path:"/crm",element:s.jsx(CG,{})}),s.jsx(wt,{path:"/sales",element:s.jsx(xue,{})}),s.jsx(wt,{path:"/finance",element:s.jsx(gue,{})}),s.jsx(wt,{path:"/hr",element:s.jsx(jue,{})}),s.jsx(wt,{path:"/legal",element:s.jsx(wue,{})}),s.jsx(wt,{path:"/marketing",element:s.jsx(Due,{})}),s.jsx(wt,{path:"/support",element:s.jsx(Lue,{})}),s.jsx(wt,{path:"/projects",element:s.jsx(nde,{})}),s.jsx(wt,{path:"/automation",element:s.jsx(Uue,{})}),s.jsx(wt,{path:"/amos",element:s.jsx(Vue,{})}),s.jsx(wt,{path:"/quixzoom",element:s.jsx(Hue,{})}),s.jsx(wt,{path:"/landvex",element:s.jsx(Fue,{})}),s.jsx(wt,{path:"/compliance",element:s.jsx(Gue,{})}),s.jsx(wt,{path:"/accounting",element:s.jsx(Zue,{})}),s.jsx(wt,{path:"/mail",element:s.jsx(Que,{})}),s.jsx(wt,{path:"/mail/settings",element:s.jsx(Jue,{})}),s.jsx(wt,{path:"/social",element:s.jsx(ede,{})}),s.jsx(wt,{path:"/alva",element:s.jsx(tde,{})}),s.jsx(wt,{path:"/profile",element:s.jsx(_G,{})})]}),s.jsx(wt,{path:"*",element:s.jsx(Cw,{to:"/",replace:!0})})]})}"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});XB.createRoot(document.getElementById("root")).render(s.jsx(M.StrictMode,{children:s.jsx(wq,{children:s.jsx(ide,{})})}));
|