@wraps.dev/cli 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3471 -1923
- package/dist/cli.js.map +1 -1
- package/dist/console/assets/index-B8Dwj3Ia.css +1 -0
- package/dist/console/assets/index-C-_YbUR8.js +497 -0
- package/dist/console/index.html +2 -2
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/event-processor/index.mjs +1 -0
- package/dist/lambda/inbound-processor/.bundled +1 -0
- package/dist/lambda/inbound-processor/index.mjs +75 -0
- package/dist/lambda/inbound-processor/index.ts +234 -0
- package/dist/lambda/sms-event-processor/.bundled +1 -1
- package/dist/lambda/sms-event-processor/index.mjs +1 -0
- package/package.json +4 -6
- package/dist/console/assets/index-BkjyJsJy.js +0 -476
- package/dist/console/assets/index-C0PNzmYT.css +0 -1
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
var EU=Object.defineProperty;var _U=(e,t,n)=>t in e?EU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fb=(e,t,n)=>_U(e,typeof t!="symbol"?t+"":t,n);function NU(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var db={exports:{}},gu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var U2;function AU(){if(U2)return gu;U2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return gu.Fragment=t,gu.jsx=n,gu.jsxs=n,gu}var H2;function CU(){return H2||(H2=1,db.exports=AU()),db.exports}var c=CU(),hb={exports:{}},Be={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var F2;function TU(){if(F2)return Be;F2=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"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function b($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,x={};function E($,Y,q){this.props=$,this.context=Y,this.refs=x,this.updater=q||O}E.prototype.isReactComponent={},E.prototype.setState=function($,Y){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,Y,"setState")},E.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function N(){}N.prototype=E.prototype;function _($,Y,q){this.props=$,this.context=Y,this.refs=x,this.updater=q||O}var C=_.prototype=new N;C.constructor=_,S(C,E.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z($,Y,q){var U=q.ref;return{$$typeof:e,type:$,key:Y,ref:U!==void 0?U:null,props:q}}function G($,Y){return z($.type,Y,$.props)}function L($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function F($){var Y={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(q){return Y[q]})}var W=/\/+/g;function Q($,Y){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):Y.toString(36)}function X($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(M,M):($.status="pending",$.then(function(Y){$.status==="pending"&&($.status="fulfilled",$.value=Y)},function(Y){$.status==="pending"&&($.status="rejected",$.reason=Y)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function k($,Y,q,U,ne){var fe=typeof $;(fe==="undefined"||fe==="boolean")&&($=null);var ie=!1;if($===null)ie=!0;else switch(fe){case"bigint":case"string":case"number":ie=!0;break;case"object":switch($.$$typeof){case e:case t:ie=!0;break;case v:return ie=$._init,k(ie($._payload),Y,q,U,ne)}}if(ie)return ne=ne($),ie=U===""?"."+Q($,0):U,A(ne)?(q="",ie!=null&&(q=ie.replace(W,"$&/")+"/"),k(ne,Y,q,"",function(ve){return ve})):ne!=null&&(L(ne)&&(ne=G(ne,q+(ne.key==null||$&&$.key===ne.key?"":(""+ne.key).replace(W,"$&/")+"/")+ie)),Y.push(ne)),1;ie=0;var pe=U===""?".":U+":";if(A($))for(var re=0;re<$.length;re++)U=$[re],fe=pe+Q(U,re),ie+=k(U,Y,q,fe,ne);else if(re=b($),typeof re=="function")for($=re.call($),re=0;!(U=$.next()).done;)U=U.value,fe=pe+Q(U,re++),ie+=k(U,Y,q,fe,ne);else if(fe==="object"){if(typeof $.then=="function")return k(X($),Y,q,U,ne);throw Y=String($),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ie}function H($,Y,q){if($==null)return $;var U=[],ne=0;return k($,U,"","",function(fe){return Y.call(q,fe,ne++)}),U}function B($){if($._status===-1){var Y=$._result;Y=Y(),Y.then(function(q){($._status===0||$._status===-1)&&($._status=1,$._result=q)},function(q){($._status===0||$._status===-1)&&($._status=2,$._result=q)}),$._status===-1&&($._status=0,$._result=Y)}if($._status===1)return $._result.default;throw $._result}var Z=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},le={map:H,forEach:function($,Y,q){H($,function(){Y.apply(this,arguments)},q)},count:function($){var Y=0;return H($,function(){Y++}),Y},toArray:function($){return H($,function(Y){return Y})||[]},only:function($){if(!L($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Be.Activity=m,Be.Children=le,Be.Component=E,Be.Fragment=n,Be.Profiler=i,Be.PureComponent=_,Be.StrictMode=r,Be.Suspense=d,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Be.__COMPILER_RUNTIME={__proto__:null,c:function($){return R.H.useMemoCache($)}},Be.cache=function($){return function(){return $.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function($,Y,q){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var U=S({},$.props),ne=$.key;if(Y!=null)for(fe in Y.key!==void 0&&(ne=""+Y.key),Y)!D.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(U[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)U.children=q;else if(1<fe){for(var ie=Array(fe),pe=0;pe<fe;pe++)ie[pe]=arguments[pe+2];U.children=ie}return z($.type,ne,U)},Be.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:o,_context:$},$},Be.createElement=function($,Y,q){var U,ne={},fe=null;if(Y!=null)for(U in Y.key!==void 0&&(fe=""+Y.key),Y)D.call(Y,U)&&U!=="key"&&U!=="__self"&&U!=="__source"&&(ne[U]=Y[U]);var ie=arguments.length-2;if(ie===1)ne.children=q;else if(1<ie){for(var pe=Array(ie),re=0;re<ie;re++)pe[re]=arguments[re+2];ne.children=pe}if($&&$.defaultProps)for(U in ie=$.defaultProps,ie)ne[U]===void 0&&(ne[U]=ie[U]);return z($,fe,ne)},Be.createRef=function(){return{current:null}},Be.forwardRef=function($){return{$$typeof:u,render:$}},Be.isValidElement=L,Be.lazy=function($){return{$$typeof:v,_payload:{_status:-1,_result:$},_init:B}},Be.memo=function($,Y){return{$$typeof:h,type:$,compare:Y===void 0?null:Y}},Be.startTransition=function($){var Y=R.T,q={};R.T=q;try{var U=$(),ne=R.S;ne!==null&&ne(q,U),typeof U=="object"&&U!==null&&typeof U.then=="function"&&U.then(M,Z)}catch(fe){Z(fe)}finally{Y!==null&&q.types!==null&&(Y.types=q.types),R.T=Y}},Be.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Be.use=function($){return R.H.use($)},Be.useActionState=function($,Y,q){return R.H.useActionState($,Y,q)},Be.useCallback=function($,Y){return R.H.useCallback($,Y)},Be.useContext=function($){return R.H.useContext($)},Be.useDebugValue=function(){},Be.useDeferredValue=function($,Y){return R.H.useDeferredValue($,Y)},Be.useEffect=function($,Y){return R.H.useEffect($,Y)},Be.useEffectEvent=function($){return R.H.useEffectEvent($)},Be.useId=function(){return R.H.useId()},Be.useImperativeHandle=function($,Y,q){return R.H.useImperativeHandle($,Y,q)},Be.useInsertionEffect=function($,Y){return R.H.useInsertionEffect($,Y)},Be.useLayoutEffect=function($,Y){return R.H.useLayoutEffect($,Y)},Be.useMemo=function($,Y){return R.H.useMemo($,Y)},Be.useOptimistic=function($,Y){return R.H.useOptimistic($,Y)},Be.useReducer=function($,Y,q){return R.H.useReducer($,Y,q)},Be.useRef=function($){return R.H.useRef($)},Be.useState=function($){return R.H.useState($)},Be.useSyncExternalStore=function($,Y,q){return R.H.useSyncExternalStore($,Y,q)},Be.useTransition=function(){return R.H.useTransition()},Be.version="19.2.3",Be}var G2;function Tp(){return G2||(G2=1,hb.exports=TU()),hb.exports}var w=Tp();const I=xt(w),Bj=NU({__proto__:null,default:I},[w]);var mb={exports:{}},yu={},pb={exports:{}},vb={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var V2;function MU(){return V2||(V2=1,(function(e){function t(k,H){var B=k.length;k.push(H);e:for(;0<B;){var Z=B-1>>>1,le=k[Z];if(0<i(le,H))k[Z]=H,k[B]=le,B=Z;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var H=k[0],B=k.pop();if(B!==H){k[0]=B;e:for(var Z=0,le=k.length,$=le>>>1;Z<$;){var Y=2*(Z+1)-1,q=k[Y],U=Y+1,ne=k[U];if(0>i(q,B))U<le&&0>i(ne,q)?(k[Z]=ne,k[U]=B,Z=U):(k[Z]=q,k[Y]=B,Z=Y);else if(U<le&&0>i(ne,B))k[Z]=ne,k[U]=B,Z=U;else break e}}return H}function i(k,H){var B=k.sortIndex-H.sortIndex;return B!==0?B:k.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],v=1,m=null,g=3,b=!1,O=!1,S=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function C(k){for(var H=n(h);H!==null;){if(H.callback===null)r(h);else if(H.startTime<=k)r(h),H.sortIndex=H.expirationTime,t(d,H);else break;H=n(h)}}function A(k){if(S=!1,C(k),!O)if(n(d)!==null)O=!0,M||(M=!0,F());else{var H=n(h);H!==null&&X(A,H.startTime-k)}}var M=!1,R=-1,D=5,z=-1;function G(){return x?!0:!(e.unstable_now()-z<D)}function L(){if(x=!1,M){var k=e.unstable_now();z=k;var H=!0;try{e:{O=!1,S&&(S=!1,N(R),R=-1),b=!0;var B=g;try{t:{for(C(k),m=n(d);m!==null&&!(m.expirationTime>k&&G());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,g=m.priorityLevel;var le=Z(m.expirationTime<=k);if(k=e.unstable_now(),typeof le=="function"){m.callback=le,C(k),H=!0;break t}m===n(d)&&r(d),C(k)}else r(d);m=n(d)}if(m!==null)H=!0;else{var $=n(h);$!==null&&X(A,$.startTime-k),H=!1}}break e}finally{m=null,g=B,b=!1}H=void 0}}finally{H?F():M=!1}}}var F;if(typeof _=="function")F=function(){_(L)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Q=W.port2;W.port1.onmessage=L,F=function(){Q.postMessage(null)}}else F=function(){E(L,0)};function X(k,H){R=E(function(){k(e.unstable_now())},H)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(k){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var B=g;g=H;try{return k()}finally{g=B}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(k,H){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var B=g;g=k;try{return H()}finally{g=B}},e.unstable_scheduleCallback=function(k,H,B){var Z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Z+B:Z):B=Z,k){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=B+le,k={id:v++,callback:H,priorityLevel:k,startTime:B,expirationTime:le,sortIndex:-1},B>Z?(k.sortIndex=B,t(h,k),n(d)===null&&k===n(h)&&(S?(N(R),R=-1):S=!0,X(A,B-Z))):(k.sortIndex=le,t(d,k),O||b||(O=!0,M||(M=!0,F()))),k},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(k){var H=g;return function(){var B=g;g=H;try{return k.apply(this,arguments)}finally{g=B}}}})(vb)),vb}var Y2;function RU(){return Y2||(Y2=1,pb.exports=MU()),pb.exports}var gb={exports:{}},bn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var W2;function DU(){if(W2)return bn;W2=1;var e=Tp();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+d+"; 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 o(d,h,v){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:d,containerInfo:h,implementation:v}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,bn.createPortal=function(d,h){var v=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 o(d,h,null,v)},bn.flushSync=function(d){var h=l.T,v=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=v,r.d.f()}},bn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},bn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},bn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var v=h.as,m=u(v,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:b}):v==="script"&&r.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},bn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},bn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,m=u(v,h.crossOrigin);r.d.L(d,v,{crossOrigin:m,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})}},bn.preloadModule=function(d,h){if(typeof d=="string")if(h){var v=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},bn.requestFormReset=function(d){r.d.r(d)},bn.unstable_batchedUpdates=function(d,h){return d(h)},bn.useFormState=function(d,h,v){return l.H.useFormState(d,h,v)},bn.useFormStatus=function(){return l.H.useHostTransitionStatus()},bn.version="19.2.3",bn}var K2;function G4(){if(K2)return gb.exports;K2=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(),gb.exports=DU(),gb.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var X2;function PU(){if(X2)return yu;X2=1;var e=RU(),t=Tp(),n=G4();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)s+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+s+" 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 o(a){var s=a,f=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(f=s.return),a=s.return;while(a)}return s.tag===3?f:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function u(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function d(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var f=a,p=s;;){var y=f.return;if(y===null)break;var j=y.alternate;if(j===null){if(p=y.return,p!==null){f=p;continue}break}if(y.child===j.child){for(j=y.child;j;){if(j===f)return d(y),a;if(j===p)return d(y),s;j=j.sibling}throw Error(r(188))}if(f.return!==p.return)f=y,p=j;else{for(var T=!1,P=y.child;P;){if(P===f){T=!0,f=y,p=j;break}if(P===p){T=!0,p=y,f=j;break}P=P.sibling}if(!T){for(P=j.child;P;){if(P===f){T=!0,f=j,p=y;break}if(P===p){T=!0,p=j,f=y;break}P=P.sibling}if(!T)throw Error(r(189))}}if(f.alternate!==p)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?a:s}function v(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=v(a),s!==null)return s;a=a.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function F(a){return a===null||typeof a!="object"?null:(a=L&&a[L]||a["@@iterator"],typeof a=="function"?a:null)}var W=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===W?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case E:return"Profiler";case x:return"StrictMode";case A:return"Suspense";case M:return"SuspenseList";case z:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case O:return"Portal";case _:return a.displayName||"Context";case N:return(a._context.displayName||"Context")+".Consumer";case C:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return s=a.displayName||null,s!==null?s:Q(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return Q(a(s))}catch{}}return null}var X=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},Z=[],le=-1;function $(a){return{current:a}}function Y(a){0>le||(a.current=Z[le],Z[le]=null,le--)}function q(a,s){le++,Z[le]=a.current,a.current=s}var U=$(null),ne=$(null),fe=$(null),ie=$(null);function pe(a,s){switch(q(fe,s),q(ne,a),q(U,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?f2(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=f2(s),a=d2(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Y(U),q(U,a)}function re(){Y(U),Y(ne),Y(fe)}function ve(a){a.memoizedState!==null&&q(ie,a);var s=U.current,f=d2(s,a.type);s!==f&&(q(ne,a),q(U,f))}function ge(a){ne.current===a&&(Y(U),Y(ne)),ie.current===a&&(Y(ie),hu._currentValue=B)}var oe,ke;function we(a){if(oe===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\n( *(at )?)/);oe=s&&s[1]||"",ke=-1<f.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+oe+a+ke}var ze=!1;function Ze(a,s){if(!a||ze)return"";ze=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var ae=se}Reflect.construct(a,[],he)}else{try{he.call()}catch(se){ae=se}a.call(he.prototype)}}else{try{throw Error()}catch(se){ae=se}(he=a())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&ae&&typeof se.stack=="string")return[se.stack,ae.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=p.DetermineComponentFrameRoot(),T=j[0],P=j[1];if(T&&P){var V=T.split(`
|
|
44
|
+
`),te=P.split(`
|
|
45
|
+
`);for(y=p=0;p<V.length&&!V[p].includes("DetermineComponentFrameRoot");)p++;for(;y<te.length&&!te[y].includes("DetermineComponentFrameRoot");)y++;if(p===V.length||y===te.length)for(p=V.length-1,y=te.length-1;1<=p&&0<=y&&V[p]!==te[y];)y--;for(;1<=p&&0<=y;p--,y--)if(V[p]!==te[y]){if(p!==1||y!==1)do if(p--,y--,0>y||V[p]!==te[y]){var ce=`
|
|
46
|
+
`+V[p].replace(" at new "," at ");return a.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",a.displayName)),ce}while(1<=p&&0<=y);break}}}finally{ze=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?we(f):""}function lt(a,s){switch(a.tag){case 26:case 27:case 5:return we(a.type);case 16:return we("Lazy");case 13:return a.child!==s&&s!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ze(a.type,!1);case 11:return Ze(a.type.render,!1);case 1:return Ze(a.type,!0);case 31:return we("Activity");default:return""}}function tn(a){try{var s="",f=null;do s+=lt(a,f),f=a,a=a.return;while(a);return s}catch(p){return`
|
|
47
|
+
Error generating stack: `+p.message+`
|
|
48
|
+
`+p.stack}}var pt=Object.prototype.hasOwnProperty,dr=e.unstable_scheduleCallback,Yn=e.unstable_cancelCallback,Rt=e.unstable_shouldYield,hr=e.unstable_requestPaint,nn=e.unstable_now,bs=e.unstable_getCurrentPriorityLevel,vo=e.unstable_ImmediatePriority,rd=e.unstable_UserBlockingPriority,go=e.unstable_NormalPriority,_c=e.unstable_LowPriority,Ea=e.unstable_IdlePriority,ad=e.log,vi=e.unstable_setDisableYieldValue,yo=null,On=null;function $r(a){if(typeof ad=="function"&&vi(a),On&&typeof On.setStrictMode=="function")try{On.setStrictMode(yo,a)}catch{}}var gn=Math.clz32?Math.clz32:ta,eg=Math.log,Nc=Math.LN2;function ta(a){return a>>>=0,a===0?32:31-(eg(a)/Nc|0)|0}var xs=256,ws=262144,bo=4194304;function na(a){var s=a&42;if(s!==0)return s;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 Ie(a,s,f){var p=a.pendingLanes;if(p===0)return 0;var y=0,j=a.suspendedLanes,T=a.pingedLanes;a=a.warmLanes;var P=p&134217727;return P!==0?(p=P&~j,p!==0?y=na(p):(T&=P,T!==0?y=na(T):f||(f=P&~a,f!==0&&(y=na(f))))):(P=p&~j,P!==0?y=na(P):T!==0?y=na(T):f||(f=p&~a,f!==0&&(y=na(f)))),y===0?0:s!==0&&s!==y&&(s&j)===0&&(j=y&-y,f=s&-s,j>=f||j===32&&(f&4194048)!==0)?s:y}function At(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function rn(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 yn(){var a=bo;return bo<<=1,(bo&62914560)===0&&(bo=4194304),a}function gi(a){for(var s=[],f=0;31>f;f++)s.push(a);return s}function Dt(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Tn(a,s,f,p,y,j){var T=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var P=a.entanglements,V=a.expirationTimes,te=a.hiddenUpdates;for(f=T&~f;0<f;){var ce=31-gn(f),he=1<<ce;P[ce]=0,V[ce]=-1;var ae=te[ce];if(ae!==null)for(te[ce]=null,ce=0;ce<ae.length;ce++){var se=ae[ce];se!==null&&(se.lane&=-536870913)}f&=~he}p!==0&&xo(a,p,0),j!==0&&y===0&&a.tag!==0&&(a.suspendedLanes|=j&~(T&~s))}function xo(a,s,f){a.pendingLanes|=s,a.suspendedLanes&=~s;var p=31-gn(s);a.entangledLanes|=s,a.entanglements[p]=a.entanglements[p]|1073741824|f&261930}function Mn(a,s){var f=a.entangledLanes|=s;for(a=a.entanglements;f;){var p=31-gn(f),y=1<<p;y&s|a[p]&s&&(a[p]|=s),f&=~y}}function Rn(a,s){var f=s&-s;return f=(f&42)!==0?1:Ss(f),(f&(a.suspendedLanes|s))!==0?0:f}function Ss(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 Ir(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function tg(){var a=H.p;return a!==0?a:(a=window.event,a===void 0?32:k2(a.type))}function QE(a,s){var f=H.p;try{return H.p=a,s()}finally{H.p=f}}var yi=Math.random().toString(36).slice(2),un="__reactFiber$"+yi,Dn="__reactProps$"+yi,js="__reactContainer$"+yi,ng="__reactEvents$"+yi,m8="__reactListeners$"+yi,p8="__reactHandles$"+yi,ZE="__reactResources$"+yi,Ac="__reactMarker$"+yi;function rg(a){delete a[un],delete a[Dn],delete a[ng],delete a[m8],delete a[p8]}function Os(a){var s=a[un];if(s)return s;for(var f=a.parentNode;f;){if(s=f[js]||f[un]){if(f=s.alternate,s.child!==null||f!==null&&f.child!==null)for(a=b2(a);a!==null;){if(f=a[un])return f;a=b2(a)}return s}a=f,f=a.parentNode}return null}function Es(a){if(a=a[un]||a[js]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Cc(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function _s(a){var s=a[ZE];return s||(s=a[ZE]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function an(a){a[Ac]=!0}var JE=new Set,e_={};function wo(a,s){Ns(a,s),Ns(a+"Capture",s)}function Ns(a,s){for(e_[a]=s,a=0;a<s.length;a++)JE.add(s[a])}var v8=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]*$"),t_={},n_={};function g8(a){return pt.call(n_,a)?!0:pt.call(t_,a)?!1:v8.test(a)?n_[a]=!0:(t_[a]=!0,!1)}function id(a,s,f){if(g8(s))if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+f)}}function od(a,s,f){if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+f)}}function _a(a,s,f,p){if(p===null)a.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(s,f,""+p)}}function mr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function r_(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function y8(a,s,f){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,j=p.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return y.call(this)},set:function(T){f=""+T,j.call(this,T)}}),Object.defineProperty(a,s,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(T){f=""+T},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function ag(a){if(!a._valueTracker){var s=r_(a)?"checked":"value";a._valueTracker=y8(a,s,""+a[s])}}function a_(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var f=s.getValue(),p="";return a&&(p=r_(a)?a.checked?"true":"false":a.value),a=p,a!==f?(s.setValue(a),!0):!1}function sd(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 b8=/[\n"\\]/g;function pr(a){return a.replace(b8,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ig(a,s,f,p,y,j,T,P){a.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?a.type=T:a.removeAttribute("type"),s!=null?T==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+mr(s)):a.value!==""+mr(s)&&(a.value=""+mr(s)):T!=="submit"&&T!=="reset"||a.removeAttribute("value"),s!=null?og(a,T,mr(s)):f!=null?og(a,T,mr(f)):p!=null&&a.removeAttribute("value"),y==null&&j!=null&&(a.defaultChecked=!!j),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+mr(P):a.removeAttribute("name")}function i_(a,s,f,p,y,j,T,P){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.type=j),s!=null||f!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){ag(a);return}f=f!=null?""+mr(f):"",s=s!=null?""+mr(s):f,P||s===a.value||(a.value=s),a.defaultValue=s}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=P?a.checked:!!p,a.defaultChecked=!!p,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(a.name=T),ag(a)}function og(a,s,f){s==="number"&&sd(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function As(a,s,f,p){if(a=a.options,s){s={};for(var y=0;y<f.length;y++)s["$"+f[y]]=!0;for(f=0;f<a.length;f++)y=s.hasOwnProperty("$"+a[f].value),a[f].selected!==y&&(a[f].selected=y),y&&p&&(a[f].defaultSelected=!0)}else{for(f=""+mr(f),s=null,y=0;y<a.length;y++){if(a[y].value===f){a[y].selected=!0,p&&(a[y].defaultSelected=!0);return}s!==null||a[y].disabled||(s=a[y])}s!==null&&(s.selected=!0)}}function o_(a,s,f){if(s!=null&&(s=""+mr(s),s!==a.value&&(a.value=s),f==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=f!=null?""+mr(f):""}function s_(a,s,f,p){if(s==null){if(p!=null){if(f!=null)throw Error(r(92));if(X(p)){if(1<p.length)throw Error(r(93));p=p[0]}f=p}f==null&&(f=""),s=f}f=mr(s),a.defaultValue=f,p=a.textContent,p===f&&p!==""&&p!==null&&(a.value=p),ag(a)}function Cs(a,s){if(s){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=s;return}}a.textContent=s}var x8=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 l_(a,s,f){var p=s.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":p?a.setProperty(s,f):typeof f!="number"||f===0||x8.has(s)?s==="float"?a.cssFloat=f:a[s]=(""+f).trim():a[s]=f+"px"}function c_(a,s,f){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var y in s)p=s[y],s.hasOwnProperty(y)&&f[y]!==p&&l_(a,y,p)}else for(var j in s)s.hasOwnProperty(j)&&l_(a,j,s[j])}function sg(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 w8=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"]]),S8=/^[\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 ld(a){return S8.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Na(){}var lg=null;function cg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ts=null,Ms=null;function u_(a){var s=Es(a);if(s&&(a=s.stateNode)){var f=a[Dn]||null;e:switch(a=s.stateNode,s.type){case"input":if(ig(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),s=f.name,f.type==="radio"&&s!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+pr(""+s)+'"][type="radio"]'),s=0;s<f.length;s++){var p=f[s];if(p!==a&&p.form===a.form){var y=p[Dn]||null;if(!y)throw Error(r(90));ig(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(s=0;s<f.length;s++)p=f[s],p.form===a.form&&a_(p)}break e;case"textarea":o_(a,f.value,f.defaultValue);break e;case"select":s=f.value,s!=null&&As(a,!!f.multiple,s,!1)}}}var ug=!1;function f_(a,s,f){if(ug)return a(s,f);ug=!0;try{var p=a(s);return p}finally{if(ug=!1,(Ts!==null||Ms!==null)&&(Kd(),Ts&&(s=Ts,a=Ms,Ms=Ts=null,u_(s),a)))for(s=0;s<a.length;s++)u_(a[s])}}function Tc(a,s){var f=a.stateNode;if(f===null)return null;var p=f[Dn]||null;if(p===null)return null;f=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(r(231,s,typeof f));return f}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fg=!1;if(Aa)try{var Mc={};Object.defineProperty(Mc,"passive",{get:function(){fg=!0}}),window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{fg=!1}var bi=null,dg=null,cd=null;function d_(){if(cd)return cd;var a,s=dg,f=s.length,p,y="value"in bi?bi.value:bi.textContent,j=y.length;for(a=0;a<f&&s[a]===y[a];a++);var T=f-a;for(p=1;p<=T&&s[f-p]===y[j-p];p++);return cd=y.slice(a,1<p?1-p:void 0)}function ud(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function fd(){return!0}function h_(){return!1}function Pn(a){function s(f,p,y,j,T){this._reactName=f,this._targetInst=y,this.type=p,this.nativeEvent=j,this.target=T,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(f=a[P],this[P]=f?f(j):j[P]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?fd:h_,this.isPropagationStopped=h_,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=fd)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=fd)},persist:function(){},isPersistent:fd}),s}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dd=Pn(So),Rc=m({},So,{view:0,detail:0}),j8=Pn(Rc),hg,mg,Dc,hd=m({},Rc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vg,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!==Dc&&(Dc&&a.type==="mousemove"?(hg=a.screenX-Dc.screenX,mg=a.screenY-Dc.screenY):mg=hg=0,Dc=a),hg)},movementY:function(a){return"movementY"in a?a.movementY:mg}}),m_=Pn(hd),O8=m({},hd,{dataTransfer:0}),E8=Pn(O8),_8=m({},Rc,{relatedTarget:0}),pg=Pn(_8),N8=m({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),A8=Pn(N8),C8=m({},So,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),T8=Pn(C8),M8=m({},So,{data:0}),p_=Pn(M8),R8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D8={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"},P8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k8(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=P8[a])?!!s[a]:!1}function vg(){return k8}var $8=m({},Rc,{key:function(a){if(a.key){var s=R8[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=ud(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?D8[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vg,charCode:function(a){return a.type==="keypress"?ud(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?ud(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),I8=Pn($8),L8=m({},hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),v_=Pn(L8),z8=m({},Rc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vg}),B8=Pn(z8),q8=m({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),U8=Pn(q8),H8=m({},hd,{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}),F8=Pn(H8),G8=m({},So,{newState:0,oldState:0}),V8=Pn(G8),Y8=[9,13,27,32],gg=Aa&&"CompositionEvent"in window,Pc=null;Aa&&"documentMode"in document&&(Pc=document.documentMode);var W8=Aa&&"TextEvent"in window&&!Pc,g_=Aa&&(!gg||Pc&&8<Pc&&11>=Pc),y_=" ",b_=!1;function x_(a,s){switch(a){case"keyup":return Y8.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w_(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Rs=!1;function K8(a,s){switch(a){case"compositionend":return w_(s);case"keypress":return s.which!==32?null:(b_=!0,y_);case"textInput":return a=s.data,a===y_&&b_?null:a;default:return null}}function X8(a,s){if(Rs)return a==="compositionend"||!gg&&x_(a,s)?(a=d_(),cd=dg=bi=null,Rs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return g_&&s.locale!=="ko"?null:s.data;default:return null}}var Q8={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 S_(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!Q8[a.type]:s==="textarea"}function j_(a,s,f,p){Ts?Ms?Ms.push(p):Ms=[p]:Ts=p,s=nh(s,"onChange"),0<s.length&&(f=new dd("onChange","change",null,f,p),a.push({event:f,listeners:s}))}var kc=null,$c=null;function Z8(a){i2(a,0)}function md(a){var s=Cc(a);if(a_(s))return a}function O_(a,s){if(a==="change")return s}var E_=!1;if(Aa){var yg;if(Aa){var bg="oninput"in document;if(!bg){var __=document.createElement("div");__.setAttribute("oninput","return;"),bg=typeof __.oninput=="function"}yg=bg}else yg=!1;E_=yg&&(!document.documentMode||9<document.documentMode)}function N_(){kc&&(kc.detachEvent("onpropertychange",A_),$c=kc=null)}function A_(a){if(a.propertyName==="value"&&md($c)){var s=[];j_(s,$c,a,cg(a)),f_(Z8,s)}}function J8(a,s,f){a==="focusin"?(N_(),kc=s,$c=f,kc.attachEvent("onpropertychange",A_)):a==="focusout"&&N_()}function eq(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return md($c)}function tq(a,s){if(a==="click")return md(s)}function nq(a,s){if(a==="input"||a==="change")return md(s)}function rq(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Wn=typeof Object.is=="function"?Object.is:rq;function Ic(a,s){if(Wn(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var f=Object.keys(a),p=Object.keys(s);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var y=f[p];if(!pt.call(s,y)||!Wn(a[y],s[y]))return!1}return!0}function C_(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function T_(a,s){var f=C_(a);a=0;for(var p;f;){if(f.nodeType===3){if(p=a+f.textContent.length,a<=s&&p>=s)return{node:f,offset:s-a};a=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=C_(f)}}function M_(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?M_(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function R_(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=sd(a.document);s instanceof a.HTMLIFrameElement;){try{var f=typeof s.contentWindow.location.href=="string"}catch{f=!1}if(f)a=s.contentWindow;else break;s=sd(a.document)}return s}function xg(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var aq=Aa&&"documentMode"in document&&11>=document.documentMode,Ds=null,wg=null,Lc=null,Sg=!1;function D_(a,s,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Sg||Ds==null||Ds!==sd(p)||(p=Ds,"selectionStart"in p&&xg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Lc&&Ic(Lc,p)||(Lc=p,p=nh(wg,"onSelect"),0<p.length&&(s=new dd("onSelect","select",null,s,f),a.push({event:s,listeners:p}),s.target=Ds)))}function jo(a,s){var f={};return f[a.toLowerCase()]=s.toLowerCase(),f["Webkit"+a]="webkit"+s,f["Moz"+a]="moz"+s,f}var Ps={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionrun:jo("Transition","TransitionRun"),transitionstart:jo("Transition","TransitionStart"),transitioncancel:jo("Transition","TransitionCancel"),transitionend:jo("Transition","TransitionEnd")},jg={},P_={};Aa&&(P_=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function Oo(a){if(jg[a])return jg[a];if(!Ps[a])return a;var s=Ps[a],f;for(f in s)if(s.hasOwnProperty(f)&&f in P_)return jg[a]=s[f];return a}var k_=Oo("animationend"),$_=Oo("animationiteration"),I_=Oo("animationstart"),iq=Oo("transitionrun"),oq=Oo("transitionstart"),sq=Oo("transitioncancel"),L_=Oo("transitionend"),z_=new Map,Og="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(" ");Og.push("scrollEnd");function Lr(a,s){z_.set(a,s),wo(s,[a])}var pd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},vr=[],ks=0,Eg=0;function vd(){for(var a=ks,s=Eg=ks=0;s<a;){var f=vr[s];vr[s++]=null;var p=vr[s];vr[s++]=null;var y=vr[s];vr[s++]=null;var j=vr[s];if(vr[s++]=null,p!==null&&y!==null){var T=p.pending;T===null?y.next=y:(y.next=T.next,T.next=y),p.pending=y}j!==0&&B_(f,y,j)}}function gd(a,s,f,p){vr[ks++]=a,vr[ks++]=s,vr[ks++]=f,vr[ks++]=p,Eg|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function _g(a,s,f,p){return gd(a,s,f,p),yd(a)}function Eo(a,s){return gd(a,null,null,s),yd(a)}function B_(a,s,f){a.lanes|=f;var p=a.alternate;p!==null&&(p.lanes|=f);for(var y=!1,j=a.return;j!==null;)j.childLanes|=f,p=j.alternate,p!==null&&(p.childLanes|=f),j.tag===22&&(a=j.stateNode,a===null||a._visibility&1||(y=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,y&&s!==null&&(y=31-gn(f),a=j.hiddenUpdates,p=a[y],p===null?a[y]=[s]:p.push(s),s.lane=f|536870912),j):null}function yd(a){if(50<ou)throw ou=0,ky=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var $s={};function lq(a,s,f,p){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kn(a,s,f,p){return new lq(a,s,f,p)}function Ng(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ca(a,s){var f=a.alternate;return f===null?(f=Kn(a.tag,s,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=s,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,s=a.dependencies,f.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function q_(a,s){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,s=f.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function bd(a,s,f,p,y,j){var T=0;if(p=a,typeof a=="function")Ng(a)&&(T=1);else if(typeof a=="string")T=hU(a,f,U.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case z:return a=Kn(31,f,s,y),a.elementType=z,a.lanes=j,a;case S:return _o(f.children,y,j,s);case x:T=8,y|=24;break;case E:return a=Kn(12,f,s,y|2),a.elementType=E,a.lanes=j,a;case A:return a=Kn(13,f,s,y),a.elementType=A,a.lanes=j,a;case M:return a=Kn(19,f,s,y),a.elementType=M,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:T=10;break e;case N:T=9;break e;case C:T=11;break e;case R:T=14;break e;case D:T=16,p=null;break e}T=29,f=Error(r(130,a===null?"null":typeof a,"")),p=null}return s=Kn(T,f,s,y),s.elementType=a,s.type=p,s.lanes=j,s}function _o(a,s,f,p){return a=Kn(7,a,p,s),a.lanes=f,a}function Ag(a,s,f){return a=Kn(6,a,null,s),a.lanes=f,a}function U_(a){var s=Kn(18,null,null,0);return s.stateNode=a,s}function Cg(a,s,f){return s=Kn(4,a.children!==null?a.children:[],a.key,s),s.lanes=f,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var H_=new WeakMap;function gr(a,s){if(typeof a=="object"&&a!==null){var f=H_.get(a);return f!==void 0?f:(s={value:a,source:s,stack:tn(s)},H_.set(a,s),s)}return{value:a,source:s,stack:tn(s)}}var Is=[],Ls=0,xd=null,zc=0,yr=[],br=0,xi=null,ra=1,aa="";function Ta(a,s){Is[Ls++]=zc,Is[Ls++]=xd,xd=a,zc=s}function F_(a,s,f){yr[br++]=ra,yr[br++]=aa,yr[br++]=xi,xi=a;var p=ra;a=aa;var y=32-gn(p)-1;p&=~(1<<y),f+=1;var j=32-gn(s)+y;if(30<j){var T=y-y%5;j=(p&(1<<T)-1).toString(32),p>>=T,y-=T,ra=1<<32-gn(s)+y|f<<y|p,aa=j+a}else ra=1<<j|f<<y|p,aa=a}function Tg(a){a.return!==null&&(Ta(a,1),F_(a,1,0))}function Mg(a){for(;a===xd;)xd=Is[--Ls],Is[Ls]=null,zc=Is[--Ls],Is[Ls]=null;for(;a===xi;)xi=yr[--br],yr[br]=null,aa=yr[--br],yr[br]=null,ra=yr[--br],yr[br]=null}function G_(a,s){yr[br++]=ra,yr[br++]=aa,yr[br++]=xi,ra=s.id,aa=s.overflow,xi=a}var fn=null,Et=null,tt=!1,wi=null,xr=!1,Rg=Error(r(519));function Si(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bc(gr(s,a)),Rg}function V_(a){var s=a.stateNode,f=a.type,p=a.memoizedProps;switch(s[un]=a,s[Dn]=p,f){case"dialog":Xe("cancel",s),Xe("close",s);break;case"iframe":case"object":case"embed":Xe("load",s);break;case"video":case"audio":for(f=0;f<lu.length;f++)Xe(lu[f],s);break;case"source":Xe("error",s);break;case"img":case"image":case"link":Xe("error",s),Xe("load",s);break;case"details":Xe("toggle",s);break;case"input":Xe("invalid",s),i_(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Xe("invalid",s);break;case"textarea":Xe("invalid",s),s_(s,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||s.textContent===""+f||p.suppressHydrationWarning===!0||c2(s.textContent,f)?(p.popover!=null&&(Xe("beforetoggle",s),Xe("toggle",s)),p.onScroll!=null&&Xe("scroll",s),p.onScrollEnd!=null&&Xe("scrollend",s),p.onClick!=null&&(s.onclick=Na),s=!0):s=!1,s||Si(a,!0)}function Y_(a){for(fn=a.return;fn;)switch(fn.tag){case 5:case 31:case 13:xr=!1;return;case 27:case 3:xr=!0;return;default:fn=fn.return}}function zs(a){if(a!==fn)return!1;if(!tt)return Y_(a),tt=!0,!1;var s=a.tag,f;if((f=s!==3&&s!==27)&&((f=s===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||Xy(a.type,a.memoizedProps)),f=!f),f&&Et&&Si(a),Y_(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Et=y2(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Et=y2(a)}else s===27?(s=Et,$i(a.type)?(a=tb,tb=null,Et=a):Et=s):Et=fn?Sr(a.stateNode.nextSibling):null;return!0}function No(){Et=fn=null,tt=!1}function Dg(){var a=wi;return a!==null&&(Ln===null?Ln=a:Ln.push.apply(Ln,a),wi=null),a}function Bc(a){wi===null?wi=[a]:wi.push(a)}var Pg=$(null),Ao=null,Ma=null;function ji(a,s,f){q(Pg,s._currentValue),s._currentValue=f}function Ra(a){a._currentValue=Pg.current,Y(Pg)}function kg(a,s,f){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===f)break;a=a.return}}function $g(a,s,f,p){var y=a.child;for(y!==null&&(y.return=a);y!==null;){var j=y.dependencies;if(j!==null){var T=y.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=y;for(var V=0;V<s.length;V++)if(P.context===s[V]){j.lanes|=f,P=j.alternate,P!==null&&(P.lanes|=f),kg(j.return,f,a),p||(T=null);break e}j=P.next}}else if(y.tag===18){if(T=y.return,T===null)throw Error(r(341));T.lanes|=f,j=T.alternate,j!==null&&(j.lanes|=f),kg(T,f,a),T=null}else T=y.child;if(T!==null)T.return=y;else for(T=y;T!==null;){if(T===a){T=null;break}if(y=T.sibling,y!==null){y.return=T.return,T=y;break}T=T.return}y=T}}function Bs(a,s,f,p){a=null;for(var y=s,j=!1;y!==null;){if(!j){if((y.flags&524288)!==0)j=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var T=y.alternate;if(T===null)throw Error(r(387));if(T=T.memoizedProps,T!==null){var P=y.type;Wn(y.pendingProps.value,T.value)||(a!==null?a.push(P):a=[P])}}else if(y===ie.current){if(T=y.alternate,T===null)throw Error(r(387));T.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(a!==null?a.push(hu):a=[hu])}y=y.return}a!==null&&$g(s,a,f,p),s.flags|=262144}function wd(a){for(a=a.firstContext;a!==null;){if(!Wn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Co(a){Ao=a,Ma=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function dn(a){return W_(Ao,a)}function Sd(a,s){return Ao===null&&Co(a),W_(a,s)}function W_(a,s){var f=s._currentValue;if(s={context:s,memoizedValue:f,next:null},Ma===null){if(a===null)throw Error(r(308));Ma=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Ma=Ma.next=s;return f}var cq=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(f,p){a.push(p)}};this.abort=function(){s.aborted=!0,a.forEach(function(f){return f()})}},uq=e.unstable_scheduleCallback,fq=e.unstable_NormalPriority,Ut={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ig(){return{controller:new cq,data:new Map,refCount:0}}function qc(a){a.refCount--,a.refCount===0&&uq(fq,function(){a.controller.abort()})}var Uc=null,Lg=0,qs=0,Us=null;function dq(a,s){if(Uc===null){var f=Uc=[];Lg=0,qs=qy(),Us={status:"pending",value:void 0,then:function(p){f.push(p)}}}return Lg++,s.then(K_,K_),s}function K_(){if(--Lg===0&&Uc!==null){Us!==null&&(Us.status="fulfilled");var a=Uc;Uc=null,qs=0,Us=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function hq(a,s){var f=[],p={status:"pending",value:null,reason:null,then:function(y){f.push(y)}};return a.then(function(){p.status="fulfilled",p.value=s;for(var y=0;y<f.length;y++)(0,f[y])(s)},function(y){for(p.status="rejected",p.reason=y,y=0;y<f.length;y++)(0,f[y])(void 0)}),p}var X_=k.S;k.S=function(a,s){DA=nn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&dq(a,s),X_!==null&&X_(a,s)};var To=$(null);function zg(){var a=To.current;return a!==null?a:wt.pooledCache}function jd(a,s){s===null?q(To,To.current):q(To,s.pool)}function Q_(){var a=zg();return a===null?null:{parent:Ut._currentValue,pool:a}}var Hs=Error(r(460)),Bg=Error(r(474)),Od=Error(r(542)),Ed={then:function(){}};function Z_(a){return a=a.status,a==="fulfilled"||a==="rejected"}function J_(a,s,f){switch(f=a[f],f===void 0?a.push(s):f!==s&&(s.then(Na,Na),s=f),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,tN(a),a;default:if(typeof s.status=="string")s.then(Na,Na);else{if(a=wt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(p){if(s.status==="pending"){var y=s;y.status="fulfilled",y.value=p}},function(p){if(s.status==="pending"){var y=s;y.status="rejected",y.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,tN(a),a}throw Ro=s,Hs}}function Mo(a){try{var s=a._init;return s(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Ro=f,Hs):f}}var Ro=null;function eN(){if(Ro===null)throw Error(r(459));var a=Ro;return Ro=null,a}function tN(a){if(a===Hs||a===Od)throw Error(r(483))}var Fs=null,Hc=0;function _d(a){var s=Hc;return Hc+=1,Fs===null&&(Fs=[]),J_(Fs,a,s)}function Fc(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Nd(a,s){throw s.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function nN(a){function s(J,K){if(a){var ee=J.deletions;ee===null?(J.deletions=[K],J.flags|=16):ee.push(K)}}function f(J,K){if(!a)return null;for(;K!==null;)s(J,K),K=K.sibling;return null}function p(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function y(J,K){return J=Ca(J,K),J.index=0,J.sibling=null,J}function j(J,K,ee){return J.index=ee,a?(ee=J.alternate,ee!==null?(ee=ee.index,ee<K?(J.flags|=67108866,K):ee):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function T(J){return a&&J.alternate===null&&(J.flags|=67108866),J}function P(J,K,ee,de){return K===null||K.tag!==6?(K=Ag(ee,J.mode,de),K.return=J,K):(K=y(K,ee),K.return=J,K)}function V(J,K,ee,de){var Ae=ee.type;return Ae===S?ce(J,K,ee.props.children,de,ee.key):K!==null&&(K.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===D&&Mo(Ae)===K.type)?(K=y(K,ee.props),Fc(K,ee),K.return=J,K):(K=bd(ee.type,ee.key,ee.props,null,J.mode,de),Fc(K,ee),K.return=J,K)}function te(J,K,ee,de){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=Cg(ee,J.mode,de),K.return=J,K):(K=y(K,ee.children||[]),K.return=J,K)}function ce(J,K,ee,de,Ae){return K===null||K.tag!==7?(K=_o(ee,J.mode,de,Ae),K.return=J,K):(K=y(K,ee),K.return=J,K)}function he(J,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Ag(""+K,J.mode,ee),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return ee=bd(K.type,K.key,K.props,null,J.mode,ee),Fc(ee,K),ee.return=J,ee;case O:return K=Cg(K,J.mode,ee),K.return=J,K;case D:return K=Mo(K),he(J,K,ee)}if(X(K)||F(K))return K=_o(K,J.mode,ee,null),K.return=J,K;if(typeof K.then=="function")return he(J,_d(K),ee);if(K.$$typeof===_)return he(J,Sd(J,K),ee);Nd(J,K)}return null}function ae(J,K,ee,de){var Ae=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Ae!==null?null:P(J,K,""+ee,de);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===Ae?V(J,K,ee,de):null;case O:return ee.key===Ae?te(J,K,ee,de):null;case D:return ee=Mo(ee),ae(J,K,ee,de)}if(X(ee)||F(ee))return Ae!==null?null:ce(J,K,ee,de,null);if(typeof ee.then=="function")return ae(J,K,_d(ee),de);if(ee.$$typeof===_)return ae(J,K,Sd(J,ee),de);Nd(J,ee)}return null}function se(J,K,ee,de,Ae){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return J=J.get(ee)||null,P(K,J,""+de,Ae);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case b:return J=J.get(de.key===null?ee:de.key)||null,V(K,J,de,Ae);case O:return J=J.get(de.key===null?ee:de.key)||null,te(K,J,de,Ae);case D:return de=Mo(de),se(J,K,ee,de,Ae)}if(X(de)||F(de))return J=J.get(ee)||null,ce(K,J,de,Ae,null);if(typeof de.then=="function")return se(J,K,ee,_d(de),Ae);if(de.$$typeof===_)return se(J,K,ee,Sd(K,de),Ae);Nd(K,de)}return null}function Se(J,K,ee,de){for(var Ae=null,at=null,Ee=K,Ge=K=0,et=null;Ee!==null&&Ge<ee.length;Ge++){Ee.index>Ge?(et=Ee,Ee=null):et=Ee.sibling;var it=ae(J,Ee,ee[Ge],de);if(it===null){Ee===null&&(Ee=et);break}a&&Ee&&it.alternate===null&&s(J,Ee),K=j(it,K,Ge),at===null?Ae=it:at.sibling=it,at=it,Ee=et}if(Ge===ee.length)return f(J,Ee),tt&&Ta(J,Ge),Ae;if(Ee===null){for(;Ge<ee.length;Ge++)Ee=he(J,ee[Ge],de),Ee!==null&&(K=j(Ee,K,Ge),at===null?Ae=Ee:at.sibling=Ee,at=Ee);return tt&&Ta(J,Ge),Ae}for(Ee=p(Ee);Ge<ee.length;Ge++)et=se(Ee,J,Ge,ee[Ge],de),et!==null&&(a&&et.alternate!==null&&Ee.delete(et.key===null?Ge:et.key),K=j(et,K,Ge),at===null?Ae=et:at.sibling=et,at=et);return a&&Ee.forEach(function(qi){return s(J,qi)}),tt&&Ta(J,Ge),Ae}function De(J,K,ee,de){if(ee==null)throw Error(r(151));for(var Ae=null,at=null,Ee=K,Ge=K=0,et=null,it=ee.next();Ee!==null&&!it.done;Ge++,it=ee.next()){Ee.index>Ge?(et=Ee,Ee=null):et=Ee.sibling;var qi=ae(J,Ee,it.value,de);if(qi===null){Ee===null&&(Ee=et);break}a&&Ee&&qi.alternate===null&&s(J,Ee),K=j(qi,K,Ge),at===null?Ae=qi:at.sibling=qi,at=qi,Ee=et}if(it.done)return f(J,Ee),tt&&Ta(J,Ge),Ae;if(Ee===null){for(;!it.done;Ge++,it=ee.next())it=he(J,it.value,de),it!==null&&(K=j(it,K,Ge),at===null?Ae=it:at.sibling=it,at=it);return tt&&Ta(J,Ge),Ae}for(Ee=p(Ee);!it.done;Ge++,it=ee.next())it=se(Ee,J,Ge,it.value,de),it!==null&&(a&&it.alternate!==null&&Ee.delete(it.key===null?Ge:it.key),K=j(it,K,Ge),at===null?Ae=it:at.sibling=it,at=it);return a&&Ee.forEach(function(OU){return s(J,OU)}),tt&&Ta(J,Ge),Ae}function yt(J,K,ee,de){if(typeof ee=="object"&&ee!==null&&ee.type===S&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var Ae=ee.key;K!==null;){if(K.key===Ae){if(Ae=ee.type,Ae===S){if(K.tag===7){f(J,K.sibling),de=y(K,ee.props.children),de.return=J,J=de;break e}}else if(K.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===D&&Mo(Ae)===K.type){f(J,K.sibling),de=y(K,ee.props),Fc(de,ee),de.return=J,J=de;break e}f(J,K);break}else s(J,K);K=K.sibling}ee.type===S?(de=_o(ee.props.children,J.mode,de,ee.key),de.return=J,J=de):(de=bd(ee.type,ee.key,ee.props,null,J.mode,de),Fc(de,ee),de.return=J,J=de)}return T(J);case O:e:{for(Ae=ee.key;K!==null;){if(K.key===Ae)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){f(J,K.sibling),de=y(K,ee.children||[]),de.return=J,J=de;break e}else{f(J,K);break}else s(J,K);K=K.sibling}de=Cg(ee,J.mode,de),de.return=J,J=de}return T(J);case D:return ee=Mo(ee),yt(J,K,ee,de)}if(X(ee))return Se(J,K,ee,de);if(F(ee)){if(Ae=F(ee),typeof Ae!="function")throw Error(r(150));return ee=Ae.call(ee),De(J,K,ee,de)}if(typeof ee.then=="function")return yt(J,K,_d(ee),de);if(ee.$$typeof===_)return yt(J,K,Sd(J,ee),de);Nd(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(f(J,K.sibling),de=y(K,ee),de.return=J,J=de):(f(J,K),de=Ag(ee,J.mode,de),de.return=J,J=de),T(J)):f(J,K)}return function(J,K,ee,de){try{Hc=0;var Ae=yt(J,K,ee,de);return Fs=null,Ae}catch(Ee){if(Ee===Hs||Ee===Od)throw Ee;var at=Kn(29,Ee,null,J.mode);return at.lanes=de,at.return=J,at}finally{}}}var Do=nN(!0),rN=nN(!1),Oi=!1;function qg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ug(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ei(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function _i(a,s,f){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(st&2)!==0){var y=p.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),p.pending=s,s=yd(a),B_(a,null,f),s}return gd(a,p,s,f),yd(a)}function Gc(a,s,f){if(s=s.updateQueue,s!==null&&(s=s.shared,(f&4194048)!==0)){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,Mn(a,f)}}function Hg(a,s){var f=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var y=null,j=null;if(f=f.firstBaseUpdate,f!==null){do{var T={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};j===null?y=j=T:j=j.next=T,f=f.next}while(f!==null);j===null?y=j=s:j=j.next=s}else y=j=s;f={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:j,shared:p.shared,callbacks:p.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=s}var Fg=!1;function Vc(){if(Fg){var a=Us;if(a!==null)throw a}}function Yc(a,s,f,p){Fg=!1;var y=a.updateQueue;Oi=!1;var j=y.firstBaseUpdate,T=y.lastBaseUpdate,P=y.shared.pending;if(P!==null){y.shared.pending=null;var V=P,te=V.next;V.next=null,T===null?j=te:T.next=te,T=V;var ce=a.alternate;ce!==null&&(ce=ce.updateQueue,P=ce.lastBaseUpdate,P!==T&&(P===null?ce.firstBaseUpdate=te:P.next=te,ce.lastBaseUpdate=V))}if(j!==null){var he=y.baseState;T=0,ce=te=V=null,P=j;do{var ae=P.lane&-536870913,se=ae!==P.lane;if(se?(Je&ae)===ae:(p&ae)===ae){ae!==0&&ae===qs&&(Fg=!0),ce!==null&&(ce=ce.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Se=a,De=P;ae=s;var yt=f;switch(De.tag){case 1:if(Se=De.payload,typeof Se=="function"){he=Se.call(yt,he,ae);break e}he=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=De.payload,ae=typeof Se=="function"?Se.call(yt,he,ae):Se,ae==null)break e;he=m({},he,ae);break e;case 2:Oi=!0}}ae=P.callback,ae!==null&&(a.flags|=64,se&&(a.flags|=8192),se=y.callbacks,se===null?y.callbacks=[ae]:se.push(ae))}else se={lane:ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ce===null?(te=ce=se,V=he):ce=ce.next=se,T|=ae;if(P=P.next,P===null){if(P=y.shared.pending,P===null)break;se=P,P=se.next,se.next=null,y.lastBaseUpdate=se,y.shared.pending=null}}while(!0);ce===null&&(V=he),y.baseState=V,y.firstBaseUpdate=te,y.lastBaseUpdate=ce,j===null&&(y.shared.lanes=0),Mi|=T,a.lanes=T,a.memoizedState=he}}function aN(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function iN(a,s){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)aN(f[a],s)}var Gs=$(null),Ad=$(0);function oN(a,s){a=qa,q(Ad,a),q(Gs,s),qa=a|s.baseLanes}function Gg(){q(Ad,qa),q(Gs,Gs.current)}function Vg(){qa=Ad.current,Y(Gs),Y(Ad)}var Xn=$(null),wr=null;function Ni(a){var s=a.alternate;q(Lt,Lt.current&1),q(Xn,a),wr===null&&(s===null||Gs.current!==null||s.memoizedState!==null)&&(wr=a)}function Yg(a){q(Lt,Lt.current),q(Xn,a),wr===null&&(wr=a)}function sN(a){a.tag===22?(q(Lt,Lt.current),q(Xn,a),wr===null&&(wr=a)):Ai()}function Ai(){q(Lt,Lt.current),q(Xn,Xn.current)}function Qn(a){Y(Xn),wr===a&&(wr=null),Y(Lt)}var Lt=$(0);function Cd(a){for(var s=a;s!==null;){if(s.tag===13){var f=s.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Jy(f)||eb(f)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Da=0,He=null,vt=null,Ht=null,Td=!1,Vs=!1,Po=!1,Md=0,Wc=0,Ys=null,mq=0;function kt(){throw Error(r(321))}function Wg(a,s){if(s===null)return!1;for(var f=0;f<s.length&&f<a.length;f++)if(!Wn(a[f],s[f]))return!1;return!0}function Kg(a,s,f,p,y,j){return Da=j,He=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,k.H=a===null||a.memoizedState===null?FN:uy,Po=!1,j=f(p,y),Po=!1,Vs&&(j=cN(s,f,p,y)),lN(a),j}function lN(a){k.H=Qc;var s=vt!==null&&vt.next!==null;if(Da=0,Ht=vt=He=null,Td=!1,Wc=0,Ys=null,s)throw Error(r(300));a===null||Ft||(a=a.dependencies,a!==null&&wd(a)&&(Ft=!0))}function cN(a,s,f,p){He=a;var y=0;do{if(Vs&&(Ys=null),Wc=0,Vs=!1,25<=y)throw Error(r(301));if(y+=1,Ht=vt=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}k.H=GN,j=s(f,p)}while(Vs);return j}function pq(){var a=k.H,s=a.useState()[0];return s=typeof s.then=="function"?Kc(s):s,a=a.useState()[0],(vt!==null?vt.memoizedState:null)!==a&&(He.flags|=1024),s}function Xg(){var a=Md!==0;return Md=0,a}function Qg(a,s,f){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~f}function Zg(a){if(Td){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Td=!1}Da=0,Ht=vt=He=null,Vs=!1,Wc=Md=0,Ys=null}function En(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?He.memoizedState=Ht=a:Ht=Ht.next=a,Ht}function zt(){if(vt===null){var a=He.alternate;a=a!==null?a.memoizedState:null}else a=vt.next;var s=Ht===null?He.memoizedState:Ht.next;if(s!==null)Ht=s,vt=a;else{if(a===null)throw He.alternate===null?Error(r(467)):Error(r(310));vt=a,a={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},Ht===null?He.memoizedState=Ht=a:Ht=Ht.next=a}return Ht}function Rd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kc(a){var s=Wc;return Wc+=1,Ys===null&&(Ys=[]),a=J_(Ys,a,s),s=He,(Ht===null?s.memoizedState:Ht.next)===null&&(s=s.alternate,k.H=s===null||s.memoizedState===null?FN:uy),a}function Dd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Kc(a);if(a.$$typeof===_)return dn(a)}throw Error(r(438,String(a)))}function Jg(a){var s=null,f=He.updateQueue;if(f!==null&&(s=f.memoCache),s==null){var p=He.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(y){return y.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),f===null&&(f=Rd(),He.updateQueue=f),f.memoCache=s,f=s.data[s.index],f===void 0)for(f=s.data[s.index]=Array(a),p=0;p<a;p++)f[p]=G;return s.index++,f}function Pa(a,s){return typeof s=="function"?s(a):s}function Pd(a){var s=zt();return ey(s,vt,a)}function ey(a,s,f){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=f;var y=a.baseQueue,j=p.pending;if(j!==null){if(y!==null){var T=y.next;y.next=j.next,j.next=T}s.baseQueue=y=j,p.pending=null}if(j=a.baseState,y===null)a.memoizedState=j;else{s=y.next;var P=T=null,V=null,te=s,ce=!1;do{var he=te.lane&-536870913;if(he!==te.lane?(Je&he)===he:(Da&he)===he){var ae=te.revertLane;if(ae===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),he===qs&&(ce=!0);else if((Da&ae)===ae){te=te.next,ae===qs&&(ce=!0);continue}else he={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(P=V=he,T=j):V=V.next=he,He.lanes|=ae,Mi|=ae;he=te.action,Po&&f(j,he),j=te.hasEagerState?te.eagerState:f(j,he)}else ae={lane:he,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(P=V=ae,T=j):V=V.next=ae,He.lanes|=he,Mi|=he;te=te.next}while(te!==null&&te!==s);if(V===null?T=j:V.next=P,!Wn(j,a.memoizedState)&&(Ft=!0,ce&&(f=Us,f!==null)))throw f;a.memoizedState=j,a.baseState=T,a.baseQueue=V,p.lastRenderedState=j}return y===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function ty(a){var s=zt(),f=s.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=a;var p=f.dispatch,y=f.pending,j=s.memoizedState;if(y!==null){f.pending=null;var T=y=y.next;do j=a(j,T.action),T=T.next;while(T!==y);Wn(j,s.memoizedState)||(Ft=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),f.lastRenderedState=j}return[j,p]}function uN(a,s,f){var p=He,y=zt(),j=tt;if(j){if(f===void 0)throw Error(r(407));f=f()}else f=s();var T=!Wn((vt||y).memoizedState,f);if(T&&(y.memoizedState=f,Ft=!0),y=y.queue,ay(hN.bind(null,p,y,a),[a]),y.getSnapshot!==s||T||Ht!==null&&Ht.memoizedState.tag&1){if(p.flags|=2048,Ws(9,{destroy:void 0},dN.bind(null,p,y,f,s),null),wt===null)throw Error(r(349));j||(Da&127)!==0||fN(p,s,f)}return f}function fN(a,s,f){a.flags|=16384,a={getSnapshot:s,value:f},s=He.updateQueue,s===null?(s=Rd(),He.updateQueue=s,s.stores=[a]):(f=s.stores,f===null?s.stores=[a]:f.push(a))}function dN(a,s,f,p){s.value=f,s.getSnapshot=p,mN(s)&&pN(a)}function hN(a,s,f){return f(function(){mN(s)&&pN(a)})}function mN(a){var s=a.getSnapshot;a=a.value;try{var f=s();return!Wn(a,f)}catch{return!0}}function pN(a){var s=Eo(a,2);s!==null&&zn(s,a,2)}function ny(a){var s=En();if(typeof a=="function"){var f=a;if(a=f(),Po){$r(!0);try{f()}finally{$r(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:a},s}function vN(a,s,f,p){return a.baseState=f,ey(a,vt,typeof p=="function"?p:Pa)}function vq(a,s,f,p,y){if(Id(a))throw Error(r(485));if(a=s.action,a!==null){var j={payload:y,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){j.listeners.push(T)}};k.T!==null?f(!0):j.isTransition=!1,p(j),f=s.pending,f===null?(j.next=s.pending=j,gN(s,j)):(j.next=f.next,s.pending=f.next=j)}}function gN(a,s){var f=s.action,p=s.payload,y=a.state;if(s.isTransition){var j=k.T,T={};k.T=T;try{var P=f(y,p),V=k.S;V!==null&&V(T,P),yN(a,s,P)}catch(te){ry(a,s,te)}finally{j!==null&&T.types!==null&&(j.types=T.types),k.T=j}}else try{j=f(y,p),yN(a,s,j)}catch(te){ry(a,s,te)}}function yN(a,s,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){bN(a,s,p)},function(p){return ry(a,s,p)}):bN(a,s,f)}function bN(a,s,f){s.status="fulfilled",s.value=f,xN(s),a.state=f,s=a.pending,s!==null&&(f=s.next,f===s?a.pending=null:(f=f.next,s.next=f,gN(a,f)))}function ry(a,s,f){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=f,xN(s),s=s.next;while(s!==p)}a.action=null}function xN(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function wN(a,s){return s}function SN(a,s){if(tt){var f=wt.formState;if(f!==null){e:{var p=He;if(tt){if(Et){t:{for(var y=Et,j=xr;y.nodeType!==8;){if(!j){y=null;break t}if(y=Sr(y.nextSibling),y===null){y=null;break t}}j=y.data,y=j==="F!"||j==="F"?y:null}if(y){Et=Sr(y.nextSibling),p=y.data==="F!";break e}}Si(p)}p=!1}p&&(s=f[0])}}return f=En(),f.memoizedState=f.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wN,lastRenderedState:s},f.queue=p,f=qN.bind(null,He,p),p.dispatch=f,p=ny(!1),j=cy.bind(null,He,!1,p.queue),p=En(),y={state:s,dispatch:null,action:a,pending:null},p.queue=y,f=vq.bind(null,He,y,j,f),y.dispatch=f,p.memoizedState=a,[s,f,!1]}function jN(a){var s=zt();return ON(s,vt,a)}function ON(a,s,f){if(s=ey(a,s,wN)[0],a=Pd(Pa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Kc(s)}catch(T){throw T===Hs?Od:T}else p=s;s=zt();var y=s.queue,j=y.dispatch;return f!==s.memoizedState&&(He.flags|=2048,Ws(9,{destroy:void 0},gq.bind(null,y,f),null)),[p,j,a]}function gq(a,s){a.action=s}function EN(a){var s=zt(),f=vt;if(f!==null)return ON(s,f,a);zt(),s=s.memoizedState,f=zt();var p=f.queue.dispatch;return f.memoizedState=a,[s,p,!1]}function Ws(a,s,f,p){return a={tag:a,create:f,deps:p,inst:s,next:null},s=He.updateQueue,s===null&&(s=Rd(),He.updateQueue=s),f=s.lastEffect,f===null?s.lastEffect=a.next=a:(p=f.next,f.next=a,a.next=p,s.lastEffect=a),a}function _N(){return zt().memoizedState}function kd(a,s,f,p){var y=En();He.flags|=a,y.memoizedState=Ws(1|s,{destroy:void 0},f,p===void 0?null:p)}function $d(a,s,f,p){var y=zt();p=p===void 0?null:p;var j=y.memoizedState.inst;vt!==null&&p!==null&&Wg(p,vt.memoizedState.deps)?y.memoizedState=Ws(s,j,f,p):(He.flags|=a,y.memoizedState=Ws(1|s,j,f,p))}function NN(a,s){kd(8390656,8,a,s)}function ay(a,s){$d(2048,8,a,s)}function yq(a){He.flags|=4;var s=He.updateQueue;if(s===null)s=Rd(),He.updateQueue=s,s.events=[a];else{var f=s.events;f===null?s.events=[a]:f.push(a)}}function AN(a){var s=zt().memoizedState;return yq({ref:s,nextImpl:a}),function(){if((st&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function CN(a,s){return $d(4,2,a,s)}function TN(a,s){return $d(4,4,a,s)}function MN(a,s){if(typeof s=="function"){a=a();var f=s(a);return function(){typeof f=="function"?f():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function RN(a,s,f){f=f!=null?f.concat([a]):null,$d(4,4,MN.bind(null,s,a),f)}function iy(){}function DN(a,s){var f=zt();s=s===void 0?null:s;var p=f.memoizedState;return s!==null&&Wg(s,p[1])?p[0]:(f.memoizedState=[a,s],a)}function PN(a,s){var f=zt();s=s===void 0?null:s;var p=f.memoizedState;if(s!==null&&Wg(s,p[1]))return p[0];if(p=a(),Po){$r(!0);try{a()}finally{$r(!1)}}return f.memoizedState=[p,s],p}function oy(a,s,f){return f===void 0||(Da&1073741824)!==0&&(Je&261930)===0?a.memoizedState=s:(a.memoizedState=f,a=kA(),He.lanes|=a,Mi|=a,f)}function kN(a,s,f,p){return Wn(f,s)?f:Gs.current!==null?(a=oy(a,f,p),Wn(a,s)||(Ft=!0),a):(Da&42)===0||(Da&1073741824)!==0&&(Je&261930)===0?(Ft=!0,a.memoizedState=f):(a=kA(),He.lanes|=a,Mi|=a,s)}function $N(a,s,f,p,y){var j=H.p;H.p=j!==0&&8>j?j:8;var T=k.T,P={};k.T=P,cy(a,!1,s,f);try{var V=y(),te=k.S;if(te!==null&&te(P,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var ce=hq(V,p);Xc(a,s,ce,er(a))}else Xc(a,s,p,er(a))}catch(he){Xc(a,s,{then:function(){},status:"rejected",reason:he},er())}finally{H.p=j,T!==null&&P.types!==null&&(T.types=P.types),k.T=T}}function bq(){}function sy(a,s,f,p){if(a.tag!==5)throw Error(r(476));var y=IN(a).queue;$N(a,y,s,B,f===null?bq:function(){return LN(a),f(p)})}function IN(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:B},next:null};var f={};return s.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:f},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function LN(a){var s=IN(a);s.next===null&&(s=a.alternate.memoizedState),Xc(a,s.next.queue,{},er())}function ly(){return dn(hu)}function zN(){return zt().memoizedState}function BN(){return zt().memoizedState}function xq(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var f=er();a=Ei(f);var p=_i(s,a,f);p!==null&&(zn(p,s,f),Gc(p,s,f)),s={cache:Ig()},a.payload=s;return}s=s.return}}function wq(a,s,f){var p=er();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Id(a)?UN(s,f):(f=_g(a,s,f,p),f!==null&&(zn(f,a,p),HN(f,s,p)))}function qN(a,s,f){var p=er();Xc(a,s,f,p)}function Xc(a,s,f,p){var y={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Id(a))UN(s,y);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var T=s.lastRenderedState,P=j(T,f);if(y.hasEagerState=!0,y.eagerState=P,Wn(P,T))return gd(a,s,y,0),wt===null&&vd(),!1}catch{}finally{}if(f=_g(a,s,y,p),f!==null)return zn(f,a,p),HN(f,s,p),!0}return!1}function cy(a,s,f,p){if(p={lane:2,revertLane:qy(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Id(a)){if(s)throw Error(r(479))}else s=_g(a,f,p,2),s!==null&&zn(s,a,2)}function Id(a){var s=a.alternate;return a===He||s!==null&&s===He}function UN(a,s){Vs=Td=!0;var f=a.pending;f===null?s.next=s:(s.next=f.next,f.next=s),a.pending=s}function HN(a,s,f){if((f&4194048)!==0){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,Mn(a,f)}}var Qc={readContext:dn,use:Dd,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};Qc.useEffectEvent=kt;var FN={readContext:dn,use:Dd,useCallback:function(a,s){return En().memoizedState=[a,s===void 0?null:s],a},useContext:dn,useEffect:NN,useImperativeHandle:function(a,s,f){f=f!=null?f.concat([a]):null,kd(4194308,4,MN.bind(null,s,a),f)},useLayoutEffect:function(a,s){return kd(4194308,4,a,s)},useInsertionEffect:function(a,s){kd(4,2,a,s)},useMemo:function(a,s){var f=En();s=s===void 0?null:s;var p=a();if(Po){$r(!0);try{a()}finally{$r(!1)}}return f.memoizedState=[p,s],p},useReducer:function(a,s,f){var p=En();if(f!==void 0){var y=f(s);if(Po){$r(!0);try{f(s)}finally{$r(!1)}}}else y=s;return p.memoizedState=p.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},p.queue=a,a=a.dispatch=wq.bind(null,He,a),[p.memoizedState,a]},useRef:function(a){var s=En();return a={current:a},s.memoizedState=a},useState:function(a){a=ny(a);var s=a.queue,f=qN.bind(null,He,s);return s.dispatch=f,[a.memoizedState,f]},useDebugValue:iy,useDeferredValue:function(a,s){var f=En();return oy(f,a,s)},useTransition:function(){var a=ny(!1);return a=$N.bind(null,He,a.queue,!0,!1),En().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,f){var p=He,y=En();if(tt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=s(),wt===null)throw Error(r(349));(Je&127)!==0||fN(p,s,f)}y.memoizedState=f;var j={value:f,getSnapshot:s};return y.queue=j,NN(hN.bind(null,p,j,a),[a]),p.flags|=2048,Ws(9,{destroy:void 0},dN.bind(null,p,j,f,s),null),f},useId:function(){var a=En(),s=wt.identifierPrefix;if(tt){var f=aa,p=ra;f=(p&~(1<<32-gn(p)-1)).toString(32)+f,s="_"+s+"R_"+f,f=Md++,0<f&&(s+="H"+f.toString(32)),s+="_"}else f=mq++,s="_"+s+"r_"+f.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:ly,useFormState:SN,useActionState:SN,useOptimistic:function(a){var s=En();s.memoizedState=s.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=f,s=cy.bind(null,He,!0,f),f.dispatch=s,[a,s]},useMemoCache:Jg,useCacheRefresh:function(){return En().memoizedState=xq.bind(null,He)},useEffectEvent:function(a){var s=En(),f={impl:a};return s.memoizedState=f,function(){if((st&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},uy={readContext:dn,use:Dd,useCallback:DN,useContext:dn,useEffect:ay,useImperativeHandle:RN,useInsertionEffect:CN,useLayoutEffect:TN,useMemo:PN,useReducer:Pd,useRef:_N,useState:function(){return Pd(Pa)},useDebugValue:iy,useDeferredValue:function(a,s){var f=zt();return kN(f,vt.memoizedState,a,s)},useTransition:function(){var a=Pd(Pa)[0],s=zt().memoizedState;return[typeof a=="boolean"?a:Kc(a),s]},useSyncExternalStore:uN,useId:zN,useHostTransitionStatus:ly,useFormState:jN,useActionState:jN,useOptimistic:function(a,s){var f=zt();return vN(f,vt,a,s)},useMemoCache:Jg,useCacheRefresh:BN};uy.useEffectEvent=AN;var GN={readContext:dn,use:Dd,useCallback:DN,useContext:dn,useEffect:ay,useImperativeHandle:RN,useInsertionEffect:CN,useLayoutEffect:TN,useMemo:PN,useReducer:ty,useRef:_N,useState:function(){return ty(Pa)},useDebugValue:iy,useDeferredValue:function(a,s){var f=zt();return vt===null?oy(f,a,s):kN(f,vt.memoizedState,a,s)},useTransition:function(){var a=ty(Pa)[0],s=zt().memoizedState;return[typeof a=="boolean"?a:Kc(a),s]},useSyncExternalStore:uN,useId:zN,useHostTransitionStatus:ly,useFormState:EN,useActionState:EN,useOptimistic:function(a,s){var f=zt();return vt!==null?vN(f,vt,a,s):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Jg,useCacheRefresh:BN};GN.useEffectEvent=AN;function fy(a,s,f,p){s=a.memoizedState,f=f(p,s),f=f==null?s:m({},s,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var dy={enqueueSetState:function(a,s,f){a=a._reactInternals;var p=er(),y=Ei(p);y.payload=s,f!=null&&(y.callback=f),s=_i(a,y,p),s!==null&&(zn(s,a,p),Gc(s,a,p))},enqueueReplaceState:function(a,s,f){a=a._reactInternals;var p=er(),y=Ei(p);y.tag=1,y.payload=s,f!=null&&(y.callback=f),s=_i(a,y,p),s!==null&&(zn(s,a,p),Gc(s,a,p))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var f=er(),p=Ei(f);p.tag=2,s!=null&&(p.callback=s),s=_i(a,p,f),s!==null&&(zn(s,a,f),Gc(s,a,f))}};function VN(a,s,f,p,y,j,T){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,j,T):s.prototype&&s.prototype.isPureReactComponent?!Ic(f,p)||!Ic(y,j):!0}function YN(a,s,f,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(f,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(f,p),s.state!==a&&dy.enqueueReplaceState(s,s.state,null)}function ko(a,s){var f=s;if("ref"in s){f={};for(var p in s)p!=="ref"&&(f[p]=s[p])}if(a=a.defaultProps){f===s&&(f=m({},f));for(var y in a)f[y]===void 0&&(f[y]=a[y])}return f}function WN(a){pd(a)}function KN(a){console.error(a)}function XN(a){pd(a)}function Ld(a,s){try{var f=a.onUncaughtError;f(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function QN(a,s,f){try{var p=a.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function hy(a,s,f){return f=Ei(f),f.tag=3,f.payload={element:null},f.callback=function(){Ld(a,s)},f}function ZN(a){return a=Ei(a),a.tag=3,a}function JN(a,s,f,p){var y=f.type.getDerivedStateFromError;if(typeof y=="function"){var j=p.value;a.payload=function(){return y(j)},a.callback=function(){QN(s,f,p)}}var T=f.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(a.callback=function(){QN(s,f,p),typeof y!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function Sq(a,s,f,p,y){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=f.alternate,s!==null&&Bs(s,f,y,!0),f=Xn.current,f!==null){switch(f.tag){case 31:case 13:return wr===null?Xd():f.alternate===null&&$t===0&&($t=3),f.flags&=-257,f.flags|=65536,f.lanes=y,p===Ed?f.flags|=16384:(s=f.updateQueue,s===null?f.updateQueue=new Set([p]):s.add(p),Ly(a,p,y)),!1;case 22:return f.flags|=65536,p===Ed?f.flags|=16384:(s=f.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=s):(f=s.retryQueue,f===null?s.retryQueue=new Set([p]):f.add(p)),Ly(a,p,y)),!1}throw Error(r(435,f.tag))}return Ly(a,p,y),Xd(),!1}if(tt)return s=Xn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=y,p!==Rg&&(a=Error(r(422),{cause:p}),Bc(gr(a,f)))):(p!==Rg&&(s=Error(r(423),{cause:p}),Bc(gr(s,f))),a=a.current.alternate,a.flags|=65536,y&=-y,a.lanes|=y,p=gr(p,f),y=hy(a.stateNode,p,y),Hg(a,y),$t!==4&&($t=2)),!1;var j=Error(r(520),{cause:p});if(j=gr(j,f),iu===null?iu=[j]:iu.push(j),$t!==4&&($t=2),s===null)return!0;p=gr(p,f),f=s;do{switch(f.tag){case 3:return f.flags|=65536,a=y&-y,f.lanes|=a,a=hy(f.stateNode,p,a),Hg(f,a),!1;case 1:if(s=f.type,j=f.stateNode,(f.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Ri===null||!Ri.has(j))))return f.flags|=65536,y&=-y,f.lanes|=y,y=ZN(y),JN(y,a,f,p),Hg(f,y),!1}f=f.return}while(f!==null);return!1}var my=Error(r(461)),Ft=!1;function hn(a,s,f,p){s.child=a===null?rN(s,null,f,p):Do(s,a.child,f,p)}function eA(a,s,f,p,y){f=f.render;var j=s.ref;if("ref"in p){var T={};for(var P in p)P!=="ref"&&(T[P]=p[P])}else T=p;return Co(s),p=Kg(a,s,f,T,j,y),P=Xg(),a!==null&&!Ft?(Qg(a,s,y),ka(a,s,y)):(tt&&P&&Tg(s),s.flags|=1,hn(a,s,p,y),s.child)}function tA(a,s,f,p,y){if(a===null){var j=f.type;return typeof j=="function"&&!Ng(j)&&j.defaultProps===void 0&&f.compare===null?(s.tag=15,s.type=j,nA(a,s,j,p,y)):(a=bd(f.type,null,p,s,s.mode,y),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!Sy(a,y)){var T=j.memoizedProps;if(f=f.compare,f=f!==null?f:Ic,f(T,p)&&a.ref===s.ref)return ka(a,s,y)}return s.flags|=1,a=Ca(j,p),a.ref=s.ref,a.return=s,s.child=a}function nA(a,s,f,p,y){if(a!==null){var j=a.memoizedProps;if(Ic(j,p)&&a.ref===s.ref)if(Ft=!1,s.pendingProps=p=j,Sy(a,y))(a.flags&131072)!==0&&(Ft=!0);else return s.lanes=a.lanes,ka(a,s,y)}return py(a,s,f,p,y)}function rA(a,s,f,p){var y=p.children,j=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|f:f,a!==null){for(p=s.child=a.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~j}else p=0,s.child=null;return aA(a,s,j,f,p)}if((f&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&jd(s,j!==null?j.cachePool:null),j!==null?oN(s,j):Gg(),sN(s);else return p=s.lanes=536870912,aA(a,s,j!==null?j.baseLanes|f:f,f,p)}else j!==null?(jd(s,j.cachePool),oN(s,j),Ai(),s.memoizedState=null):(a!==null&&jd(s,null),Gg(),Ai());return hn(a,s,y,f),s.child}function Zc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function aA(a,s,f,p,y){var j=zg();return j=j===null?null:{parent:Ut._currentValue,pool:j},s.memoizedState={baseLanes:f,cachePool:j},a!==null&&jd(s,null),Gg(),sN(s),a!==null&&Bs(a,s,p,!0),s.childLanes=y,null}function zd(a,s){return s=qd({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function iA(a,s,f){return Do(s,a.child,null,f),a=zd(s,s.pendingProps),a.flags|=2,Qn(s),s.memoizedState=null,a}function jq(a,s,f){var p=s.pendingProps,y=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(tt){if(p.mode==="hidden")return a=zd(s,p),s.lanes=536870912,Zc(null,a);if(Yg(s),(a=Et)?(a=g2(a,xr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xi!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},f=U_(a),f.return=s,s.child=f,fn=s,Et=null)):a=null,a===null)throw Si(s);return s.lanes=536870912,null}return zd(s,p)}var j=a.memoizedState;if(j!==null){var T=j.dehydrated;if(Yg(s),y)if(s.flags&256)s.flags&=-257,s=iA(a,s,f);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Ft||Bs(a,s,f,!1),y=(f&a.childLanes)!==0,Ft||y){if(p=wt,p!==null&&(T=Rn(p,f),T!==0&&T!==j.retryLane))throw j.retryLane=T,Eo(a,T),zn(p,a,T),my;Xd(),s=iA(a,s,f)}else a=j.treeContext,Et=Sr(T.nextSibling),fn=s,tt=!0,wi=null,xr=!1,a!==null&&G_(s,a),s=zd(s,p),s.flags|=4096;return s}return a=Ca(a.child,{mode:p.mode,children:p.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Bd(a,s){var f=s.ref;if(f===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(a===null||a.ref!==f)&&(s.flags|=4194816)}}function py(a,s,f,p,y){return Co(s),f=Kg(a,s,f,p,void 0,y),p=Xg(),a!==null&&!Ft?(Qg(a,s,y),ka(a,s,y)):(tt&&p&&Tg(s),s.flags|=1,hn(a,s,f,y),s.child)}function oA(a,s,f,p,y,j){return Co(s),s.updateQueue=null,f=cN(s,p,f,y),lN(a),p=Xg(),a!==null&&!Ft?(Qg(a,s,j),ka(a,s,j)):(tt&&p&&Tg(s),s.flags|=1,hn(a,s,f,j),s.child)}function sA(a,s,f,p,y){if(Co(s),s.stateNode===null){var j=$s,T=f.contextType;typeof T=="object"&&T!==null&&(j=dn(T)),j=new f(p,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=dy,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=p,j.state=s.memoizedState,j.refs={},qg(s),T=f.contextType,j.context=typeof T=="object"&&T!==null?dn(T):$s,j.state=s.memoizedState,T=f.getDerivedStateFromProps,typeof T=="function"&&(fy(s,f,T,p),j.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(T=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),T!==j.state&&dy.enqueueReplaceState(j,j.state,null),Yc(s,p,j,y),Vc(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(a===null){j=s.stateNode;var P=s.memoizedProps,V=ko(f,P);j.props=V;var te=j.context,ce=f.contextType;T=$s,typeof ce=="object"&&ce!==null&&(T=dn(ce));var he=f.getDerivedStateFromProps;ce=typeof he=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,ce||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||te!==T)&&YN(s,j,p,T),Oi=!1;var ae=s.memoizedState;j.state=ae,Yc(s,p,j,y),Vc(),te=s.memoizedState,P||ae!==te||Oi?(typeof he=="function"&&(fy(s,f,he,p),te=s.memoizedState),(V=Oi||VN(s,f,V,p,ae,te,T))?(ce||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=te),j.props=p,j.state=te,j.context=T,p=V):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{j=s.stateNode,Ug(a,s),T=s.memoizedProps,ce=ko(f,T),j.props=ce,he=s.pendingProps,ae=j.context,te=f.contextType,V=$s,typeof te=="object"&&te!==null&&(V=dn(te)),P=f.getDerivedStateFromProps,(te=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(T!==he||ae!==V)&&YN(s,j,p,V),Oi=!1,ae=s.memoizedState,j.state=ae,Yc(s,p,j,y),Vc();var se=s.memoizedState;T!==he||ae!==se||Oi||a!==null&&a.dependencies!==null&&wd(a.dependencies)?(typeof P=="function"&&(fy(s,f,P,p),se=s.memoizedState),(ce=Oi||VN(s,f,ce,p,ae,se,V)||a!==null&&a.dependencies!==null&&wd(a.dependencies))?(te||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(p,se,V),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(p,se,V)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||T===a.memoizedProps&&ae===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&ae===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=se),j.props=p,j.state=se,j.context=V,p=ce):(typeof j.componentDidUpdate!="function"||T===a.memoizedProps&&ae===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&ae===a.memoizedState||(s.flags|=1024),p=!1)}return j=p,Bd(a,s),p=(s.flags&128)!==0,j||p?(j=s.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,a!==null&&p?(s.child=Do(s,a.child,null,y),s.child=Do(s,null,f,y)):hn(a,s,f,y),s.memoizedState=j.state,a=s.child):a=ka(a,s,y),a}function lA(a,s,f,p){return No(),s.flags|=256,hn(a,s,f,p),s.child}var vy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gy(a){return{baseLanes:a,cachePool:Q_()}}function yy(a,s,f){return a=a!==null?a.childLanes&~f:0,s&&(a|=Jn),a}function cA(a,s,f){var p=s.pendingProps,y=!1,j=(s.flags&128)!==0,T;if((T=j)||(T=a!==null&&a.memoizedState===null?!1:(Lt.current&2)!==0),T&&(y=!0,s.flags&=-129),T=(s.flags&32)!==0,s.flags&=-33,a===null){if(tt){if(y?Ni(s):Ai(),(a=Et)?(a=g2(a,xr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xi!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},f=U_(a),f.return=s,s.child=f,fn=s,Et=null)):a=null,a===null)throw Si(s);return eb(a)?s.lanes=32:s.lanes=536870912,null}var P=p.children;return p=p.fallback,y?(Ai(),y=s.mode,P=qd({mode:"hidden",children:P},y),p=_o(p,y,f,null),P.return=s,p.return=s,P.sibling=p,s.child=P,p=s.child,p.memoizedState=gy(f),p.childLanes=yy(a,T,f),s.memoizedState=vy,Zc(null,p)):(Ni(s),by(s,P))}var V=a.memoizedState;if(V!==null&&(P=V.dehydrated,P!==null)){if(j)s.flags&256?(Ni(s),s.flags&=-257,s=xy(a,s,f)):s.memoizedState!==null?(Ai(),s.child=a.child,s.flags|=128,s=null):(Ai(),P=p.fallback,y=s.mode,p=qd({mode:"visible",children:p.children},y),P=_o(P,y,f,null),P.flags|=2,p.return=s,P.return=s,p.sibling=P,s.child=p,Do(s,a.child,null,f),p=s.child,p.memoizedState=gy(f),p.childLanes=yy(a,T,f),s.memoizedState=vy,s=Zc(null,p));else if(Ni(s),eb(P)){if(T=P.nextSibling&&P.nextSibling.dataset,T)var te=T.dgst;T=te,p=Error(r(419)),p.stack="",p.digest=T,Bc({value:p,source:null,stack:null}),s=xy(a,s,f)}else if(Ft||Bs(a,s,f,!1),T=(f&a.childLanes)!==0,Ft||T){if(T=wt,T!==null&&(p=Rn(T,f),p!==0&&p!==V.retryLane))throw V.retryLane=p,Eo(a,p),zn(T,a,p),my;Jy(P)||Xd(),s=xy(a,s,f)}else Jy(P)?(s.flags|=192,s.child=a.child,s=null):(a=V.treeContext,Et=Sr(P.nextSibling),fn=s,tt=!0,wi=null,xr=!1,a!==null&&G_(s,a),s=by(s,p.children),s.flags|=4096);return s}return y?(Ai(),P=p.fallback,y=s.mode,V=a.child,te=V.sibling,p=Ca(V,{mode:"hidden",children:p.children}),p.subtreeFlags=V.subtreeFlags&65011712,te!==null?P=Ca(te,P):(P=_o(P,y,f,null),P.flags|=2),P.return=s,p.return=s,p.sibling=P,s.child=p,Zc(null,p),p=s.child,P=a.child.memoizedState,P===null?P=gy(f):(y=P.cachePool,y!==null?(V=Ut._currentValue,y=y.parent!==V?{parent:V,pool:V}:y):y=Q_(),P={baseLanes:P.baseLanes|f,cachePool:y}),p.memoizedState=P,p.childLanes=yy(a,T,f),s.memoizedState=vy,Zc(a.child,p)):(Ni(s),f=a.child,a=f.sibling,f=Ca(f,{mode:"visible",children:p.children}),f.return=s,f.sibling=null,a!==null&&(T=s.deletions,T===null?(s.deletions=[a],s.flags|=16):T.push(a)),s.child=f,s.memoizedState=null,f)}function by(a,s){return s=qd({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function qd(a,s){return a=Kn(22,a,null,s),a.lanes=0,a}function xy(a,s,f){return Do(s,a.child,null,f),a=by(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function uA(a,s,f){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),kg(a.return,s,f)}function wy(a,s,f,p,y,j){var T=a.memoizedState;T===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:y,treeForkCount:j}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=p,T.tail=f,T.tailMode=y,T.treeForkCount=j)}function fA(a,s,f){var p=s.pendingProps,y=p.revealOrder,j=p.tail;p=p.children;var T=Lt.current,P=(T&2)!==0;if(P?(T=T&1|2,s.flags|=128):T&=1,q(Lt,T),hn(a,s,p,f),p=tt?zc:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&uA(a,f,s);else if(a.tag===19)uA(a,f,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(y){case"forwards":for(f=s.child,y=null;f!==null;)a=f.alternate,a!==null&&Cd(a)===null&&(y=f),f=f.sibling;f=y,f===null?(y=s.child,s.child=null):(y=f.sibling,f.sibling=null),wy(s,!1,y,f,j,p);break;case"backwards":case"unstable_legacy-backwards":for(f=null,y=s.child,s.child=null;y!==null;){if(a=y.alternate,a!==null&&Cd(a)===null){s.child=y;break}a=y.sibling,y.sibling=f,f=y,y=a}wy(s,!0,f,null,j,p);break;case"together":wy(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function ka(a,s,f){if(a!==null&&(s.dependencies=a.dependencies),Mi|=s.lanes,(f&s.childLanes)===0)if(a!==null){if(Bs(a,s,f,!1),(f&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,f=Ca(a,a.pendingProps),s.child=f,f.return=s;a.sibling!==null;)a=a.sibling,f=f.sibling=Ca(a,a.pendingProps),f.return=s;f.sibling=null}return s.child}function Sy(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&wd(a)))}function Oq(a,s,f){switch(s.tag){case 3:pe(s,s.stateNode.containerInfo),ji(s,Ut,a.memoizedState.cache),No();break;case 27:case 5:ve(s);break;case 4:pe(s,s.stateNode.containerInfo);break;case 10:ji(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Yg(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Ni(s),s.flags|=128,null):(f&s.child.childLanes)!==0?cA(a,s,f):(Ni(s),a=ka(a,s,f),a!==null?a.sibling:null);Ni(s);break;case 19:var y=(a.flags&128)!==0;if(p=(f&s.childLanes)!==0,p||(Bs(a,s,f,!1),p=(f&s.childLanes)!==0),y){if(p)return fA(a,s,f);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),q(Lt,Lt.current),p)break;return null;case 22:return s.lanes=0,rA(a,s,f,s.pendingProps);case 24:ji(s,Ut,a.memoizedState.cache)}return ka(a,s,f)}function dA(a,s,f){if(a!==null)if(a.memoizedProps!==s.pendingProps)Ft=!0;else{if(!Sy(a,f)&&(s.flags&128)===0)return Ft=!1,Oq(a,s,f);Ft=(a.flags&131072)!==0}else Ft=!1,tt&&(s.flags&1048576)!==0&&F_(s,zc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(a=Mo(s.elementType),s.type=a,typeof a=="function")Ng(a)?(p=ko(a,p),s.tag=1,s=sA(null,s,a,p,f)):(s.tag=0,s=py(null,s,a,p,f));else{if(a!=null){var y=a.$$typeof;if(y===C){s.tag=11,s=eA(null,s,a,p,f);break e}else if(y===R){s.tag=14,s=tA(null,s,a,p,f);break e}}throw s=Q(a)||a,Error(r(306,s,""))}}return s;case 0:return py(a,s,s.type,s.pendingProps,f);case 1:return p=s.type,y=ko(p,s.pendingProps),sA(a,s,p,y,f);case 3:e:{if(pe(s,s.stateNode.containerInfo),a===null)throw Error(r(387));p=s.pendingProps;var j=s.memoizedState;y=j.element,Ug(a,s),Yc(s,p,null,f);var T=s.memoizedState;if(p=T.cache,ji(s,Ut,p),p!==j.cache&&$g(s,[Ut],f,!0),Vc(),p=T.element,j.isDehydrated)if(j={element:p,isDehydrated:!1,cache:T.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=lA(a,s,p,f);break e}else if(p!==y){y=gr(Error(r(424)),s),Bc(y),s=lA(a,s,p,f);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Et=Sr(a.firstChild),fn=s,tt=!0,wi=null,xr=!0,f=rN(s,null,p,f),s.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(No(),p===y){s=ka(a,s,f);break e}hn(a,s,p,f)}s=s.child}return s;case 26:return Bd(a,s),a===null?(f=j2(s.type,null,s.pendingProps,null))?s.memoizedState=f:tt||(f=s.type,a=s.pendingProps,p=rh(fe.current).createElement(f),p[un]=s,p[Dn]=a,mn(p,f,a),an(p),s.stateNode=p):s.memoizedState=j2(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return ve(s),a===null&&tt&&(p=s.stateNode=x2(s.type,s.pendingProps,fe.current),fn=s,xr=!0,y=Et,$i(s.type)?(tb=y,Et=Sr(p.firstChild)):Et=y),hn(a,s,s.pendingProps.children,f),Bd(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&tt&&((y=p=Et)&&(p=eU(p,s.type,s.pendingProps,xr),p!==null?(s.stateNode=p,fn=s,Et=Sr(p.firstChild),xr=!1,y=!0):y=!1),y||Si(s)),ve(s),y=s.type,j=s.pendingProps,T=a!==null?a.memoizedProps:null,p=j.children,Xy(y,j)?p=null:T!==null&&Xy(y,T)&&(s.flags|=32),s.memoizedState!==null&&(y=Kg(a,s,pq,null,null,f),hu._currentValue=y),Bd(a,s),hn(a,s,p,f),s.child;case 6:return a===null&&tt&&((a=f=Et)&&(f=tU(f,s.pendingProps,xr),f!==null?(s.stateNode=f,fn=s,Et=null,a=!0):a=!1),a||Si(s)),null;case 13:return cA(a,s,f);case 4:return pe(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Do(s,null,p,f):hn(a,s,p,f),s.child;case 11:return eA(a,s,s.type,s.pendingProps,f);case 7:return hn(a,s,s.pendingProps,f),s.child;case 8:return hn(a,s,s.pendingProps.children,f),s.child;case 12:return hn(a,s,s.pendingProps.children,f),s.child;case 10:return p=s.pendingProps,ji(s,s.type,p.value),hn(a,s,p.children,f),s.child;case 9:return y=s.type._context,p=s.pendingProps.children,Co(s),y=dn(y),p=p(y),s.flags|=1,hn(a,s,p,f),s.child;case 14:return tA(a,s,s.type,s.pendingProps,f);case 15:return nA(a,s,s.type,s.pendingProps,f);case 19:return fA(a,s,f);case 31:return jq(a,s,f);case 22:return rA(a,s,f,s.pendingProps);case 24:return Co(s),p=dn(Ut),a===null?(y=zg(),y===null&&(y=wt,j=Ig(),y.pooledCache=j,j.refCount++,j!==null&&(y.pooledCacheLanes|=f),y=j),s.memoizedState={parent:p,cache:y},qg(s),ji(s,Ut,y)):((a.lanes&f)!==0&&(Ug(a,s),Yc(s,null,null,f),Vc()),y=a.memoizedState,j=s.memoizedState,y.parent!==p?(y={parent:p,cache:p},s.memoizedState=y,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=y),ji(s,Ut,p)):(p=j.cache,ji(s,Ut,p),p!==y.cache&&$g(s,[Ut],f,!0))),hn(a,s,s.pendingProps.children,f),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function $a(a){a.flags|=4}function jy(a,s,f,p,y){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(y&335544128)===y)if(a.stateNode.complete)a.flags|=8192;else if(zA())a.flags|=8192;else throw Ro=Ed,Bg}else a.flags&=-16777217}function hA(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!A2(s))if(zA())a.flags|=8192;else throw Ro=Ed,Bg}function Ud(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?yn():536870912,a.lanes|=s,Zs|=s)}function Jc(a,s){if(!tt)switch(a.tailMode){case"hidden":s=a.tail;for(var f=null;s!==null;)s.alternate!==null&&(f=s),s=s.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function _t(a){var s=a.alternate!==null&&a.alternate.child===a.child,f=0,p=0;if(s)for(var y=a.child;y!==null;)f|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)f|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=p,a.childLanes=f,s}function Eq(a,s,f){var p=s.pendingProps;switch(Mg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(s),null;case 1:return _t(s),null;case 3:return f=s.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Ra(Ut),re(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(zs(s)?$a(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Dg())),_t(s),null;case 26:var y=s.type,j=s.memoizedState;return a===null?($a(s),j!==null?(_t(s),hA(s,j)):(_t(s),jy(s,y,null,p,f))):j?j!==a.memoizedState?($a(s),_t(s),hA(s,j)):(_t(s),s.flags&=-16777217):(a=a.memoizedProps,a!==p&&$a(s),_t(s),jy(s,y,a,p,f)),null;case 27:if(ge(s),f=fe.current,y=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&$a(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return _t(s),null}a=U.current,zs(s)?V_(s):(a=x2(y,p,f),s.stateNode=a,$a(s))}return _t(s),null;case 5:if(ge(s),y=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&$a(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return _t(s),null}if(j=U.current,zs(s))V_(s);else{var T=rh(fe.current);switch(j){case 1:j=T.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:j=T.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":j=T.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":j=T.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":j=T.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof p.is=="string"?T.createElement("select",{is:p.is}):T.createElement("select"),p.multiple?j.multiple=!0:p.size&&(j.size=p.size);break;default:j=typeof p.is=="string"?T.createElement(y,{is:p.is}):T.createElement(y)}}j[un]=s,j[Dn]=p;e:for(T=s.child;T!==null;){if(T.tag===5||T.tag===6)j.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===s)break e;for(;T.sibling===null;){if(T.return===null||T.return===s)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}s.stateNode=j;e:switch(mn(j,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&$a(s)}}return _t(s),jy(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,f),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==p&&$a(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(a=fe.current,zs(s)){if(a=s.stateNode,f=s.memoizedProps,p=null,y=fn,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}a[un]=s,a=!!(a.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||c2(a.nodeValue,f)),a||Si(s,!0)}else a=rh(a).createTextNode(p),a[un]=s,s.stateNode=a}return _t(s),null;case 31:if(f=s.memoizedState,a===null||a.memoizedState!==null){if(p=zs(s),f!==null){if(a===null){if(!p)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[un]=s}else No(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;_t(s),a=!1}else f=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return s.flags&256?(Qn(s),s):(Qn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return _t(s),null;case 13:if(p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=zs(s),p!==null&&p.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[un]=s}else No(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;_t(s),y=!1}else y=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return s.flags&256?(Qn(s),s):(Qn(s),null)}return Qn(s),(s.flags&128)!==0?(s.lanes=f,s):(f=p!==null,a=a!==null&&a.memoizedState!==null,f&&(p=s.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),j=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(j=p.memoizedState.cachePool.pool),j!==y&&(p.flags|=2048)),f!==a&&f&&(s.child.flags|=8192),Ud(s,s.updateQueue),_t(s),null);case 4:return re(),a===null&&Gy(s.stateNode.containerInfo),_t(s),null;case 10:return Ra(s.type),_t(s),null;case 19:if(Y(Lt),p=s.memoizedState,p===null)return _t(s),null;if(y=(s.flags&128)!==0,j=p.rendering,j===null)if(y)Jc(p,!1);else{if($t!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=Cd(a),j!==null){for(s.flags|=128,Jc(p,!1),a=j.updateQueue,s.updateQueue=a,Ud(s,a),s.subtreeFlags=0,a=f,f=s.child;f!==null;)q_(f,a),f=f.sibling;return q(Lt,Lt.current&1|2),tt&&Ta(s,p.treeForkCount),s.child}a=a.sibling}p.tail!==null&&nn()>Yd&&(s.flags|=128,y=!0,Jc(p,!1),s.lanes=4194304)}else{if(!y)if(a=Cd(j),a!==null){if(s.flags|=128,y=!0,a=a.updateQueue,s.updateQueue=a,Ud(s,a),Jc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!j.alternate&&!tt)return _t(s),null}else 2*nn()-p.renderingStartTime>Yd&&f!==536870912&&(s.flags|=128,y=!0,Jc(p,!1),s.lanes=4194304);p.isBackwards?(j.sibling=s.child,s.child=j):(a=p.last,a!==null?a.sibling=j:s.child=j,p.last=j)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=nn(),a.sibling=null,f=Lt.current,q(Lt,y?f&1|2:f&1),tt&&Ta(s,p.treeForkCount),a):(_t(s),null);case 22:case 23:return Qn(s),Vg(),p=s.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(f&536870912)!==0&&(s.flags&128)===0&&(_t(s),s.subtreeFlags&6&&(s.flags|=8192)):_t(s),f=s.updateQueue,f!==null&&Ud(s,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==f&&(s.flags|=2048),a!==null&&Y(To),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),Ra(Ut),_t(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function _q(a,s){switch(Mg(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Ra(Ut),re(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ge(s),null;case 31:if(s.memoizedState!==null){if(Qn(s),s.alternate===null)throw Error(r(340));No()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Qn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));No()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return Y(Lt),null;case 4:return re(),null;case 10:return Ra(s.type),null;case 22:case 23:return Qn(s),Vg(),a!==null&&Y(To),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Ra(Ut),null;case 25:return null;default:return null}}function mA(a,s){switch(Mg(s),s.tag){case 3:Ra(Ut),re();break;case 26:case 27:case 5:ge(s);break;case 4:re();break;case 31:s.memoizedState!==null&&Qn(s);break;case 13:Qn(s);break;case 19:Y(Lt);break;case 10:Ra(s.type);break;case 22:case 23:Qn(s),Vg(),a!==null&&Y(To);break;case 24:Ra(Ut)}}function eu(a,s){try{var f=s.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var y=p.next;f=y;do{if((f.tag&a)===a){p=void 0;var j=f.create,T=f.inst;p=j(),T.destroy=p}f=f.next}while(f!==y)}}catch(P){dt(s,s.return,P)}}function Ci(a,s,f){try{var p=s.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var j=y.next;p=j;do{if((p.tag&a)===a){var T=p.inst,P=T.destroy;if(P!==void 0){T.destroy=void 0,y=s;var V=f,te=P;try{te()}catch(ce){dt(y,V,ce)}}}p=p.next}while(p!==j)}}catch(ce){dt(s,s.return,ce)}}function pA(a){var s=a.updateQueue;if(s!==null){var f=a.stateNode;try{iN(s,f)}catch(p){dt(a,a.return,p)}}}function vA(a,s,f){f.props=ko(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(p){dt(a,s,p)}}function tu(a,s){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof f=="function"?a.refCleanup=f(p):f.current=p}}catch(y){dt(a,s,y)}}function ia(a,s){var f=a.ref,p=a.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(y){dt(a,s,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(y){dt(a,s,y)}else f.current=null}function gA(a){var s=a.type,f=a.memoizedProps,p=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(y){dt(a,a.return,y)}}function Oy(a,s,f){try{var p=a.stateNode;Wq(p,a.type,f,s),p[Dn]=s}catch(y){dt(a,a.return,y)}}function yA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&$i(a.type)||a.tag===4}function Ey(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||yA(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&&$i(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 _y(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,s):(s=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,s.appendChild(a),f=f._reactRootContainer,f!=null||s.onclick!==null||(s.onclick=Na));else if(p!==4&&(p===27&&$i(a.type)&&(f=a.stateNode,s=null),a=a.child,a!==null))for(_y(a,s,f),a=a.sibling;a!==null;)_y(a,s,f),a=a.sibling}function Hd(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?f.insertBefore(a,s):f.appendChild(a);else if(p!==4&&(p===27&&$i(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(Hd(a,s,f),a=a.sibling;a!==null;)Hd(a,s,f),a=a.sibling}function bA(a){var s=a.stateNode,f=a.memoizedProps;try{for(var p=a.type,y=s.attributes;y.length;)s.removeAttributeNode(y[0]);mn(s,p,f),s[un]=a,s[Dn]=f}catch(j){dt(a,a.return,j)}}var Ia=!1,Gt=!1,Ny=!1,xA=typeof WeakSet=="function"?WeakSet:Set,on=null;function Nq(a,s){if(a=a.containerInfo,Wy=uh,a=R_(a),xg(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var y=p.anchorOffset,j=p.focusNode;p=p.focusOffset;try{f.nodeType,j.nodeType}catch{f=null;break e}var T=0,P=-1,V=-1,te=0,ce=0,he=a,ae=null;t:for(;;){for(var se;he!==f||y!==0&&he.nodeType!==3||(P=T+y),he!==j||p!==0&&he.nodeType!==3||(V=T+p),he.nodeType===3&&(T+=he.nodeValue.length),(se=he.firstChild)!==null;)ae=he,he=se;for(;;){if(he===a)break t;if(ae===f&&++te===y&&(P=T),ae===j&&++ce===p&&(V=T),(se=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=se}f=P===-1||V===-1?null:{start:P,end:V}}else f=null}f=f||{start:0,end:0}}else f=null;for(Ky={focusedElem:a,selectionRange:f},uh=!1,on=s;on!==null;)if(s=on,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,on=a;else for(;on!==null;){switch(s=on,j=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)y=a[f],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,f=s,y=j.memoizedProps,j=j.memoizedState,p=f.stateNode;try{var Se=ko(f.type,y);a=p.getSnapshotBeforeUpdate(Se,j),p.__reactInternalSnapshotBeforeUpdate=a}catch(De){dt(f,f.return,De)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,f=a.nodeType,f===9)Zy(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Zy(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=s.sibling,a!==null){a.return=s.return,on=a;break}on=s.return}}function wA(a,s,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:za(a,f),p&4&&eu(5,f);break;case 1:if(za(a,f),p&4)if(a=f.stateNode,s===null)try{a.componentDidMount()}catch(T){dt(f,f.return,T)}else{var y=ko(f.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(y,s,a.__reactInternalSnapshotBeforeUpdate)}catch(T){dt(f,f.return,T)}}p&64&&pA(f),p&512&&tu(f,f.return);break;case 3:if(za(a,f),p&64&&(a=f.updateQueue,a!==null)){if(s=null,f.child!==null)switch(f.child.tag){case 27:case 5:s=f.child.stateNode;break;case 1:s=f.child.stateNode}try{iN(a,s)}catch(T){dt(f,f.return,T)}}break;case 27:s===null&&p&4&&bA(f);case 26:case 5:za(a,f),s===null&&p&4&&gA(f),p&512&&tu(f,f.return);break;case 12:za(a,f);break;case 31:za(a,f),p&4&&OA(a,f);break;case 13:za(a,f),p&4&&EA(a,f),p&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=$q.bind(null,f),nU(a,f))));break;case 22:if(p=f.memoizedState!==null||Ia,!p){s=s!==null&&s.memoizedState!==null||Gt,y=Ia;var j=Gt;Ia=p,(Gt=s)&&!j?Ba(a,f,(f.subtreeFlags&8772)!==0):za(a,f),Ia=y,Gt=j}break;case 30:break;default:za(a,f)}}function SA(a){var s=a.alternate;s!==null&&(a.alternate=null,SA(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&rg(s)),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 Ct=null,kn=!1;function La(a,s,f){for(f=f.child;f!==null;)jA(a,s,f),f=f.sibling}function jA(a,s,f){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(yo,f)}catch{}switch(f.tag){case 26:Gt||ia(f,s),La(a,s,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Gt||ia(f,s);var p=Ct,y=kn;$i(f.type)&&(Ct=f.stateNode,kn=!1),La(a,s,f),uu(f.stateNode),Ct=p,kn=y;break;case 5:Gt||ia(f,s);case 6:if(p=Ct,y=kn,Ct=null,La(a,s,f),Ct=p,kn=y,Ct!==null)if(kn)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(f.stateNode)}catch(j){dt(f,s,j)}else try{Ct.removeChild(f.stateNode)}catch(j){dt(f,s,j)}break;case 18:Ct!==null&&(kn?(a=Ct,p2(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),ol(a)):p2(Ct,f.stateNode));break;case 4:p=Ct,y=kn,Ct=f.stateNode.containerInfo,kn=!0,La(a,s,f),Ct=p,kn=y;break;case 0:case 11:case 14:case 15:Ci(2,f,s),Gt||Ci(4,f,s),La(a,s,f);break;case 1:Gt||(ia(f,s),p=f.stateNode,typeof p.componentWillUnmount=="function"&&vA(f,s,p)),La(a,s,f);break;case 21:La(a,s,f);break;case 22:Gt=(p=Gt)||f.memoizedState!==null,La(a,s,f),Gt=p;break;default:La(a,s,f)}}function OA(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{ol(a)}catch(f){dt(s,s.return,f)}}}function EA(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{ol(a)}catch(f){dt(s,s.return,f)}}function Aq(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new xA),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new xA),s;default:throw Error(r(435,a.tag))}}function Fd(a,s){var f=Aq(a);s.forEach(function(p){if(!f.has(p)){f.add(p);var y=Iq.bind(null,a,p);p.then(y,y)}})}function $n(a,s){var f=s.deletions;if(f!==null)for(var p=0;p<f.length;p++){var y=f[p],j=a,T=s,P=T;e:for(;P!==null;){switch(P.tag){case 27:if($i(P.type)){Ct=P.stateNode,kn=!1;break e}break;case 5:Ct=P.stateNode,kn=!1;break e;case 3:case 4:Ct=P.stateNode.containerInfo,kn=!0;break e}P=P.return}if(Ct===null)throw Error(r(160));jA(j,T,y),Ct=null,kn=!1,j=y.alternate,j!==null&&(j.return=null),y.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)_A(s,a),s=s.sibling}var zr=null;function _A(a,s){var f=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:$n(s,a),In(a),p&4&&(Ci(3,a,a.return),eu(3,a),Ci(5,a,a.return));break;case 1:$n(s,a),In(a),p&512&&(Gt||f===null||ia(f,f.return)),p&64&&Ia&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var y=zr;if($n(s,a),In(a),p&512&&(Gt||f===null||ia(f,f.return)),p&4){var j=f!==null?f.memoizedState:null;if(p=a.memoizedState,f===null)if(p===null)if(a.stateNode===null){e:{p=a.type,f=a.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":j=y.getElementsByTagName("title")[0],(!j||j[Ac]||j[un]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=y.createElement(p),y.head.insertBefore(j,y.querySelector("head > title"))),mn(j,p,f),j[un]=a,an(j),p=j;break e;case"link":var T=_2("link","href",y).get(p+(f.href||""));if(T){for(var P=0;P<T.length;P++)if(j=T[P],j.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&j.getAttribute("rel")===(f.rel==null?null:f.rel)&&j.getAttribute("title")===(f.title==null?null:f.title)&&j.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){T.splice(P,1);break t}}j=y.createElement(p),mn(j,p,f),y.head.appendChild(j);break;case"meta":if(T=_2("meta","content",y).get(p+(f.content||""))){for(P=0;P<T.length;P++)if(j=T[P],j.getAttribute("content")===(f.content==null?null:""+f.content)&&j.getAttribute("name")===(f.name==null?null:f.name)&&j.getAttribute("property")===(f.property==null?null:f.property)&&j.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&j.getAttribute("charset")===(f.charSet==null?null:f.charSet)){T.splice(P,1);break t}}j=y.createElement(p),mn(j,p,f),y.head.appendChild(j);break;default:throw Error(r(468,p))}j[un]=a,an(j),p=j}a.stateNode=p}else N2(y,a.type,a.stateNode);else a.stateNode=E2(y,p,a.memoizedProps);else j!==p?(j===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):j.count--,p===null?N2(y,a.type,a.stateNode):E2(y,p,a.memoizedProps)):p===null&&a.stateNode!==null&&Oy(a,a.memoizedProps,f.memoizedProps)}break;case 27:$n(s,a),In(a),p&512&&(Gt||f===null||ia(f,f.return)),f!==null&&p&4&&Oy(a,a.memoizedProps,f.memoizedProps);break;case 5:if($n(s,a),In(a),p&512&&(Gt||f===null||ia(f,f.return)),a.flags&32){y=a.stateNode;try{Cs(y,"")}catch(Se){dt(a,a.return,Se)}}p&4&&a.stateNode!=null&&(y=a.memoizedProps,Oy(a,y,f!==null?f.memoizedProps:y)),p&1024&&(Ny=!0);break;case 6:if($n(s,a),In(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,f=a.stateNode;try{f.nodeValue=p}catch(Se){dt(a,a.return,Se)}}break;case 3:if(oh=null,y=zr,zr=ah(s.containerInfo),$n(s,a),zr=y,In(a),p&4&&f!==null&&f.memoizedState.isDehydrated)try{ol(s.containerInfo)}catch(Se){dt(a,a.return,Se)}Ny&&(Ny=!1,NA(a));break;case 4:p=zr,zr=ah(a.stateNode.containerInfo),$n(s,a),In(a),zr=p;break;case 12:$n(s,a),In(a);break;case 31:$n(s,a),In(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fd(a,p)));break;case 13:$n(s,a),In(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Vd=nn()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fd(a,p)));break;case 22:y=a.memoizedState!==null;var V=f!==null&&f.memoizedState!==null,te=Ia,ce=Gt;if(Ia=te||y,Gt=ce||V,$n(s,a),Gt=ce,Ia=te,In(a),p&8192)e:for(s=a.stateNode,s._visibility=y?s._visibility&-2:s._visibility|1,y&&(f===null||V||Ia||Gt||$o(a)),f=null,s=a;;){if(s.tag===5||s.tag===26){if(f===null){V=f=s;try{if(j=V.stateNode,y)T=j.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{P=V.stateNode;var he=V.memoizedProps.style,ae=he!=null&&he.hasOwnProperty("display")?he.display:null;P.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Se){dt(V,V.return,Se)}}}else if(s.tag===6){if(f===null){V=s;try{V.stateNode.nodeValue=y?"":V.memoizedProps}catch(Se){dt(V,V.return,Se)}}}else if(s.tag===18){if(f===null){V=s;try{var se=V.stateNode;y?v2(se,!0):v2(V.stateNode,!1)}catch(Se){dt(V,V.return,Se)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;f===s&&(f=null),s=s.return}f===s&&(f=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=a.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,Fd(a,f))));break;case 19:$n(s,a),In(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fd(a,p)));break;case 30:break;case 21:break;default:$n(s,a),In(a)}}function In(a){var s=a.flags;if(s&2){try{for(var f,p=a.return;p!==null;){if(yA(p)){f=p;break}p=p.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var y=f.stateNode,j=Ey(a);Hd(a,j,y);break;case 5:var T=f.stateNode;f.flags&32&&(Cs(T,""),f.flags&=-33);var P=Ey(a);Hd(a,P,T);break;case 3:case 4:var V=f.stateNode.containerInfo,te=Ey(a);_y(a,te,V);break;default:throw Error(r(161))}}catch(ce){dt(a,a.return,ce)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function NA(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;NA(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function za(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)wA(a,s.alternate,s),s=s.sibling}function $o(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Ci(4,s,s.return),$o(s);break;case 1:ia(s,s.return);var f=s.stateNode;typeof f.componentWillUnmount=="function"&&vA(s,s.return,f),$o(s);break;case 27:uu(s.stateNode);case 26:case 5:ia(s,s.return),$o(s);break;case 22:s.memoizedState===null&&$o(s);break;case 30:$o(s);break;default:$o(s)}a=a.sibling}}function Ba(a,s,f){for(f=f&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,y=a,j=s,T=j.flags;switch(j.tag){case 0:case 11:case 15:Ba(y,j,f),eu(4,j);break;case 1:if(Ba(y,j,f),p=j,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(te){dt(p,p.return,te)}if(p=j,y=p.updateQueue,y!==null){var P=p.stateNode;try{var V=y.shared.hiddenCallbacks;if(V!==null)for(y.shared.hiddenCallbacks=null,y=0;y<V.length;y++)aN(V[y],P)}catch(te){dt(p,p.return,te)}}f&&T&64&&pA(j),tu(j,j.return);break;case 27:bA(j);case 26:case 5:Ba(y,j,f),f&&p===null&&T&4&&gA(j),tu(j,j.return);break;case 12:Ba(y,j,f);break;case 31:Ba(y,j,f),f&&T&4&&OA(y,j);break;case 13:Ba(y,j,f),f&&T&4&&EA(y,j);break;case 22:j.memoizedState===null&&Ba(y,j,f),tu(j,j.return);break;case 30:break;default:Ba(y,j,f)}s=s.sibling}}function Ay(a,s){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&qc(f))}function Cy(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&qc(a))}function Br(a,s,f,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)AA(a,s,f,p),s=s.sibling}function AA(a,s,f,p){var y=s.flags;switch(s.tag){case 0:case 11:case 15:Br(a,s,f,p),y&2048&&eu(9,s);break;case 1:Br(a,s,f,p);break;case 3:Br(a,s,f,p),y&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&qc(a)));break;case 12:if(y&2048){Br(a,s,f,p),a=s.stateNode;try{var j=s.memoizedProps,T=j.id,P=j.onPostCommit;typeof P=="function"&&P(T,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(V){dt(s,s.return,V)}}else Br(a,s,f,p);break;case 31:Br(a,s,f,p);break;case 13:Br(a,s,f,p);break;case 23:break;case 22:j=s.stateNode,T=s.alternate,s.memoizedState!==null?j._visibility&2?Br(a,s,f,p):nu(a,s):j._visibility&2?Br(a,s,f,p):(j._visibility|=2,Ks(a,s,f,p,(s.subtreeFlags&10256)!==0||!1)),y&2048&&Ay(T,s);break;case 24:Br(a,s,f,p),y&2048&&Cy(s.alternate,s);break;default:Br(a,s,f,p)}}function Ks(a,s,f,p,y){for(y=y&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,T=s,P=f,V=p,te=T.flags;switch(T.tag){case 0:case 11:case 15:Ks(j,T,P,V,y),eu(8,T);break;case 23:break;case 22:var ce=T.stateNode;T.memoizedState!==null?ce._visibility&2?Ks(j,T,P,V,y):nu(j,T):(ce._visibility|=2,Ks(j,T,P,V,y)),y&&te&2048&&Ay(T.alternate,T);break;case 24:Ks(j,T,P,V,y),y&&te&2048&&Cy(T.alternate,T);break;default:Ks(j,T,P,V,y)}s=s.sibling}}function nu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var f=a,p=s,y=p.flags;switch(p.tag){case 22:nu(f,p),y&2048&&Ay(p.alternate,p);break;case 24:nu(f,p),y&2048&&Cy(p.alternate,p);break;default:nu(f,p)}s=s.sibling}}var ru=8192;function Xs(a,s,f){if(a.subtreeFlags&ru)for(a=a.child;a!==null;)CA(a,s,f),a=a.sibling}function CA(a,s,f){switch(a.tag){case 26:Xs(a,s,f),a.flags&ru&&a.memoizedState!==null&&mU(f,zr,a.memoizedState,a.memoizedProps);break;case 5:Xs(a,s,f);break;case 3:case 4:var p=zr;zr=ah(a.stateNode.containerInfo),Xs(a,s,f),zr=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=ru,ru=16777216,Xs(a,s,f),ru=p):Xs(a,s,f));break;default:Xs(a,s,f)}}function TA(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function au(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];on=p,RA(p,a)}TA(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)MA(a),a=a.sibling}function MA(a){switch(a.tag){case 0:case 11:case 15:au(a),a.flags&2048&&Ci(9,a,a.return);break;case 3:au(a);break;case 12:au(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Gd(a)):au(a);break;default:au(a)}}function Gd(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];on=p,RA(p,a)}TA(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Ci(8,s,s.return),Gd(s);break;case 22:f=s.stateNode,f._visibility&2&&(f._visibility&=-3,Gd(s));break;default:Gd(s)}a=a.sibling}}function RA(a,s){for(;on!==null;){var f=on;switch(f.tag){case 0:case 11:case 15:Ci(8,f,s);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:qc(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,on=p;else e:for(f=a;on!==null;){p=on;var y=p.sibling,j=p.return;if(SA(p),p===f){on=null;break e}if(y!==null){y.return=j,on=y;break e}on=j}}}var Cq={getCacheForType:function(a){var s=dn(Ut),f=s.data.get(a);return f===void 0&&(f=a(),s.data.set(a,f)),f},cacheSignal:function(){return dn(Ut).controller.signal}},Tq=typeof WeakMap=="function"?WeakMap:Map,st=0,wt=null,Ke=null,Je=0,ft=0,Zn=null,Ti=!1,Qs=!1,Ty=!1,qa=0,$t=0,Mi=0,Io=0,My=0,Jn=0,Zs=0,iu=null,Ln=null,Ry=!1,Vd=0,DA=0,Yd=1/0,Wd=null,Ri=null,Kt=0,Di=null,Js=null,Ua=0,Dy=0,Py=null,PA=null,ou=0,ky=null;function er(){return(st&2)!==0&&Je!==0?Je&-Je:k.T!==null?qy():tg()}function kA(){if(Jn===0)if((Je&536870912)===0||tt){var a=ws;ws<<=1,(ws&3932160)===0&&(ws=262144),Jn=a}else Jn=536870912;return a=Xn.current,a!==null&&(a.flags|=32),Jn}function zn(a,s,f){(a===wt&&(ft===2||ft===9)||a.cancelPendingCommit!==null)&&(el(a,0),Pi(a,Je,Jn,!1)),Dt(a,f),((st&2)===0||a!==wt)&&(a===wt&&((st&2)===0&&(Io|=f),$t===4&&Pi(a,Je,Jn,!1)),oa(a))}function $A(a,s,f){if((st&6)!==0)throw Error(r(327));var p=!f&&(s&127)===0&&(s&a.expiredLanes)===0||At(a,s),y=p?Dq(a,s):Iy(a,s,!0),j=p;do{if(y===0){Qs&&!p&&Pi(a,s,0,!1);break}else{if(f=a.current.alternate,j&&!Mq(f)){y=Iy(a,s,!1),j=!1;continue}if(y===2){if(j=s,a.errorRecoveryDisabledLanes&j)var T=0;else T=a.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){s=T;e:{var P=a;y=iu;var V=P.current.memoizedState.isDehydrated;if(V&&(el(P,T).flags|=256),T=Iy(P,T,!1),T!==2){if(Ty&&!V){P.errorRecoveryDisabledLanes|=j,Io|=j,y=4;break e}j=Ln,Ln=y,j!==null&&(Ln===null?Ln=j:Ln.push.apply(Ln,j))}y=T}if(j=!1,y!==2)continue}}if(y===1){el(a,0),Pi(a,s,0,!0);break}e:{switch(p=a,j=y,j){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Pi(p,s,Jn,!Ti);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(y=Vd+300-nn(),10<y)){if(Pi(p,s,Jn,!Ti),Ie(p,0,!0)!==0)break e;Ua=s,p.timeoutHandle=h2(IA.bind(null,p,f,Ln,Wd,Ry,s,Jn,Io,Zs,Ti,j,"Throttled",-0,0),y);break e}IA(p,f,Ln,Wd,Ry,s,Jn,Io,Zs,Ti,j,null,-0,0)}}break}while(!0);oa(a)}function IA(a,s,f,p,y,j,T,P,V,te,ce,he,ae,se){if(a.timeoutHandle=-1,he=s.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Na},CA(s,j,he);var Se=(j&62914560)===j?Vd-nn():(j&4194048)===j?DA-nn():0;if(Se=pU(he,Se),Se!==null){Ua=j,a.cancelPendingCommit=Se(GA.bind(null,a,s,j,f,p,y,T,P,V,ce,he,null,ae,se)),Pi(a,j,T,!te);return}}GA(a,s,j,f,p,y,T,P,V)}function Mq(a){for(var s=a;;){var f=s.tag;if((f===0||f===11||f===15)&&s.flags&16384&&(f=s.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var y=f[p],j=y.getSnapshot;y=y.value;try{if(!Wn(j(),y))return!1}catch{return!1}}if(f=s.child,s.subtreeFlags&16384&&f!==null)f.return=s,s=f;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Pi(a,s,f,p){s&=~My,s&=~Io,a.suspendedLanes|=s,a.pingedLanes&=~s,p&&(a.warmLanes|=s),p=a.expirationTimes;for(var y=s;0<y;){var j=31-gn(y),T=1<<j;p[j]=-1,y&=~T}f!==0&&xo(a,f,s)}function Kd(){return(st&6)===0?(su(0),!1):!0}function $y(){if(Ke!==null){if(ft===0)var a=Ke.return;else a=Ke,Ma=Ao=null,Zg(a),Fs=null,Hc=0,a=Ke;for(;a!==null;)mA(a.alternate,a),a=a.return;Ke=null}}function el(a,s){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,Qq(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Ua=0,$y(),wt=a,Ke=f=Ca(a.current,null),Je=s,ft=0,Zn=null,Ti=!1,Qs=At(a,s),Ty=!1,Zs=Jn=My=Io=Mi=$t=0,Ln=iu=null,Ry=!1,(s&8)!==0&&(s|=s&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=s;0<p;){var y=31-gn(p),j=1<<y;s|=a[y],p&=~j}return qa=s,vd(),f}function LA(a,s){He=null,k.H=Qc,s===Hs||s===Od?(s=eN(),ft=3):s===Bg?(s=eN(),ft=4):ft=s===my?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Zn=s,Ke===null&&($t=1,Ld(a,gr(s,a.current)))}function zA(){var a=Xn.current;return a===null?!0:(Je&4194048)===Je?wr===null:(Je&62914560)===Je||(Je&536870912)!==0?a===wr:!1}function BA(){var a=k.H;return k.H=Qc,a===null?Qc:a}function qA(){var a=k.A;return k.A=Cq,a}function Xd(){$t=4,Ti||(Je&4194048)!==Je&&Xn.current!==null||(Qs=!0),(Mi&134217727)===0&&(Io&134217727)===0||wt===null||Pi(wt,Je,Jn,!1)}function Iy(a,s,f){var p=st;st|=2;var y=BA(),j=qA();(wt!==a||Je!==s)&&(Wd=null,el(a,s)),s=!1;var T=$t;e:do try{if(ft!==0&&Ke!==null){var P=Ke,V=Zn;switch(ft){case 8:$y(),T=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(s=!0);var te=ft;if(ft=0,Zn=null,tl(a,P,V,te),f&&Qs){T=0;break e}break;default:te=ft,ft=0,Zn=null,tl(a,P,V,te)}}Rq(),T=$t;break}catch(ce){LA(a,ce)}while(!0);return s&&a.shellSuspendCounter++,Ma=Ao=null,st=p,k.H=y,k.A=j,Ke===null&&(wt=null,Je=0,vd()),T}function Rq(){for(;Ke!==null;)UA(Ke)}function Dq(a,s){var f=st;st|=2;var p=BA(),y=qA();wt!==a||Je!==s?(Wd=null,Yd=nn()+500,el(a,s)):Qs=At(a,s);e:do try{if(ft!==0&&Ke!==null){s=Ke;var j=Zn;t:switch(ft){case 1:ft=0,Zn=null,tl(a,s,j,1);break;case 2:case 9:if(Z_(j)){ft=0,Zn=null,HA(s);break}s=function(){ft!==2&&ft!==9||wt!==a||(ft=7),oa(a)},j.then(s,s);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:Z_(j)?(ft=0,Zn=null,HA(s)):(ft=0,Zn=null,tl(a,s,j,7));break;case 5:var T=null;switch(Ke.tag){case 26:T=Ke.memoizedState;case 5:case 27:var P=Ke;if(T?A2(T):P.stateNode.complete){ft=0,Zn=null;var V=P.sibling;if(V!==null)Ke=V;else{var te=P.return;te!==null?(Ke=te,Qd(te)):Ke=null}break t}}ft=0,Zn=null,tl(a,s,j,5);break;case 6:ft=0,Zn=null,tl(a,s,j,6);break;case 8:$y(),$t=6;break e;default:throw Error(r(462))}}Pq();break}catch(ce){LA(a,ce)}while(!0);return Ma=Ao=null,k.H=p,k.A=y,st=f,Ke!==null?0:(wt=null,Je=0,vd(),$t)}function Pq(){for(;Ke!==null&&!Rt();)UA(Ke)}function UA(a){var s=dA(a.alternate,a,qa);a.memoizedProps=a.pendingProps,s===null?Qd(a):Ke=s}function HA(a){var s=a,f=s.alternate;switch(s.tag){case 15:case 0:s=oA(f,s,s.pendingProps,s.type,void 0,Je);break;case 11:s=oA(f,s,s.pendingProps,s.type.render,s.ref,Je);break;case 5:Zg(s);default:mA(f,s),s=Ke=q_(s,qa),s=dA(f,s,qa)}a.memoizedProps=a.pendingProps,s===null?Qd(a):Ke=s}function tl(a,s,f,p){Ma=Ao=null,Zg(s),Fs=null,Hc=0;var y=s.return;try{if(Sq(a,y,s,f,Je)){$t=1,Ld(a,gr(f,a.current)),Ke=null;return}}catch(j){if(y!==null)throw Ke=y,j;$t=1,Ld(a,gr(f,a.current)),Ke=null;return}s.flags&32768?(tt||p===1?a=!0:Qs||(Je&536870912)!==0?a=!1:(Ti=a=!0,(p===2||p===9||p===3||p===6)&&(p=Xn.current,p!==null&&p.tag===13&&(p.flags|=16384))),FA(s,a)):Qd(s)}function Qd(a){var s=a;do{if((s.flags&32768)!==0){FA(s,Ti);return}a=s.return;var f=Eq(s.alternate,s,qa);if(f!==null){Ke=f;return}if(s=s.sibling,s!==null){Ke=s;return}Ke=s=a}while(s!==null);$t===0&&($t=5)}function FA(a,s){do{var f=_q(a.alternate,a);if(f!==null){f.flags&=32767,Ke=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!s&&(a=a.sibling,a!==null)){Ke=a;return}Ke=a=f}while(a!==null);$t=6,Ke=null}function GA(a,s,f,p,y,j,T,P,V){a.cancelPendingCommit=null;do Zd();while(Kt!==0);if((st&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(j=s.lanes|s.childLanes,j|=Eg,Tn(a,f,j,T,P,V),a===wt&&(Ke=wt=null,Je=0),Js=s,Di=a,Ua=f,Dy=j,Py=y,PA=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Lq(go,function(){return XA(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=k.T,k.T=null,y=H.p,H.p=2,T=st,st|=4;try{Nq(a,s,f)}finally{st=T,H.p=y,k.T=p}}Kt=1,VA(),YA(),WA()}}function VA(){if(Kt===1){Kt=0;var a=Di,s=Js,f=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||f){f=k.T,k.T=null;var p=H.p;H.p=2;var y=st;st|=4;try{_A(s,a);var j=Ky,T=R_(a.containerInfo),P=j.focusedElem,V=j.selectionRange;if(T!==P&&P&&P.ownerDocument&&M_(P.ownerDocument.documentElement,P)){if(V!==null&&xg(P)){var te=V.start,ce=V.end;if(ce===void 0&&(ce=te),"selectionStart"in P)P.selectionStart=te,P.selectionEnd=Math.min(ce,P.value.length);else{var he=P.ownerDocument||document,ae=he&&he.defaultView||window;if(ae.getSelection){var se=ae.getSelection(),Se=P.textContent.length,De=Math.min(V.start,Se),yt=V.end===void 0?De:Math.min(V.end,Se);!se.extend&&De>yt&&(T=yt,yt=De,De=T);var J=T_(P,De),K=T_(P,yt);if(J&&K&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==K.node||se.focusOffset!==K.offset)){var ee=he.createRange();ee.setStart(J.node,J.offset),se.removeAllRanges(),De>yt?(se.addRange(ee),se.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),se.addRange(ee))}}}}for(he=[],se=P;se=se.parentNode;)se.nodeType===1&&he.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<he.length;P++){var de=he[P];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}uh=!!Wy,Ky=Wy=null}finally{st=y,H.p=p,k.T=f}}a.current=s,Kt=2}}function YA(){if(Kt===2){Kt=0;var a=Di,s=Js,f=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||f){f=k.T,k.T=null;var p=H.p;H.p=2;var y=st;st|=4;try{wA(a,s.alternate,s)}finally{st=y,H.p=p,k.T=f}}Kt=3}}function WA(){if(Kt===4||Kt===3){Kt=0,hr();var a=Di,s=Js,f=Ua,p=PA;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Kt=5:(Kt=0,Js=Di=null,KA(a,a.pendingLanes));var y=a.pendingLanes;if(y===0&&(Ri=null),Ir(f),s=s.stateNode,On&&typeof On.onCommitFiberRoot=="function")try{On.onCommitFiberRoot(yo,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=k.T,y=H.p,H.p=2,k.T=null;try{for(var j=a.onRecoverableError,T=0;T<p.length;T++){var P=p[T];j(P.value,{componentStack:P.stack})}}finally{k.T=s,H.p=y}}(Ua&3)!==0&&Zd(),oa(a),y=a.pendingLanes,(f&261930)!==0&&(y&42)!==0?a===ky?ou++:(ou=0,ky=a):ou=0,su(0)}}function KA(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,qc(s)))}function Zd(){return VA(),YA(),WA(),XA()}function XA(){if(Kt!==5)return!1;var a=Di,s=Dy;Dy=0;var f=Ir(Ua),p=k.T,y=H.p;try{H.p=32>f?32:f,k.T=null,f=Py,Py=null;var j=Di,T=Ua;if(Kt=0,Js=Di=null,Ua=0,(st&6)!==0)throw Error(r(331));var P=st;if(st|=4,MA(j.current),AA(j,j.current,T,f),st=P,su(0,!1),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(yo,j)}catch{}return!0}finally{H.p=y,k.T=p,KA(a,s)}}function QA(a,s,f){s=gr(f,s),s=hy(a.stateNode,s,2),a=_i(a,s,2),a!==null&&(Dt(a,2),oa(a))}function dt(a,s,f){if(a.tag===3)QA(a,a,f);else for(;s!==null;){if(s.tag===3){QA(s,a,f);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ri===null||!Ri.has(p))){a=gr(f,a),f=ZN(2),p=_i(s,f,2),p!==null&&(JN(f,p,s,a),Dt(p,2),oa(p));break}}s=s.return}}function Ly(a,s,f){var p=a.pingCache;if(p===null){p=a.pingCache=new Tq;var y=new Set;p.set(s,y)}else y=p.get(s),y===void 0&&(y=new Set,p.set(s,y));y.has(f)||(Ty=!0,y.add(f),a=kq.bind(null,a,s,f),s.then(a,a))}function kq(a,s,f){var p=a.pingCache;p!==null&&p.delete(s),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,wt===a&&(Je&f)===f&&($t===4||$t===3&&(Je&62914560)===Je&&300>nn()-Vd?(st&2)===0&&el(a,0):My|=f,Zs===Je&&(Zs=0)),oa(a)}function ZA(a,s){s===0&&(s=yn()),a=Eo(a,s),a!==null&&(Dt(a,s),oa(a))}function $q(a){var s=a.memoizedState,f=0;s!==null&&(f=s.retryLane),ZA(a,f)}function Iq(a,s){var f=0;switch(a.tag){case 31:case 13:var p=a.stateNode,y=a.memoizedState;y!==null&&(f=y.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),ZA(a,f)}function Lq(a,s){return dr(a,s)}var Jd=null,nl=null,zy=!1,eh=!1,By=!1,ki=0;function oa(a){a!==nl&&a.next===null&&(nl===null?Jd=nl=a:nl=nl.next=a),eh=!0,zy||(zy=!0,Bq())}function su(a,s){if(!By&&eh){By=!0;do for(var f=!1,p=Jd;p!==null;){if(a!==0){var y=p.pendingLanes;if(y===0)var j=0;else{var T=p.suspendedLanes,P=p.pingedLanes;j=(1<<31-gn(42|a)+1)-1,j&=y&~(T&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(f=!0,n2(p,j))}else j=Je,j=Ie(p,p===wt?j:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(j&3)===0||At(p,j)||(f=!0,n2(p,j));p=p.next}while(f);By=!1}}function zq(){JA()}function JA(){eh=zy=!1;var a=0;ki!==0&&Xq()&&(a=ki);for(var s=nn(),f=null,p=Jd;p!==null;){var y=p.next,j=e2(p,s);j===0?(p.next=null,f===null?Jd=y:f.next=y,y===null&&(nl=f)):(f=p,(a!==0||(j&3)!==0)&&(eh=!0)),p=y}Kt!==0&&Kt!==5||su(a),ki!==0&&(ki=0)}function e2(a,s){for(var f=a.suspendedLanes,p=a.pingedLanes,y=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var T=31-gn(j),P=1<<T,V=y[T];V===-1?((P&f)===0||(P&p)!==0)&&(y[T]=rn(P,s)):V<=s&&(a.expiredLanes|=P),j&=~P}if(s=wt,f=Je,f=Ie(a,a===s?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,f===0||a===s&&(ft===2||ft===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&Yn(p),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||At(a,f)){if(s=f&-f,s===a.callbackPriority)return s;switch(p!==null&&Yn(p),Ir(f)){case 2:case 8:f=rd;break;case 32:f=go;break;case 268435456:f=Ea;break;default:f=go}return p=t2.bind(null,a),f=dr(f,p),a.callbackPriority=s,a.callbackNode=f,s}return p!==null&&p!==null&&Yn(p),a.callbackPriority=2,a.callbackNode=null,2}function t2(a,s){if(Kt!==0&&Kt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Zd()&&a.callbackNode!==f)return null;var p=Je;return p=Ie(a,a===wt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:($A(a,p,s),e2(a,nn()),a.callbackNode!=null&&a.callbackNode===f?t2.bind(null,a):null)}function n2(a,s){if(Zd())return null;$A(a,s,!0)}function Bq(){Zq(function(){(st&6)!==0?dr(vo,zq):JA()})}function qy(){if(ki===0){var a=qs;a===0&&(a=xs,xs<<=1,(xs&261888)===0&&(xs=256)),ki=a}return ki}function r2(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:ld(""+a)}function a2(a,s){var f=s.ownerDocument.createElement("input");return f.name=s.name,f.value=s.value,a.id&&f.setAttribute("form",a.id),s.parentNode.insertBefore(f,s),a=new FormData(a),f.parentNode.removeChild(f),a}function qq(a,s,f,p,y){if(s==="submit"&&f&&f.stateNode===y){var j=r2((y[Dn]||null).action),T=p.submitter;T&&(s=(s=T[Dn]||null)?r2(s.formAction):T.getAttribute("formAction"),s!==null&&(j=s,T=null));var P=new dd("action","action",null,p,y);a.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ki!==0){var V=T?a2(y,T):new FormData(y);sy(f,{pending:!0,data:V,method:y.method,action:j},null,V)}}else typeof j=="function"&&(P.preventDefault(),V=T?a2(y,T):new FormData(y),sy(f,{pending:!0,data:V,method:y.method,action:j},j,V))},currentTarget:y}]})}}for(var Uy=0;Uy<Og.length;Uy++){var Hy=Og[Uy],Uq=Hy.toLowerCase(),Hq=Hy[0].toUpperCase()+Hy.slice(1);Lr(Uq,"on"+Hq)}Lr(k_,"onAnimationEnd"),Lr($_,"onAnimationIteration"),Lr(I_,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(iq,"onTransitionRun"),Lr(oq,"onTransitionStart"),Lr(sq,"onTransitionCancel"),Lr(L_,"onTransitionEnd"),Ns("onMouseEnter",["mouseout","mouseover"]),Ns("onMouseLeave",["mouseout","mouseover"]),Ns("onPointerEnter",["pointerout","pointerover"]),Ns("onPointerLeave",["pointerout","pointerover"]),wo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wo("onBeforeInput",["compositionend","keypress","textInput","paste"]),wo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="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(" "),Fq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function i2(a,s){s=(s&4)!==0;for(var f=0;f<a.length;f++){var p=a[f],y=p.event;p=p.listeners;e:{var j=void 0;if(s)for(var T=p.length-1;0<=T;T--){var P=p[T],V=P.instance,te=P.currentTarget;if(P=P.listener,V!==j&&y.isPropagationStopped())break e;j=P,y.currentTarget=te;try{j(y)}catch(ce){pd(ce)}y.currentTarget=null,j=V}else for(T=0;T<p.length;T++){if(P=p[T],V=P.instance,te=P.currentTarget,P=P.listener,V!==j&&y.isPropagationStopped())break e;j=P,y.currentTarget=te;try{j(y)}catch(ce){pd(ce)}y.currentTarget=null,j=V}}}}function Xe(a,s){var f=s[ng];f===void 0&&(f=s[ng]=new Set);var p=a+"__bubble";f.has(p)||(o2(s,a,2,!1),f.add(p))}function Fy(a,s,f){var p=0;s&&(p|=4),o2(f,a,p,s)}var th="_reactListening"+Math.random().toString(36).slice(2);function Gy(a){if(!a[th]){a[th]=!0,JE.forEach(function(f){f!=="selectionchange"&&(Fq.has(f)||Fy(f,!1,a),Fy(f,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[th]||(s[th]=!0,Fy("selectionchange",!1,s))}}function o2(a,s,f,p){switch(k2(s)){case 2:var y=yU;break;case 8:y=bU;break;default:y=ob}f=y.bind(null,s,f,a),y=void 0,!fg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),p?y!==void 0?a.addEventListener(s,f,{capture:!0,passive:y}):a.addEventListener(s,f,!0):y!==void 0?a.addEventListener(s,f,{passive:y}):a.addEventListener(s,f,!1)}function Vy(a,s,f,p,y){var j=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var T=p.tag;if(T===3||T===4){var P=p.stateNode.containerInfo;if(P===y)break;if(T===4)for(T=p.return;T!==null;){var V=T.tag;if((V===3||V===4)&&T.stateNode.containerInfo===y)return;T=T.return}for(;P!==null;){if(T=Os(P),T===null)return;if(V=T.tag,V===5||V===6||V===26||V===27){p=j=T;continue e}P=P.parentNode}}p=p.return}f_(function(){var te=j,ce=cg(f),he=[];e:{var ae=z_.get(a);if(ae!==void 0){var se=dd,Se=a;switch(a){case"keypress":if(ud(f)===0)break e;case"keydown":case"keyup":se=I8;break;case"focusin":Se="focus",se=pg;break;case"focusout":Se="blur",se=pg;break;case"beforeblur":case"afterblur":se=pg;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=m_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=E8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=B8;break;case k_:case $_:case I_:se=A8;break;case L_:se=U8;break;case"scroll":case"scrollend":se=j8;break;case"wheel":se=F8;break;case"copy":case"cut":case"paste":se=T8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=v_;break;case"toggle":case"beforetoggle":se=V8}var De=(s&4)!==0,yt=!De&&(a==="scroll"||a==="scrollend"),J=De?ae!==null?ae+"Capture":null:ae;De=[];for(var K=te,ee;K!==null;){var de=K;if(ee=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ee===null||J===null||(de=Tc(K,J),de!=null&&De.push(cu(K,de,ee))),yt)break;K=K.return}0<De.length&&(ae=new se(ae,Se,null,f,ce),he.push({event:ae,listeners:De}))}}if((s&7)===0){e:{if(ae=a==="mouseover"||a==="pointerover",se=a==="mouseout"||a==="pointerout",ae&&f!==lg&&(Se=f.relatedTarget||f.fromElement)&&(Os(Se)||Se[js]))break e;if((se||ae)&&(ae=ce.window===ce?ce:(ae=ce.ownerDocument)?ae.defaultView||ae.parentWindow:window,se?(Se=f.relatedTarget||f.toElement,se=te,Se=Se?Os(Se):null,Se!==null&&(yt=o(Se),De=Se.tag,Se!==yt||De!==5&&De!==27&&De!==6)&&(Se=null)):(se=null,Se=te),se!==Se)){if(De=m_,de="onMouseLeave",J="onMouseEnter",K="mouse",(a==="pointerout"||a==="pointerover")&&(De=v_,de="onPointerLeave",J="onPointerEnter",K="pointer"),yt=se==null?ae:Cc(se),ee=Se==null?ae:Cc(Se),ae=new De(de,K+"leave",se,f,ce),ae.target=yt,ae.relatedTarget=ee,de=null,Os(ce)===te&&(De=new De(J,K+"enter",Se,f,ce),De.target=ee,De.relatedTarget=yt,de=De),yt=de,se&&Se)t:{for(De=Gq,J=se,K=Se,ee=0,de=J;de;de=De(de))ee++;de=0;for(var Ae=K;Ae;Ae=De(Ae))de++;for(;0<ee-de;)J=De(J),ee--;for(;0<de-ee;)K=De(K),de--;for(;ee--;){if(J===K||K!==null&&J===K.alternate){De=J;break t}J=De(J),K=De(K)}De=null}else De=null;se!==null&&s2(he,ae,se,De,!1),Se!==null&&yt!==null&&s2(he,yt,Se,De,!0)}}e:{if(ae=te?Cc(te):window,se=ae.nodeName&&ae.nodeName.toLowerCase(),se==="select"||se==="input"&&ae.type==="file")var at=O_;else if(S_(ae))if(E_)at=nq;else{at=eq;var Ee=J8}else se=ae.nodeName,!se||se.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?te&&sg(te.elementType)&&(at=O_):at=tq;if(at&&(at=at(a,te))){j_(he,at,f,ce);break e}Ee&&Ee(a,ae,te),a==="focusout"&&te&&ae.type==="number"&&te.memoizedProps.value!=null&&og(ae,"number",ae.value)}switch(Ee=te?Cc(te):window,a){case"focusin":(S_(Ee)||Ee.contentEditable==="true")&&(Ds=Ee,wg=te,Lc=null);break;case"focusout":Lc=wg=Ds=null;break;case"mousedown":Sg=!0;break;case"contextmenu":case"mouseup":case"dragend":Sg=!1,D_(he,f,ce);break;case"selectionchange":if(aq)break;case"keydown":case"keyup":D_(he,f,ce)}var Ge;if(gg)e:{switch(a){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else Rs?x_(a,f)&&(et="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(et="onCompositionStart");et&&(g_&&f.locale!=="ko"&&(Rs||et!=="onCompositionStart"?et==="onCompositionEnd"&&Rs&&(Ge=d_()):(bi=ce,dg="value"in bi?bi.value:bi.textContent,Rs=!0)),Ee=nh(te,et),0<Ee.length&&(et=new p_(et,a,null,f,ce),he.push({event:et,listeners:Ee}),Ge?et.data=Ge:(Ge=w_(f),Ge!==null&&(et.data=Ge)))),(Ge=W8?K8(a,f):X8(a,f))&&(et=nh(te,"onBeforeInput"),0<et.length&&(Ee=new p_("onBeforeInput","beforeinput",null,f,ce),he.push({event:Ee,listeners:et}),Ee.data=Ge)),qq(he,a,te,f,ce)}i2(he,s)})}function cu(a,s,f){return{instance:a,listener:s,currentTarget:f}}function nh(a,s){for(var f=s+"Capture",p=[];a!==null;){var y=a,j=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||j===null||(y=Tc(a,f),y!=null&&p.unshift(cu(a,y,j)),y=Tc(a,s),y!=null&&p.push(cu(a,y,j))),a.tag===3)return p;a=a.return}return[]}function Gq(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function s2(a,s,f,p,y){for(var j=s._reactName,T=[];f!==null&&f!==p;){var P=f,V=P.alternate,te=P.stateNode;if(P=P.tag,V!==null&&V===p)break;P!==5&&P!==26&&P!==27||te===null||(V=te,y?(te=Tc(f,j),te!=null&&T.unshift(cu(f,te,V))):y||(te=Tc(f,j),te!=null&&T.push(cu(f,te,V)))),f=f.return}T.length!==0&&a.push({event:s,listeners:T})}var Vq=/\r\n?/g,Yq=/\u0000|\uFFFD/g;function l2(a){return(typeof a=="string"?a:""+a).replace(Vq,`
|
|
49
|
+
`).replace(Yq,"")}function c2(a,s){return s=l2(s),l2(a)===s}function gt(a,s,f,p,y,j){switch(f){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Cs(a,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Cs(a,""+p);break;case"className":od(a,"class",p);break;case"tabIndex":od(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":od(a,f,p);break;case"style":c_(a,p,j);break;case"data":if(s!=="object"){od(a,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||f!=="href")){a.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=ld(""+p),a.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(f,"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 j=="function"&&(f==="formAction"?(s!=="input"&>(a,s,"name",y.name,y,null),gt(a,s,"formEncType",y.formEncType,y,null),gt(a,s,"formMethod",y.formMethod,y,null),gt(a,s,"formTarget",y.formTarget,y,null)):(gt(a,s,"encType",y.encType,y,null),gt(a,s,"method",y.method,y,null),gt(a,s,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=ld(""+p),a.setAttribute(f,p);break;case"onClick":p!=null&&(a.onclick=Na);break;case"onScroll":p!=null&&Xe("scroll",a);break;case"onScrollEnd":p!=null&&Xe("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}f=ld(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""+p):a.removeAttribute(f);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":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":p===!0?a.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,p):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(f,p):a.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(f):a.setAttribute(f,p);break;case"popover":Xe("beforetoggle",a),Xe("toggle",a),id(a,"popover",p);break;case"xlinkActuate":_a(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":_a(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":_a(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":_a(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":_a(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":_a(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":_a(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":_a(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":_a(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":id(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=w8.get(f)||f,id(a,f,p))}}function Yy(a,s,f,p,y,j){switch(f){case"style":c_(a,p,j);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"children":typeof p=="string"?Cs(a,p):(typeof p=="number"||typeof p=="bigint")&&Cs(a,""+p);break;case"onScroll":p!=null&&Xe("scroll",a);break;case"onScrollEnd":p!=null&&Xe("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!e_.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(y=f.endsWith("Capture"),s=f.slice(2,y?f.length-7:void 0),j=a[Dn]||null,j=j!=null?j[f]:null,typeof j=="function"&&a.removeEventListener(s,j,y),typeof p=="function")){typeof j!="function"&&j!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(s,p,y);break e}f in a?a[f]=p:p===!0?a.setAttribute(f,""):id(a,f,p)}}}function mn(a,s,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",a),Xe("load",a);var p=!1,y=!1,j;for(j in f)if(f.hasOwnProperty(j)){var T=f[j];if(T!=null)switch(j){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(a,s,j,T,f,null)}}y&>(a,s,"srcSet",f.srcSet,f,null),p&>(a,s,"src",f.src,f,null);return;case"input":Xe("invalid",a);var P=j=T=y=null,V=null,te=null;for(p in f)if(f.hasOwnProperty(p)){var ce=f[p];if(ce!=null)switch(p){case"name":y=ce;break;case"type":T=ce;break;case"checked":V=ce;break;case"defaultChecked":te=ce;break;case"value":j=ce;break;case"defaultValue":P=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,s));break;default:gt(a,s,p,ce,f,null)}}i_(a,j,P,V,te,T,y,!1);return;case"select":Xe("invalid",a),p=T=j=null;for(y in f)if(f.hasOwnProperty(y)&&(P=f[y],P!=null))switch(y){case"value":j=P;break;case"defaultValue":T=P;break;case"multiple":p=P;default:gt(a,s,y,P,f,null)}s=j,f=T,a.multiple=!!p,s!=null?As(a,!!p,s,!1):f!=null&&As(a,!!p,f,!0);return;case"textarea":Xe("invalid",a),j=y=p=null;for(T in f)if(f.hasOwnProperty(T)&&(P=f[T],P!=null))switch(T){case"value":p=P;break;case"defaultValue":y=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:gt(a,s,T,P,f,null)}s_(a,p,y,j);return;case"option":for(V in f)if(f.hasOwnProperty(V)&&(p=f[V],p!=null))switch(V){case"selected":a.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:gt(a,s,V,p,f,null)}return;case"dialog":Xe("beforetoggle",a),Xe("toggle",a),Xe("cancel",a),Xe("close",a);break;case"iframe":case"object":Xe("load",a);break;case"video":case"audio":for(p=0;p<lu.length;p++)Xe(lu[p],a);break;case"image":Xe("error",a),Xe("load",a);break;case"details":Xe("toggle",a);break;case"embed":case"source":case"link":Xe("error",a),Xe("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(te in f)if(f.hasOwnProperty(te)&&(p=f[te],p!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(a,s,te,p,f,null)}return;default:if(sg(s)){for(ce in f)f.hasOwnProperty(ce)&&(p=f[ce],p!==void 0&&Yy(a,s,ce,p,f,void 0));return}}for(P in f)f.hasOwnProperty(P)&&(p=f[P],p!=null&>(a,s,P,p,f,null))}function Wq(a,s,f,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,j=null,T=null,P=null,V=null,te=null,ce=null;for(se in f){var he=f[se];if(f.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":V=he;default:p.hasOwnProperty(se)||gt(a,s,se,null,p,he)}}for(var ae in p){var se=p[ae];if(he=f[ae],p.hasOwnProperty(ae)&&(se!=null||he!=null))switch(ae){case"type":j=se;break;case"name":y=se;break;case"checked":te=se;break;case"defaultChecked":ce=se;break;case"value":T=se;break;case"defaultValue":P=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:se!==he&>(a,s,ae,se,p,he)}}ig(a,T,P,V,te,ce,j,y);return;case"select":se=T=P=ae=null;for(j in f)if(V=f[j],f.hasOwnProperty(j)&&V!=null)switch(j){case"value":break;case"multiple":se=V;default:p.hasOwnProperty(j)||gt(a,s,j,null,p,V)}for(y in p)if(j=p[y],V=f[y],p.hasOwnProperty(y)&&(j!=null||V!=null))switch(y){case"value":ae=j;break;case"defaultValue":P=j;break;case"multiple":T=j;default:j!==V&>(a,s,y,j,p,V)}s=P,f=T,p=se,ae!=null?As(a,!!f,ae,!1):!!p!=!!f&&(s!=null?As(a,!!f,s,!0):As(a,!!f,f?[]:"",!1));return;case"textarea":se=ae=null;for(P in f)if(y=f[P],f.hasOwnProperty(P)&&y!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:gt(a,s,P,null,p,y)}for(T in p)if(y=p[T],j=f[T],p.hasOwnProperty(T)&&(y!=null||j!=null))switch(T){case"value":ae=y;break;case"defaultValue":se=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==j&>(a,s,T,y,p,j)}o_(a,ae,se);return;case"option":for(var Se in f)if(ae=f[Se],f.hasOwnProperty(Se)&&ae!=null&&!p.hasOwnProperty(Se))switch(Se){case"selected":a.selected=!1;break;default:gt(a,s,Se,null,p,ae)}for(V in p)if(ae=p[V],se=f[V],p.hasOwnProperty(V)&&ae!==se&&(ae!=null||se!=null))switch(V){case"selected":a.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:gt(a,s,V,ae,p,se)}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 De in f)ae=f[De],f.hasOwnProperty(De)&&ae!=null&&!p.hasOwnProperty(De)&>(a,s,De,null,p,ae);for(te in p)if(ae=p[te],se=f[te],p.hasOwnProperty(te)&&ae!==se&&(ae!=null||se!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,s));break;default:gt(a,s,te,ae,p,se)}return;default:if(sg(s)){for(var yt in f)ae=f[yt],f.hasOwnProperty(yt)&&ae!==void 0&&!p.hasOwnProperty(yt)&&Yy(a,s,yt,void 0,p,ae);for(ce in p)ae=p[ce],se=f[ce],!p.hasOwnProperty(ce)||ae===se||ae===void 0&&se===void 0||Yy(a,s,ce,ae,p,se);return}}for(var J in f)ae=f[J],f.hasOwnProperty(J)&&ae!=null&&!p.hasOwnProperty(J)&>(a,s,J,null,p,ae);for(he in p)ae=p[he],se=f[he],!p.hasOwnProperty(he)||ae===se||ae==null&&se==null||gt(a,s,he,ae,p,se)}function u2(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kq(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var y=f[p],j=y.transferSize,T=y.initiatorType,P=y.duration;if(j&&P&&u2(T)){for(T=0,P=y.responseEnd,p+=1;p<f.length;p++){var V=f[p],te=V.startTime;if(te>P)break;var ce=V.transferSize,he=V.initiatorType;ce&&u2(he)&&(V=V.responseEnd,T+=ce*(V<P?1:(P-te)/(V-te)))}if(--p,s+=8*(j+T)/(y.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Wy=null,Ky=null;function rh(a){return a.nodeType===9?a:a.ownerDocument}function f2(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 d2(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Xy(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Qy=null;function Xq(){var a=window.event;return a&&a.type==="popstate"?a===Qy?!1:(Qy=a,!0):(Qy=null,!1)}var h2=typeof setTimeout=="function"?setTimeout:void 0,Qq=typeof clearTimeout=="function"?clearTimeout:void 0,m2=typeof Promise=="function"?Promise:void 0,Zq=typeof queueMicrotask=="function"?queueMicrotask:typeof m2<"u"?function(a){return m2.resolve(null).then(a).catch(Jq)}:h2;function Jq(a){setTimeout(function(){throw a})}function $i(a){return a==="head"}function p2(a,s){var f=s,p=0;do{var y=f.nextSibling;if(a.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"||f==="/&"){if(p===0){a.removeChild(y),ol(s);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")uu(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,uu(f);for(var j=f.firstChild;j;){var T=j.nextSibling,P=j.nodeName;j[Ac]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||f.removeChild(j),j=T}}else f==="body"&&uu(a.ownerDocument.body);f=y}while(f);ol(s)}function v2(a,s){var f=a;a=0;do{var p=f.nextSibling;if(f.nodeType===1?s?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(s?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=p}while(f)}function Zy(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var f=s;switch(s=s.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Zy(f),rg(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function eU(a,s,f,p){for(;a.nodeType===1;){var y=f;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[Ac])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(j=a.getAttribute("rel"),j==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(j!==y.rel||a.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||a.getAttribute("title")!==(y.title==null?null:y.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(y.src==null?null:y.src)||a.getAttribute("type")!==(y.type==null?null:y.type)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=y.name==null?null:""+y.name;if(y.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=Sr(a.nextSibling),a===null)break}return null}function tU(a,s,f){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=Sr(a.nextSibling),a===null))return null;return a}function g2(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Sr(a.nextSibling),a===null))return null;return a}function Jy(a){return a.data==="$?"||a.data==="$~"}function eb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function nU(a,s){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||f.readyState!=="loading")s();else{var p=function(){s(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function Sr(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var tb=null;function y2(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(s===0)return Sr(a.nextSibling);s--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||s++}a=a.nextSibling}return null}function b2(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(s===0)return a;s--}else f!=="/$"&&f!=="/&"||s++}a=a.previousSibling}return null}function x2(a,s,f){switch(s=rh(f),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function uu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);rg(a)}var jr=new Map,w2=new Set;function ah(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ha=H.d;H.d={f:rU,r:aU,D:iU,C:oU,L:sU,m:lU,X:uU,S:cU,M:fU};function rU(){var a=Ha.f(),s=Kd();return a||s}function aU(a){var s=Es(a);s!==null&&s.tag===5&&s.type==="form"?LN(s):Ha.r(a)}var rl=typeof document>"u"?null:document;function S2(a,s,f){var p=rl;if(p&&typeof s=="string"&&s){var y=pr(s);y='link[rel="'+a+'"][href="'+y+'"]',typeof f=="string"&&(y+='[crossorigin="'+f+'"]'),w2.has(y)||(w2.add(y),a={rel:a,crossOrigin:f,href:s},p.querySelector(y)===null&&(s=p.createElement("link"),mn(s,"link",a),an(s),p.head.appendChild(s)))}}function iU(a){Ha.D(a),S2("dns-prefetch",a,null)}function oU(a,s){Ha.C(a,s),S2("preconnect",a,s)}function sU(a,s,f){Ha.L(a,s,f);var p=rl;if(p&&a&&s){var y='link[rel="preload"][as="'+pr(s)+'"]';s==="image"&&f&&f.imageSrcSet?(y+='[imagesrcset="'+pr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(y+='[imagesizes="'+pr(f.imageSizes)+'"]')):y+='[href="'+pr(a)+'"]';var j=y;switch(s){case"style":j=al(a);break;case"script":j=il(a)}jr.has(j)||(a=m({rel:"preload",href:s==="image"&&f&&f.imageSrcSet?void 0:a,as:s},f),jr.set(j,a),p.querySelector(y)!==null||s==="style"&&p.querySelector(fu(j))||s==="script"&&p.querySelector(du(j))||(s=p.createElement("link"),mn(s,"link",a),an(s),p.head.appendChild(s)))}}function lU(a,s){Ha.m(a,s);var f=rl;if(f&&a){var p=s&&typeof s.as=="string"?s.as:"script",y='link[rel="modulepreload"][as="'+pr(p)+'"][href="'+pr(a)+'"]',j=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=il(a)}if(!jr.has(j)&&(a=m({rel:"modulepreload",href:a},s),jr.set(j,a),f.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(du(j)))return}p=f.createElement("link"),mn(p,"link",a),an(p),f.head.appendChild(p)}}}function cU(a,s,f){Ha.S(a,s,f);var p=rl;if(p&&a){var y=_s(p).hoistableStyles,j=al(a);s=s||"default";var T=y.get(j);if(!T){var P={loading:0,preload:null};if(T=p.querySelector(fu(j)))P.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":s},f),(f=jr.get(j))&&nb(a,f);var V=T=p.createElement("link");an(V),mn(V,"link",a),V._p=new Promise(function(te,ce){V.onload=te,V.onerror=ce}),V.addEventListener("load",function(){P.loading|=1}),V.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ih(T,s,p)}T={type:"stylesheet",instance:T,count:1,state:P},y.set(j,T)}}}function uU(a,s){Ha.X(a,s);var f=rl;if(f&&a){var p=_s(f).hoistableScripts,y=il(a),j=p.get(y);j||(j=f.querySelector(du(y)),j||(a=m({src:a,async:!0},s),(s=jr.get(y))&&rb(a,s),j=f.createElement("script"),an(j),mn(j,"link",a),f.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},p.set(y,j))}}function fU(a,s){Ha.M(a,s);var f=rl;if(f&&a){var p=_s(f).hoistableScripts,y=il(a),j=p.get(y);j||(j=f.querySelector(du(y)),j||(a=m({src:a,async:!0,type:"module"},s),(s=jr.get(y))&&rb(a,s),j=f.createElement("script"),an(j),mn(j,"link",a),f.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},p.set(y,j))}}function j2(a,s,f,p){var y=(y=fe.current)?ah(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(s=al(f.href),f=_s(y).hoistableStyles,p=f.get(s),p||(p={type:"style",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=al(f.href);var j=_s(y).hoistableStyles,T=j.get(a);if(T||(y=y.ownerDocument||y,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,T),(j=y.querySelector(fu(a)))&&!j._p&&(T.instance=j,T.state.loading=5),jr.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},jr.set(a,f),j||dU(y,a,f,T.state))),s&&p===null)throw Error(r(528,""));return T}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=f.async,f=f.src,typeof f=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=il(f),f=_s(y).hoistableScripts,p=f.get(s),p||(p={type:"script",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function al(a){return'href="'+pr(a)+'"'}function fu(a){return'link[rel="stylesheet"]['+a+"]"}function O2(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function dU(a,s,f,p){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=a.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),mn(s,"link",f),an(s),a.head.appendChild(s))}function il(a){return'[src="'+pr(a)+'"]'}function du(a){return"script[async]"+a}function E2(a,s,f){if(s.count++,s.instance===null)switch(s.type){case"style":var p=a.querySelector('style[data-href~="'+pr(f.href)+'"]');if(p)return s.instance=p,an(p),p;var y=m({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),an(p),mn(p,"style",y),ih(p,f.precedence,a),s.instance=p;case"stylesheet":y=al(f.href);var j=a.querySelector(fu(y));if(j)return s.state.loading|=4,s.instance=j,an(j),j;p=O2(f),(y=jr.get(y))&&nb(p,y),j=(a.ownerDocument||a).createElement("link"),an(j);var T=j;return T._p=new Promise(function(P,V){T.onload=P,T.onerror=V}),mn(j,"link",p),s.state.loading|=4,ih(j,f.precedence,a),s.instance=j;case"script":return j=il(f.src),(y=a.querySelector(du(j)))?(s.instance=y,an(y),y):(p=f,(y=jr.get(j))&&(p=m({},f),rb(p,y)),a=a.ownerDocument||a,y=a.createElement("script"),an(y),mn(y,"link",p),a.head.appendChild(y),s.instance=y);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,ih(p,f.precedence,a));return s.instance}function ih(a,s,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,j=y,T=0;T<p.length;T++){var P=p[T];if(P.dataset.precedence===s)j=P;else if(j!==y)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=f.nodeType===9?f.head:f,s.insertBefore(a,s.firstChild))}function nb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function rb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var oh=null;function _2(a,s,f){if(oh===null){var p=new Map,y=oh=new Map;y.set(f,p)}else y=oh,p=y.get(f),p||(p=new Map,y.set(f,p));if(p.has(a))return p;for(p.set(a,null),f=f.getElementsByTagName(a),y=0;y<f.length;y++){var j=f[y];if(!(j[Ac]||j[un]||a==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var T=j.getAttribute(s)||"";T=a+T;var P=p.get(T);P?P.push(j):p.set(T,[j])}}return p}function N2(a,s,f){a=a.ownerDocument||a,a.head.insertBefore(f,s==="title"?a.querySelector("head > title"):null)}function hU(a,s,f){if(f===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function A2(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function mU(a,s,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var y=al(p.href),j=s.querySelector(fu(y));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=sh.bind(a),s.then(a,a)),f.state.loading|=4,f.instance=j,an(j);return}j=s.ownerDocument||s,p=O2(p),(y=jr.get(y))&&nb(p,y),j=j.createElement("link"),an(j);var T=j;T._p=new Promise(function(P,V){T.onload=P,T.onerror=V}),mn(j,"link",p),f.instance=j}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,s),(s=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=sh.bind(a),s.addEventListener("load",f),s.addEventListener("error",f))}}var ab=0;function pU(a,s){return a.stylesheets&&a.count===0&&ch(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var p=setTimeout(function(){if(a.stylesheets&&ch(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&ab===0&&(ab=62500*Kq());var y=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&ch(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>ab?50:800)+s);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function sh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ch(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var lh=null;function ch(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,lh=new Map,s.forEach(vU,a),lh=null,sh.call(a))}function vU(a,s){if(!(s.state.loading&4)){var f=lh.get(a);if(f)var p=f.get(null);else{f=new Map,lh.set(a,f);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<y.length;j++){var T=y[j];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(f.set(T.dataset.precedence,T),p=T)}p&&f.set(null,p)}y=s.instance,T=y.getAttribute("data-precedence"),j=f.get(T)||p,j===p&&f.set(null,y),f.set(T,y),this.count++,p=sh.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),j?j.parentNode.insertBefore(y,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(y,a.firstChild)),s.state.loading|=4}}var hu={$$typeof:_,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function gU(a,s,f,p,y,j,T,P,V){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=gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.hiddenUpdates=gi(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=j,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function C2(a,s,f,p,y,j,T,P,V,te,ce,he){return a=new gU(a,s,f,T,V,te,ce,he,P),s=1,j===!0&&(s|=24),j=Kn(3,null,null,s),a.current=j,j.stateNode=a,s=Ig(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:p,isDehydrated:f,cache:s},qg(j),a}function T2(a){return a?(a=$s,a):$s}function M2(a,s,f,p,y,j){y=T2(y),p.context===null?p.context=y:p.pendingContext=y,p=Ei(s),p.payload={element:f},j=j===void 0?null:j,j!==null&&(p.callback=j),f=_i(a,p,s),f!==null&&(zn(f,a,s),Gc(f,a,s))}function R2(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<s?f:s}}function ib(a,s){R2(a,s),(a=a.alternate)&&R2(a,s)}function D2(a){if(a.tag===13||a.tag===31){var s=Eo(a,67108864);s!==null&&zn(s,a,67108864),ib(a,67108864)}}function P2(a){if(a.tag===13||a.tag===31){var s=er();s=Ss(s);var f=Eo(a,s);f!==null&&zn(f,a,s),ib(a,s)}}var uh=!0;function yU(a,s,f,p){var y=k.T;k.T=null;var j=H.p;try{H.p=2,ob(a,s,f,p)}finally{H.p=j,k.T=y}}function bU(a,s,f,p){var y=k.T;k.T=null;var j=H.p;try{H.p=8,ob(a,s,f,p)}finally{H.p=j,k.T=y}}function ob(a,s,f,p){if(uh){var y=sb(p);if(y===null)Vy(a,s,p,fh,f),$2(a,p);else if(wU(y,a,s,f,p))p.stopPropagation();else if($2(a,p),s&4&&-1<xU.indexOf(a)){for(;y!==null;){var j=Es(y);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var T=na(j.pendingLanes);if(T!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var V=1<<31-gn(T);P.entanglements[1]|=V,T&=~V}oa(j),(st&6)===0&&(Yd=nn()+500,su(0))}}break;case 31:case 13:P=Eo(j,2),P!==null&&zn(P,j,2),Kd(),ib(j,2)}if(j=sb(p),j===null&&Vy(a,s,p,fh,f),j===y)break;y=j}y!==null&&p.stopPropagation()}else Vy(a,s,p,null,f)}}function sb(a){return a=cg(a),lb(a)}var fh=null;function lb(a){if(fh=null,a=Os(a),a!==null){var s=o(a);if(s===null)a=null;else{var f=s.tag;if(f===13){if(a=l(s),a!==null)return a;a=null}else if(f===31){if(a=u(s),a!==null)return a;a=null}else if(f===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return fh=a,null}function k2(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(bs()){case vo:return 2;case rd:return 8;case go:case _c:return 32;case Ea:return 268435456;default:return 32}default:return 32}}var cb=!1,Ii=null,Li=null,zi=null,mu=new Map,pu=new Map,Bi=[],xU="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 $2(a,s){switch(a){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":Li=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":mu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(s.pointerId)}}function vu(a,s,f,p,y,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:f,eventSystemFlags:p,nativeEvent:j,targetContainers:[y]},s!==null&&(s=Es(s),s!==null&&D2(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),a)}function wU(a,s,f,p,y){switch(s){case"focusin":return Ii=vu(Ii,a,s,f,p,y),!0;case"dragenter":return Li=vu(Li,a,s,f,p,y),!0;case"mouseover":return zi=vu(zi,a,s,f,p,y),!0;case"pointerover":var j=y.pointerId;return mu.set(j,vu(mu.get(j)||null,a,s,f,p,y)),!0;case"gotpointercapture":return j=y.pointerId,pu.set(j,vu(pu.get(j)||null,a,s,f,p,y)),!0}return!1}function I2(a){var s=Os(a.target);if(s!==null){var f=o(s);if(f!==null){if(s=f.tag,s===13){if(s=l(f),s!==null){a.blockedOn=s,QE(a.priority,function(){P2(f)});return}}else if(s===31){if(s=u(f),s!==null){a.blockedOn=s,QE(a.priority,function(){P2(f)});return}}else if(s===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function dh(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var f=sb(a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);lg=p,f.target.dispatchEvent(p),lg=null}else return s=Es(f),s!==null&&D2(s),a.blockedOn=f,!1;s.shift()}return!0}function L2(a,s,f){dh(a)&&f.delete(s)}function SU(){cb=!1,Ii!==null&&dh(Ii)&&(Ii=null),Li!==null&&dh(Li)&&(Li=null),zi!==null&&dh(zi)&&(zi=null),mu.forEach(L2),pu.forEach(L2)}function hh(a,s){a.blockedOn===s&&(a.blockedOn=null,cb||(cb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SU)))}var mh=null;function z2(a){mh!==a&&(mh=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mh===a&&(mh=null);for(var s=0;s<a.length;s+=3){var f=a[s],p=a[s+1],y=a[s+2];if(typeof p!="function"){if(lb(p||f)===null)continue;break}var j=Es(f);j!==null&&(a.splice(s,3),s-=3,sy(j,{pending:!0,data:y,method:f.method,action:p},p,y))}}))}function ol(a){function s(V){return hh(V,a)}Ii!==null&&hh(Ii,a),Li!==null&&hh(Li,a),zi!==null&&hh(zi,a),mu.forEach(s),pu.forEach(s);for(var f=0;f<Bi.length;f++){var p=Bi[f];p.blockedOn===a&&(p.blockedOn=null)}for(;0<Bi.length&&(f=Bi[0],f.blockedOn===null);)I2(f),f.blockedOn===null&&Bi.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var y=f[p],j=f[p+1],T=y[Dn]||null;if(typeof j=="function")T||z2(f);else if(T){var P=null;if(j&&j.hasAttribute("formAction")){if(y=j,T=j[Dn]||null)P=T.formAction;else if(lb(y)!==null)continue}else P=T.action;typeof P=="function"?f[p+1]=P:(f.splice(p,3),p-=3),z2(f)}}}function B2(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(T){return y=T})},focusReset:"manual",scroll:"manual"})}function s(){y!==null&&(y(),y=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),y!==null&&(y(),y=null)}}}function ub(a){this._internalRoot=a}ph.prototype.render=ub.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var f=s.current,p=er();M2(f,p,a,s,null,null)},ph.prototype.unmount=ub.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;M2(a.current,2,null,a,null,null),Kd(),s[js]=null}};function ph(a){this._internalRoot=a}ph.prototype.unstable_scheduleHydration=function(a){if(a){var s=tg();a={blockedOn:null,target:a,priority:s};for(var f=0;f<Bi.length&&s!==0&&s<Bi[f].priority;f++);Bi.splice(f,0,a),f===0&&I2(a)}};var q2=t.version;if(q2!=="19.2.3")throw Error(r(527,q2,"19.2.3"));H.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?v(a):null,a=a===null?null:a.stateNode,a};var jU={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vh.isDisabled&&vh.supportsFiber)try{yo=vh.inject(jU),On=vh}catch{}}return yu.createRoot=function(a,s){if(!i(a))throw Error(r(299));var f=!1,p="",y=WN,j=KN,T=XN;return s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError)),s=C2(a,1,!1,null,null,f,p,null,y,j,T,B2),a[js]=s.current,Gy(a),new ub(s)},yu.hydrateRoot=function(a,s,f){if(!i(a))throw Error(r(299));var p=!1,y="",j=WN,T=KN,P=XN,V=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(y=f.identifierPrefix),f.onUncaughtError!==void 0&&(j=f.onUncaughtError),f.onCaughtError!==void 0&&(T=f.onCaughtError),f.onRecoverableError!==void 0&&(P=f.onRecoverableError),f.formState!==void 0&&(V=f.formState)),s=C2(a,1,!0,s,f??null,p,y,V,j,T,P,B2),s.context=T2(null),f=s.current,p=er(),p=Ss(p),y=Ei(p),y.callback=null,_i(f,y,p),f=p,s.current.lanes=f,Dt(s,f),oa(s),a[js]=s.current,Gy(a),new ph(s)},yu.version="19.2.3",yu}var Q2;function kU(){if(Q2)return mb.exports;Q2=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(),mb.exports=PU(),mb.exports}var $U=kU();/**
|
|
50
|
+
* react-router v7.11.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Z2="popstate";function IU(e={}){function t(r,i){let{pathname:o,search:l,hash:u}=r.location;return V1("",{pathname:o,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Fu(i)}return zU(t,n,null,e)}function Mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function LU(){return Math.random().toString(36).substring(2,10)}function J2(e,t){return{usr:e.state,key:e.key,idx:t}}function V1(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?nc(t):t,state:n,key:t&&t.key||r||LU()}}function Fu({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 nc(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 zU(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u="POP",d=null,h=v();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function v(){return(l.state||{idx:null}).idx}function m(){u="POP";let x=v(),E=x==null?null:x-h;h=x,d&&d({action:u,location:S.location,delta:E})}function g(x,E){u="PUSH";let N=V1(S.location,x,E);h=v()+1;let _=J2(N,h),C=S.createHref(N);try{l.pushState(_,"",C)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign(C)}o&&d&&d({action:u,location:S.location,delta:1})}function b(x,E){u="REPLACE";let N=V1(S.location,x,E);h=v();let _=J2(N,h),C=S.createHref(N);l.replaceState(_,"",C),o&&d&&d({action:u,location:S.location,delta:0})}function O(x){return BU(x)}let S={get action(){return u},get location(){return e(i,l)},listen(x){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Z2,m),d=x,()=>{i.removeEventListener(Z2,m),d=null}},createHref(x){return t(i,x)},createURL:O,encodeLocation(x){let E=O(x);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:g,replace:b,go(x){return l.go(x)}};return S}function BU(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Mt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Fu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function V4(e,t,n="/"){return qU(e,t,n,!1)}function qU(e,t,n,r){let i=typeof t=="string"?nc(t):t,o=ni(i.pathname||"/",n);if(o==null)return null;let l=Y4(e);UU(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let h=JU(o);u=QU(l[d],h,r)}return u}function Y4(e,t=[],n=[],r="",i=!1){let o=(l,u,d=i,h)=>{let v={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(r)&&d)return;Mt(v.relativePath.startsWith(r),`Absolute route path "${v.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(r.length)}let m=Xa([r,v.relativePath]),g=n.concat(v);l.children&&l.children.length>0&&(Mt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Y4(l.children,t,g,m,d)),!(l.path==null&&!l.index)&&t.push({path:m,score:KU(m,l.index),routesMeta:g})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let h of W4(l.path))o(l,u,!0,h)}),t}function W4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=W4(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),i&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function UU(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:XU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var HU=/^:[\w-]+$/,FU=3,GU=2,VU=1,YU=10,WU=-2,eC=e=>e==="*";function KU(e,t){let n=e.split("/"),r=n.length;return n.some(eC)&&(r+=WU),t&&(r+=GU),n.filter(i=>!eC(i)).reduce((i,o)=>i+(HU.test(o)?FU:o===""?VU:YU),r)}function XU(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 QU(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,v=o==="/"?t:t.slice(o.length)||"/",m=Jh({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},v),g=d.route;if(!m&&h&&n&&!r[r.length-1].route.index&&(m=Jh({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},v)),!m)return null;Object.assign(i,m.params),l.push({params:i,pathname:Xa([o,m.pathname]),pathnameBase:rH(Xa([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=Xa([o,m.pathnameBase]))}return l}function Jh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ZU(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((h,{paramName:v,isOptional:m},g)=>{if(v==="*"){let O=u[g]||"";l=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const b=u[g];return m&&!b?h[v]=void 0:h[v]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function ZU(e,t=!1,n=!0){lr(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,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).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 JU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lr(!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 ni(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)||"/"}var K4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eH=e=>K4.test(e);function tH(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?nc(e):e,o;if(n)if(eH(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),lr(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?o=tC(n.substring(1),"/"):o=tC(n,t)}else o=t;return{pathname:o,search:aH(r),hash:iH(i)}}function tC(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function yb(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 nH(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qj(e){let t=nH(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Uj(e,t,n,r=!1){let i;typeof e=="string"?i=nc(e):(i={...e},Mt(!i.pathname||!i.pathname.includes("?"),yb("?","pathname","search",i)),Mt(!i.pathname||!i.pathname.includes("#"),yb("#","pathname","hash",i)),Mt(!i.search||!i.search.includes("#"),yb("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}u=m>=0?t[m]:"/"}let d=tH(i,u),h=l&&l!=="/"&&l.endsWith("/"),v=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||v)&&(d.pathname+="/"),d}var Xa=e=>e.join("/").replace(/\/\/+/g,"/"),rH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,oH=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 sH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function lH(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var X4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Q4(e,t){let n=e;if(typeof n!="string"||!K4.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(X4)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=ni(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:i=!0}catch{lr(!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 Z4=["POST","PUT","PATCH","DELETE"];new Set(Z4);var cH=["GET",...Z4];new Set(cH);var rc=w.createContext(null);rc.displayName="DataRouter";var Mp=w.createContext(null);Mp.displayName="DataRouterState";var uH=w.createContext(!1),J4=w.createContext({isTransitioning:!1});J4.displayName="ViewTransition";var fH=w.createContext(new Map);fH.displayName="Fetchers";var dH=w.createContext(null);dH.displayName="Await";var fr=w.createContext(null);fr.displayName="Navigation";var $f=w.createContext(null);$f.displayName="Location";var Qr=w.createContext({outlet:null,matches:[],isDataRoute:!1});Qr.displayName="Route";var Hj=w.createContext(null);Hj.displayName="RouteError";var e$="REACT_ROUTER_ERROR",hH="REDIRECT",mH="ROUTE_ERROR_RESPONSE";function pH(e){if(e.startsWith(`${e$}:${hH}:{`))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 vH(e){if(e.startsWith(`${e$}:${mH}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new oH(t.status,t.statusText,t.data)}catch{}}function gH(e,{relative:t}={}){Mt(ac(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=w.useContext(fr),{hash:i,pathname:o,search:l}=If(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Xa([n,o])),r.createHref({pathname:u,search:l,hash:i})}function ac(){return w.useContext($f)!=null}function Zr(){return Mt(ac(),"useLocation() may be used only in the context of a <Router> component."),w.useContext($f).location}var t$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function n$(e){w.useContext(fr).static||w.useLayoutEffect(e)}function Sa(){let{isDataRoute:e}=w.useContext(Qr);return e?TH():yH()}function yH(){Mt(ac(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(rc),{basename:t,navigator:n}=w.useContext(fr),{matches:r}=w.useContext(Qr),{pathname:i}=Zr(),o=JSON.stringify(qj(r)),l=w.useRef(!1);return n$(()=>{l.current=!0}),w.useCallback((d,h={})=>{if(lr(l.current,t$),!l.current)return;if(typeof d=="number"){n.go(d);return}let v=Uj(d,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:Xa([t,v.pathname])),(h.replace?n.replace:n.push)(v,h.state,h)},[t,n,o,i,e])}w.createContext(null);function Fj(){let{matches:e}=w.useContext(Qr),t=e[e.length-1];return t?t.params:{}}function If(e,{relative:t}={}){let{matches:n}=w.useContext(Qr),{pathname:r}=Zr(),i=JSON.stringify(qj(n));return w.useMemo(()=>Uj(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function bH(e,t){return r$(e,t)}function r$(e,t,n,r,i){var N;Mt(ac(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=w.useContext(fr),{matches:l}=w.useContext(Qr),u=l[l.length-1],d=u?u.params:{},h=u?u.pathname:"/",v=u?u.pathnameBase:"/",m=u&&u.route;{let _=m&&m.path||"";i$(h,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${_}">) 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.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let g=Zr(),b;if(t){let _=typeof t=="string"?nc(t):t;Mt(v==="/"||((N=_.pathname)==null?void 0:N.startsWith(v)),`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 "${v}" but pathname "${_.pathname}" was given in the \`location\` prop.`),b=_}else b=g;let O=b.pathname||"/",S=O;if(v!=="/"){let _=v.replace(/^\//,"").split("/");S="/"+O.replace(/^\//,"").split("/").slice(_.length).join("/")}let x=V4(e,{pathname:S});lr(m||x!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),lr(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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 E=OH(x&&x.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Xa([v,o.encodeLocation?o.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?v:Xa([v,o.encodeLocation?o.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,n,r,i);return t&&E?w.createElement($f.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},E):E}function xH(){let e=CH(),t=sH(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},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:i},n):null,l)}var wH=w.createElement(xH,null),a$=class extends w.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=vH(e.digest);n&&(e=n)}let t=e!==void 0?w.createElement(Qr.Provider,{value:this.props.routeContext},w.createElement(Hj.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(SH,{error:e},t):t}};a$.contextType=uH;var bb=new WeakMap;function SH({children:e,error:t}){let{basename:n}=w.useContext(fr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=pH(t.digest);if(r){let i=bb.get(t);if(i)throw i;let o=Q4(r.location,n);if(X4&&!bb.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw bb.set(t,l),l}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function jH({routeContext:e,match:t,children:n}){let r=w.useContext(rc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Qr.Provider,{value:e},n)}function OH(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=n==null?void 0:n.errors;if(l!=null){let v=o.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);Mt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,v+1))}let u=!1,d=-1;if(n)for(let v=0;v<o.length;v++){let m=o[v];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=v),m.route.id){let{loaderData:g,errors:b}=n,O=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||O){u=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}let h=n&&r?(v,m)=>{var g,b;r(v,{location:n.location,params:((b=(g=n.matches)==null?void 0:g[0])==null?void 0:b.params)??{},unstable_pattern:lH(n.matches),errorInfo:m})}:void 0;return o.reduceRight((v,m,g)=>{let b,O=!1,S=null,x=null;n&&(b=l&&m.route.id?l[m.route.id]:void 0,S=m.route.errorElement||wH,u&&(d<0&&g===0?(i$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,x=null):d===g&&(O=!0,x=m.route.hydrateFallbackElement||null)));let E=t.concat(o.slice(0,g+1)),N=()=>{let _;return b?_=S:O?_=x:m.route.Component?_=w.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=v,w.createElement(jH,{match:m,routeContext:{outlet:v,matches:E,isDataRoute:n!=null},children:_})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?w.createElement(a$,{location:n.location,revalidation:n.revalidation,component:S,error:b,children:N(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:h}):N()},null)}function Gj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function EH(e){let t=w.useContext(rc);return Mt(t,Gj(e)),t}function _H(e){let t=w.useContext(Mp);return Mt(t,Gj(e)),t}function NH(e){let t=w.useContext(Qr);return Mt(t,Gj(e)),t}function Vj(e){let t=NH(e),n=t.matches[t.matches.length-1];return Mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function AH(){return Vj("useRouteId")}function CH(){var r;let e=w.useContext(Hj),t=_H("useRouteError"),n=Vj("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function TH(){let{router:e}=EH("useNavigate"),t=Vj("useNavigate"),n=w.useRef(!1);return n$(()=>{n.current=!0}),w.useCallback(async(i,o={})=>{lr(n.current,t$),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var nC={};function i$(e,t,n){!t&&!nC[e]&&(nC[e]=!0,lr(!1,n))}w.memo(MH);function MH({routes:e,future:t,state:n,onError:r}){return r$(e,void 0,n,r,t)}function RH({to:e,replace:t,state:n,relative:r}){Mt(ac(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=w.useContext(fr);lr(!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:o}=w.useContext(Qr),{pathname:l}=Zr(),u=Sa(),d=Uj(e,qj(o),l,r==="path"),h=JSON.stringify(d);return w.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function Bn(e){Mt(!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 DH({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:l}){Mt(!ac(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=w.useMemo(()=>({basename:u,navigator:i,static:o,unstable_useTransitions:l,future:{}}),[u,i,o,l]);typeof n=="string"&&(n=nc(n));let{pathname:h="/",search:v="",hash:m="",state:g=null,key:b="default"}=n,O=w.useMemo(()=>{let S=ni(h,u);return S==null?null:{location:{pathname:S,search:v,hash:m,state:g,key:b},navigationType:r}},[u,h,v,m,g,b,r]);return lr(O!=null,`<Router basename="${u}"> is not able to match the URL "${h}${v}${m}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:w.createElement(fr.Provider,{value:d},w.createElement($f.Provider,{children:t,value:O}))}function PH({children:e,location:t}){return bH(Y1(e),t)}function Y1(e,t=[]){let n=[];return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let o=[...t,i];if(r.type===w.Fragment){n.push.apply(n,Y1(r.props.children,o));return}Mt(r.type===Bn,`[${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>`),Mt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.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&&(l.children=Y1(r.props.children,o)),n.push(l)}),n}var Vh="get",Yh="application/x-www-form-urlencoded";function Rp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function kH(e){return Rp(e)&&e.tagName.toLowerCase()==="button"}function $H(e){return Rp(e)&&e.tagName.toLowerCase()==="form"}function IH(e){return Rp(e)&&e.tagName.toLowerCase()==="input"}function LH(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zH(e,t){return e.button===0&&(!t||t==="_self")&&!LH(e)}function W1(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 BH(e,t){let n=W1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var yh=null;function qH(){if(yh===null)try{new FormData(document.createElement("form"),0),yh=!1}catch{yh=!0}return yh}var UH=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xb(e){return e!=null&&!UH.has(e)?(lr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yh}"`),null):e}function HH(e,t){let n,r,i,o,l;if($H(e)){let u=e.getAttribute("action");r=u?ni(u,t):null,n=e.getAttribute("method")||Vh,i=xb(e.getAttribute("enctype"))||Yh,o=new FormData(e)}else if(kH(e)||IH(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?ni(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Vh,i=xb(e.getAttribute("formenctype"))||xb(u.getAttribute("enctype"))||Yh,o=new FormData(u,e),!qH()){let{name:h,type:v,value:m}=e;if(v==="image"){let g=h?`${h}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else h&&o.append(h,m)}}else{if(Rp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Vh,r=null,i=Yh,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yj(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function FH(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&ni(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function GH(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 VH(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 YH(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await GH(o,n);return l.links?l.links():[]}return[]}));return QH(r.flat(1).filter(VH).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function rC(e,t,n,r,i,o){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,u=(d,h)=>{var v;return n[h].pathname!==d.pathname||((v=n[h].route.path)==null?void 0:v.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>l(d,h)||u(d,h)):o==="data"?t.filter((d,h)=>{var m;let v=r.routes[d.route.id];if(!v||!v.hasLoader)return!1;if(l(d,h)||u(d,h))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function WH(e,t,{includeHydrateFallback:n}={}){return KH(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function KH(e){return[...new Set(e)]}function XH(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function QH(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(XH(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function o$(){let e=w.useContext(rc);return Yj(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ZH(){let e=w.useContext(Mp);return Yj(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Wj=w.createContext(void 0);Wj.displayName="FrameworkContext";function s$(){let e=w.useContext(Wj);return Yj(e,"You must render this element inside a <HydratedRouter> element"),e}function JH(e,t){let n=w.useContext(Wj),[r,i]=w.useState(!1),[o,l]=w.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:h,onMouseLeave:v,onTouchStart:m}=t,g=w.useRef(null);w.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=E=>{E.forEach(N=>{l(N.isIntersecting)})},x=new IntersectionObserver(S,{threshold:.5});return g.current&&x.observe(g.current),()=>{x.disconnect()}}},[e]),w.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let b=()=>{i(!0)},O=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:bu(u,b),onBlur:bu(d,O),onMouseEnter:bu(h,b),onMouseLeave:bu(v,O),onTouchStart:bu(m,b)}]:[!1,g,{}]}function bu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function eF({page:e,...t}){let{router:n}=o$(),r=w.useMemo(()=>V4(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(nF,{page:e,matches:r,...t}):null}function tF(e){let{manifest:t,routeModules:n}=s$(),[r,i]=w.useState([]);return w.useEffect(()=>{let o=!1;return YH(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function nF({page:e,matches:t,...n}){let r=Zr(),{manifest:i,routeModules:o}=s$(),{basename:l}=o$(),{loaderData:u,matches:d}=ZH(),h=w.useMemo(()=>rC(e,t,d,i,r,"data"),[e,t,d,i,r]),v=w.useMemo(()=>rC(e,t,d,i,r,"assets"),[e,t,d,i,r]),m=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let O=new Set,S=!1;if(t.forEach(E=>{var _;let N=i.routes[E.route.id];!N||!N.hasLoader||(!h.some(C=>C.route.id===E.route.id)&&E.route.id in u&&((_=o[E.route.id])!=null&&_.shouldRevalidate)||N.hasClientLoader?S=!0:O.add(E.route.id))}),O.size===0)return[];let x=FH(e,l,"data");return S&&O.size>0&&x.searchParams.set("_routes",t.filter(E=>O.has(E.route.id)).map(E=>E.route.id).join(",")),[x.pathname+x.search]},[l,u,r,i,h,t,e,o]),g=w.useMemo(()=>WH(v,i),[v,i]),b=tF(v);return w.createElement(w.Fragment,null,m.map(O=>w.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...n})),g.map(O=>w.createElement("link",{key:O,rel:"modulepreload",href:O,...n})),b.map(({key:O,link:S})=>w.createElement("link",{key:O,nonce:n.nonce,...S})))}function rF(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var aF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aF&&(window.__reactRouterVersion="7.11.0")}catch{}function iF({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=w.useRef();i.current==null&&(i.current=IU({window:r,v5Compat:!0}));let o=i.current,[l,u]=w.useState({action:o.action,location:o.location}),d=w.useCallback(h=>{n===!1?u(h):w.startTransition(()=>u(h))},[n]);return w.useLayoutEffect(()=>o.listen(d),[o,d]),w.createElement(DH,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var l$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,em=w.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,state:u,target:d,to:h,preventScrollReset:v,viewTransition:m,unstable_defaultShouldRevalidate:g,...b},O){let{basename:S,unstable_useTransitions:x}=w.useContext(fr),E=typeof h=="string"&&l$.test(h),N=Q4(h,S);h=N.to;let _=gH(h,{relative:i}),[C,A,M]=JH(r,b),R=cF(h,{replace:l,state:u,target:d,preventScrollReset:v,relative:i,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:x});function D(G){t&&t(G),G.defaultPrevented||R(G)}let z=w.createElement("a",{...b,...M,href:N.absoluteURL||_,onClick:N.isExternal||o?t:D,ref:rF(O,A),target:d,"data-discover":!E&&n==="render"?"true":void 0});return C&&!E?w.createElement(w.Fragment,null,z,w.createElement(eF,{page:_})):z});em.displayName="Link";var oF=w.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:u,children:d,...h},v){let m=If(l,{relative:h.relative}),g=Zr(),b=w.useContext(Mp),{navigator:O,basename:S}=w.useContext(fr),x=b!=null&&pF(m)&&u===!0,E=O.encodeLocation?O.encodeLocation(m).pathname:m.pathname,N=g.pathname,_=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(N=N.toLowerCase(),_=_?_.toLowerCase():null,E=E.toLowerCase()),_&&S&&(_=ni(_,S)||_);const C=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let A=N===E||!i&&N.startsWith(E)&&N.charAt(C)==="/",M=_!=null&&(_===E||!i&&_.startsWith(E)&&_.charAt(E.length)==="/"),R={isActive:A,isPending:M,isTransitioning:x},D=A?t:void 0,z;typeof r=="function"?z=r(R):z=[r,A?"active":null,M?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(R):o;return w.createElement(em,{...h,"aria-current":D,className:z,ref:v,style:G,to:l,viewTransition:u},typeof d=="function"?d(R):d)});oF.displayName="NavLink";var sF=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Vh,action:u,onSubmit:d,relative:h,preventScrollReset:v,viewTransition:m,unstable_defaultShouldRevalidate:g,...b},O)=>{let{unstable_useTransitions:S}=w.useContext(fr),x=hF(),E=mF(u,{relative:h}),N=l.toLowerCase()==="get"?"get":"post",_=typeof u=="string"&&l$.test(u),C=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let M=A.nativeEvent.submitter,R=(M==null?void 0:M.getAttribute("formmethod"))||l,D=()=>x(M||A.currentTarget,{fetcherKey:t,method:R,navigate:n,replace:i,state:o,relative:h,preventScrollReset:v,viewTransition:m,unstable_defaultShouldRevalidate:g});S&&n!==!1?w.startTransition(()=>D()):D()};return w.createElement("form",{ref:O,method:N,action:E,onSubmit:r?d:C,...b,"data-discover":!_&&e==="render"?"true":void 0})});sF.displayName="Form";function lF(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function c$(e){let t=w.useContext(rc);return Mt(t,lF(e)),t}function cF(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let h=Sa(),v=Zr(),m=If(e,{relative:o});return w.useCallback(g=>{if(zH(g,t)){g.preventDefault();let b=n!==void 0?n:Fu(v)===Fu(m),O=()=>h(e,{replace:b,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u});d?w.startTransition(()=>O()):O()}},[v,h,m,n,r,t,e,i,o,l,u,d])}function uF(e){lr(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=w.useRef(W1(e)),n=w.useRef(!1),r=Zr(),i=w.useMemo(()=>BH(r.search,n.current?null:t.current),[r.search]),o=Sa(),l=w.useCallback((u,d)=>{const h=W1(typeof u=="function"?u(new URLSearchParams(i)):u);n.current=!0,o("?"+h,d)},[o,i]);return[i,l]}var fF=0,dF=()=>`__${String(++fF)}__`;function hF(){let{router:e}=c$("useSubmit"),{basename:t}=w.useContext(fr),n=AH(),r=e.fetch,i=e.navigate;return w.useCallback(async(o,l={})=>{let{action:u,method:d,encType:h,formData:v,body:m}=HH(o,t);if(l.navigate===!1){let g=l.fetcherKey||dF();await r(g,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:v,body:m,formMethod:l.method||d,formEncType:l.encType||h,flushSync:l.flushSync})}else await i(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:v,body:m,formMethod:l.method||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function mF(e,{relative:t}={}){let{basename:n}=w.useContext(fr),r=w.useContext(Qr);Mt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...If(e||".",{relative:t})},l=Zr();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(v=>v==="")){u.delete("index"),d.filter(m=>m).forEach(m=>u.append("index",m));let v=u.toString();o.search=v?`?${v}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Xa([n,o.pathname])),Fu(o)}function pF(e,{relative:t}={}){let n=w.useContext(J4);Mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=c$("useViewTransitionState"),i=If(e,{relative:t});if(!n.isTransitioning)return!1;let o=ni(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=ni(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Jh(i.pathname,l)!=null||Jh(i.pathname,o)!=null}var Lf=G4();const u$=xt(Lf);/**
|
|
61
|
+
* @license lucide-react v0.462.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const vF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),f$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.462.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var gF={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"};/**
|
|
71
|
+
* @license lucide-react v0.462.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const yF=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},d)=>w.createElement("svg",{ref:d,...gF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:f$("lucide",i),...u},[...l.map(([h,v])=>w.createElement(h,v)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
+
* @license lucide-react v0.462.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const _e=(e,t)=>{const n=w.forwardRef(({className:r,...i},o)=>w.createElement(yF,{ref:o,iconNode:t,className:f$(`lucide-${vF(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
81
|
+
* @license lucide-react v0.462.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Dp=_e("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"}]]);/**
|
|
86
|
+
* @license lucide-react v0.462.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const bF=_e("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
91
|
+
* @license lucide-react v0.462.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Qa=_e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
96
|
+
* @license lucide-react v0.462.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const xF=_e("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
101
|
+
* @license lucide-react v0.462.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const wF=_e("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
106
|
+
* @license lucide-react v0.462.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const SF=_e("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
111
|
+
* @license lucide-react v0.462.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const wb=_e("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"}]]);/**
|
|
116
|
+
* @license lucide-react v0.462.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const ri=_e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
121
|
+
* @license lucide-react v0.462.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const ro=_e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
126
|
+
* @license lucide-react v0.462.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const jF=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
131
|
+
* @license lucide-react v0.462.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const ic=_e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
136
|
+
* @license lucide-react v0.462.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const OF=_e("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
141
|
+
* @license lucide-react v0.462.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const cr=_e("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"}]]);/**
|
|
146
|
+
* @license lucide-react v0.462.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const ao=_e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
151
|
+
* @license lucide-react v0.462.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const d$=_e("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"}]]);/**
|
|
156
|
+
* @license lucide-react v0.462.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Qo=_e("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
161
|
+
* @license lucide-react v0.462.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const EF=_e("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
166
|
+
* @license lucide-react v0.462.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Kj=_e("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"}]]);/**
|
|
171
|
+
* @license lucide-react v0.462.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const _F=_e("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
176
|
+
* @license lucide-react v0.462.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const NF=_e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
181
|
+
* @license lucide-react v0.462.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Gu=_e("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"}]]);/**
|
|
186
|
+
* @license lucide-react v0.462.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Xj=_e("FileImage",[["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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/**
|
|
191
|
+
* @license lucide-react v0.462.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const h$=_e("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"}]]);/**
|
|
196
|
+
* @license lucide-react v0.462.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Qj=_e("File",[["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"}]]);/**
|
|
201
|
+
* @license lucide-react v0.462.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const AF=_e("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
206
|
+
* @license lucide-react v0.462.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const m$=_e("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
211
|
+
* @license lucide-react v0.462.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Vu=_e("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"}]]);/**
|
|
216
|
+
* @license lucide-react v0.462.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const CF=_e("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
221
|
+
* @license lucide-react v0.462.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const zf=_e("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
226
|
+
* @license lucide-react v0.462.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const Sb=_e("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"}]]);/**
|
|
231
|
+
* @license lucide-react v0.462.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const TF=_e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
236
|
+
* @license lucide-react v0.462.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const MF=_e("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
241
|
+
* @license lucide-react v0.462.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const Va=_e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
246
|
+
* @license lucide-react v0.462.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const xl=_e("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"}]]);/**
|
|
251
|
+
* @license lucide-react v0.462.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const Zi=_e("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"}]]);/**
|
|
256
|
+
* @license lucide-react v0.462.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const RF=_e("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
261
|
+
* @license lucide-react v0.462.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const DF=_e("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
266
|
+
* @license lucide-react v0.462.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const PF=_e("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
271
|
+
* @license lucide-react v0.462.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const p$=_e("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"}]]);/**
|
|
276
|
+
* @license lucide-react v0.462.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const aC=_e("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
281
|
+
* @license lucide-react v0.462.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const tm=_e("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"}]]);/**
|
|
286
|
+
* @license lucide-react v0.462.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const Bf=_e("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"}]]);/**
|
|
291
|
+
* @license lucide-react v0.462.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const Pp=_e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
296
|
+
* @license lucide-react v0.462.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const jb=_e("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"}]]);/**
|
|
301
|
+
* @license lucide-react v0.462.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const v$=_e("ShieldAlert",[["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"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
306
|
+
* @license lucide-react v0.462.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const g$=_e("ShieldCheck",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
311
|
+
* @license lucide-react v0.462.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const nm=_e("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"}]]);/**
|
|
316
|
+
* @license lucide-react v0.462.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const kF=_e("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"}]]);/**
|
|
321
|
+
* @license lucide-react v0.462.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const y$=_e("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
326
|
+
* @license lucide-react v0.462.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const $F=_e("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"}]]);/**
|
|
331
|
+
* @license lucide-react v0.462.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const IF=_e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
336
|
+
* @license lucide-react v0.462.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const Zj=_e("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"}]]);/**
|
|
341
|
+
* @license lucide-react v0.462.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const LF=_e("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"}]]);/**
|
|
346
|
+
* @license lucide-react v0.462.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const Yu=_e("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"}]]);/**
|
|
351
|
+
* @license lucide-react v0.462.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const zF=_e("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"}]]);/**
|
|
356
|
+
* @license lucide-react v0.462.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const BF=_e("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
|
|
361
|
+
* @license lucide-react v0.462.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const or=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function b$(e,t=[]){let n=[];function r(o,l){const u=w.createContext(l);u.displayName=o+"Context";const d=n.length;n=[...n,l];const h=m=>{var E;const{scope:g,children:b,...O}=m,S=((E=g==null?void 0:g[e])==null?void 0:E[d])||u,x=w.useMemo(()=>O,Object.values(O));return c.jsx(S.Provider,{value:x,children:b})};h.displayName=o+"Provider";function v(m,g){var S;const b=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,O=w.useContext(b);if(O)return O;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[h,v]}const i=()=>{const o=n.map(l=>w.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,qF(i,...t)]}function qF(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const m=d(o)[`__scope${h}`];return{...u,...m}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Wr(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Wt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function iC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qf(...e){return t=>{let n=!1;const r=e.map(i=>{const o=iC(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():iC(e[i],null)}}}}function Ue(...e){return w.useCallback(qf(...e),e)}var UF=Symbol.for("react.lazy"),rm=Bj[" use ".trim().toString()];function HF(e){return typeof e=="object"&&e!==null&&"then"in e}function x$(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===UF&&"_payload"in e&&HF(e._payload)}function w$(e){const t=FF(e),n=w.forwardRef((r,i)=>{let{children:o,...l}=r;x$(o)&&typeof rm=="function"&&(o=rm(o._payload));const u=w.Children.toArray(o),d=u.find(VF);if(d){const h=d.props.children,v=u.map(m=>m===d?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:m);return c.jsx(t,{...l,ref:i,children:w.isValidElement(h)?w.cloneElement(h,void 0,v):null})}return c.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var ss=w$("Slot");function FF(e){const t=w.forwardRef((n,r)=>{let{children:i,...o}=n;if(x$(i)&&typeof rm=="function"&&(i=rm(i._payload)),w.isValidElement(i)){const l=WF(i),u=YF(o,i.props);return i.type!==w.Fragment&&(u.ref=r?qf(r,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GF=Symbol("radix.slottable");function VF(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GF}function YF(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const d=o(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function WF(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var KF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ls=KF.reduce((e,t)=>{const n=w$(`Primitive.${t}`),r=w.forwardRef((i,o)=>{const{asChild:l,...u}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ob={exports:{}},Eb={};/**
|
|
366
|
+
* @license React
|
|
367
|
+
* use-sync-external-store-shim.production.js
|
|
368
|
+
*
|
|
369
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the MIT license found in the
|
|
372
|
+
* LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/var oC;function XF(){if(oC)return Eb;oC=1;var e=Tp();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(m,g){var b=g(),O=r({inst:{value:b,getSnapshot:g}}),S=O[0].inst,x=O[1];return o(function(){S.value=b,S.getSnapshot=g,d(S)&&x({inst:S})},[m,b,g]),i(function(){return d(S)&&x({inst:S}),m(function(){d(S)&&x({inst:S})})},[m]),l(b),b}function d(m){var g=m.getSnapshot;m=m.value;try{var b=g();return!n(m,b)}catch{return!0}}function h(m,g){return g()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Eb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,Eb}var sC;function QF(){return sC||(sC=1,Ob.exports=XF()),Ob.exports}var ZF=QF();function JF(){return ZF.useSyncExternalStore(e7,()=>!0,()=>!1)}function e7(){return()=>{}}var Jj="Avatar",[t7]=b$(Jj),[n7,S$]=t7(Jj),j$=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=w.useState("idle");return c.jsx(n7,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:c.jsx(ls.span,{...r,ref:t})})});j$.displayName=Jj;var O$="AvatarImage",E$=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,l=S$(O$,n),u=r7(r,o),d=Wr(h=>{i(h),l.onImageLoadingStatusChange(h)});return Wt(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?c.jsx(ls.img,{...o,ref:t,src:r}):null});E$.displayName=O$;var _$="AvatarFallback",N$=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=S$(_$,n),[l,u]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&o.imageLoadingStatus!=="loaded"?c.jsx(ls.span,{...i,ref:t}):null});N$.displayName=_$;function lC(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function r7(e,{referrerPolicy:t,crossOrigin:n}){const r=JF(),i=w.useRef(null),o=r?(i.current||(i.current=new window.Image),i.current):null,[l,u]=w.useState(()=>lC(o,e));return Wt(()=>{u(lC(o,e))},[o,e]),Wt(()=>{const d=m=>()=>{u(m)};if(!o)return;const h=d("loaded"),v=d("error");return o.addEventListener("load",h),o.addEventListener("error",v),t&&(o.referrerPolicy=t),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",h),o.removeEventListener("error",v)}},[o,n,t]),l}var a7=j$,i7=E$,o7=N$;function A$(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=A$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=A$(e))&&(r&&(r+=" "),r+=t);return r}const s7=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},l7=(e,t)=>({classGroupId:e,validator:t}),C$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),am="-",cC=[],c7="arbitrary..",u7=e=>{const t=d7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return f7(l);const u=l.split(am),d=u[0]===""&&u.length>1?1:0;return T$(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],h=n[l];return d?h?s7(h,d):d:h||cC}return n[l]||cC}}},T$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const h=T$(e,t+1,o);if(h)return h}const l=n.validators;if(l===null)return;const u=t===0?e.join(am):e.slice(t).join(am),d=l.length;for(let h=0;h<d;h++){const v=l[h];if(v.validator(u))return v.classGroupId}},f7=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?c7+r:void 0})(),d7=e=>{const{theme:t,classGroups:n}=e;return h7(n,t)},h7=(e,t)=>{const n=C$();for(const r in e){const i=e[r];eO(i,n,r,t)}return n},eO=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];m7(l,t,n,r)}},m7=(e,t,n,r)=>{if(typeof e=="string"){p7(e,t,n);return}if(typeof e=="function"){v7(e,t,n,r);return}g7(e,t,n,r)},p7=(e,t,n)=>{const r=e===""?t:M$(t,e);r.classGroupId=n},v7=(e,t,n,r)=>{if(y7(e)){eO(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(l7(n,e))},g7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[u,d]=i[l];eO(d,M$(t,u),n,r)}},M$=(e,t)=>{let n=e;const r=t.split(am),i=r.length;for(let o=0;o<i;o++){const l=r[o];let u=n.nextPart.get(l);u||(u=C$(),n.nextPart.set(l,u)),n=u}return n},y7=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,b7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},K1="!",uC=":",x7=[],fC=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),w7=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,u=0,d=0,h;const v=i.length;for(let S=0;S<v;S++){const x=i[S];if(l===0&&u===0){if(x===uC){o.push(i.slice(d,S)),d=S+1;continue}if(x==="/"){h=S;continue}}x==="["?l++:x==="]"?l--:x==="("?u++:x===")"&&u--}const m=o.length===0?i:i.slice(d);let g=m,b=!1;m.endsWith(K1)?(g=m.slice(0,-1),b=!0):m.startsWith(K1)&&(g=m.slice(1),b=!0);const O=h&&h>d?h-d:void 0;return fC(o,b,g,O)};if(t){const i=t+uC,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):fC(x7,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},S7=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",d=t.has(l);u||d?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},j7=e=>({cache:b7(e.cacheSize),parseClassName:w7(e),sortModifiers:S7(e),...u7(e)}),O7=/\s+/,E7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,l=[],u=e.trim().split(O7);let d="";for(let h=u.length-1;h>=0;h-=1){const v=u[h],{isExternal:m,modifiers:g,hasImportantModifier:b,baseClassName:O,maybePostfixModifierPosition:S}=n(v);if(m){d=v+(d.length>0?" "+d:d);continue}let x=!!S,E=r(x?O.substring(0,S):O);if(!E){if(!x){d=v+(d.length>0?" "+d:d);continue}if(E=r(O),!E){d=v+(d.length>0?" "+d:d);continue}x=!1}const N=g.length===0?"":g.length===1?g[0]:o(g).join(":"),_=b?N+K1:N,C=_+E;if(l.indexOf(C)>-1)continue;l.push(C);const A=i(E,x);for(let M=0;M<A.length;++M){const R=A[M];l.push(_+R)}d=v+(d.length>0?" "+d:d)}return d},_7=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=R$(n))&&(i&&(i+=" "),i+=r);return i},R$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R$(e[r]))&&(n&&(n+=" "),n+=t);return n},N7=(e,...t)=>{let n,r,i,o;const l=d=>{const h=t.reduce((v,m)=>m(v),e());return n=j7(h),r=n.cache.get,i=n.cache.set,o=u,u(d)},u=d=>{const h=r(d);if(h)return h;const v=E7(d,n);return i(d,v),v};return o=l,(...d)=>o(_7(...d))},A7=[],Xt=e=>{const t=n=>n[e]||A7;return t.isThemeGetter=!0,t},D$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,P$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C7=/^\d+\/\d+$/,T7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M7=/\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$/,R7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,D7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sl=e=>C7.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Ui=e=>!!e&&Number.isInteger(Number(e)),_b=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Fa=e=>T7.test(e),k7=()=>!0,$7=e=>M7.test(e)&&!R7.test(e),k$=()=>!1,I7=e=>D7.test(e),L7=e=>P7.test(e),z7=e=>!je(e)&&!Oe(e),B7=e=>oc(e,L$,k$),je=e=>D$.test(e),Lo=e=>oc(e,z$,$7),Nb=e=>oc(e,G7,Ve),dC=e=>oc(e,$$,k$),q7=e=>oc(e,I$,L7),bh=e=>oc(e,B$,I7),Oe=e=>P$.test(e),xu=e=>sc(e,z$),U7=e=>sc(e,V7),hC=e=>sc(e,$$),H7=e=>sc(e,L$),F7=e=>sc(e,I$),xh=e=>sc(e,B$,!0),oc=(e,t,n)=>{const r=D$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},sc=(e,t,n=!1)=>{const r=P$.exec(e);return r?r[1]?t(r[1]):n:!1},$$=e=>e==="position"||e==="percentage",I$=e=>e==="image"||e==="url",L$=e=>e==="length"||e==="size"||e==="bg-size",z$=e=>e==="length",G7=e=>e==="number",V7=e=>e==="family-name",B$=e=>e==="shadow",Y7=()=>{const e=Xt("color"),t=Xt("font"),n=Xt("text"),r=Xt("font-weight"),i=Xt("tracking"),o=Xt("leading"),l=Xt("breakpoint"),u=Xt("container"),d=Xt("spacing"),h=Xt("radius"),v=Xt("shadow"),m=Xt("inset-shadow"),g=Xt("text-shadow"),b=Xt("drop-shadow"),O=Xt("blur"),S=Xt("perspective"),x=Xt("aspect"),E=Xt("ease"),N=Xt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...C(),Oe,je],M=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],D=()=>[Oe,je,d],z=()=>[sl,"full","auto",...D()],G=()=>[Ui,"none","subgrid",Oe,je],L=()=>["auto",{span:["full",Ui,Oe,je]},Ui,Oe,je],F=()=>[Ui,"auto",Oe,je],W=()=>["auto","min","max","fr",Oe,je],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],H=()=>[sl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],B=()=>[e,Oe,je],Z=()=>[...C(),hC,dC,{position:[Oe,je]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",H7,B7,{size:[Oe,je]}],Y=()=>[_b,xu,Lo],q=()=>["","none","full",h,Oe,je],U=()=>["",Ve,xu,Lo],ne=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Ve,_b,hC,dC],pe=()=>["","none",O,Oe,je],re=()=>["none",Ve,Oe,je],ve=()=>["none",Ve,Oe,je],ge=()=>[Ve,Oe,je],oe=()=>[sl,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fa],breakpoint:[Fa],color:[k7],container:[Fa],"drop-shadow":[Fa],ease:["in","out","in-out"],font:[z7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fa],shadow:[Fa],spacing:["px",Ve],text:[Fa],"text-shadow":[Fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sl,je,Oe,x]}],container:["container"],columns:[{columns:[Ve,je,Oe,u]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ui,"auto",Oe,je]}],basis:[{basis:[sl,"full","auto",u,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,sl,"auto","initial","none",je]}],grow:[{grow:["",Ve,Oe,je]}],shrink:[{shrink:["",Ve,Oe,je]}],order:[{order:[Ui,"first","last","none",Oe,je]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[u,"screen",...H()]}],"min-w":[{"min-w":[u,"screen","none",...H()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,xu,Lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Oe,Nb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_b,je]}],"font-family":[{font:[U7,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Oe,je]}],"line-clamp":[{"line-clamp":[Ve,"none",Oe,Nb]}],leading:[{leading:[o,...D()]}],"list-image":[{"list-image":["none",Oe,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Oe,Lo]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ve,"auto",Oe,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ui,Oe,je],radial:["",Oe,je],conic:[Ui,Oe,je]},F7,q7]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Oe,je]}],"outline-w":[{outline:["",Ve,xu,Lo]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",v,xh,bh]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,xh,bh]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ve,Lo]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",g,xh,bh]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ve,Oe,je]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Oe,je]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,je]}],filter:[{filter:["","none",Oe,je]}],blur:[{blur:pe()}],brightness:[{brightness:[Ve,Oe,je]}],contrast:[{contrast:[Ve,Oe,je]}],"drop-shadow":[{"drop-shadow":["","none",b,xh,bh]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ve,Oe,je]}],"hue-rotate":[{"hue-rotate":[Ve,Oe,je]}],invert:[{invert:["",Ve,Oe,je]}],saturate:[{saturate:[Ve,Oe,je]}],sepia:[{sepia:["",Ve,Oe,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,je]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Oe,je]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Oe,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Oe,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Oe,je]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Oe,je]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Oe,je]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Oe,je]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Oe,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Oe,je]}],ease:[{ease:["linear","initial",E,Oe,je]}],delay:[{delay:[Ve,Oe,je]}],animate:[{animate:["none",N,Oe,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Oe,je]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Oe,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Oe,je]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ve,xu,Lo,Nb]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},W7=N7(Y7);function me(...e){return W7(rt(e))}function mC({className:e,...t}){return c.jsx(a7,{className:me("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),"data-slot":"avatar",...t})}function pC({className:e,...t}){return c.jsx(i7,{className:me("aspect-square size-full",e),"data-slot":"avatar-image",...t})}function vC({className:e,...t}){return c.jsx(o7,{className:me("flex size-full items-center justify-center rounded-full bg-muted",e),"data-slot":"avatar-fallback",...t})}function ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function K7(e,t){const n=w.createContext(t),r=o=>{const{children:l,...u}=o,d=w.useMemo(()=>u,Object.values(u));return c.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function i(o){const l=w.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function jn(e,t=[]){let n=[];function r(o,l){const u=w.createContext(l),d=n.length;n=[...n,l];const h=m=>{var E;const{scope:g,children:b,...O}=m,S=((E=g==null?void 0:g[e])==null?void 0:E[d])||u,x=w.useMemo(()=>O,Object.values(O));return c.jsx(S.Provider,{value:x,children:b})};h.displayName=o+"Provider";function v(m,g){var S;const b=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,O=w.useContext(b);if(O)return O;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[h,v]}const i=()=>{const o=n.map(l=>w.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,X7(i,...t)]}function X7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const m=d(o)[`__scope${h}`];return{...u,...m}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Q7=Bj[" useInsertionEffect ".trim().toString()]||Wt;function Nn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=Z7({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:i;{const v=w.useRef(e!==void 0);w.useEffect(()=>{const m=v.current;m!==u&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=u},[u,r])}const h=w.useCallback(v=>{var m;if(u){const g=J7(v)?v(e):v;g!==e&&((m=l.current)==null||m.call(l,g))}else o(v)},[u,e,o,l]);return[d,h]}function Z7({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),o=w.useRef(t);return Q7(()=>{o.current=t},[t]),w.useEffect(()=>{var l;i.current!==n&&((l=o.current)==null||l.call(o,n),i.current=n)},[n,i]),[n,r,o]}function J7(e){return typeof e=="function"}function Tl(e){const t=e9(e),n=w.forwardRef((r,i)=>{const{children:o,...l}=r,u=w.Children.toArray(o),d=u.find(t9);if(d){const h=d.props.children,v=u.map(m=>m===d?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:m);return c.jsx(t,{...l,ref:i,children:w.isValidElement(h)?w.cloneElement(h,void 0,v):null})}return c.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function e9(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const l=r9(i),u=n9(o,i.props);return i.type!==w.Fragment&&(u.ref=r?qf(r,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q$=Symbol("radix.slottable");function U$(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=q$,t}function t9(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q$}function n9(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const d=o(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function r9(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var a9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=a9.reduce((e,t)=>{const n=Tl(`Primitive.${t}`),r=w.forwardRef((i,o)=>{const{asChild:l,...u}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function H$(e,t){e&&Lf.flushSync(()=>e.dispatchEvent(t))}function kp(e){const t=e+"CollectionProvider",[n,r]=jn(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:x,children:E}=S,N=I.useRef(null),_=I.useRef(new Map).current;return c.jsx(i,{scope:x,itemMap:_,collectionRef:N,children:E})};l.displayName=t;const u=e+"CollectionSlot",d=Tl(u),h=I.forwardRef((S,x)=>{const{scope:E,children:N}=S,_=o(u,E),C=Ue(x,_.collectionRef);return c.jsx(d,{ref:C,children:N})});h.displayName=u;const v=e+"CollectionItemSlot",m="data-radix-collection-item",g=Tl(v),b=I.forwardRef((S,x)=>{const{scope:E,children:N,..._}=S,C=I.useRef(null),A=Ue(x,C),M=o(v,E);return I.useEffect(()=>(M.itemMap.set(C,{ref:C,..._}),()=>void M.itemMap.delete(C))),c.jsx(g,{[m]:"",ref:A,children:N})});b.displayName=v;function O(S){const x=o(e+"CollectionConsumer",S);return I.useCallback(()=>{const N=x.collectionRef.current;if(!N)return[];const _=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(x.itemMap.values()).sort((M,R)=>_.indexOf(M.ref.current)-_.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:h,ItemSlot:b},O,r]}var i9=w.createContext(void 0);function lc(e){const t=w.useContext(i9);return e||t||"ltr"}function o9(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var s9="DismissableLayer",X1="dismissableLayer.update",l9="dismissableLayer.pointerDownOutside",c9="dismissableLayer.focusOutside",gC,F$=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cc=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,h=w.useContext(F$),[v,m]=w.useState(null),g=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=w.useState({}),O=Ue(t,R=>m(R)),S=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(x),N=v?S.indexOf(v):-1,_=h.layersWithOutsidePointerEventsDisabled.size>0,C=N>=E,A=d9(R=>{const D=R.target,z=[...h.branches].some(G=>G.contains(D));!C||z||(i==null||i(R),l==null||l(R),R.defaultPrevented||u==null||u())},g),M=h9(R=>{const D=R.target;[...h.branches].some(G=>G.contains(D))||(o==null||o(R),l==null||l(R),R.defaultPrevented||u==null||u())},g);return o9(R=>{N===h.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},g),w.useEffect(()=>{if(v)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(gC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),yC(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=gC)}},[v,g,n,h]),w.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),yC())},[v,h]),w.useEffect(()=>{const R=()=>b({});return document.addEventListener(X1,R),()=>document.removeEventListener(X1,R)},[]),c.jsx(Ne.div,{...d,ref:O,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,M.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,A.onPointerDownCapture)})});cc.displayName=s9;var u9="DismissableLayerBranch",f9=w.forwardRef((e,t)=>{const n=w.useContext(F$),r=w.useRef(null),i=Ue(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(Ne.div,{...e,ref:i})});f9.displayName=u9;function d9(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){G$(l9,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function h9(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&G$(c9,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yC(){const e=new CustomEvent(X1);document.dispatchEvent(e)}function G$(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?H$(i,o):i.dispatchEvent(o)}var Ab=0;function tO(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bC()),document.body.insertAdjacentElement("beforeend",e[1]??bC()),Ab++,()=>{Ab===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ab--}},[])}function bC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cb="focusScope.autoFocusOnMount",Tb="focusScope.autoFocusOnUnmount",xC={bubbles:!1,cancelable:!0},m9="FocusScope",$p=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[u,d]=w.useState(null),h=Wr(i),v=Wr(o),m=w.useRef(null),g=Ue(t,S=>d(S)),b=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let S=function(_){if(b.paused||!u)return;const C=_.target;u.contains(C)?m.current=C:Gi(m.current,{select:!0})},x=function(_){if(b.paused||!u)return;const C=_.relatedTarget;C!==null&&(u.contains(C)||Gi(m.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const A of _)A.removedNodes.length>0&&Gi(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",x);const N=new MutationObserver(E);return u&&N.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",x),N.disconnect()}}},[r,u,b.paused]),w.useEffect(()=>{if(u){SC.add(b);const S=document.activeElement;if(!u.contains(S)){const E=new CustomEvent(Cb,xC);u.addEventListener(Cb,h),u.dispatchEvent(E),E.defaultPrevented||(p9(x9(V$(u)),{select:!0}),document.activeElement===S&&Gi(u))}return()=>{u.removeEventListener(Cb,h),setTimeout(()=>{const E=new CustomEvent(Tb,xC);u.addEventListener(Tb,v),u.dispatchEvent(E),E.defaultPrevented||Gi(S??document.body,{select:!0}),u.removeEventListener(Tb,v),SC.remove(b)},0)}}},[u,h,v,b]);const O=w.useCallback(S=>{if(!n&&!r||b.paused)return;const x=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(x&&E){const N=S.currentTarget,[_,C]=v9(N);_&&C?!S.shiftKey&&E===C?(S.preventDefault(),n&&Gi(_,{select:!0})):S.shiftKey&&E===_&&(S.preventDefault(),n&&Gi(C,{select:!0})):E===N&&S.preventDefault()}},[n,r,b.paused]);return c.jsx(Ne.div,{tabIndex:-1,...l,ref:g,onKeyDown:O})});$p.displayName=m9;function p9(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gi(r,{select:t}),document.activeElement!==n)return}function v9(e){const t=V$(e),n=wC(t,e),r=wC(t.reverse(),e);return[n,r]}function V$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wC(e,t){for(const n of e)if(!g9(n,{upTo:t}))return n}function g9(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function y9(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&y9(e)&&t&&e.select()}}var SC=b9();function b9(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jC(e,t),e.unshift(t)},remove(t){var n;e=jC(e,t),(n=e[0])==null||n.resume()}}}function jC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function x9(e){return e.filter(t=>t.tagName!=="A")}var w9=Bj[" useId ".trim().toString()]||(()=>{}),S9=0;function Tr(e){const[t,n]=w.useState(w9());return Wt(()=>{n(r=>r??String(S9++))},[e]),e||(t?`radix-${t}`:"")}const j9=["top","right","bottom","left"],Ji=Math.min,ar=Math.max,im=Math.round,wh=Math.floor,ha=e=>({x:e,y:e}),O9={left:"right",right:"left",bottom:"top",top:"bottom"},E9={start:"end",end:"start"};function Q1(e,t,n){return ar(e,Ji(t,n))}function ai(e,t){return typeof e=="function"?e(t):e}function ii(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function nO(e){return e==="x"?"y":"x"}function rO(e){return e==="y"?"height":"width"}const _9=new Set(["top","bottom"]);function ua(e){return _9.has(ii(e))?"y":"x"}function aO(e){return nO(ua(e))}function N9(e,t,n){n===void 0&&(n=!1);const r=uc(e),i=aO(e),o=rO(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=om(l)),[l,om(l)]}function A9(e){const t=om(e);return[Z1(e),t,Z1(t)]}function Z1(e){return e.replace(/start|end/g,t=>E9[t])}const OC=["left","right"],EC=["right","left"],C9=["top","bottom"],T9=["bottom","top"];function M9(e,t,n){switch(e){case"top":case"bottom":return n?t?EC:OC:t?OC:EC;case"left":case"right":return t?C9:T9;default:return[]}}function R9(e,t,n,r){const i=uc(e);let o=M9(ii(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Z1)))),o}function om(e){return e.replace(/left|right|bottom|top/g,t=>O9[t])}function D9(e){return{top:0,right:0,bottom:0,left:0,...e}}function Y$(e){return typeof e!="number"?D9(e):{top:e,right:e,bottom:e,left:e}}function sm(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function _C(e,t,n){let{reference:r,floating:i}=e;const o=ua(t),l=aO(t),u=rO(l),d=ii(t),h=o==="y",v=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let b;switch(d){case"top":b={x:v,y:r.y-i.height};break;case"bottom":b={x:v,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-i.width,y:m};break;default:b={x:r.x,y:r.y}}switch(uc(t)){case"start":b[l]-=g*(n&&h?-1:1);break;case"end":b[l]+=g*(n&&h?-1:1);break}return b}const P9=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:v,y:m}=_C(h,r,d),g=r,b={},O=0;for(let S=0;S<u.length;S++){const{name:x,fn:E}=u[S],{x:N,y:_,data:C,reset:A}=await E({x:v,y:m,initialPlacement:r,placement:g,strategy:i,middlewareData:b,rects:h,platform:l,elements:{reference:e,floating:t}});v=N??v,m=_??m,b={...b,[x]:{...b[x],...C}},A&&O<=50&&(O++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(h=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:v,y:m}=_C(h,g,d)),S=-1)}return{x:v,y:m,placement:g,strategy:i,middlewareData:b}};async function Wu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:m="floating",altBoundary:g=!1,padding:b=0}=ai(t,e),O=Y$(b),x=u[g?m==="floating"?"reference":"floating":m],E=sm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:h,rootBoundary:v,strategy:d})),N=m==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),C=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},A=sm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:N,offsetParent:_,strategy:d}):N);return{top:(E.top-A.top+O.top)/C.y,bottom:(A.bottom-E.bottom+O.bottom)/C.y,left:(E.left-A.left+O.left)/C.x,right:(A.right-E.right+O.right)/C.x}}const k9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:v=0}=ai(e,t)||{};if(h==null)return{};const m=Y$(v),g={x:n,y:r},b=aO(i),O=rO(b),S=await l.getDimensions(h),x=b==="y",E=x?"top":"left",N=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=o.reference[O]+o.reference[b]-g[b]-o.floating[O],A=g[b]-o.reference[b],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let R=M?M[_]:0;(!R||!await(l.isElement==null?void 0:l.isElement(M)))&&(R=u.floating[_]||o.floating[O]);const D=C/2-A/2,z=R/2-S[O]/2-1,G=Ji(m[E],z),L=Ji(m[N],z),F=G,W=R-S[O]-L,Q=R/2-S[O]/2+D,X=Q1(F,Q,W),k=!d.arrow&&uc(i)!=null&&Q!==X&&o.reference[O]/2-(Q<F?G:L)-S[O]/2<0,H=k?Q<F?Q-F:Q-W:0;return{[b]:g[b]+H,data:{[b]:X,centerOffset:Q-X-H,...k&&{alignmentOffset:H}},reset:k}}}),$9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:v=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:S=!0,...x}=ai(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=ii(i),N=ua(u),_=ii(u)===u,C=await(d.isRTL==null?void 0:d.isRTL(h.floating)),A=g||(_||!S?[om(u)]:A9(u)),M=O!=="none";!g&&M&&A.push(...R9(u,S,O,C));const R=[u,...A],D=await Wu(t,x),z=[];let G=((r=o.flip)==null?void 0:r.overflows)||[];if(v&&z.push(D[E]),m){const Q=N9(i,l,C);z.push(D[Q[0]],D[Q[1]])}if(G=[...G,{placement:i,overflows:z}],!z.every(Q=>Q<=0)){var L,F;const Q=(((L=o.flip)==null?void 0:L.index)||0)+1,X=R[Q];if(X&&(!(m==="alignment"?N!==ua(X):!1)||G.every(B=>ua(B.placement)===N?B.overflows[0]>0:!0)))return{data:{index:Q,overflows:G},reset:{placement:X}};let k=(F=G.filter(H=>H.overflows[0]<=0).sort((H,B)=>H.overflows[1]-B.overflows[1])[0])==null?void 0:F.placement;if(!k)switch(b){case"bestFit":{var W;const H=(W=G.filter(B=>{if(M){const Z=ua(B.placement);return Z===N||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,le)=>Z+le,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:W[0];H&&(k=H);break}case"initialPlacement":k=u;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function NC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AC(e){return j9.some(t=>e[t]>=0)}const I9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ai(e,t);switch(r){case"referenceHidden":{const o=await Wu(t,{...i,elementContext:"reference"}),l=NC(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:AC(l)}}}case"escaped":{const o=await Wu(t,{...i,altBoundary:!0}),l=NC(o,n.floating);return{data:{escapedOffsets:l,escaped:AC(l)}}}default:return{}}}}},W$=new Set(["left","top"]);async function L9(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ii(n),u=uc(n),d=ua(n)==="y",h=W$.has(l)?-1:1,v=o&&d?-1:1,m=ai(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:O}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof O=="number"&&(b=u==="end"?O*-1:O),d?{x:b*v,y:g*h}:{x:g*h,y:b*v}}const z9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,d=await L9(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:l}}}}},B9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:x=>{let{x:E,y:N}=x;return{x:E,y:N}}},...d}=ai(e,t),h={x:n,y:r},v=await Wu(t,d),m=ua(ii(i)),g=nO(m);let b=h[g],O=h[m];if(o){const x=g==="y"?"top":"left",E=g==="y"?"bottom":"right",N=b+v[x],_=b-v[E];b=Q1(N,b,_)}if(l){const x=m==="y"?"top":"left",E=m==="y"?"bottom":"right",N=O+v[x],_=O-v[E];O=Q1(N,O,_)}const S=u.fn({...t,[g]:b,[m]:O});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:o,[m]:l}}}}}},q9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=ai(e,t),v={x:n,y:r},m=ua(i),g=nO(m);let b=v[g],O=v[m];const S=ai(u,t),x=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=g==="y"?"height":"width",C=o.reference[g]-o.floating[_]+x.mainAxis,A=o.reference[g]+o.reference[_]-x.mainAxis;b<C?b=C:b>A&&(b=A)}if(h){var E,N;const _=g==="y"?"width":"height",C=W$.has(ii(i)),A=o.reference[m]-o.floating[_]+(C&&((E=l.offset)==null?void 0:E[m])||0)+(C?0:x.crossAxis),M=o.reference[m]+o.reference[_]+(C?0:((N=l.offset)==null?void 0:N[m])||0)-(C?x.crossAxis:0);O<A?O=A:O>M&&(O=M)}return{[g]:b,[m]:O}}}},U9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...h}=ai(e,t),v=await Wu(t,h),m=ii(i),g=uc(i),b=ua(i)==="y",{width:O,height:S}=o.floating;let x,E;m==="top"||m==="bottom"?(x=m,E=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=m,x=g==="end"?"top":"bottom");const N=S-v.top-v.bottom,_=O-v.left-v.right,C=Ji(S-v[x],N),A=Ji(O-v[E],_),M=!t.middlewareData.shift;let R=C,D=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=N),M&&!g){const G=ar(v.left,0),L=ar(v.right,0),F=ar(v.top,0),W=ar(v.bottom,0);b?D=O-2*(G!==0||L!==0?G+L:ar(v.left,v.right)):R=S-2*(F!==0||W!==0?F+W:ar(v.top,v.bottom))}await d({...t,availableWidth:D,availableHeight:R});const z=await l.getDimensions(u.floating);return O!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function Ip(){return typeof window<"u"}function fc(e){return K$(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ja(e){var t;return(t=(K$(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K$(e){return Ip()?e instanceof Node||e instanceof sr(e).Node:!1}function Kr(e){return Ip()?e instanceof Element||e instanceof sr(e).Element:!1}function xa(e){return Ip()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function CC(e){return!Ip()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}const H9=new Set(["inline","contents"]);function Uf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!H9.has(i)}const F9=new Set(["table","td","th"]);function G9(e){return F9.has(fc(e))}const V9=[":popover-open",":modal"];function Lp(e){return V9.some(t=>{try{return e.matches(t)}catch{return!1}})}const Y9=["transform","translate","scale","rotate","perspective"],W9=["transform","translate","scale","rotate","perspective","filter"],K9=["paint","layout","strict","content"];function iO(e){const t=oO(),n=Kr(e)?Xr(e):e;return Y9.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||W9.some(r=>(n.willChange||"").includes(r))||K9.some(r=>(n.contain||"").includes(r))}function X9(e){let t=eo(e);for(;xa(t)&&!Ml(t);){if(iO(t))return t;if(Lp(t))return null;t=eo(t)}return null}function oO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Q9=new Set(["html","body","#document"]);function Ml(e){return Q9.has(fc(e))}function Xr(e){return sr(e).getComputedStyle(e)}function zp(e){return Kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eo(e){if(fc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||CC(e)&&e.host||ja(e);return CC(t)?t.host:t}function X$(e){const t=eo(e);return Ml(t)?e.ownerDocument?e.ownerDocument.body:e.body:xa(t)&&Uf(t)?t:X$(t)}function Ku(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=X$(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=sr(i);if(o){const u=J1(l);return t.concat(l,l.visualViewport||[],Uf(i)?i:[],u&&n?Ku(u):[])}return t.concat(i,Ku(i,[],n))}function J1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q$(e){const t=Xr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xa(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=im(n)!==o||im(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function sO(e){return Kr(e)?e:e.contextElement}function wl(e){const t=sO(e);if(!xa(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Q$(t);let l=(o?im(n.width):n.width)/r,u=(o?im(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const Z9=ha(0);function Z$(e){const t=sr(e);return!oO()||!t.visualViewport?Z9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function J9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function Zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=sO(e);let l=ha(1);t&&(r?Kr(r)&&(l=wl(r)):l=wl(e));const u=J9(o,n,r)?Z$(o):ha(0);let d=(i.left+u.x)/l.x,h=(i.top+u.y)/l.y,v=i.width/l.x,m=i.height/l.y;if(o){const g=sr(o),b=r&&Kr(r)?sr(r):r;let O=g,S=J1(O);for(;S&&r&&b!==O;){const x=wl(S),E=S.getBoundingClientRect(),N=Xr(S),_=E.left+(S.clientLeft+parseFloat(N.paddingLeft))*x.x,C=E.top+(S.clientTop+parseFloat(N.paddingTop))*x.y;d*=x.x,h*=x.y,v*=x.x,m*=x.y,d+=_,h+=C,O=sr(S),S=J1(O)}}return sm({width:v,height:m,x:d,y:h})}function Bp(e,t){const n=zp(e).scrollLeft;return t?t.left+n:Zo(ja(e)).left+n}function J$(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function eG(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=ja(r),u=t?Lp(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},h=ha(1);const v=ha(0),m=xa(r);if((m||!m&&!o)&&((fc(r)!=="body"||Uf(l))&&(d=zp(r)),xa(r))){const b=Zo(r);h=wl(r),v.x=b.x+r.clientLeft,v.y=b.y+r.clientTop}const g=l&&!m&&!o?J$(l,d):ha(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+v.x+g.x,y:n.y*h.y-d.scrollTop*h.y+v.y+g.y}}function tG(e){return Array.from(e.getClientRects())}function nG(e){const t=ja(e),n=zp(e),r=e.ownerDocument.body,i=ar(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ar(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bp(e);const u=-n.scrollTop;return Xr(r).direction==="rtl"&&(l+=ar(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}const TC=25;function rG(e,t){const n=sr(e),r=ja(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(i){o=i.width,l=i.height;const v=oO();(!v||v&&t==="fixed")&&(u=i.offsetLeft,d=i.offsetTop)}const h=Bp(r);if(h<=0){const v=r.ownerDocument,m=v.body,g=getComputedStyle(m),b=v.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,O=Math.abs(r.clientWidth-m.clientWidth-b);O<=TC&&(o-=O)}else h<=TC&&(o+=h);return{width:o,height:l,x:u,y:d}}const aG=new Set(["absolute","fixed"]);function iG(e,t){const n=Zo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=xa(e)?wl(e):ha(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=i*o.x,h=r*o.y;return{width:l,height:u,x:d,y:h}}function MC(e,t,n){let r;if(t==="viewport")r=rG(e,n);else if(t==="document")r=nG(ja(e));else if(Kr(t))r=iG(t,n);else{const i=Z$(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return sm(r)}function e5(e,t){const n=eo(e);return n===t||!Kr(n)||Ml(n)?!1:Xr(n).position==="fixed"||e5(n,t)}function oG(e,t){const n=t.get(e);if(n)return n;let r=Ku(e,[],!1).filter(u=>Kr(u)&&fc(u)!=="body"),i=null;const o=Xr(e).position==="fixed";let l=o?eo(e):e;for(;Kr(l)&&!Ml(l);){const u=Xr(l),d=iO(l);!d&&u.position==="fixed"&&(i=null),(o?!d&&!i:!d&&u.position==="static"&&!!i&&aG.has(i.position)||Uf(l)&&!d&&e5(e,l))?r=r.filter(v=>v!==l):i=u,l=eo(l)}return t.set(e,r),r}function sG(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Lp(t)?[]:oG(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,v)=>{const m=MC(t,v,i);return h.top=ar(m.top,h.top),h.right=Ji(m.right,h.right),h.bottom=Ji(m.bottom,h.bottom),h.left=ar(m.left,h.left),h},MC(t,u,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function lG(e){const{width:t,height:n}=Q$(e);return{width:t,height:n}}function cG(e,t,n){const r=xa(t),i=ja(t),o=n==="fixed",l=Zo(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=ha(0);function h(){d.x=Bp(i)}if(r||!r&&!o)if((fc(t)!=="body"||Uf(i))&&(u=zp(t)),r){const b=Zo(t,!0,o,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();o&&!r&&i&&h();const v=i&&!r&&!o?J$(i,u):ha(0),m=l.left+u.scrollLeft-d.x-v.x,g=l.top+u.scrollTop-d.y-v.y;return{x:m,y:g,width:l.width,height:l.height}}function Mb(e){return Xr(e).position==="static"}function RC(e,t){if(!xa(e)||Xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ja(e)===n&&(n=n.ownerDocument.body),n}function t5(e,t){const n=sr(e);if(Lp(e))return n;if(!xa(e)){let i=eo(e);for(;i&&!Ml(i);){if(Kr(i)&&!Mb(i))return i;i=eo(i)}return n}let r=RC(e,t);for(;r&&G9(r)&&Mb(r);)r=RC(r,t);return r&&Ml(r)&&Mb(r)&&!iO(r)?n:r||X9(e)||n}const uG=async function(e){const t=this.getOffsetParent||t5,n=this.getDimensions,r=await n(e.floating);return{reference:cG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fG(e){return Xr(e).direction==="rtl"}const dG={convertOffsetParentRelativeRectToViewportRelativeRect:eG,getDocumentElement:ja,getClippingRect:sG,getOffsetParent:t5,getElementRects:uG,getClientRects:tG,getDimensions:lG,getScale:wl,isElement:Kr,isRTL:fG};function n5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hG(e,t){let n=null,r;const i=ja(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:v,top:m,width:g,height:b}=h;if(u||t(),!g||!b)return;const O=wh(m),S=wh(i.clientWidth-(v+g)),x=wh(i.clientHeight-(m+b)),E=wh(v),_={rootMargin:-O+"px "+-S+"px "+-x+"px "+-E+"px",threshold:ar(0,Ji(1,d))||1};let C=!0;function A(M){const R=M[0].intersectionRatio;if(R!==d){if(!C)return l();R?l(!1,R):r=setTimeout(()=>{l(!1,1e-7)},1e3)}R===1&&!n5(h,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return l(!0),o}function mG(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=sO(e),v=i||o?[...h?Ku(h):[],...Ku(t)]:[];v.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const m=h&&u?hG(h,n):null;let g=-1,b=null;l&&(b=new ResizeObserver(E=>{let[N]=E;N&&N.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=b)==null||_.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let O,S=d?Zo(e):null;d&&x();function x(){const E=Zo(e);S&&!n5(S,E)&&n(),S=E,O=requestAnimationFrame(x)}return n(),()=>{var E;v.forEach(N=>{i&&N.removeEventListener("scroll",n),o&&N.removeEventListener("resize",n)}),m==null||m(),(E=b)==null||E.disconnect(),b=null,d&&cancelAnimationFrame(O)}}const pG=z9,vG=B9,gG=$9,yG=U9,bG=I9,DC=k9,xG=q9,wG=(e,t,n)=>{const r=new Map,i={platform:dG,...n},o={...i.platform,_c:r};return P9(e,t,{...i,platform:o})};var SG=typeof document<"u",jG=function(){},Wh=SG?w.useLayoutEffect:jG;function lm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!lm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function r5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PC(e,t){const n=r5(e);return Math.round(t*n)/n}function Rb(e){const t=w.useRef(e);return Wh(()=>{t.current=e}),t}function OG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[v,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,b]=w.useState(r);lm(g,r)||b(r);const[O,S]=w.useState(null),[x,E]=w.useState(null),N=w.useCallback(B=>{B!==M.current&&(M.current=B,S(B))},[]),_=w.useCallback(B=>{B!==R.current&&(R.current=B,E(B))},[]),C=o||O,A=l||x,M=w.useRef(null),R=w.useRef(null),D=w.useRef(v),z=d!=null,G=Rb(d),L=Rb(i),F=Rb(h),W=w.useCallback(()=>{if(!M.current||!R.current)return;const B={placement:t,strategy:n,middleware:g};L.current&&(B.platform=L.current),wG(M.current,R.current,B).then(Z=>{const le={...Z,isPositioned:F.current!==!1};Q.current&&!lm(D.current,le)&&(D.current=le,Lf.flushSync(()=>{m(le)}))})},[g,t,n,L,F]);Wh(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[h]);const Q=w.useRef(!1);Wh(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Wh(()=>{if(C&&(M.current=C),A&&(R.current=A),C&&A){if(G.current)return G.current(C,A,W);W()}},[C,A,W,G,z]);const X=w.useMemo(()=>({reference:M,floating:R,setReference:N,setFloating:_}),[N,_]),k=w.useMemo(()=>({reference:C,floating:A}),[C,A]),H=w.useMemo(()=>{const B={position:n,left:0,top:0};if(!k.floating)return B;const Z=PC(k.floating,v.x),le=PC(k.floating,v.y);return u?{...B,transform:"translate("+Z+"px, "+le+"px)",...r5(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:le}},[n,u,k.floating,v.x,v.y]);return w.useMemo(()=>({...v,update:W,refs:X,elements:k,floatingStyles:H}),[v,W,X,k,H])}const EG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?DC({element:r.current,padding:i}).fn(n):{}:r?DC({element:r,padding:i}).fn(n):{}}}},_G=(e,t)=>({...pG(e),options:[e,t]}),NG=(e,t)=>({...vG(e),options:[e,t]}),AG=(e,t)=>({...xG(e),options:[e,t]}),CG=(e,t)=>({...gG(e),options:[e,t]}),TG=(e,t)=>({...yG(e),options:[e,t]}),MG=(e,t)=>({...bG(e),options:[e,t]}),RG=(e,t)=>({...EG(e),options:[e,t]});var DG="Arrow",a5=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return c.jsx(Ne.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});a5.displayName=DG;var PG=a5;function qp(e){const[t,n]=w.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var lO="Popper",[i5,io]=jn(lO),[kG,o5]=i5(lO),s5=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return c.jsx(kG,{scope:t,anchor:r,onAnchorChange:i,children:n})};s5.displayName=lO;var l5="PopperAnchor",c5=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=o5(l5,n),l=w.useRef(null),u=Ue(t,l),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=(r==null?void 0:r.current)||l.current,h!==d.current&&o.onAnchorChange(d.current)}),r?null:c.jsx(Ne.div,{...i,ref:u})});c5.displayName=l5;var cO="PopperContent",[$G,IG]=i5(cO),u5=w.forwardRef((e,t)=>{var ie,pe,re,ve,ge,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:b="optimized",onPlaced:O,...S}=e,x=o5(cO,n),[E,N]=w.useState(null),_=Ue(t,ke=>N(ke)),[C,A]=w.useState(null),M=qp(C),R=(M==null?void 0:M.width)??0,D=(M==null?void 0:M.height)??0,z=r+(o!=="center"?"-"+o:""),G=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},L=Array.isArray(h)?h:[h],F=L.length>0,W={padding:G,boundary:L.filter(zG),altBoundary:F},{refs:Q,floatingStyles:X,placement:k,isPositioned:H,middlewareData:B}=OG({strategy:"fixed",placement:z,whileElementsMounted:(...ke)=>mG(...ke,{animationFrame:b==="always"}),elements:{reference:x.anchor},middleware:[_G({mainAxis:i+D,alignmentAxis:l}),d&&NG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?AG():void 0,...W}),d&&CG({...W}),TG({...W,apply:({elements:ke,rects:we,availableWidth:ze,availableHeight:Ze})=>{const{width:lt,height:tn}=we.reference,pt=ke.floating.style;pt.setProperty("--radix-popper-available-width",`${ze}px`),pt.setProperty("--radix-popper-available-height",`${Ze}px`),pt.setProperty("--radix-popper-anchor-width",`${lt}px`),pt.setProperty("--radix-popper-anchor-height",`${tn}px`)}}),C&&RG({element:C,padding:u}),BG({arrowWidth:R,arrowHeight:D}),g&&MG({strategy:"referenceHidden",...W})]}),[Z,le]=h5(k),$=Wr(O);Wt(()=>{H&&($==null||$())},[H,$]);const Y=(ie=B.arrow)==null?void 0:ie.x,q=(pe=B.arrow)==null?void 0:pe.y,U=((re=B.arrow)==null?void 0:re.centerOffset)!==0,[ne,fe]=w.useState();return Wt(()=>{E&&fe(window.getComputedStyle(E).zIndex)},[E]),c.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:H?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(ve=B.transformOrigin)==null?void 0:ve.x,(ge=B.transformOrigin)==null?void 0:ge.y].join(" "),...((oe=B.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx($G,{scope:n,placedSide:Z,onArrowChange:A,arrowX:Y,arrowY:q,shouldHideArrow:U,children:c.jsx(Ne.div,{"data-side":Z,"data-align":le,...S,ref:_,style:{...S.style,animation:H?void 0:"none"}})})})});u5.displayName=cO;var f5="PopperArrow",LG={top:"bottom",right:"left",bottom:"top",left:"right"},d5=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=IG(f5,r),l=LG[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(PG,{...i,ref:n,style:{...i.style,display:"block"}})})});d5.displayName=f5;function zG(e){return e!==null}var BG=e=>({name:"transformOrigin",options:e,fn(t){var x,E,N;const{placement:n,rects:r,middlewareData:i}=t,l=((x=i.arrow)==null?void 0:x.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,v]=h5(n),m={start:"0%",center:"50%",end:"100%"}[v],g=(((E=i.arrow)==null?void 0:E.x)??0)+u/2,b=(((N=i.arrow)==null?void 0:N.y)??0)+d/2;let O="",S="";return h==="bottom"?(O=l?m:`${g}px`,S=`${-d}px`):h==="top"?(O=l?m:`${g}px`,S=`${r.floating.height+d}px`):h==="right"?(O=`${-d}px`,S=l?m:`${b}px`):h==="left"&&(O=`${r.floating.width+d}px`,S=l?m:`${b}px`),{data:{x:O,y:S}}}});function h5(e){const[t,n="center"]=e.split("-");return[t,n]}var Up=s5,Hp=c5,Fp=u5,Gp=d5,qG="Portal",dc=w.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,o]=w.useState(!1);Wt(()=>o(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?u$.createPortal(c.jsx(Ne.div,{...r,ref:t}),l):null});dc.displayName=qG;function UG(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var An=e=>{const{present:t,children:n}=e,r=HG(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=Ue(r.ref,FG(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};An.displayName="Presence";function HG(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[u,d]=UG(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=Sh(r.current);o.current=u==="mounted"?h:"none"},[u]),Wt(()=>{const h=r.current,v=i.current;if(v!==e){const g=o.current,b=Sh(h);e?d("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(v&&g!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Wt(()=>{if(t){let h;const v=t.ownerDocument.defaultView??window,m=b=>{const S=Sh(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&S&&(d("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",h=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=b=>{b.target===t&&(o.current=Sh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{v.clearTimeout(h),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Sh(e){return(e==null?void 0:e.animationName)||"none"}function FG(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Db="rovingFocusGroup.onEntryFocus",GG={bubbles:!1,cancelable:!0},Hf="RovingFocusGroup",[eS,m5,VG]=kp(Hf),[YG,hc]=jn(Hf,[VG]),[WG,KG]=YG(Hf),p5=w.forwardRef((e,t)=>c.jsx(eS.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(eS.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(XG,{...e,ref:t})})}));p5.displayName=Hf;var XG=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...m}=e,g=w.useRef(null),b=Ue(t,g),O=lc(o),[S,x]=Nn({prop:l,defaultProp:u??null,onChange:d,caller:Hf}),[E,N]=w.useState(!1),_=Wr(h),C=m5(n),A=w.useRef(!1),[M,R]=w.useState(0);return w.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(Db,_),()=>D.removeEventListener(Db,_)},[_]),c.jsx(WG,{scope:n,orientation:r,dir:O,loop:i,currentTabStopId:S,onItemFocus:w.useCallback(D=>x(D),[x]),onItemShiftTab:w.useCallback(()=>N(!0),[]),onFocusableItemAdd:w.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:w.useCallback(()=>R(D=>D-1),[]),children:c.jsx(Ne.div,{tabIndex:E||M===0?-1:0,"data-orientation":r,...m,ref:b,style:{outline:"none",...e.style},onMouseDown:ye(e.onMouseDown,()=>{A.current=!0}),onFocus:ye(e.onFocus,D=>{const z=!A.current;if(D.target===D.currentTarget&&z&&!E){const G=new CustomEvent(Db,GG);if(D.currentTarget.dispatchEvent(G),!G.defaultPrevented){const L=C().filter(k=>k.focusable),F=L.find(k=>k.active),W=L.find(k=>k.id===S),X=[F,W,...L].filter(Boolean).map(k=>k.ref.current);y5(X,v)}}A.current=!1}),onBlur:ye(e.onBlur,()=>N(!1))})})}),v5="RovingFocusGroupItem",g5=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...u}=e,d=Tr(),h=o||d,v=KG(v5,n),m=v.currentTabStopId===h,g=m5(n),{onFocusableItemAdd:b,onFocusableItemRemove:O,currentTabStopId:S}=v;return w.useEffect(()=>{if(r)return b(),()=>O()},[r,b,O]),c.jsx(eS.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:c.jsx(Ne.span,{tabIndex:m?0:-1,"data-orientation":v.orientation,...u,ref:t,onMouseDown:ye(e.onMouseDown,x=>{r?v.onItemFocus(h):x.preventDefault()}),onFocus:ye(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:ye(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){v.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const E=JG(x,v.orientation,v.dir);if(E!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let _=g().filter(C=>C.focusable).map(C=>C.ref.current);if(E==="last")_.reverse();else if(E==="prev"||E==="next"){E==="prev"&&_.reverse();const C=_.indexOf(x.currentTarget);_=v.loop?eV(_,C+1):_.slice(C+1)}setTimeout(()=>y5(_))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});g5.displayName=v5;var QG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JG(e,t,n){const r=ZG(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return QG[r]}function y5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function eV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uO=p5,fO=g5,tV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ll=new WeakMap,jh=new WeakMap,Oh={},Pb=0,b5=function(e){return e&&(e.host||b5(e.parentNode))},nV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=b5(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},rV=function(e,t,n,r){var i=nV(t,Array.isArray(e)?e:[e]);Oh[n]||(Oh[n]=new WeakMap);var o=Oh[n],l=[],u=new Set,d=new Set(i),h=function(m){!m||u.has(m)||(u.add(m),h(m.parentNode))};i.forEach(h);var v=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(u.has(g))v(g);else try{var b=g.getAttribute(r),O=b!==null&&b!=="false",S=(ll.get(g)||0)+1,x=(o.get(g)||0)+1;ll.set(g,S),o.set(g,x),l.push(g),S===1&&O&&jh.set(g,!0),x===1&&g.setAttribute(n,"true"),O||g.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",g,E)}})};return v(t),u.clear(),Pb++,function(){l.forEach(function(m){var g=ll.get(m)-1,b=o.get(m)-1;ll.set(m,g),o.set(m,b),g||(jh.has(m)||m.removeAttribute(r),jh.delete(m)),b||m.removeAttribute(n)}),Pb--,Pb||(ll=new WeakMap,ll=new WeakMap,jh=new WeakMap,Oh={})}},dO=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=tV(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),rV(r,i,n,"aria-hidden")):function(){return null}},ca=function(){return ca=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ca.apply(this,arguments)};function x5(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function aV(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Kh="right-scroll-bar-position",Xh="width-before-scroll-bar",iV="with-scroll-bars-hidden",oV="--removed-body-scroll-bar-size";function kb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sV(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var lV=typeof window<"u"?w.useLayoutEffect:w.useEffect,kC=new WeakMap;function cV(e,t){var n=sV(null,function(r){return e.forEach(function(i){return kb(i,r)})});return lV(function(){var r=kC.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(u){o.has(u)||kb(u,null)}),o.forEach(function(u){i.has(u)||kb(u,l)})}kC.set(n,e)},[e]),n}function uV(e){return e}function fV(e,t){t===void 0&&(t=uV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var v=l;l=[],v.forEach(o)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(v){l.push(v),h()},filter:function(v){return l=l.filter(v),n}}}};return i}function dV(e){e===void 0&&(e={});var t=fV(null);return t.options=ca({async:!0,ssr:!1},e),t}var w5=function(e){var t=e.sideCar,n=x5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,ca({},n))};w5.isSideCarExport=!0;function hV(e,t){return e.useMedium(t),w5}var S5=dV(),$b=function(){},Vp=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:$b,onWheelCapture:$b,onTouchMoveCapture:$b}),i=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,v=e.enabled,m=e.shards,g=e.sideCar,b=e.noRelative,O=e.noIsolation,S=e.inert,x=e.allowPinchZoom,E=e.as,N=E===void 0?"div":E,_=e.gapMode,C=x5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=g,M=cV([n,t]),R=ca(ca({},C),i);return w.createElement(w.Fragment,null,v&&w.createElement(A,{sideCar:S5,removeScrollBar:h,shards:m,noRelative:b,noIsolation:O,inert:S,setCallbacks:o,allowPinchZoom:!!x,lockRef:n,gapMode:_}),l?w.cloneElement(w.Children.only(u),ca(ca({},R),{ref:M})):w.createElement(N,ca({},R,{className:d,ref:M}),u))});Vp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vp.classNames={fullWidth:Xh,zeroRight:Kh};var mV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mV();return t&&e.setAttribute("nonce",t),e}function vV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pV())&&(vV(t,n),gV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bV=function(){var e=yV();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},j5=function(){var e=bV(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},xV={left:0,top:0,right:0,gap:0},Ib=function(e){return parseInt(e||"",10)||0},wV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Ib(n),Ib(r),Ib(i)]},SV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xV;var t=wV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jV=j5(),Sl="data-scroll-locked",OV=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
374
|
+
.`.concat(iV,` {
|
|
375
|
+
overflow: hidden `).concat(r,`;
|
|
376
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
377
|
+
}
|
|
378
|
+
body[`).concat(Sl,`] {
|
|
379
|
+
overflow: hidden `).concat(r,`;
|
|
380
|
+
overscroll-behavior: contain;
|
|
381
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
382
|
+
padding-left: `.concat(i,`px;
|
|
383
|
+
padding-top: `).concat(o,`px;
|
|
384
|
+
padding-right: `).concat(l,`px;
|
|
385
|
+
margin-left:0;
|
|
386
|
+
margin-top:0;
|
|
387
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
388
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.`).concat(Kh,` {
|
|
392
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.`).concat(Xh,` {
|
|
396
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.`).concat(Kh," .").concat(Kh,` {
|
|
400
|
+
right: 0 `).concat(r,`;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.`).concat(Xh," .").concat(Xh,` {
|
|
404
|
+
margin-right: 0 `).concat(r,`;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
body[`).concat(Sl,`] {
|
|
408
|
+
`).concat(oV,": ").concat(u,`px;
|
|
409
|
+
}
|
|
410
|
+
`)},$C=function(){var e=parseInt(document.body.getAttribute(Sl)||"0",10);return isFinite(e)?e:0},EV=function(){w.useEffect(function(){return document.body.setAttribute(Sl,($C()+1).toString()),function(){var e=$C()-1;e<=0?document.body.removeAttribute(Sl):document.body.setAttribute(Sl,e.toString())}},[])},_V=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;EV();var o=w.useMemo(function(){return SV(i)},[i]);return w.createElement(jV,{styles:OV(o,!t,i,n?"":"!important")})},tS=!1;if(typeof window<"u")try{var Eh=Object.defineProperty({},"passive",{get:function(){return tS=!0,!0}});window.addEventListener("test",Eh,Eh),window.removeEventListener("test",Eh,Eh)}catch{tS=!1}var cl=tS?{passive:!1}:!1,NV=function(e){return e.tagName==="TEXTAREA"},O5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!NV(e)&&n[t]==="visible")},AV=function(e){return O5(e,"overflowY")},CV=function(e){return O5(e,"overflowX")},IC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=E5(e,r);if(i){var o=_5(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},MV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},E5=function(e,t){return e==="v"?AV(t):CV(t)},_5=function(e,t){return e==="v"?TV(t):MV(t)},RV=function(e,t){return e==="h"&&t==="rtl"?-1:1},DV=function(e,t,n,r,i){var o=RV(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),h=!1,v=l>0,m=0,g=0;do{if(!u)break;var b=_5(e,u),O=b[0],S=b[1],x=b[2],E=S-x-o*O;(O||E)&&E5(e,u)&&(m+=E,g+=O);var N=u.parentNode;u=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(v&&Math.abs(m)<1||!v&&Math.abs(g)<1)&&(h=!0),h},_h=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},LC=function(e){return[e.deltaX,e.deltaY]},zC=function(e){return e&&"current"in e?e.current:e},PV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kV=function(e){return`
|
|
411
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
412
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
413
|
+
`)},$V=0,ul=[];function IV(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState($V++)[0],o=w.useState(j5)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=aV([e.lockRef.current],(e.shards||[]).map(zC),!0).filter(Boolean);return S.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(S,x){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var E=_h(S),N=n.current,_="deltaX"in S?S.deltaX:N[0]-E[0],C="deltaY"in S?S.deltaY:N[1]-E[1],A,M=S.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in S&&R==="h"&&M.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,G=z?z===M||z.contains(M):!1;if(G)return!1;var L=IC(R,M);if(!L)return!0;if(L?A=R:(A=R==="v"?"h":"v",L=IC(R,M)),!L)return!1;if(!r.current&&"changedTouches"in S&&(_||C)&&(r.current=A),!A)return!0;var F=r.current||A;return DV(F,x,S,F==="h"?_:C)},[]),d=w.useCallback(function(S){var x=S;if(!(!ul.length||ul[ul.length-1]!==o)){var E="deltaY"in x?LC(x):_h(x),N=t.current.filter(function(A){return A.name===x.type&&(A.target===x.target||x.target===A.shadowParent)&&PV(A.delta,E)})[0];if(N&&N.should){x.cancelable&&x.preventDefault();return}if(!N){var _=(l.current.shards||[]).map(zC).filter(Boolean).filter(function(A){return A.contains(x.target)}),C=_.length>0?u(x,_[0]):!l.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),h=w.useCallback(function(S,x,E,N){var _={name:S,delta:x,target:E,should:N,shadowParent:LV(E)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),v=w.useCallback(function(S){n.current=_h(S),r.current=void 0},[]),m=w.useCallback(function(S){h(S.type,LC(S),S.target,u(S,e.lockRef.current))},[]),g=w.useCallback(function(S){h(S.type,_h(S),S.target,u(S,e.lockRef.current))},[]);w.useEffect(function(){return ul.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,cl),document.addEventListener("touchmove",d,cl),document.addEventListener("touchstart",v,cl),function(){ul=ul.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,cl),document.removeEventListener("touchmove",d,cl),document.removeEventListener("touchstart",v,cl)}},[]);var b=e.removeScrollBar,O=e.inert;return w.createElement(w.Fragment,null,O?w.createElement(o,{styles:kV(i)}):null,b?w.createElement(_V,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function LV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zV=hV(S5,IV);var Yp=w.forwardRef(function(e,t){return w.createElement(Vp,ca({},e,{ref:t,sideCar:zV}))});Yp.classNames=Vp.classNames;var nS=["Enter"," "],BV=["ArrowDown","PageUp","Home"],N5=["ArrowUp","PageDown","End"],qV=[...BV,...N5],UV={ltr:[...nS,"ArrowRight"],rtl:[...nS,"ArrowLeft"]},HV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ff="Menu",[Xu,FV,GV]=kp(Ff),[cs,A5]=jn(Ff,[GV,io,hc]),Wp=io(),C5=hc(),[VV,us]=cs(Ff),[YV,Gf]=cs(Ff),T5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:l=!0}=e,u=Wp(t),[d,h]=w.useState(null),v=w.useRef(!1),m=Wr(o),g=lc(i);return w.useEffect(()=>{const b=()=>{v.current=!0,document.addEventListener("pointerdown",O,{capture:!0,once:!0}),document.addEventListener("pointermove",O,{capture:!0,once:!0})},O=()=>v.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",O,{capture:!0}),document.removeEventListener("pointermove",O,{capture:!0})}},[]),c.jsx(Up,{...u,children:c.jsx(VV,{scope:t,open:n,onOpenChange:m,content:d,onContentChange:h,children:c.jsx(YV,{scope:t,onClose:w.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:v,dir:g,modal:l,children:r})})})};T5.displayName=Ff;var WV="MenuAnchor",hO=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Wp(n);return c.jsx(Hp,{...i,...r,ref:t})});hO.displayName=WV;var mO="MenuPortal",[KV,M5]=cs(mO,{forceMount:void 0}),R5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=us(mO,t);return c.jsx(KV,{scope:t,forceMount:n,children:c.jsx(An,{present:n||o.open,children:c.jsx(dc,{asChild:!0,container:i,children:r})})})};R5.displayName=mO;var Mr="MenuContent",[XV,pO]=cs(Mr),D5=w.forwardRef((e,t)=>{const n=M5(Mr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=us(Mr,e.__scopeMenu),l=Gf(Mr,e.__scopeMenu);return c.jsx(Xu.Provider,{scope:e.__scopeMenu,children:c.jsx(An,{present:r||o.open,children:c.jsx(Xu.Slot,{scope:e.__scopeMenu,children:l.modal?c.jsx(QV,{...i,ref:t}):c.jsx(ZV,{...i,ref:t})})})})}),QV=w.forwardRef((e,t)=>{const n=us(Mr,e.__scopeMenu),r=w.useRef(null),i=Ue(t,r);return w.useEffect(()=>{const o=r.current;if(o)return dO(o)},[]),c.jsx(vO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ZV=w.forwardRef((e,t)=>{const n=us(Mr,e.__scopeMenu);return c.jsx(vO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),JV=Tl("MenuContent.ScrollLock"),vO=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:m,onInteractOutside:g,onDismiss:b,disableOutsideScroll:O,...S}=e,x=us(Mr,n),E=Gf(Mr,n),N=Wp(n),_=C5(n),C=FV(n),[A,M]=w.useState(null),R=w.useRef(null),D=Ue(t,R,x.onContentChange),z=w.useRef(0),G=w.useRef(""),L=w.useRef(0),F=w.useRef(null),W=w.useRef("right"),Q=w.useRef(0),X=O?Yp:w.Fragment,k=O?{as:JV,allowPinchZoom:!0}:void 0,H=Z=>{var ie,pe;const le=G.current+Z,$=C().filter(re=>!re.disabled),Y=document.activeElement,q=(ie=$.find(re=>re.ref.current===Y))==null?void 0:ie.textValue,U=$.map(re=>re.textValue),ne=fY(U,le,q),fe=(pe=$.find(re=>re.textValue===ne))==null?void 0:pe.ref.current;(function re(ve){G.current=ve,window.clearTimeout(z.current),ve!==""&&(z.current=window.setTimeout(()=>re(""),1e3))})(le),fe&&setTimeout(()=>fe.focus())};w.useEffect(()=>()=>window.clearTimeout(z.current),[]),tO();const B=w.useCallback(Z=>{var $,Y;return W.current===(($=F.current)==null?void 0:$.side)&&hY(Z,(Y=F.current)==null?void 0:Y.area)},[]);return c.jsx(XV,{scope:n,searchRef:G,onItemEnter:w.useCallback(Z=>{B(Z)&&Z.preventDefault()},[B]),onItemLeave:w.useCallback(Z=>{var le;B(Z)||((le=R.current)==null||le.focus(),M(null))},[B]),onTriggerLeave:w.useCallback(Z=>{B(Z)&&Z.preventDefault()},[B]),pointerGraceTimerRef:L,onPointerGraceIntentChange:w.useCallback(Z=>{F.current=Z},[]),children:c.jsx(X,{...k,children:c.jsx($p,{asChild:!0,trapped:i,onMountAutoFocus:ye(o,Z=>{var le;Z.preventDefault(),(le=R.current)==null||le.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:c.jsx(cc,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:m,onInteractOutside:g,onDismiss:b,children:c.jsx(uO,{asChild:!0,..._,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:M,onEntryFocus:ye(d,Z=>{E.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Fp,{role:"menu","aria-orientation":"vertical","data-state":K5(x.open),"data-radix-menu-content":"",dir:E.dir,...N,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:ye(S.onKeyDown,Z=>{const $=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,Y=Z.ctrlKey||Z.altKey||Z.metaKey,q=Z.key.length===1;$&&(Z.key==="Tab"&&Z.preventDefault(),!Y&&q&&H(Z.key));const U=R.current;if(Z.target!==U||!qV.includes(Z.key))return;Z.preventDefault();const fe=C().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);N5.includes(Z.key)&&fe.reverse(),cY(fe)}),onBlur:ye(e.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(z.current),G.current="")}),onPointerMove:ye(e.onPointerMove,Qu(Z=>{const le=Z.target,$=Q.current!==Z.clientX;if(Z.currentTarget.contains(le)&&$){const Y=Z.clientX>Q.current?"right":"left";W.current=Y,Q.current=Z.clientX}}))})})})})})})});D5.displayName=Mr;var eY="MenuGroup",gO=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ne.div,{role:"group",...r,ref:t})});gO.displayName=eY;var tY="MenuLabel",P5=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ne.div,{...r,ref:t})});P5.displayName=tY;var cm="MenuItem",BC="menu.itemSelect",Kp=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=w.useRef(null),l=Gf(cm,e.__scopeMenu),u=pO(cm,e.__scopeMenu),d=Ue(t,o),h=w.useRef(!1),v=()=>{const m=o.current;if(!n&&m){const g=new CustomEvent(BC,{bubbles:!0,cancelable:!0});m.addEventListener(BC,b=>r==null?void 0:r(b),{once:!0}),H$(m,g),g.defaultPrevented?h.current=!1:l.onClose()}};return c.jsx(k5,{...i,ref:d,disabled:n,onClick:ye(e.onClick,v),onPointerDown:m=>{var g;(g=e.onPointerDown)==null||g.call(e,m),h.current=!0},onPointerUp:ye(e.onPointerUp,m=>{var g;h.current||(g=m.currentTarget)==null||g.click()}),onKeyDown:ye(e.onKeyDown,m=>{const g=u.searchRef.current!=="";n||g&&m.key===" "||nS.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Kp.displayName=cm;var k5=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,l=pO(cm,n),u=C5(n),d=w.useRef(null),h=Ue(t,d),[v,m]=w.useState(!1),[g,b]=w.useState("");return w.useEffect(()=>{const O=d.current;O&&b((O.textContent??"").trim())},[o.children]),c.jsx(Xu.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:c.jsx(fO,{asChild:!0,...u,focusable:!r,children:c.jsx(Ne.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:h,onPointerMove:ye(e.onPointerMove,Qu(O=>{r?l.onItemLeave(O):(l.onItemEnter(O),O.defaultPrevented||O.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(e.onPointerLeave,Qu(O=>l.onItemLeave(O))),onFocus:ye(e.onFocus,()=>m(!0)),onBlur:ye(e.onBlur,()=>m(!1))})})})}),nY="MenuCheckboxItem",$5=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return c.jsx(q5,{scope:e.__scopeMenu,checked:n,children:c.jsx(Kp,{role:"menuitemcheckbox","aria-checked":um(n)?"mixed":n,...i,ref:t,"data-state":bO(n),onSelect:ye(i.onSelect,()=>r==null?void 0:r(um(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$5.displayName=nY;var I5="MenuRadioGroup",[rY,aY]=cs(I5,{value:void 0,onValueChange:()=>{}}),L5=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Wr(r);return c.jsx(rY,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx(gO,{...i,ref:t})})});L5.displayName=I5;var z5="MenuRadioItem",B5=w.forwardRef((e,t)=>{const{value:n,...r}=e,i=aY(z5,e.__scopeMenu),o=n===i.value;return c.jsx(q5,{scope:e.__scopeMenu,checked:o,children:c.jsx(Kp,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":bO(o),onSelect:ye(r.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});B5.displayName=z5;var yO="MenuItemIndicator",[q5,iY]=cs(yO,{checked:!1}),U5=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=iY(yO,n);return c.jsx(An,{present:r||um(o.checked)||o.checked===!0,children:c.jsx(Ne.span,{...i,ref:t,"data-state":bO(o.checked)})})});U5.displayName=yO;var oY="MenuSeparator",H5=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});H5.displayName=oY;var sY="MenuArrow",F5=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Wp(n);return c.jsx(Gp,{...i,...r,ref:t})});F5.displayName=sY;var lY="MenuSub",[uye,G5]=cs(lY),Ru="MenuSubTrigger",V5=w.forwardRef((e,t)=>{const n=us(Ru,e.__scopeMenu),r=Gf(Ru,e.__scopeMenu),i=G5(Ru,e.__scopeMenu),o=pO(Ru,e.__scopeMenu),l=w.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,h={__scopeMenu:e.__scopeMenu},v=w.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return w.useEffect(()=>v,[v]),w.useEffect(()=>{const m=u.current;return()=>{window.clearTimeout(m),d(null)}},[u,d]),c.jsx(hO,{asChild:!0,...h,children:c.jsx(k5,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":K5(n.open),...e,ref:qf(t,i.onTriggerChange),onClick:m=>{var g;(g=e.onClick)==null||g.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ye(e.onPointerMove,Qu(m=>{o.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:ye(e.onPointerLeave,Qu(m=>{var b,O;v();const g=(b=n.content)==null?void 0:b.getBoundingClientRect();if(g){const S=(O=n.content)==null?void 0:O.dataset.side,x=S==="right",E=x?-5:5,N=g[x?"left":"right"],_=g[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:m.clientX+E,y:m.clientY},{x:N,y:g.top},{x:_,y:g.top},{x:_,y:g.bottom},{x:N,y:g.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(m),m.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ye(e.onKeyDown,m=>{var b;const g=o.searchRef.current!=="";e.disabled||g&&m.key===" "||UV[r.dir].includes(m.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),m.preventDefault())})})})});V5.displayName=Ru;var Y5="MenuSubContent",W5=w.forwardRef((e,t)=>{const n=M5(Mr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=us(Mr,e.__scopeMenu),l=Gf(Mr,e.__scopeMenu),u=G5(Y5,e.__scopeMenu),d=w.useRef(null),h=Ue(t,d);return c.jsx(Xu.Provider,{scope:e.__scopeMenu,children:c.jsx(An,{present:r||o.open,children:c.jsx(Xu.Slot,{scope:e.__scopeMenu,children:c.jsx(vO,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:h,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{var m;l.isUsingKeyboardRef.current&&((m=d.current)==null||m.focus()),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:ye(e.onFocusOutside,v=>{v.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ye(e.onEscapeKeyDown,v=>{l.onClose(),v.preventDefault()}),onKeyDown:ye(e.onKeyDown,v=>{var b;const m=v.currentTarget.contains(v.target),g=HV[l.dir].includes(v.key);m&&g&&(o.onOpenChange(!1),(b=u.trigger)==null||b.focus(),v.preventDefault())})})})})})});W5.displayName=Y5;function K5(e){return e?"open":"closed"}function um(e){return e==="indeterminate"}function bO(e){return um(e)?"indeterminate":e?"checked":"unchecked"}function cY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fY(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=uY(e,Math.max(o,0));i.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function dY(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,v=u.y,m=d.x,g=d.y;v>r!=g>r&&n<(m-h)*(r-v)/(g-v)+h&&(i=!i)}return i}function hY(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dY(n,t)}function Qu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var mY=T5,pY=hO,vY=R5,gY=D5,yY=gO,bY=P5,xY=Kp,wY=$5,SY=L5,jY=B5,OY=U5,EY=H5,_Y=F5,NY=V5,AY=W5,Xp="DropdownMenu",[CY]=jn(Xp,[A5]),Cn=A5(),[TY,X5]=CY(Xp),Q5=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=Cn(t),h=w.useRef(null),[v,m]=Nn({prop:i,defaultProp:o??!1,onChange:l,caller:Xp});return c.jsx(TY,{scope:t,triggerId:Tr(),triggerRef:h,contentId:Tr(),open:v,onOpenChange:m,onOpenToggle:w.useCallback(()=>m(g=>!g),[m]),modal:u,children:c.jsx(mY,{...d,open:v,onOpenChange:m,dir:r,modal:u,children:n})})};Q5.displayName=Xp;var Z5="DropdownMenuTrigger",J5=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=X5(Z5,n),l=Cn(n);return c.jsx(pY,{asChild:!0,...l,children:c.jsx(Ne.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:qf(t,o.triggerRef),onPointerDown:ye(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:ye(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});J5.displayName=Z5;var MY="DropdownMenuPortal",eI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Cn(t);return c.jsx(vY,{...r,...n})};eI.displayName=MY;var tI="DropdownMenuContent",nI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=X5(tI,n),o=Cn(n),l=w.useRef(!1);return c.jsx(gY,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:ye(e.onCloseAutoFocus,u=>{var d;l.current||(d=i.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:ye(e.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,v=d.button===2||h;(!i.modal||v)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nI.displayName=tI;var RY="DropdownMenuGroup",DY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(yY,{...i,...r,ref:t})});DY.displayName=RY;var PY="DropdownMenuLabel",rI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(bY,{...i,...r,ref:t})});rI.displayName=PY;var kY="DropdownMenuItem",aI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(xY,{...i,...r,ref:t})});aI.displayName=kY;var $Y="DropdownMenuCheckboxItem",iI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(wY,{...i,...r,ref:t})});iI.displayName=$Y;var IY="DropdownMenuRadioGroup",LY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(SY,{...i,...r,ref:t})});LY.displayName=IY;var zY="DropdownMenuRadioItem",BY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(jY,{...i,...r,ref:t})});BY.displayName=zY;var qY="DropdownMenuItemIndicator",oI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(OY,{...i,...r,ref:t})});oI.displayName=qY;var UY="DropdownMenuSeparator",sI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(EY,{...i,...r,ref:t})});sI.displayName=UY;var HY="DropdownMenuArrow",FY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(_Y,{...i,...r,ref:t})});FY.displayName=HY;var GY="DropdownMenuSubTrigger",VY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(NY,{...i,...r,ref:t})});VY.displayName=GY;var YY="DropdownMenuSubContent",WY=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return c.jsx(AY,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});WY.displayName=YY;var KY=Q5,XY=J5,QY=eI,ZY=nI,JY=rI,eW=aI,tW=iI,nW=oI,rW=sI;function lI({...e}){return c.jsx(KY,{"data-slot":"dropdown-menu",...e})}function cI({...e}){return c.jsx(XY,{"data-slot":"dropdown-menu-trigger",...e})}function uI({className:e,sideOffset:t=4,...n}){return c.jsx(QY,{children:c.jsx(ZY,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-[--radix-dropdown-menu-content-available-height] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-slot":"dropdown-menu-content",sideOffset:t,...n})})}function qC({className:e,inset:t,variant:n="default",...r}){return c.jsx(eW,{className:me("data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-inset":t,"data-slot":"dropdown-menu-item","data-variant":n,...r})}function aW({className:e,children:t,checked:n,...r}){return c.jsxs(tW,{checked:n,className:me("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"dropdown-menu-checkbox-item",...r,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(nW,{children:c.jsx(ri,{className:"size-4"})})}),t]})}function fI({className:e,inset:t,...n}){return c.jsx(JY,{className:me("px-2 py-1.5 font-medium text-sm data-[inset]:pl-8",e),"data-inset":t,"data-slot":"dropdown-menu-label",...n})}function rS({className:e,...t}){return c.jsx(rW,{className:me("-mx-1 my-1 h-px bg-border",e),"data-slot":"dropdown-menu-separator",...t})}const UC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,HC=rt,mc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return HC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(h=>{const v=n==null?void 0:n[h],m=o==null?void 0:o[h];if(v===null)return null;const g=UC(v)||UC(m);return i[h][g]}),u=n&&Object.entries(n).reduce((h,v)=>{let[m,g]=v;return g===void 0||(h[m]=g),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,v)=>{let{class:m,className:g,...b}=v;return Object.entries(b).every(O=>{let[S,x]=O;return Array.isArray(x)?x.includes({...o,...u}[S]):{...o,...u}[S]===x})?[...h,m,g]:h},[]);return HC(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},xO=mc("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ce({className:e,variant:t,size:n,asChild:r=!1,...i}){const o=r?ss:"button";return c.jsx(o,{className:me(xO({variant:t,size:n,className:e})),"data-slot":"button",...i})}const oo=w.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,type:t,...n}));oo.displayName="Input";var iW="Separator",FC="horizontal",oW=["horizontal","vertical"],dI=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=FC,...i}=e,o=sW(r)?r:FC,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(ls.div,{"data-orientation":o,...u,...i,ref:t})});dI.displayName=iW;function sW(e){return oW.includes(e)}var lW=dI;function qt({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return c.jsx(lW,{className:me("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),"data-slot":"separator",decorative:n,orientation:t,...r})}var Qp="Dialog",[hI,mI]=jn(Qp),[cW,Jr]=hI(Qp),pI=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,u=w.useRef(null),d=w.useRef(null),[h,v]=Nn({prop:r,defaultProp:i??!1,onChange:o,caller:Qp});return c.jsx(cW,{scope:t,triggerRef:u,contentRef:d,contentId:Tr(),titleId:Tr(),descriptionId:Tr(),open:h,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(m=>!m),[v]),modal:l,children:n})};pI.displayName=Qp;var vI="DialogTrigger",gI=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jr(vI,n),o=Ue(t,i.triggerRef);return c.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jO(i.open),...r,ref:o,onClick:ye(e.onClick,i.onOpenToggle)})});gI.displayName=vI;var wO="DialogPortal",[uW,yI]=hI(wO,{forceMount:void 0}),bI=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Jr(wO,t);return c.jsx(uW,{scope:t,forceMount:n,children:w.Children.map(r,l=>c.jsx(An,{present:n||o.open,children:c.jsx(dc,{asChild:!0,container:i,children:l})}))})};bI.displayName=wO;var fm="DialogOverlay",xI=w.forwardRef((e,t)=>{const n=yI(fm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jr(fm,e.__scopeDialog);return o.modal?c.jsx(An,{present:r||o.open,children:c.jsx(dW,{...i,ref:t})}):null});xI.displayName=fm;var fW=Tl("DialogOverlay.RemoveScroll"),dW=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jr(fm,n);return c.jsx(Yp,{as:fW,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(Ne.div,{"data-state":jO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Jo="DialogContent",wI=w.forwardRef((e,t)=>{const n=yI(Jo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jr(Jo,e.__scopeDialog);return c.jsx(An,{present:r||o.open,children:o.modal?c.jsx(hW,{...i,ref:t}):c.jsx(mW,{...i,ref:t})})});wI.displayName=Jo;var hW=w.forwardRef((e,t)=>{const n=Jr(Jo,e.__scopeDialog),r=w.useRef(null),i=Ue(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return dO(o)},[]),c.jsx(SI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ye(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:ye(e.onFocusOutside,o=>o.preventDefault())})}),mW=w.forwardRef((e,t)=>{const n=Jr(Jo,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return c.jsx(SI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((h=n.triggerRef.current)==null?void 0:h.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),SI=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,u=Jr(Jo,n),d=w.useRef(null),h=Ue(t,d);return tO(),c.jsxs(c.Fragment,{children:[c.jsx($p,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:c.jsx(cc,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":jO(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(vW,{titleId:u.titleId}),c.jsx(yW,{contentRef:d,descriptionId:u.descriptionId})]})]})}),SO="DialogTitle",jI=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jr(SO,n);return c.jsx(Ne.h2,{id:i.titleId,...r,ref:t})});jI.displayName=SO;var OI="DialogDescription",EI=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jr(OI,n);return c.jsx(Ne.p,{id:i.descriptionId,...r,ref:t})});EI.displayName=OI;var _I="DialogClose",NI=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jr(_I,n);return c.jsx(Ne.button,{type:"button",...r,ref:t,onClick:ye(e.onClick,()=>i.onOpenChange(!1))})});NI.displayName=_I;function jO(e){return e?"open":"closed"}var AI="DialogTitleWarning",[pW,CI]=K7(AI,{contentName:Jo,titleName:SO,docsSlug:"dialog"}),vW=({titleId:e})=>{const t=CI(AI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
414
|
+
|
|
415
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
416
|
+
|
|
417
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gW="DialogDescriptionWarning",yW=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CI(gW).contentName}}.`;return w.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},OO=pI,bW=gI,EO=bI,_O=xI,NO=wI,AO=jI,CO=EI,Zp=NI;function xW({...e}){return c.jsx(OO,{"data-slot":"sheet",...e})}function wW({...e}){return c.jsx(EO,{"data-slot":"sheet-portal",...e})}function SW({className:e,...t}){return c.jsx(_O,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-slot":"sheet-overlay",...t})}function jW({className:e,children:t,side:n="right",...r}){return c.jsxs(wW,{children:[c.jsx(SW,{}),c.jsxs(NO,{className:me("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),"data-slot":"sheet-content",...r,children:[t,c.jsxs(Zp,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(or,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function OW({className:e,...t}){return c.jsx("div",{className:me("flex flex-col gap-1.5 p-4",e),"data-slot":"sheet-header",...t})}function EW({className:e,...t}){return c.jsx(AO,{className:me("font-semibold text-foreground",e),"data-slot":"sheet-title",...t})}function _W({className:e,...t}){return c.jsx(CO,{className:me("text-muted-foreground text-sm",e),"data-slot":"sheet-description",...t})}function Re({className:e,...t}){return c.jsx("div",{className:me("animate-pulse rounded-md bg-accent",e),"data-slot":"skeleton",...t})}var TI=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NW="VisuallyHidden",MI=w.forwardRef((e,t)=>c.jsx(Ne.span,{...e,ref:t,style:{...TI,...e.style}}));MI.displayName=NW;var AW=MI,[Jp]=jn("Tooltip",[io]),ev=io(),RI="TooltipProvider",CW=700,aS="tooltip.open",[TW,TO]=Jp(RI),DI=e=>{const{__scopeTooltip:t,delayDuration:n=CW,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,l=w.useRef(!0),u=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),c.jsx(TW,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:w.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:o})};DI.displayName=RI;var Zu="Tooltip",[MW,Vf]=Jp(Zu),PI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,d=TO(Zu,e.__scopeTooltip),h=ev(t),[v,m]=w.useState(null),g=Tr(),b=w.useRef(0),O=l??d.disableHoverableContent,S=u??d.delayDuration,x=w.useRef(!1),[E,N]=Nn({prop:r,defaultProp:i??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(aS))):d.onClose(),o==null||o(R)},caller:Zu}),_=w.useMemo(()=>E?x.current?"delayed-open":"instant-open":"closed",[E]),C=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,x.current=!1,N(!0)},[N]),A=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,N(!1)},[N]),M=w.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{x.current=!0,N(!0),b.current=0},S)},[S,N]);return w.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),c.jsx(Up,{...h,children:c.jsx(MW,{scope:t,contentId:g,open:E,stateAttribute:_,trigger:v,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?M():C()},[d.isOpenDelayedRef,M,C]),onTriggerLeave:w.useCallback(()=>{O?A():(window.clearTimeout(b.current),b.current=0)},[A,O]),onOpen:C,onClose:A,disableHoverableContent:O,children:n})})};PI.displayName=Zu;var iS="TooltipTrigger",kI=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Vf(iS,n),o=TO(iS,n),l=ev(n),u=w.useRef(null),d=Ue(t,u,i.onTriggerChange),h=w.useRef(!1),v=w.useRef(!1),m=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(Hp,{asChild:!0,...l,children:c.jsx(Ne.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:ye(e.onPointerMove,g=>{g.pointerType!=="touch"&&!v.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),v.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{i.onTriggerLeave(),v.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:ye(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:ye(e.onBlur,i.onClose),onClick:ye(e.onClick,i.onClose)})})});kI.displayName=iS;var MO="TooltipPortal",[RW,DW]=Jp(MO,{forceMount:void 0}),$I=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Vf(MO,t);return c.jsx(RW,{scope:t,forceMount:n,children:c.jsx(An,{present:n||o.open,children:c.jsx(dc,{asChild:!0,container:i,children:r})})})};$I.displayName=MO;var Rl="TooltipContent",II=w.forwardRef((e,t)=>{const n=DW(Rl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=Vf(Rl,e.__scopeTooltip);return c.jsx(An,{present:r||l.open,children:l.disableHoverableContent?c.jsx(LI,{side:i,...o,ref:t}):c.jsx(PW,{side:i,...o,ref:t})})}),PW=w.forwardRef((e,t)=>{const n=Vf(Rl,e.__scopeTooltip),r=TO(Rl,e.__scopeTooltip),i=w.useRef(null),o=Ue(t,i),[l,u]=w.useState(null),{trigger:d,onClose:h}=n,v=i.current,{onPointerInTransitChange:m}=r,g=w.useCallback(()=>{u(null),m(!1)},[m]),b=w.useCallback((O,S)=>{const x=O.currentTarget,E={x:O.clientX,y:O.clientY},N=LW(E,x.getBoundingClientRect()),_=zW(E,N),C=BW(S.getBoundingClientRect()),A=UW([..._,...C]);u(A),m(!0)},[m]);return w.useEffect(()=>()=>g(),[g]),w.useEffect(()=>{if(d&&v){const O=x=>b(x,v),S=x=>b(x,d);return d.addEventListener("pointerleave",O),v.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",O),v.removeEventListener("pointerleave",S)}}},[d,v,b,g]),w.useEffect(()=>{if(l){const O=S=>{const x=S.target,E={x:S.clientX,y:S.clientY},N=(d==null?void 0:d.contains(x))||(v==null?void 0:v.contains(x)),_=!qW(E,l);N?g():_&&(g(),h())};return document.addEventListener("pointermove",O),()=>document.removeEventListener("pointermove",O)}},[d,v,l,h,g]),c.jsx(LI,{...e,ref:o})}),[kW,$W]=Jp(Zu,{isInside:!1}),IW=U$("TooltipContent"),LI=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,d=Vf(Rl,n),h=ev(n),{onClose:v}=d;return w.useEffect(()=>(document.addEventListener(aS,v),()=>document.removeEventListener(aS,v)),[v]),w.useEffect(()=>{if(d.trigger){const m=g=>{const b=g.target;b!=null&&b.contains(d.trigger)&&v()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,v]),c.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:v,children:c.jsxs(Fp,{"data-state":d.stateAttribute,...h,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(IW,{children:r}),c.jsx(kW,{scope:n,isInside:!0,children:c.jsx(AW,{id:d.contentId,role:"tooltip",children:i||r})})]})})});II.displayName=Rl;var zI="TooltipArrow",BI=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ev(n);return $W(zI,n).isInside?null:c.jsx(Gp,{...i,...r,ref:t})});BI.displayName=zI;function LW(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zW(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function BW(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function qW(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,v=u.y,m=d.x,g=d.y;v>r!=g>r&&n<(m-h)*(r-v)/(g-v)+h&&(i=!i)}return i}function UW(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),HW(t)}function HW(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var FW=DI,GW=PI,VW=kI,YW=$I,WW=II,KW=BI;function qI({delayDuration:e=0,...t}){return c.jsx(FW,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function tv({...e}){return c.jsx(qI,{children:c.jsx(GW,{"data-slot":"tooltip",...e})})}function nv({...e}){return c.jsx(VW,{"data-slot":"tooltip-trigger",...e})}function rv({className:e,sideOffset:t=0,children:n,...r}){return c.jsx(YW,{children:c.jsxs(WW,{className:me("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[--radix-tooltip-content-transform-origin] animate-in text-balance rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out",e),"data-slot":"tooltip-content",sideOffset:t,...r,children:[n,c.jsx(KW,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}const Lb=768;function XW(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Lb-1}px)`),r=()=>{t(window.innerWidth<Lb)};return n.addEventListener("change",r),t(window.innerWidth<Lb),()=>n.removeEventListener("change",r)},[]),!!e}const QW="sidebar_state",ZW=3600*24*7,JW="16rem",eK="18rem",tK="3rem",nK="b",UI=w.createContext(null);function pc(){const e=w.useContext(UI);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const HI=w.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:o,...l},u)=>{const d=XW(),[h,v]=w.useState(!1),[m,g]=w.useState(e),b=t??m,O=w.useCallback(N=>{const _=typeof N=="function"?N(b):N;n?n(_):g(_),document.cookie=`${QW}=${_}; path=/; max-age=${ZW}`},[n,b]),S=w.useCallback(()=>d?v(N=>!N):O(N=>!N),[d,O]);w.useEffect(()=>{const N=_=>{_.key===nK&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),S())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[S]);const x=b?"expanded":"collapsed",E=w.useMemo(()=>({state:x,open:b,setOpen:O,isMobile:d,openMobile:h,setOpenMobile:v,toggleSidebar:S}),[x,b,O,d,h,S]);return c.jsx(UI.Provider,{value:E,children:c.jsx(qI,{delayDuration:0,children:c.jsx("div",{className:me("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:u,style:{"--sidebar-width":JW,"--sidebar-width-icon":tK,...i},...l,children:o})})})});HI.displayName="SidebarProvider";const Qh=w.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,...o},l)=>{const{isMobile:u,state:d,openMobile:h,setOpenMobile:v}=pc();return n==="none"?c.jsx("div",{className:me("flex h-full w-[calc(var(--sidebar-width)-var(--sidebar-width-icon)+1px)]! flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...o,children:i}):u?c.jsx(xW,{onOpenChange:v,open:h,...o,children:c.jsxs(jW,{className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",side:e,style:{"--sidebar-width":eK},children:[c.jsxs(OW,{className:"sr-only",children:[c.jsx(EW,{children:"Sidebar"}),c.jsx(_W,{children:"Displays the mobile sidebar."})]}),c.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):c.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":d==="collapsed"?n:"","data-side":e,"data-state":d,"data-variant":t,ref:l,children:[c.jsx("div",{className:me("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),c.jsx("div",{className:me("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:c.jsx("div",{className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow","data-sidebar":"sidebar",children:i})})]})});Qh.displayName="Sidebar";const FI=w.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:i}=pc();return c.jsxs(Ce,{className:me("h-7 w-7",e),"data-sidebar":"trigger",onClick:o=>{t==null||t(o),i()},ref:r,size:"icon",variant:"ghost",...n,children:[c.jsx(PF,{}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});FI.displayName="SidebarTrigger";const rK=w.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=pc();return c.jsx("button",{"aria-label":"Toggle Sidebar",className:me("-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),"data-sidebar":"rail",onClick:r,ref:n,tabIndex:-1,title:"Toggle Sidebar",...t})});rK.displayName="SidebarRail";const GI=w.forwardRef(({className:e,...t},n)=>c.jsx("main",{className:me("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),ref:n,...t}));GI.displayName="SidebarInset";const VI=w.forwardRef(({className:e,...t},n)=>c.jsx(oo,{className:me("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),"data-sidebar":"input",ref:n,...t}));VI.displayName="SidebarInput";const oS=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("flex flex-col gap-2 p-2",e),"data-sidebar":"header",ref:n,...t}));oS.displayName="SidebarHeader";const YI=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("flex flex-col gap-2 p-2",e),"data-sidebar":"footer",ref:n,...t}));YI.displayName="SidebarFooter";const aK=w.forwardRef(({className:e,...t},n)=>c.jsx(qt,{className:me("mx-2 w-auto bg-sidebar-border",e),"data-sidebar":"separator",ref:n,...t}));aK.displayName="SidebarSeparator";const sS=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content",ref:n,...t}));sS.displayName="SidebarContent";const lS=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group",ref:n,...t}));lS.displayName="SidebarGroup";const iK=w.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?ss:"div";return c.jsx(i,{className:me("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),"data-sidebar":"group-label",ref:r,...n})});iK.displayName="SidebarGroupLabel";const oK=w.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?ss:"button";return c.jsx(i,{className:me("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"group-action",ref:r,...n})});oK.displayName="SidebarGroupAction";const cS=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("w-full text-sm",e),"data-sidebar":"group-content",ref:n,...t}));cS.displayName="SidebarGroupContent";const dm=w.forwardRef(({className:e,...t},n)=>c.jsx("ul",{className:me("flex w-full min-w-0 flex-col gap-1",e),"data-sidebar":"menu",ref:n,...t}));dm.displayName="SidebarMenu";const hm=w.forwardRef(({className:e,...t},n)=>c.jsx("li",{className:me("group/menu-item relative",e),"data-sidebar":"menu-item",ref:n,...t}));hm.displayName="SidebarMenuItem";const sK=mc("peer/menu-button group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"group-data-[collapsible=icon]:!p-0 h-12 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),mm=w.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:o,...l},u)=>{const d=e?ss:"button",{isMobile:h,state:v}=pc(),m=c.jsx(d,{className:me(sK({variant:n,size:r}),o),"data-active":t,"data-sidebar":"menu-button","data-size":r,ref:u,...l});return i?(typeof i=="string"&&(i={children:i}),c.jsxs(tv,{children:[c.jsx(nv,{asChild:!0,children:m}),c.jsx(rv,{align:"center",hidden:v!=="collapsed"||h,side:"right",...i})]})):m});mm.displayName="SidebarMenuButton";const lK=w.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>{const o=t?ss:"button";return c.jsx(o,{className:me("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),"data-sidebar":"menu-action",ref:i,...r})});lK.displayName="SidebarMenuAction";const cK=w.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:me("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-badge",ref:n,...t}));cK.displayName="SidebarMenuBadge";const uK=w.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const i=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return c.jsxs("div",{className:me("flex h-8 items-center gap-2 rounded-md px-2",e),"data-sidebar":"menu-skeleton",ref:r,...n,children:[t&&c.jsx(Re,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),c.jsx(Re,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});uK.displayName="SidebarMenuSkeleton";const fK=w.forwardRef(({className:e,...t},n)=>c.jsx("ul",{className:me("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-sub",ref:n,...t}));fK.displayName="SidebarMenuSub";const dK=w.forwardRef(({...e},t)=>c.jsx("li",{ref:t,...e}));dK.displayName="SidebarMenuSubItem";const hK=w.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...i},o)=>{const l=e?ss:"a";return c.jsx(l,{className:me("-translate-x-px flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),"data-active":n,"data-sidebar":"menu-sub-button","data-size":t,ref:o,...i})});hK.displayName="SidebarMenuSubButton";const mK={theme:"system",setTheme:()=>null},WI=w.createContext(mK),KI=()=>{const e=w.useContext(WI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function pK({user:e}){const{isMobile:t}=pc(),{theme:n,setTheme:r}=KI(),[i,o]=w.useState(null),[l,u]=w.useState(0);w.useEffect(()=>{(async()=>{try{const g=sessionStorage.getItem("wraps-auth-token");if(!g){console.log("No auth token found yet, will retry..."),l<5&&setTimeout(()=>{u(O=>O+1)},200);return}console.log("Fetching user info from /api/user");const b=await fetch(`/api/user?token=${g}`);if(console.log("User API response status:",b.status),b.ok){const O=await b.json();console.log("User info received:",O),o(O)}else{const O=await b.text();console.error("Failed to fetch user info:",b.status,O)}}catch(g){console.error("Error fetching user info:",g)}})().catch(g=>{console.error("Failed to fetch user info:",g)})},[l]);const d=()=>{window.confirm("Are you sure you want to close the console?")&&window.close()},h=(i==null?void 0:i.accountAlias)||(i==null?void 0:i.accountId)||"Loading...",v=(i==null?void 0:i.region)||"...";return c.jsx(dm,{children:c.jsx(hm,{children:c.jsxs(lI,{children:[c.jsx(cI,{asChild:!0,children:c.jsxs(mm,{className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground md:h-8 md:p-0",size:"lg",children:[c.jsxs(mC,{className:"h-8 w-8 rounded-lg",children:[c.jsx(pC,{alt:h,src:e.avatar}),c.jsx(vC,{className:"rounded-lg bg-orange-500 text-white",children:"AWS"})]}),c.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[c.jsx("span",{className:"truncate font-medium",children:h}),c.jsx("span",{className:"truncate text-xs",children:v})]}),c.jsx(OF,{className:"ml-auto size-4"})]})}),c.jsxs(uI,{align:"end",className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",side:t?"bottom":"right",sideOffset:4,children:[c.jsx(fI,{className:"p-0 font-normal",children:c.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[c.jsxs(mC,{className:"h-8 w-8 rounded-lg",children:[c.jsx(pC,{alt:h,src:e.avatar}),c.jsx(vC,{className:"rounded-lg bg-orange-500 text-white",children:"AWS"})]}),c.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[c.jsx("span",{className:"truncate font-medium",children:h}),c.jsx("span",{className:"truncate text-xs",children:v}),(i==null?void 0:i.accountId)&&i.accountId!==i.accountAlias&&c.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground",children:i.accountId})]})]})}),c.jsx(rS,{}),c.jsxs(qC,{onClick:()=>r(n==="dark"?"light":"dark"),children:[n==="dark"?c.jsx($F,{}):c.jsx(RF,{}),n==="dark"?"Light Mode":"Dark Mode"]}),c.jsx(rS,{}),c.jsxs(qC,{onClick:d,children:[c.jsx(or,{}),"Close Console"]})]})]})})})}const Hi={user:{name:"Wraps Console",email:"admin@wraps.dev",avatar:"/avatars/wraps.jpg"},navMain:[{title:"Dashboard",url:"/",icon:Dp,isActive:!0,isDashboard:!0},{title:"Email",url:"#",icon:xl,isActive:!1,subItems:[{title:"Emails",icon:xl,url:"/email"},{title:"Metrics",icon:wb,url:"/email/metrics"},{title:"Settings",icon:jb,url:"/email/settings"}]},{title:"SMS",url:"#",icon:Zi,isActive:!1,subItems:[{title:"Messages",icon:Zi,url:"/sms"},{title:"Metrics",icon:wb,url:"/sms/metrics"},{title:"Settings",icon:jb,url:"/sms/settings"}]},{title:"CDN",url:"#",icon:zf,isActive:!1,subItems:[{title:"Library",icon:m$,url:"/cdn"},{title:"Metrics",icon:wb,url:"/cdn/metrics"},{title:"Settings",icon:jb,url:"/cdn/settings"}]}]};function vK({...e}){const t=Zr(),n=Sa(),{setOpen:r,state:i}=pc(),{theme:o}=KI(),l=w.useCallback(()=>t.pathname==="/"?Hi.navMain[0]:t.pathname.startsWith("/email")?Hi.navMain[1]:t.pathname.startsWith("/sms")?Hi.navMain[2]:t.pathname.startsWith("/cdn")?Hi.navMain[3]:Hi.navMain[0],[t.pathname]),[u,d]=w.useState(l());return w.useEffect(()=>{d(l())},[l]),c.jsxs(Qh,{className:"overflow-hidden *:data-[sidebar=sidebar]:flex-row",collapsible:"icon",...e,children:[c.jsxs(Qh,{className:"w-[calc(var(--sidebar-width-icon)+1px)]! border-r",collapsible:"none",children:[c.jsx(oS,{children:c.jsx(dm,{children:c.jsx(hm,{children:c.jsx(mm,{asChild:!0,className:"md:h-8 md:p-0",onClick:()=>{d(Hi.navMain[0]),r(!1)},size:"lg",children:c.jsxs(em,{to:"/",children:[c.jsx("div",{className:"flex aspect-square size-8 items-center justify-center rounded-lg",children:c.jsx("img",{alt:"Wraps",className:"size-8 object-contain",src:o==="dark"?"/wraps-dark.png":"/wraps-light.png"})}),c.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[c.jsx("span",{className:"truncate font-semibold",children:"Wraps"}),c.jsx("span",{className:"truncate text-xs",children:"Console"})]})]})})})})}),c.jsx(sS,{children:c.jsx(lS,{children:c.jsx(cS,{className:"px-1.5 md:px-0",children:c.jsx(dm,{children:Hi.navMain.filter(h=>!h.isDashboard).map(h=>c.jsx(hm,{children:c.jsxs(mm,{className:"px-2.5 md:px-2",isActive:(u==null?void 0:u.title)===h.title,onClick:()=>{d(h),r(!0),h.subItems&&h.subItems.length>0&&n(h.subItems[0].url)},tooltip:{children:h.title,hidden:!1},children:[c.jsx(h.icon,{}),c.jsx("span",{children:h.title})]})},h.title))})})})}),c.jsx(YI,{children:c.jsx(pK,{user:Hi.user})})]}),i==="expanded"&&c.jsx(Qh,{className:"hidden flex-1 md:flex",collapsible:"none",children:u&&!u.isDashboard&&u.subItems?c.jsxs(c.Fragment,{children:[c.jsxs(oS,{className:"gap-3.5 border-b p-4",children:[c.jsx("div",{className:"flex w-full items-center justify-between",children:c.jsxs("div",{className:"flex items-center gap-2 font-medium text-base text-foreground",children:[c.jsx(u.icon,{className:"size-4"}),u.title]})}),c.jsx(VI,{placeholder:"Search..."})]}),c.jsx(sS,{children:c.jsx(lS,{className:"px-0",children:c.jsx(cS,{children:u.subItems.map(h=>{const v=t.pathname===h.url||h.url==="/email"&&t.pathname.startsWith("/email/")&&t.pathname!=="/email/metrics"&&t.pathname!=="/email/settings"||h.url==="/sms"&&t.pathname.startsWith("/sms/")&&t.pathname!=="/sms/metrics"&&t.pathname!=="/sms/settings"||h.url==="/cdn"&&t.pathname.startsWith("/cdn/")&&t.pathname!=="/cdn/metrics"&&t.pathname!=="/cdn/settings";return c.jsxs(em,{className:`flex items-center gap-3 border-b p-4 text-sm leading-tight transition-colors last:border-b-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground ${v?"bg-sidebar-accent font-semibold text-sidebar-accent-foreground":""}`,to:h.url,children:[c.jsx(h.icon,{className:"size-4 shrink-0"}),c.jsx("span",{className:"font-medium",children:h.title})]},h.title)})})})})]}):c.jsx("div",{className:"flex h-full items-center justify-center p-8 text-center",children:c.jsxs("div",{className:"text-muted-foreground",children:[c.jsx(Dp,{className:"mx-auto mb-4 size-12 opacity-50"}),c.jsx("p",{className:"text-sm",children:"Select a product to view options"})]})})})]})}function gK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const yK=e=>{switch(e){case"success":return wK;case"info":return jK;case"warning":return SK;case"error":return OK;default:return null}},bK=Array(12).fill(0),xK=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},bK.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),wK=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),SK=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),jK=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),OK=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),EK=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_K=()=>{const[e,t]=I.useState(document.hidden);return I.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let uS=1;class NK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:uS++,l=this.toasts.find(d=>d.id===o),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(d=>d.id===o?(this.publish({...d,...t,id:o,title:r}),{...d,...t,id:o,dismissible:u,title:r}):d):this.addToast({title:r,...i,dismissible:u,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const u=i.then(async h=>{if(l=["resolve",h],I.isValidElement(h))o=!1,this.create({id:r,type:"default",message:h});else if(CK(h)&&!h.ok){o=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,O=typeof m=="object"&&!I.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:g,...O})}else if(h instanceof Error){o=!1;const m=typeof n.error=="function"?await n.error(h):n.error,g=typeof n.description=="function"?await n.description(h):n.description,O=typeof m=="object"&&!I.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:g,...O})}else if(n.success!==void 0){o=!1;const m=typeof n.success=="function"?await n.success(h):n.success,g=typeof n.description=="function"?await n.description(h):n.description,O=typeof m=="object"&&!I.isValidElement(m)?m:{message:m};this.create({id:r,type:"success",description:g,...O})}}).catch(async h=>{if(l=["reject",h],n.error!==void 0){o=!1;const v=typeof n.error=="function"?await n.error(h):n.error,m=typeof n.description=="function"?await n.description(h):n.description,b=typeof v=="object"&&!I.isValidElement(v)?v:{message:v};this.create({id:r,type:"error",description:m,...b})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((h,v)=>u.then(()=>l[0]==="reject"?v(l[1]):h(l[1])).catch(v));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||uS++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qn=new NK,AK=(e,t)=>{const n=(t==null?void 0:t.id)||uS++;return qn.addToast({title:e,...t,id:n}),n},CK=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",TK=AK,MK=()=>qn.toasts,RK=()=>qn.getActiveToasts(),Ot=Object.assign(TK,{success:qn.success,info:qn.info,warning:qn.warning,error:qn.error,custom:qn.custom,message:qn.message,promise:qn.promise,dismiss:qn.dismiss,loading:qn.loading},{getHistory:MK,getToasts:RK});gK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Nh(e){return e.label!==void 0}const DK=3,PK="24px",kK="16px",GC=4e3,$K=356,IK=14,LK=45,zK=200;function sa(...e){return e.filter(Boolean).join(" ")}function BK(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const qK=e=>{var t,n,r,i,o,l,u,d,h;const{invert:v,toast:m,unstyled:g,interacting:b,setHeights:O,visibleToasts:S,heights:x,index:E,toasts:N,expanded:_,removeToast:C,defaultRichColors:A,closeButton:M,style:R,cancelButtonStyle:D,actionButtonStyle:z,className:G="",descriptionClassName:L="",duration:F,position:W,gap:Q,expandByDefault:X,classNames:k,icons:H,closeButtonAriaLabel:B="Close toast"}=e,[Z,le]=I.useState(null),[$,Y]=I.useState(null),[q,U]=I.useState(!1),[ne,fe]=I.useState(!1),[ie,pe]=I.useState(!1),[re,ve]=I.useState(!1),[ge,oe]=I.useState(!1),[ke,we]=I.useState(0),[ze,Ze]=I.useState(0),lt=I.useRef(m.duration||F||GC),tn=I.useRef(null),pt=I.useRef(null),dr=E===0,Yn=E+1<=S,Rt=m.type,hr=m.dismissible!==!1,nn=m.className||"",bs=m.descriptionClassName||"",vo=I.useMemo(()=>x.findIndex(Ie=>Ie.toastId===m.id)||0,[x,m.id]),rd=I.useMemo(()=>{var Ie;return(Ie=m.closeButton)!=null?Ie:M},[m.closeButton,M]),go=I.useMemo(()=>m.duration||F||GC,[m.duration,F]),_c=I.useRef(0),Ea=I.useRef(0),ad=I.useRef(0),vi=I.useRef(null),[yo,On]=W.split("-"),$r=I.useMemo(()=>x.reduce((Ie,At,rn)=>rn>=vo?Ie:Ie+At.height,0),[x,vo]),gn=_K(),eg=m.invert||v,Nc=Rt==="loading";Ea.current=I.useMemo(()=>vo*Q+$r,[vo,$r]),I.useEffect(()=>{lt.current=go},[go]),I.useEffect(()=>{U(!0)},[]),I.useEffect(()=>{const Ie=pt.current;if(Ie){const At=Ie.getBoundingClientRect().height;return Ze(At),O(rn=>[{toastId:m.id,height:At,position:m.position},...rn]),()=>O(rn=>rn.filter(yn=>yn.toastId!==m.id))}},[O,m.id]),I.useLayoutEffect(()=>{if(!q)return;const Ie=pt.current,At=Ie.style.height;Ie.style.height="auto";const rn=Ie.getBoundingClientRect().height;Ie.style.height=At,Ze(rn),O(yn=>yn.find(Dt=>Dt.toastId===m.id)?yn.map(Dt=>Dt.toastId===m.id?{...Dt,height:rn}:Dt):[{toastId:m.id,height:rn,position:m.position},...yn])},[q,m.title,m.description,O,m.id,m.jsx,m.action,m.cancel]);const ta=I.useCallback(()=>{fe(!0),we(Ea.current),O(Ie=>Ie.filter(At=>At.toastId!==m.id)),setTimeout(()=>{C(m)},zK)},[m,C,O,Ea]);I.useEffect(()=>{if(m.promise&&Rt==="loading"||m.duration===1/0||m.type==="loading")return;let Ie;return _||b||gn?(()=>{if(ad.current<_c.current){const yn=new Date().getTime()-_c.current;lt.current=lt.current-yn}ad.current=new Date().getTime()})():(()=>{lt.current!==1/0&&(_c.current=new Date().getTime(),Ie=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),ta()},lt.current))})(),()=>clearTimeout(Ie)},[_,b,m,Rt,gn,ta]),I.useEffect(()=>{m.delete&&(ta(),m.onDismiss==null||m.onDismiss.call(m,m))},[ta,m.delete]);function xs(){var Ie;if(H!=null&&H.loading){var At;return I.createElement("div",{className:sa(k==null?void 0:k.loader,m==null||(At=m.classNames)==null?void 0:At.loader,"sonner-loader"),"data-visible":Rt==="loading"},H.loading)}return I.createElement(xK,{className:sa(k==null?void 0:k.loader,m==null||(Ie=m.classNames)==null?void 0:Ie.loader),visible:Rt==="loading"})}const ws=m.icon||(H==null?void 0:H[Rt])||yK(Rt);var bo,na;return I.createElement("li",{tabIndex:0,ref:pt,className:sa(G,nn,k==null?void 0:k.toast,m==null||(t=m.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[Rt],m==null||(n=m.classNames)==null?void 0:n[Rt]),"data-sonner-toast":"","data-rich-colors":(bo=m.richColors)!=null?bo:A,"data-styled":!(m.jsx||m.unstyled||g),"data-mounted":q,"data-promise":!!m.promise,"data-swiped":ge,"data-removed":ne,"data-visible":Yn,"data-y-position":yo,"data-x-position":On,"data-index":E,"data-front":dr,"data-swiping":ie,"data-dismissible":hr,"data-type":Rt,"data-invert":eg,"data-swipe-out":re,"data-swipe-direction":$,"data-expanded":!!(_||X&&q),"data-testid":m.testId,style:{"--index":E,"--toasts-before":E,"--z-index":N.length-E,"--offset":`${ne?ke:Ea.current}px`,"--initial-height":X?"auto":`${ze}px`,...R,...m.style},onDragEnd:()=>{pe(!1),le(null),vi.current=null},onPointerDown:Ie=>{Ie.button!==2&&(Nc||!hr||(tn.current=new Date,we(Ea.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(pe(!0),vi.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,At,rn;if(re||!hr)return;vi.current=null;const yn=Number(((Ie=pt.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gi=Number(((At=pt.current)==null?void 0:At.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dt=new Date().getTime()-((rn=tn.current)==null?void 0:rn.getTime()),Tn=Z==="x"?yn:gi,xo=Math.abs(Tn)/Dt;if(Math.abs(Tn)>=LK||xo>.11){we(Ea.current),m.onDismiss==null||m.onDismiss.call(m,m),Y(Z==="x"?yn>0?"right":"left":gi>0?"down":"up"),ta(),ve(!0);return}else{var Mn,Rn;(Mn=pt.current)==null||Mn.style.setProperty("--swipe-amount-x","0px"),(Rn=pt.current)==null||Rn.style.setProperty("--swipe-amount-y","0px")}oe(!1),pe(!1),le(null)},onPointerMove:Ie=>{var At,rn,yn;if(!vi.current||!hr||((At=window.getSelection())==null?void 0:At.toString().length)>0)return;const Dt=Ie.clientY-vi.current.y,Tn=Ie.clientX-vi.current.x;var xo;const Mn=(xo=e.swipeDirections)!=null?xo:BK(W);!Z&&(Math.abs(Tn)>1||Math.abs(Dt)>1)&&le(Math.abs(Tn)>Math.abs(Dt)?"x":"y");let Rn={x:0,y:0};const Ss=Ir=>1/(1.5+Math.abs(Ir)/20);if(Z==="y"){if(Mn.includes("top")||Mn.includes("bottom"))if(Mn.includes("top")&&Dt<0||Mn.includes("bottom")&&Dt>0)Rn.y=Dt;else{const Ir=Dt*Ss(Dt);Rn.y=Math.abs(Ir)<Math.abs(Dt)?Ir:Dt}}else if(Z==="x"&&(Mn.includes("left")||Mn.includes("right")))if(Mn.includes("left")&&Tn<0||Mn.includes("right")&&Tn>0)Rn.x=Tn;else{const Ir=Tn*Ss(Tn);Rn.x=Math.abs(Ir)<Math.abs(Tn)?Ir:Tn}(Math.abs(Rn.x)>0||Math.abs(Rn.y)>0)&&oe(!0),(rn=pt.current)==null||rn.style.setProperty("--swipe-amount-x",`${Rn.x}px`),(yn=pt.current)==null||yn.style.setProperty("--swipe-amount-y",`${Rn.y}px`)}},rd&&!m.jsx&&Rt!=="loading"?I.createElement("button",{"aria-label":B,"data-disabled":Nc,"data-close-button":!0,onClick:Nc||!hr?()=>{}:()=>{ta(),m.onDismiss==null||m.onDismiss.call(m,m)},className:sa(k==null?void 0:k.closeButton,m==null||(r=m.classNames)==null?void 0:r.closeButton)},(na=H==null?void 0:H.close)!=null?na:EK):null,(Rt||m.icon||m.promise)&&m.icon!==null&&((H==null?void 0:H[Rt])!==null||m.icon)?I.createElement("div",{"data-icon":"",className:sa(k==null?void 0:k.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||xs():null,m.type!=="loading"?ws:null):null,I.createElement("div",{"data-content":"",className:sa(k==null?void 0:k.content,m==null||(o=m.classNames)==null?void 0:o.content)},I.createElement("div",{"data-title":"",className:sa(k==null?void 0:k.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?I.createElement("div",{"data-description":"",className:sa(L,bs,k==null?void 0:k.description,m==null||(u=m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),I.isValidElement(m.cancel)?m.cancel:m.cancel&&Nh(m.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||D,onClick:Ie=>{Nh(m.cancel)&&hr&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ie),ta())},className:sa(k==null?void 0:k.cancelButton,m==null||(d=m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,I.isValidElement(m.action)?m.action:m.action&&Nh(m.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||z,onClick:Ie=>{Nh(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ie),!Ie.defaultPrevented&&ta())},className:sa(k==null?void 0:k.actionButton,m==null||(h=m.classNames)==null?void 0:h.actionButton)},m.action.label):null)};function VC(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function UK(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,l=o?"--mobile-offset":"--offset",u=o?kK:PK;function d(h){["top","right","bottom","left"].forEach(v=>{n[`${l}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${l}-${h}`]=u:n[`${l}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):d(u)}),n}const HK=I.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:d,className:h,offset:v,mobileOffset:m,theme:g="light",richColors:b,duration:O,style:S,visibleToasts:x=DK,toastOptions:E,dir:N=VC(),gap:_=IK,icons:C,containerAriaLabel:A="Notifications"}=t,[M,R]=I.useState([]),D=I.useMemo(()=>r?M.filter(q=>q.toasterId===r):M.filter(q=>!q.toasterId),[M,r]),z=I.useMemo(()=>Array.from(new Set([o].concat(D.filter(q=>q.position).map(q=>q.position)))),[D,o]),[G,L]=I.useState([]),[F,W]=I.useState(!1),[Q,X]=I.useState(!1),[k,H]=I.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=I.useRef(null),Z=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),le=I.useRef(null),$=I.useRef(!1),Y=I.useCallback(q=>{R(U=>{var ne;return(ne=U.find(fe=>fe.id===q.id))!=null&&ne.delete||qn.dismiss(q.id),U.filter(({id:fe})=>fe!==q.id)})},[]);return I.useEffect(()=>qn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{R(U=>U.map(ne=>ne.id===q.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{u$.flushSync(()=>{R(U=>{const ne=U.findIndex(fe=>fe.id===q.id);return ne!==-1?[...U.slice(0,ne),{...U[ne],...q},...U.slice(ne+1)]:[q,...U]})})})}),[M]),I.useEffect(()=>{if(g!=="system"){H(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:U})=>{H(U?"dark":"light")})}catch{q.addListener(({matches:ne})=>{try{H(ne?"dark":"light")}catch(fe){console.error(fe)}})}},[g]),I.useEffect(()=>{M.length<=1&&W(!1)},[M]),I.useEffect(()=>{const q=U=>{var ne;if(l.every(pe=>U[pe]||U.code===pe)){var ie;W(!0),(ie=B.current)==null||ie.focus()}U.code==="Escape"&&(document.activeElement===B.current||(ne=B.current)!=null&&ne.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),I.useEffect(()=>{if(B.current)return()=>{le.current&&(le.current.focus({preventScroll:!0}),le.current=null,$.current=!1)}},[B.current]),I.createElement("section",{ref:n,"aria-label":`${A} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((q,U)=>{var ne;const[fe,ie]=q.split("-");return D.length?I.createElement("ol",{key:q,dir:N==="auto"?VC():N,tabIndex:-1,ref:B,className:h,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":fe,"data-x-position":ie,style:{"--front-toast-height":`${((ne=G[0])==null?void 0:ne.height)||0}px`,"--width":`${$K}px`,"--gap":`${_}px`,...S,...UK(v,m)},onBlur:pe=>{$.current&&!pe.currentTarget.contains(pe.relatedTarget)&&($.current=!1,le.current&&(le.current.focus({preventScroll:!0}),le.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||$.current||($.current=!0,le.current=pe.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{Q||W(!1)},onDragEnd:()=>W(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},D.filter(pe=>!pe.position&&U===0||pe.position===q).map((pe,re)=>{var ve,ge;return I.createElement(qK,{key:pe.id,icons:C,index:re,toast:pe,defaultRichColors:b,duration:(ve=E==null?void 0:E.duration)!=null?ve:O,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:i,visibleToasts:x,closeButton:(ge=E==null?void 0:E.closeButton)!=null?ge:d,interacting:Q,position:q,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:Y,toasts:D.filter(oe=>oe.position==pe.position),heights:G.filter(oe=>oe.position==pe.position),setHeights:L,expandByDefault:u,gap:_,expanded:F,swipeDirections:t.swipeDirections})})):null}))});function fa({value:e,className:t,variant:n="outline",size:r="icon",label:i}){const[o,l]=w.useState("idle"),u=async d=>{d.stopPropagation(),l("copying");try{await Promise.all([navigator.clipboard.writeText(e),new Promise(h=>setTimeout(h,150))]),l("copied"),Ot.success("Copied to clipboard"),setTimeout(()=>l("idle"),2e3)}catch{l("idle"),Ot.error("Failed to copy to clipboard")}};return c.jsxs(Ce,{className:me("transition-all",o==="copied"&&"text-green-500",t),disabled:o==="copying",onClick:u,size:r,variant:n,children:[o==="copying"?c.jsx(Va,{className:me("animate-spin",i?"mr-2 h-4 w-4":"h-4 w-4")}):o==="copied"?c.jsx(ri,{className:me(i?"mr-2 h-4 w-4":"h-4 w-4")}):c.jsx(Kj,{className:me(i?"mr-2 h-4 w-4":"h-4 w-4")}),i]})}function XI({onDelete:e,className:t,variant:n="outline",size:r="icon",label:i}){const[o,l]=w.useState(!1),u=async d=>{d.stopPropagation(),l(!0);try{await Promise.all([e(),new Promise(h=>setTimeout(h,150))])}finally{l(!1)}};return c.jsxs(Ce,{className:me("text-destructive transition-all hover:text-destructive",t),disabled:o,onClick:u,size:r,variant:n,children:[o?c.jsx(Va,{className:me("animate-spin",i?"mr-1.5 h-4 w-4":"h-4 w-4")}):c.jsx(IF,{className:me(i?"mr-1.5 h-4 w-4":"h-4 w-4")}),i]})}const QI=6048e5,FK=864e5,Ah=43200,YC=1440,WC=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&WC in e?e[WC](t):e instanceof Date?new e.constructor(t):new Date(t)}function ln(e,t){return oi(t||e,e)}let GK={};function Yf(){return GK}function Ju(e,t){var u,d,h,v;const n=Yf(),r=(t==null?void 0:t.weekStartsOn)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((v=(h=n.locale)==null?void 0:h.options)==null?void 0:v.weekStartsOn)??0,i=ln(e,t==null?void 0:t.in),o=i.getDay(),l=(o<r?7:0)+o-r;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function pm(e,t){return Ju(e,{...t,weekStartsOn:1})}function ZI(e,t){const n=ln(e,t==null?void 0:t.in),r=n.getFullYear(),i=oi(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=pm(i),l=oi(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const u=pm(l);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function vm(e){const t=ln(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function av(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function KC(e,t){const n=ln(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function VK(e,t,n){const[r,i]=av(n==null?void 0:n.in,e,t),o=KC(r),l=KC(i),u=+o-vm(o),d=+l-vm(l);return Math.round((u-d)/FK)}function YK(e,t){const n=ZI(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),pm(r)}function Zh(e,t){const n=+ln(e)-+ln(t);return n<0?-1:n>0?1:n}function WK(e){return oi(e,Date.now())}function KK(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function XK(e){return!(!KK(e)&&typeof e!="number"||isNaN(+ln(e)))}function QK(e,t,n){const[r,i]=av(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return o*12+l}function ZK(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function JK(e,t){return+ln(e)-+ln(t)}function eX(e,t){const n=ln(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function tX(e,t){const n=ln(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function nX(e,t){const n=ln(e,t==null?void 0:t.in);return+eX(n,t)==+tX(n,t)}function rX(e,t,n){const[r,i,o]=av(n==null?void 0:n.in,e,e,t),l=Zh(i,o),u=Math.abs(QK(i,o));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*u);let d=Zh(i,o)===-l;nX(r)&&u===1&&Zh(r,o)===1&&(d=!1);const h=l*(u-+d);return h===0?0:h}function aX(e,t,n){const r=JK(e,t)/1e3;return ZK(n==null?void 0:n.roundingMethod)(r)}function iX(e,t){const n=ln(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const oX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sX=(e,t,n)=>{let r;const i=oX[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function zb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fX={date:zb({formats:lX,defaultWidth:"full"}),time:zb({formats:cX,defaultWidth:"full"}),dateTime:zb({formats:uX,defaultWidth:"full"})},dX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hX=(e,t,n,r)=>dX[e];function wu(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):l;i=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const mX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xX=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wX={ordinalNumber:xX,era:wu({values:mX,defaultWidth:"wide"}),quarter:wu({values:pX,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wu({values:vX,defaultWidth:"wide"}),day:wu({values:gX,defaultWidth:"wide"}),dayPeriod:wu({values:yX,defaultWidth:"wide",formattingValues:bX,defaultFormattingWidth:"wide"})};function Su(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const l=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?jX(u,m=>m.test(l)):SX(u,m=>m.test(l));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const v=t.slice(l.length);return{value:h,rest:v}}}function SX(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jX(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function OX(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(i.length);return{value:l,rest:u}}}const EX=/^(\d+)(th|st|nd|rd)?/i,_X=/\d+/i,NX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},AX={any:[/^b/i,/^(a|c)/i]},CX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TX={any:[/1/i,/2/i,/3/i,/4/i]},MX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},RX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},DX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},PX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},kX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$X={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},IX={ordinalNumber:OX({matchPattern:EX,parsePattern:_X,valueCallback:e=>parseInt(e,10)}),era:Su({matchPatterns:NX,defaultMatchWidth:"wide",parsePatterns:AX,defaultParseWidth:"any"}),quarter:Su({matchPatterns:CX,defaultMatchWidth:"wide",parsePatterns:TX,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Su({matchPatterns:MX,defaultMatchWidth:"wide",parsePatterns:RX,defaultParseWidth:"any"}),day:Su({matchPatterns:DX,defaultMatchWidth:"wide",parsePatterns:PX,defaultParseWidth:"any"}),dayPeriod:Su({matchPatterns:kX,defaultMatchWidth:"any",parsePatterns:$X,defaultParseWidth:"any"})},JI={code:"en-US",formatDistance:sX,formatLong:fX,formatRelative:hX,localize:wX,match:IX,options:{weekStartsOn:0,firstWeekContainsDate:1}};function LX(e,t){const n=ln(e,t==null?void 0:t.in);return VK(n,iX(n))+1}function zX(e,t){const n=ln(e,t==null?void 0:t.in),r=+pm(n)-+YK(n);return Math.round(r/QI)+1}function e3(e,t){var v,m,g,b;const n=ln(e,t==null?void 0:t.in),r=n.getFullYear(),i=Yf(),o=(t==null?void 0:t.firstWeekContainsDate)??((m=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??i.firstWeekContainsDate??((b=(g=i.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,l=oi((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const u=Ju(l,t),d=oi((t==null?void 0:t.in)||e,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const h=Ju(d,t);return+n>=+u?r+1:+n>=+h?r:r-1}function BX(e,t){var u,d,h,v;const n=Yf(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((v=(h=n.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,i=e3(e,t),o=oi((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ju(o,t)}function qX(e,t){const n=ln(e,t==null?void 0:t.in),r=+Ju(n,t)-+BX(n,t);return Math.round(r/QI)+1}function ht(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Fi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ht(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ht(n+1,2)},d(e,t){return ht(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ht(e.getHours()%12||12,t.length)},H(e,t){return ht(e.getHours(),t.length)},m(e,t){return ht(e.getMinutes(),t.length)},s(e,t){return ht(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return ht(i,t.length)}},fl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},XC={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Fi.y(e,t)},Y:function(e,t,n,r){const i=e3(e,r),o=i>0?i:1-i;if(t==="YY"){const l=o%100;return ht(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):ht(o,t.length)},R:function(e,t){const n=ZI(e);return ht(n,t.length)},u:function(e,t){const n=e.getFullYear();return ht(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ht(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ht(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Fi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ht(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=qX(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):ht(i,t.length)},I:function(e,t,n){const r=zX(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ht(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Fi.d(e,t)},D:function(e,t,n){const r=LX(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ht(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ht(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ht(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return ht(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=fl.noon:r===0?i=fl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=fl.evening:r>=12?i=fl.afternoon:r>=4?i=fl.morning:i=fl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Fi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ht(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ht(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Fi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fi.s(e,t)},S:function(e,t){return Fi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ZC(r);case"XXXX":case"XX":return Bo(r);case"XXXXX":case"XXX":default:return Bo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ZC(r);case"xxxx":case"xx":return Bo(r);case"xxxxx":case"xxx":default:return Bo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+QC(r,":");case"OOOO":default:return"GMT"+Bo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+QC(r,":");case"zzzz":default:return"GMT"+Bo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ht(r,t.length)},T:function(e,t,n){return ht(+e,t.length)}};function QC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+ht(o,2)}function ZC(e,t){return e%60===0?(e>0?"-":"+")+ht(Math.abs(e)/60,2):Bo(e,t)}function Bo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ht(Math.trunc(r/60),2),o=ht(r%60,2);return n+i+t+o}const JC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},t3=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},UX=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return JC(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",JC(r,t)).replace("{{time}}",t3(i,t))},HX={p:t3,P:UX},FX=/^D+$/,GX=/^Y+$/,VX=["D","DD","YY","YYYY"];function YX(e){return FX.test(e)}function WX(e){return GX.test(e)}function KX(e,t,n){const r=XX(e,t,n);if(console.warn(r),VX.includes(e))throw new RangeError(r)}function XX(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const QX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ZX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JX=/^'([^]*?)'?$/,eQ=/''/g,tQ=/[a-zA-Z]/;function fS(e,t,n){var v,m,g,b;const r=Yf(),i=r.locale??JI,o=r.firstWeekContainsDate??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,l=r.weekStartsOn??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,u=ln(e,n==null?void 0:n.in);if(!XK(u))throw new RangeError("Invalid time value");let d=t.match(ZX).map(O=>{const S=O[0];if(S==="p"||S==="P"){const x=HX[S];return x(O,i.formatLong)}return O}).join("").match(QX).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const S=O[0];if(S==="'")return{isToken:!1,value:nQ(O)};if(XC[S])return{isToken:!0,value:O};if(S.match(tQ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:O}});i.localize.preprocessor&&(d=i.localize.preprocessor(u,d));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:i};return d.map(O=>{if(!O.isToken)return O.value;const S=O.value;(WX(S)||YX(S))&&KX(S,t,String(e));const x=XC[S[0]];return x(u,S,i.localize,h)}).join("")}function nQ(e){const t=e.match(JX);return t?t[1].replace(eQ,"'"):e}function rQ(e,t,n){const r=Yf(),i=(n==null?void 0:n.locale)??r.locale??JI,o=2520,l=Zh(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:l}),[d,h]=av(n==null?void 0:n.in,...l>0?[t,e]:[e,t]),v=aX(h,d),m=(vm(h)-vm(d))/1e3,g=Math.round((v-m)/60);let b;if(g<2)return n!=null&&n.includeSeconds?v<5?i.formatDistance("lessThanXSeconds",5,u):v<10?i.formatDistance("lessThanXSeconds",10,u):v<20?i.formatDistance("lessThanXSeconds",20,u):v<40?i.formatDistance("halfAMinute",0,u):v<60?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",1,u):g===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",g,u);if(g<45)return i.formatDistance("xMinutes",g,u);if(g<90)return i.formatDistance("aboutXHours",1,u);if(g<YC){const O=Math.round(g/60);return i.formatDistance("aboutXHours",O,u)}else{if(g<o)return i.formatDistance("xDays",1,u);if(g<Ah){const O=Math.round(g/YC);return i.formatDistance("xDays",O,u)}else if(g<Ah*2)return b=Math.round(g/Ah),i.formatDistance("aboutXMonths",b,u)}if(b=rX(h,d),b<12){const O=Math.round(g/Ah);return i.formatDistance("xMonths",O,u)}else{const O=b%12,S=Math.trunc(b/12);return O<3?i.formatDistance("aboutXYears",S,u):O<9?i.formatDistance("overXYears",S,u):i.formatDistance("almostXYears",S+1,u)}}function aQ(e,t){return rQ(e,WK(e),t)}const iQ=mc("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function qe({className:e,variant:t,asChild:n=!1,...r}){const i=n?ss:"span";return c.jsx(i,{className:me(iQ({variant:t}),e),"data-slot":"badge",...r})}function RO({...e}){return c.jsx(OO,{"data-slot":"dialog",...e})}function oQ({...e}){return c.jsx(EO,{"data-slot":"dialog-portal",...e})}function sQ({className:e,...t}){return c.jsx(_O,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-slot":"dialog-overlay",...t})}function DO({className:e,children:t,showCloseButton:n=!0,...r}){return c.jsxs(oQ,{"data-slot":"dialog-portal",children:[c.jsx(sQ,{}),c.jsxs(NO,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",e),"data-slot":"dialog-content",...r,children:[t,n&&c.jsxs(Zp,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0","data-slot":"dialog-close",children:[c.jsx(or,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function n3({className:e,...t}){return c.jsx("div",{className:me("flex flex-col gap-2 text-center sm:text-left",e),"data-slot":"dialog-header",...t})}function r3({className:e,...t}){return c.jsx("div",{className:me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...t})}function a3({className:e,...t}){return c.jsx(AO,{className:me("font-semibold text-lg leading-none",e),"data-slot":"dialog-title",...t})}function lQ({className:e,...t}){return c.jsx(CO,{className:me("text-muted-foreground text-sm",e),"data-slot":"dialog-description",...t})}function iv({starred:e,onToggle:t,className:n,variant:r="ghost",size:i="icon",label:o}){const[l,u]=w.useState(!1),d=async h=>{h.stopPropagation(),u(!0);try{await Promise.all([t(),new Promise(v=>setTimeout(v,150))])}finally{u(!1)}};return c.jsxs(Ce,{className:me("transition-all",n),disabled:l,onClick:d,size:i,variant:r,children:[l?c.jsx(Va,{className:me("animate-spin",o?"mr-1.5 h-4 w-4":"h-4 w-4")}):c.jsx(y$,{className:me("transition-colors",o?"mr-1.5 h-4 w-4":"h-4 w-4",e?"fill-yellow-500 text-yellow-500":"text-muted-foreground")}),o,!o&&c.jsx("span",{className:"sr-only",children:e?"Unstar":"Star"})]})}function cQ(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function i3(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())||""}function uQ(e,t){if(e!=null&&e.startsWith("image/"))return!0;const n=t?i3(t):"";return["jpg","jpeg","png","gif","webp","avif","svg","bmp","ico"].includes(n)}function fQ({file:e,onClose:t,onToggleStar:n,onDelete:r}){const i=e.key.split("/").pop()||e.key,o=i3(i),l=uQ(e.contentType,i),u=()=>{const d=document.createElement("a");d.href=e.url,d.download=i,d.target="_blank",d.click()};return c.jsx(RO,{onOpenChange:d=>!d&&t(),open:!0,children:c.jsx(DO,{className:"max-h-[90vh] max-w-4xl overflow-y-auto [&>button]:hidden",children:c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"font-bold text-2xl",children:i}),e.key!==i&&c.jsx("p",{className:"mt-1 text-muted-foreground text-sm",children:e.key})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(iv,{onToggle:()=>n(e.key,!e.starred),starred:e.starred,variant:"outline"}),c.jsx(XI,{onDelete:()=>r(e.key)}),c.jsx(Ce,{onClick:t,size:"icon",variant:"outline",children:c.jsx(or,{className:"h-4 w-4"})})]})]}),c.jsx("div",{className:"aspect-video overflow-hidden rounded-lg bg-muted",children:l&&e.url.startsWith("https://")?c.jsx("img",{alt:i,className:"h-full w-full object-contain",src:e.url}):c.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2",children:[l?c.jsx(Xj,{className:"h-16 w-16 text-muted-foreground/50"}):c.jsx(Qj,{className:"h-16 w-16 text-muted-foreground/50"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Preview not available"})]})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(fa,{className:"flex-1",label:"Copy CDN URL",size:"default",value:e.url,variant:"default"}),c.jsxs(Ce,{className:"flex-1 gap-2 bg-transparent",onClick:()=>window.open(e.url,"_blank"),variant:"outline",children:[c.jsx(Gu,{className:"h-4 w-4"}),"Open in New Tab"]}),c.jsxs(Ce,{className:"flex-1 gap-2 bg-transparent",onClick:u,variant:"outline",children:[c.jsx(NF,{className:"h-4 w-4"}),"Download"]})]}),c.jsx(qt,{}),c.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[c.jsx("div",{className:"space-y-4",children:c.jsxs("div",{children:[c.jsx("h3",{className:"mb-2 font-semibold text-sm",children:"File Information"}),c.jsxs("dl",{className:"space-y-2 text-sm",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("dt",{className:"text-muted-foreground",children:"Format"}),c.jsx("dd",{className:"font-medium",children:c.jsx(qe,{variant:"secondary",children:o.toUpperCase()})})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("dt",{className:"text-muted-foreground",children:"Size"}),c.jsx("dd",{className:"font-medium",children:cQ(e.size)})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("dt",{className:"text-muted-foreground",children:"Content Type"}),c.jsx("dd",{className:"font-medium",children:e.contentType||"Unknown"})]})]})]})}),c.jsx("div",{className:"space-y-4",children:c.jsxs("div",{children:[c.jsx("h3",{className:"mb-2 font-semibold text-sm",children:"Metadata"}),c.jsxs("dl",{className:"space-y-2 text-sm",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("dt",{className:"text-muted-foreground",children:"Last Modified"}),c.jsx("dd",{className:"font-medium",children:fS(new Date(e.lastModified),"MMM d, yyyy 'at' h:mm a")})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("dt",{className:"text-muted-foreground",children:"Starred"}),c.jsx("dd",{className:"font-medium",children:e.starred?"Yes":"No"})]}),e.tags.length>0&&c.jsxs("div",{children:[c.jsx("dt",{className:"mb-1 text-muted-foreground",children:"Tags"}),c.jsx("dd",{className:"flex flex-wrap gap-1",children:e.tags.filter(d=>d.key!=="starred").map(d=>c.jsxs(qe,{variant:"secondary",children:[d.key,": ",d.value]},d.key))})]})]})]})})]}),c.jsx(qt,{}),c.jsxs("div",{children:[c.jsx("h3",{className:"mb-2 font-semibold text-sm",children:"CDN URL"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("code",{className:"flex-1 break-all rounded bg-muted px-3 py-2 text-sm",children:e.url}),c.jsx(fa,{size:"sm",value:e.url})]})]})]})})})}function Te({className:e,...t}){return c.jsx("div",{className:me("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),"data-slot":"card",...t})}function Me({className:e,...t}){return c.jsx("div",{className:me("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),"data-slot":"card-header",...t})}function Le({className:e,...t}){return c.jsx("div",{className:me("font-semibold leading-none",e),"data-slot":"card-title",...t})}function We({className:e,...t}){return c.jsx("div",{className:me("text-muted-foreground text-sm",e),"data-slot":"card-description",...t})}function $e({className:e,...t}){return c.jsx("div",{className:me("px-6",e),"data-slot":"card-content",...t})}function dQ({className:e,...t}){return c.jsx("div",{className:me("flex items-center px-6 [.border-t]:pt-6",e),"data-slot":"card-footer",...t})}function ov(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var sv="Checkbox",[hQ]=jn(sv),[mQ,PO]=hQ(sv);function pQ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:l,name:u,onCheckedChange:d,required:h,value:v="on",internal_do_not_use_render:m}=e,[g,b]=Nn({prop:n,defaultProp:i??!1,onChange:d,caller:sv}),[O,S]=w.useState(null),[x,E]=w.useState(null),N=w.useRef(!1),_=O?!!l||!!O.closest("form"):!0,C={checked:g,disabled:o,setChecked:b,control:O,setControl:S,name:u,form:l,value:v,hasConsumerStoppedPropagationRef:N,required:h,defaultChecked:Ki(i)?!1:i,isFormControl:_,bubbleInput:x,setBubbleInput:E};return c.jsx(mQ,{scope:t,...C,children:vQ(m)?m(C):r})}var o3="CheckboxTrigger",s3=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:o,value:l,disabled:u,checked:d,required:h,setControl:v,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:b,bubbleInput:O}=PO(o3,e),S=Ue(i,v),x=w.useRef(d);return w.useEffect(()=>{const E=o==null?void 0:o.form;if(E){const N=()=>m(x.current);return E.addEventListener("reset",N),()=>E.removeEventListener("reset",N)}},[o,m]),c.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":Ki(d)?"mixed":d,"aria-required":h,"data-state":h3(d),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:S,onKeyDown:ye(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ye(n,E=>{m(N=>Ki(N)?!0:!N),O&&b&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})});s3.displayName=o3;var l3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:l,disabled:u,value:d,onCheckedChange:h,form:v,...m}=e;return c.jsx(pQ,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:u,required:l,onCheckedChange:h,name:r,form:v,value:d,internal_do_not_use_render:({isFormControl:g})=>c.jsxs(c.Fragment,{children:[c.jsx(s3,{...m,ref:t,__scopeCheckbox:n}),g&&c.jsx(d3,{__scopeCheckbox:n})]})})});l3.displayName=sv;var c3="CheckboxIndicator",u3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=PO(c3,n);return c.jsx(An,{present:r||Ki(o.checked)||o.checked===!0,children:c.jsx(Ne.span,{"data-state":h3(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});u3.displayName=c3;var f3="CheckboxBubbleInput",d3=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:l,required:u,disabled:d,name:h,value:v,form:m,bubbleInput:g,setBubbleInput:b}=PO(f3,e),O=Ue(n,b),S=ov(o),x=qp(r);w.useEffect(()=>{const N=g;if(!N)return;const _=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(_,"checked").set,M=!i.current;if(S!==o&&A){const R=new Event("click",{bubbles:M});N.indeterminate=Ki(o),A.call(N,Ki(o)?!1:o),N.dispatchEvent(R)}},[g,S,o,i]);const E=w.useRef(Ki(o)?!1:o);return c.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??E.current,required:u,disabled:d,name:h,value:v,form:m,...t,tabIndex:-1,ref:O,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});d3.displayName=f3;function vQ(e){return typeof e=="function"}function Ki(e){return e==="indeterminate"}function h3(e){return Ki(e)?"indeterminate":e?"checked":"unchecked"}function dS({className:e,...t}){return c.jsx(l3,{className:me("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40",e),"data-slot":"checkbox",...t,children:c.jsx(u3,{className:"grid place-content-center text-current transition-none","data-slot":"checkbox-indicator",children:c.jsx(ri,{className:"size-3.5"})})})}function gQ(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function m3(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())||""}function yQ(e,t){if(e!=null&&e.startsWith("image/"))return!0;const n=t?m3(t):"";return["jpg","jpeg","png","gif","webp","avif","svg","bmp","ico"].includes(n)}function bQ({files:e,selectedFiles:t,onSelectFile:n,onToggleStar:r,onFileClick:i}){const o=(l,u)=>{l.stopPropagation(),window.open(u,"_blank")};return c.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6",children:e.map(l=>{const u=l.key.split("/").pop()||l.key,d=m3(u),h=yQ(l.contentType,u),v=t.includes(l.key);return c.jsxs("div",{className:"group relative cursor-pointer overflow-hidden rounded-xl bg-muted shadow-sm transition-shadow hover:shadow-md",onClick:()=>i(l),children:[c.jsx("div",{className:"flex aspect-square items-center justify-center",children:h&&l.url.startsWith("https://")?c.jsx("img",{alt:u,className:"h-full w-full object-cover",src:l.url}):c.jsx("div",{className:"flex h-full w-full items-center justify-center",children:h?c.jsx(Xj,{className:"h-12 w-12 text-muted-foreground/50"}):c.jsx(Qj,{className:"h-12 w-12 text-muted-foreground/50"})})}),c.jsx(iv,{className:"absolute top-2 right-2 rounded-full bg-background/80 hover:bg-background/90",onToggle:()=>r(l.key,!l.starred),starred:l.starred}),c.jsxs(Te,{className:"gap-2 rounded-t-none border-none py-3 shadow-none",children:[c.jsxs(Me,{className:"gap-1 px-3 py-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{onClick:m=>m.stopPropagation(),children:c.jsx(dS,{checked:v,onCheckedChange:()=>n(l.key)})}),c.jsx(Le,{className:"min-w-0 flex-1 truncate text-sm",children:u})]}),c.jsxs(We,{className:"flex items-center gap-2 pl-6",children:[c.jsx(qe,{className:"rounded-sm text-[10px]",variant:"outline",children:d.toUpperCase()}),c.jsx("span",{className:"text-xs",children:gQ(l.size)})]})]}),c.jsxs(dQ,{className:"justify-end gap-1 px-3 py-0 opacity-0 transition-opacity group-hover:opacity-100",children:[c.jsx(fa,{className:"h-7 px-2",label:"Copy",size:"sm",value:l.url,variant:"ghost"}),c.jsxs(Ce,{className:"h-7 px-2",onClick:m=>o(m,l.url),size:"sm",variant:"ghost",children:[c.jsx(Gu,{className:"mr-1 h-3 w-3"}),"Open"]})]})]})]},l.key)})})}var Bb,lv="HoverCard",[p3]=jn(lv,[io]),cv=io(),[xQ,uv]=p3(lv),v3=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:l=700,closeDelay:u=300}=e,d=cv(t),h=w.useRef(0),v=w.useRef(0),m=w.useRef(!1),g=w.useRef(!1),[b,O]=Nn({prop:r,defaultProp:i??!1,onChange:o,caller:lv}),S=w.useCallback(()=>{clearTimeout(v.current),h.current=window.setTimeout(()=>O(!0),l)},[l,O]),x=w.useCallback(()=>{clearTimeout(h.current),!m.current&&!g.current&&(v.current=window.setTimeout(()=>O(!1),u))},[u,O]),E=w.useCallback(()=>O(!1),[O]);return w.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(v.current)},[]),c.jsx(xQ,{scope:t,open:b,onOpenChange:O,onOpen:S,onClose:x,onDismiss:E,hasSelectionRef:m,isPointerDownOnContentRef:g,children:c.jsx(Up,{...d,children:n})})};v3.displayName=lv;var g3="HoverCardTrigger",y3=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=uv(g3,n),o=cv(n);return c.jsx(Hp,{asChild:!0,...o,children:c.jsx(Ne.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:ye(e.onPointerEnter,ym(i.onOpen)),onPointerLeave:ye(e.onPointerLeave,ym(i.onClose)),onFocus:ye(e.onFocus,i.onOpen),onBlur:ye(e.onBlur,i.onClose),onTouchStart:ye(e.onTouchStart,l=>l.preventDefault())})})});y3.displayName=g3;var kO="HoverCardPortal",[wQ,SQ]=p3(kO,{forceMount:void 0}),b3=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=uv(kO,t);return c.jsx(wQ,{scope:t,forceMount:n,children:c.jsx(An,{present:n||o.open,children:c.jsx(dc,{asChild:!0,container:i,children:r})})})};b3.displayName=kO;var gm="HoverCardContent",x3=w.forwardRef((e,t)=>{const n=SQ(gm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=uv(gm,e.__scopeHoverCard);return c.jsx(An,{present:r||o.open,children:c.jsx(jQ,{"data-state":o.open?"open":"closed",...i,onPointerEnter:ye(e.onPointerEnter,ym(o.onOpen)),onPointerLeave:ye(e.onPointerLeave,ym(o.onClose)),ref:t})})});x3.displayName=gm;var jQ=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,...u}=e,d=uv(gm,n),h=cv(n),v=w.useRef(null),m=Ue(t,v),[g,b]=w.useState(!1);return w.useEffect(()=>{if(g){const O=document.body;return Bb=O.style.userSelect||O.style.webkitUserSelect,O.style.userSelect="none",O.style.webkitUserSelect="none",()=>{O.style.userSelect=Bb,O.style.webkitUserSelect=Bb}}},[g]),w.useEffect(()=>{if(v.current){const O=()=>{b(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var x;((x=document.getSelection())==null?void 0:x.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",O),()=>{document.removeEventListener("pointerup",O),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),w.useEffect(()=>{v.current&&_Q(v.current).forEach(S=>S.setAttribute("tabindex","-1"))}),c.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:ye(o,O=>{O.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(Fp,{...h,...u,onPointerDown:ye(u.onPointerDown,O=>{O.currentTarget.contains(O.target)&&b(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:m,style:{...u.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),OQ="HoverCardArrow",EQ=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=cv(n);return c.jsx(Gp,{...i,...r,ref:t})});EQ.displayName=OQ;function ym(e){return t=>t.pointerType==="touch"?void 0:e()}function _Q(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var NQ=v3,AQ=y3,CQ=b3,TQ=x3;function MQ({...e}){return c.jsx(NQ,{"data-slot":"hover-card",...e})}function RQ({...e}){return c.jsx(AQ,{"data-slot":"hover-card-trigger",...e})}function DQ({className:e,align:t="center",sideOffset:n=4,...r}){return c.jsx(CQ,{"data-slot":"hover-card-portal",children:c.jsx(TQ,{align:t,className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-slot":"hover-card-content",sideOffset:n,...r})})}function fv({className:e,...t}){return c.jsx("div",{className:"relative w-full overflow-x-auto","data-slot":"table-container",children:c.jsx("table",{className:me("w-full caption-bottom text-sm",e),"data-slot":"table",...t})})}function dv({className:e,...t}){return c.jsx("thead",{className:me("[&_tr]:border-b",e),"data-slot":"table-header",...t})}function hv({className:e,...t}){return c.jsx("tbody",{className:me("[&_tr:last-child]:border-0",e),"data-slot":"table-body",...t})}function Fn({className:e,...t}){return c.jsx("tr",{className:me("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),"data-slot":"table-row",...t})}function Pt({className:e,...t}){return c.jsx("th",{className:me("h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),"data-slot":"table-head",...t})}function mt({className:e,...t}){return c.jsx("td",{className:me("whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),"data-slot":"table-cell",...t})}function PQ(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function w3(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())||""}function kQ(e,t){if(e!=null&&e.startsWith("image/"))return!0;const n=t?w3(t):"";return["jpg","jpeg","png","gif","webp","avif","svg","bmp","ico"].includes(n)}function $Q({files:e,selectedFiles:t,onSelectFile:n,onSelectAll:r,onToggleStar:i,onFileClick:o}){const l=(u,d)=>{u.stopPropagation(),window.open(d,"_blank")};return c.jsx("div",{className:"overflow-hidden rounded-lg border border-border",children:c.jsxs(fv,{children:[c.jsx(dv,{children:c.jsxs(Fn,{className:"bg-muted/50",children:[c.jsx(Pt,{className:"w-12",children:c.jsx(dS,{checked:t.length===e.length&&e.length>0,onCheckedChange:r})}),c.jsx(Pt,{className:"w-12"}),c.jsx(Pt,{children:"Name"}),c.jsx(Pt,{children:"Format"}),c.jsx(Pt,{children:"Size"}),c.jsx(Pt,{children:"Modified"}),c.jsx(Pt,{className:"w-24",children:"Actions"})]})}),c.jsx(hv,{children:e.map(u=>{const d=u.key.split("/").pop()||u.key,h=w3(d),v=kQ(u.contentType,d);return c.jsxs(Fn,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>o(u),children:[c.jsx(mt,{onClick:m=>m.stopPropagation(),children:c.jsx(dS,{checked:t.includes(u.key),onCheckedChange:()=>n(u.key)})}),c.jsx(mt,{onClick:m=>m.stopPropagation(),children:c.jsx(iv,{className:"h-8 w-8",onToggle:()=>i(u.key,!u.starred),starred:u.starred})}),c.jsx(mt,{children:c.jsxs("div",{className:"flex items-center gap-3",children:[v&&u.url.startsWith("https://")?c.jsxs(MQ,{closeDelay:200,openDelay:100,children:[c.jsx(RQ,{asChild:!0,children:c.jsx("div",{className:"h-10 w-14 shrink-0 cursor-pointer overflow-hidden rounded border bg-muted",children:c.jsx("img",{alt:d,className:"h-full w-full object-cover",src:u.url})})}),c.jsxs(DQ,{align:"start",className:"w-auto p-3",side:"right",children:[c.jsx("img",{alt:d,className:"max-h-[min(400px,40vh)] max-w-[min(400px,25vw)] rounded object-contain",src:u.url}),c.jsx("p",{className:"mt-2 max-w-[min(400px,25vw)] truncate text-center text-muted-foreground text-sm",children:d})]})]}):c.jsx("div",{className:"flex h-10 w-14 shrink-0 items-center justify-center overflow-hidden rounded border bg-muted",children:v?c.jsx(Xj,{className:"h-4 w-4 text-muted-foreground"}):c.jsx(Qj,{className:"h-4 w-4 text-muted-foreground"})}),c.jsx("span",{className:"truncate font-medium",children:d})]})}),c.jsx(mt,{children:c.jsx(qe,{variant:"secondary",children:h.toUpperCase()})}),c.jsx(mt,{className:"text-muted-foreground",children:PQ(u.size)}),c.jsx(mt,{className:"text-muted-foreground text-xs",children:aQ(new Date(u.lastModified),{addSuffix:!0})}),c.jsx(mt,{onClick:m=>m.stopPropagation(),children:c.jsxs("div",{className:"flex gap-1",children:[c.jsx(fa,{className:"h-8 w-8",size:"icon",value:u.url,variant:"ghost"}),c.jsx(Ce,{className:"h-8 w-8",onClick:m=>l(m,u.url),size:"icon",variant:"ghost",children:c.jsx(Gu,{className:"h-3.5 w-3.5"})})]})})]},u.key)})})]})})}var mv="Collapsible",[IQ]=jn(mv),[LQ,$O]=IQ(mv),S3=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...u}=e,[d,h]=Nn({prop:r,defaultProp:i??!1,onChange:l,caller:mv});return c.jsx(LQ,{scope:n,disabled:o,contentId:Tr(),open:d,onOpenToggle:w.useCallback(()=>h(v=>!v),[h]),children:c.jsx(Ne.div,{"data-state":LO(d),"data-disabled":o?"":void 0,...u,ref:t})})});S3.displayName=mv;var j3="CollapsibleTrigger",O3=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=$O(j3,n);return c.jsx(Ne.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":LO(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ye(e.onClick,i.onOpenToggle)})});O3.displayName=j3;var IO="CollapsibleContent",E3=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$O(IO,e.__scopeCollapsible);return c.jsx(An,{present:n||i.open,children:({present:o})=>c.jsx(zQ,{...r,ref:t,present:o})})});E3.displayName=IO;var zQ=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=$O(IO,n),[u,d]=w.useState(r),h=w.useRef(null),v=Ue(t,h),m=w.useRef(0),g=m.current,b=w.useRef(0),O=b.current,S=l.open||u,x=w.useRef(S),E=w.useRef(void 0);return w.useEffect(()=>{const N=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(N)},[]),Wt(()=>{const N=h.current;if(N){E.current=E.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const _=N.getBoundingClientRect();m.current=_.height,b.current=_.width,x.current||(N.style.transitionDuration=E.current.transitionDuration,N.style.animationName=E.current.animationName),d(r)}},[l.open,r]),c.jsx(Ne.div,{"data-state":LO(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...o,ref:v,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":O?`${O}px`:void 0,...e.style},children:S&&i})});function LO(e){return e?"open":"closed"}var BQ=S3;const fs=BQ,ds=O3,hs=E3;var qQ="Label",_3=w.forwardRef((e,t)=>c.jsx(ls.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));_3.displayName=qQ;var UQ=_3;function qo({className:e,...t}){return c.jsx(UQ,{className:me("flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",e),"data-slot":"label",...t})}var zO="Progress",BO=100,[HQ]=b$(zO),[FQ,GQ]=HQ(zO),N3=w.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=VQ,...l}=e;(i||i===0)&&!eT(i)&&console.error(YQ(`${i}`,"Progress"));const u=eT(i)?i:BO;r!==null&&!tT(r,u)&&console.error(WQ(`${r}`,"Progress"));const d=tT(r,u)?r:null,h=bm(d)?o(d,u):void 0;return c.jsx(FQ,{scope:n,value:d,max:u,children:c.jsx(ls.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":bm(d)?d:void 0,"aria-valuetext":h,role:"progressbar","data-state":T3(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});N3.displayName=zO;var A3="ProgressIndicator",C3=w.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=GQ(A3,n);return c.jsx(ls.div,{"data-state":T3(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});C3.displayName=A3;function VQ(e,t){return`${Math.round(e/t*100)}%`}function T3(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bm(e){return typeof e=="number"}function eT(e){return bm(e)&&!isNaN(e)&&e>0}function tT(e,t){return bm(e)&&!isNaN(e)&&e<=t&&e>=0}function YQ(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${BO}\`.`}function WQ(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
418
|
+
- a positive number
|
|
419
|
+
- less than the value passed to \`max\` (or ${BO} if no \`max\` prop is set)
|
|
420
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
421
|
+
|
|
422
|
+
Defaulting to \`null\`.`}var KQ=N3,XQ=C3;function pv({className:e,value:t,...n}){return c.jsx(KQ,{className:me("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),"data-slot":"progress",...n,children:c.jsx(XQ,{className:"h-full w-full flex-1 bg-primary transition-all","data-slot":"progress-indicator",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function xm(e,[t,n]){return Math.min(n,Math.max(t,e))}var QQ=[" ","Enter","ArrowUp","ArrowDown"],ZQ=[" ","Enter"],es="Select",[vv,gv,JQ]=kp(es),[vc]=jn(es,[JQ,io]),yv=io(),[eZ,so]=vc(es),[tZ,nZ]=vc(es),M3=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:h,name:v,autoComplete:m,disabled:g,required:b,form:O}=e,S=yv(t),[x,E]=w.useState(null),[N,_]=w.useState(null),[C,A]=w.useState(!1),M=lc(h),[R,D]=Nn({prop:r,defaultProp:i??!1,onChange:o,caller:es}),[z,G]=Nn({prop:l,defaultProp:u,onChange:d,caller:es}),L=w.useRef(null),F=x?O||!!x.closest("form"):!0,[W,Q]=w.useState(new Set),X=Array.from(W).map(k=>k.props.value).join(";");return c.jsx(Up,{...S,children:c.jsxs(eZ,{required:b,scope:t,trigger:x,onTriggerChange:E,valueNode:N,onValueNodeChange:_,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:Tr(),value:z,onValueChange:G,open:R,onOpenChange:D,dir:M,triggerPointerDownPosRef:L,disabled:g,children:[c.jsx(vv.Provider,{scope:t,children:c.jsx(tZ,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(k=>{Q(H=>new Set(H).add(k))},[]),onNativeOptionRemove:w.useCallback(k=>{Q(H=>{const B=new Set(H);return B.delete(k),B})},[]),children:n})}),F?c.jsxs(J3,{"aria-hidden":!0,required:b,tabIndex:-1,name:v,autoComplete:m,value:z,onChange:k=>G(k.target.value),disabled:g,form:O,children:[z===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},X):null]})})};M3.displayName=es;var R3="SelectTrigger",D3=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=yv(n),l=so(R3,n),u=l.disabled||r,d=Ue(t,l.onTriggerChange),h=gv(n),v=w.useRef("touch"),[m,g,b]=tL(S=>{const x=h().filter(_=>!_.disabled),E=x.find(_=>_.value===l.value),N=nL(x,S,E);N!==void 0&&l.onValueChange(N.value)}),O=S=>{u||(l.onOpenChange(!0),b()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return c.jsx(Hp,{asChild:!0,...o,children:c.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eL(l.value)?"":void 0,...i,ref:d,onClick:ye(i.onClick,S=>{S.currentTarget.focus(),v.current!=="mouse"&&O(S)}),onPointerDown:ye(i.onPointerDown,S=>{v.current=S.pointerType;const x=S.target;x.hasPointerCapture(S.pointerId)&&x.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(O(S),S.preventDefault())}),onKeyDown:ye(i.onKeyDown,S=>{const x=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(x&&S.key===" ")&&QQ.includes(S.key)&&(O(),S.preventDefault())})})})});D3.displayName=R3;var P3="SelectValue",k3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...u}=e,d=so(P3,n),{onValueNodeHasChildrenChange:h}=d,v=o!==void 0,m=Ue(t,d.onValueNodeChange);return Wt(()=>{h(v)},[h,v]),c.jsx(Ne.span,{...u,ref:m,style:{pointerEvents:"none"},children:eL(d.value)?c.jsx(c.Fragment,{children:l}):o})});k3.displayName=P3;var rZ="SelectIcon",$3=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return c.jsx(Ne.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});$3.displayName=rZ;var aZ="SelectPortal",I3=e=>c.jsx(dc,{asChild:!0,...e});I3.displayName=aZ;var ts="SelectContent",L3=w.forwardRef((e,t)=>{const n=so(ts,e.__scopeSelect),[r,i]=w.useState();if(Wt(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Lf.createPortal(c.jsx(z3,{scope:e.__scopeSelect,children:c.jsx(vv.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(B3,{...e,ref:t})});L3.displayName=ts;var Ur=10,[z3,lo]=vc(ts),iZ="SelectContentImpl",oZ=Tl("SelectContent.RemoveScroll"),B3=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:v,arrowPadding:m,collisionBoundary:g,collisionPadding:b,sticky:O,hideWhenDetached:S,avoidCollisions:x,...E}=e,N=so(ts,n),[_,C]=w.useState(null),[A,M]=w.useState(null),R=Ue(t,ie=>C(ie)),[D,z]=w.useState(null),[G,L]=w.useState(null),F=gv(n),[W,Q]=w.useState(!1),X=w.useRef(!1);w.useEffect(()=>{if(_)return dO(_)},[_]),tO();const k=w.useCallback(ie=>{const[pe,...re]=F().map(oe=>oe.ref.current),[ve]=re.slice(-1),ge=document.activeElement;for(const oe of ie)if(oe===ge||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===pe&&A&&(A.scrollTop=0),oe===ve&&A&&(A.scrollTop=A.scrollHeight),oe==null||oe.focus(),document.activeElement!==ge))return},[F,A]),H=w.useCallback(()=>k([D,_]),[k,D,_]);w.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=N;w.useEffect(()=>{if(_){let ie={x:0,y:0};const pe=ve=>{var ge,oe;ie={x:Math.abs(Math.round(ve.pageX)-(((ge=Z.current)==null?void 0:ge.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((oe=Z.current)==null?void 0:oe.y)??0))}},re=ve=>{ie.x<=10&&ie.y<=10?ve.preventDefault():_.contains(ve.target)||B(!1),document.removeEventListener("pointermove",pe),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",re,{capture:!0})}}},[_,B,Z]),w.useEffect(()=>{const ie=()=>B(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[B]);const[le,$]=tL(ie=>{const pe=F().filter(ge=>!ge.disabled),re=pe.find(ge=>ge.ref.current===document.activeElement),ve=nL(pe,ie,re);ve&&setTimeout(()=>ve.ref.current.focus())}),Y=w.useCallback((ie,pe,re)=>{const ve=!X.current&&!re;(N.value!==void 0&&N.value===pe||ve)&&(z(ie),ve&&(X.current=!0))},[N.value]),q=w.useCallback(()=>_==null?void 0:_.focus(),[_]),U=w.useCallback((ie,pe,re)=>{const ve=!X.current&&!re;(N.value!==void 0&&N.value===pe||ve)&&L(ie)},[N.value]),ne=r==="popper"?hS:q3,fe=ne===hS?{side:u,sideOffset:d,align:h,alignOffset:v,arrowPadding:m,collisionBoundary:g,collisionPadding:b,sticky:O,hideWhenDetached:S,avoidCollisions:x}:{};return c.jsx(z3,{scope:n,content:_,viewport:A,onViewportChange:M,itemRefCallback:Y,selectedItem:D,onItemLeave:q,itemTextRefCallback:U,focusSelectedItem:H,selectedItemText:G,position:r,isPositioned:W,searchRef:le,children:c.jsx(Yp,{as:oZ,allowPinchZoom:!0,children:c.jsx($p,{asChild:!0,trapped:N.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:ye(i,ie=>{var pe;(pe=N.trigger)==null||pe.focus({preventScroll:!0}),ie.preventDefault()}),children:c.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:c.jsx(ne,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ie=>ie.preventDefault(),...E,...fe,onPlaced:()=>Q(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:ye(E.onKeyDown,ie=>{const pe=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!pe&&ie.key.length===1&&$(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let ve=F().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const ge=ie.target,oe=ve.indexOf(ge);ve=ve.slice(oe+1)}setTimeout(()=>k(ve)),ie.preventDefault()}})})})})})})});B3.displayName=iZ;var sZ="SelectItemAlignedPosition",q3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=so(ts,n),l=lo(ts,n),[u,d]=w.useState(null),[h,v]=w.useState(null),m=Ue(t,R=>v(R)),g=gv(n),b=w.useRef(!1),O=w.useRef(!0),{viewport:S,selectedItem:x,selectedItemText:E,focusSelectedItem:N}=l,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&h&&S&&x&&E){const R=o.trigger.getBoundingClientRect(),D=h.getBoundingClientRect(),z=o.valueNode.getBoundingClientRect(),G=E.getBoundingClientRect();if(o.dir!=="rtl"){const ge=G.left-D.left,oe=z.left-ge,ke=R.left-oe,we=R.width+ke,ze=Math.max(we,D.width),Ze=window.innerWidth-Ur,lt=xm(oe,[Ur,Math.max(Ur,Ze-ze)]);u.style.minWidth=we+"px",u.style.left=lt+"px"}else{const ge=D.right-G.right,oe=window.innerWidth-z.right-ge,ke=window.innerWidth-R.right-oe,we=R.width+ke,ze=Math.max(we,D.width),Ze=window.innerWidth-Ur,lt=xm(oe,[Ur,Math.max(Ur,Ze-ze)]);u.style.minWidth=we+"px",u.style.right=lt+"px"}const L=g(),F=window.innerHeight-Ur*2,W=S.scrollHeight,Q=window.getComputedStyle(h),X=parseInt(Q.borderTopWidth,10),k=parseInt(Q.paddingTop,10),H=parseInt(Q.borderBottomWidth,10),B=parseInt(Q.paddingBottom,10),Z=X+k+W+B+H,le=Math.min(x.offsetHeight*5,Z),$=window.getComputedStyle(S),Y=parseInt($.paddingTop,10),q=parseInt($.paddingBottom,10),U=R.top+R.height/2-Ur,ne=F-U,fe=x.offsetHeight/2,ie=x.offsetTop+fe,pe=X+k+ie,re=Z-pe;if(pe<=U){const ge=L.length>0&&x===L[L.length-1].ref.current;u.style.bottom="0px";const oe=h.clientHeight-S.offsetTop-S.offsetHeight,ke=Math.max(ne,fe+(ge?q:0)+oe+H),we=pe+ke;u.style.height=we+"px"}else{const ge=L.length>0&&x===L[0].ref.current;u.style.top="0px";const ke=Math.max(U,X+S.offsetTop+(ge?Y:0)+fe)+re;u.style.height=ke+"px",S.scrollTop=pe-U+S.offsetTop}u.style.margin=`${Ur}px 0`,u.style.minHeight=le+"px",u.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>b.current=!0)}},[g,o.trigger,o.valueNode,u,h,S,x,E,o.dir,r]);Wt(()=>_(),[_]);const[C,A]=w.useState();Wt(()=>{h&&A(window.getComputedStyle(h).zIndex)},[h]);const M=w.useCallback(R=>{R&&O.current===!0&&(_(),N==null||N(),O.current=!1)},[_,N]);return c.jsx(cZ,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:M,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Ne.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});q3.displayName=sZ;var lZ="SelectPopperPosition",hS=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ur,...o}=e,l=yv(n);return c.jsx(Fp,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hS.displayName=lZ;var[cZ,qO]=vc(ts,{}),mS="SelectViewport",U3=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=lo(mS,n),l=qO(mS,n),u=Ue(t,o.onViewportChange),d=w.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(vv.Slot,{scope:n,children:c.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ye(i.onScroll,h=>{const v=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&m){const b=Math.abs(d.current-v.scrollTop);if(b>0){const O=window.innerHeight-Ur*2,S=parseFloat(m.style.minHeight),x=parseFloat(m.style.height),E=Math.max(S,x);if(E<O){const N=E+b,_=Math.min(O,N),C=N-_;m.style.height=_+"px",m.style.bottom==="0px"&&(v.scrollTop=C>0?C:0,m.style.justifyContent="flex-end")}}}d.current=v.scrollTop})})})]})});U3.displayName=mS;var H3="SelectGroup",[uZ,fZ]=vc(H3),dZ=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Tr();return c.jsx(uZ,{scope:n,id:i,children:c.jsx(Ne.div,{role:"group","aria-labelledby":i,...r,ref:t})})});dZ.displayName=H3;var F3="SelectLabel",hZ=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fZ(F3,n);return c.jsx(Ne.div,{id:i.id,...r,ref:t})});hZ.displayName=F3;var wm="SelectItem",[mZ,G3]=vc(wm),V3=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,u=so(wm,n),d=lo(wm,n),h=u.value===r,[v,m]=w.useState(o??""),[g,b]=w.useState(!1),O=Ue(t,N=>{var _;return(_=d.itemRefCallback)==null?void 0:_.call(d,N,r,i)}),S=Tr(),x=w.useRef("touch"),E=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(mZ,{scope:n,value:r,disabled:i,textId:S,isSelected:h,onItemTextChange:w.useCallback(N=>{m(_=>_||((N==null?void 0:N.textContent)??"").trim())},[]),children:c.jsx(vv.ItemSlot,{scope:n,value:r,disabled:i,textValue:v,children:c.jsx(Ne.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:O,onFocus:ye(l.onFocus,()=>b(!0)),onBlur:ye(l.onBlur,()=>b(!1)),onClick:ye(l.onClick,()=>{x.current!=="mouse"&&E()}),onPointerUp:ye(l.onPointerUp,()=>{x.current==="mouse"&&E()}),onPointerDown:ye(l.onPointerDown,N=>{x.current=N.pointerType}),onPointerMove:ye(l.onPointerMove,N=>{var _;x.current=N.pointerType,i?(_=d.onItemLeave)==null||_.call(d):x.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(l.onPointerLeave,N=>{var _;N.currentTarget===document.activeElement&&((_=d.onItemLeave)==null||_.call(d))}),onKeyDown:ye(l.onKeyDown,N=>{var C;((C=d.searchRef)==null?void 0:C.current)!==""&&N.key===" "||(ZQ.includes(N.key)&&E(),N.key===" "&&N.preventDefault())})})})})});V3.displayName=wm;var Du="SelectItemText",Y3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=so(Du,n),u=lo(Du,n),d=G3(Du,n),h=nZ(Du,n),[v,m]=w.useState(null),g=Ue(t,E=>m(E),d.onItemTextChange,E=>{var N;return(N=u.itemTextRefCallback)==null?void 0:N.call(u,E,d.value,d.disabled)}),b=v==null?void 0:v.textContent,O=w.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:x}=h;return Wt(()=>(S(O),()=>x(O)),[S,x,O]),c.jsxs(c.Fragment,{children:[c.jsx(Ne.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Lf.createPortal(o.children,l.valueNode):null]})});Y3.displayName=Du;var W3="SelectItemIndicator",K3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return G3(W3,n).isSelected?c.jsx(Ne.span,{"aria-hidden":!0,...r,ref:t}):null});K3.displayName=W3;var pS="SelectScrollUpButton",X3=w.forwardRef((e,t)=>{const n=lo(pS,e.__scopeSelect),r=qO(pS,e.__scopeSelect),[i,o]=w.useState(!1),l=Ue(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?c.jsx(Z3,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});X3.displayName=pS;var vS="SelectScrollDownButton",Q3=w.forwardRef((e,t)=>{const n=lo(vS,e.__scopeSelect),r=qO(vS,e.__scopeSelect),[i,o]=w.useState(!1),l=Ue(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,v=Math.ceil(d.scrollTop)<h;o(v)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?c.jsx(Z3,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});Q3.displayName=vS;var Z3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=lo("SelectScrollButton",n),l=w.useRef(null),u=gv(n),d=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),Wt(()=>{var v;const h=u().find(m=>m.ref.current===document.activeElement);(v=h==null?void 0:h.ref.current)==null||v.scrollIntoView({block:"nearest"})},[u]),c.jsx(Ne.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ye(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ye(i.onPointerMove,()=>{var h;(h=o.onItemLeave)==null||h.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ye(i.onPointerLeave,()=>{d()})})}),pZ="SelectSeparator",vZ=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(Ne.div,{"aria-hidden":!0,...r,ref:t})});vZ.displayName=pZ;var gS="SelectArrow",gZ=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=yv(n),o=so(gS,n),l=lo(gS,n);return o.open&&l.position==="popper"?c.jsx(Gp,{...i,...r,ref:t}):null});gZ.displayName=gS;var yZ="SelectBubbleInput",J3=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),o=Ue(r,i),l=ov(t);return w.useEffect(()=>{const u=i.current;if(!u)return;const d=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&v){const m=new Event("change",{bubbles:!0});v.call(u,t),u.dispatchEvent(m)}},[l,t]),c.jsx(Ne.select,{...n,style:{...TI,...n.style},ref:o,defaultValue:t})});J3.displayName=yZ;function eL(e){return e===""||e===void 0}function tL(e){const t=Wr(e),n=w.useRef(""),r=w.useRef(0),i=w.useCallback(l=>{const u=n.current+l;t(u),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function nL(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=bZ(e,Math.max(o,0));i.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function bZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var xZ=M3,wZ=D3,SZ=k3,jZ=$3,OZ=I3,EZ=L3,_Z=U3,NZ=V3,AZ=Y3,CZ=K3,TZ=X3,MZ=Q3;function ma({...e}){return c.jsx(xZ,{"data-slot":"select",...e})}function pa({...e}){return c.jsx(SZ,{"data-slot":"select-value",...e})}function va({className:e,size:t="default",children:n,...r}){return c.jsxs(wZ,{className:me("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-size":t,"data-slot":"select-trigger",...r,children:[n,c.jsx(jZ,{asChild:!0,children:c.jsx(ro,{className:"size-4 opacity-50"})})]})}function ga({className:e,children:t,position:n="popper",align:r="center",...i}){return c.jsx(OZ,{children:c.jsxs(EZ,{align:r,className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",n==="popper"&&"data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1",e),"data-slot":"select-content",position:n,...i,children:[c.jsx(RZ,{}),c.jsx(_Z,{className:me("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(DZ,{})]})})}function Fe({className:e,children:t,...n}){return c.jsxs(NZ,{className:me("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),"data-slot":"select-item",...n,children:[c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(CZ,{children:c.jsx(ri,{className:"size-4"})})}),c.jsx(AZ,{children:t})]})}function RZ({className:e,...t}){return c.jsx(TZ,{className:me("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...t,children:c.jsx(ic,{className:"size-4"})})}function DZ({className:e,...t}){return c.jsx(MZ,{className:me("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...t,children:c.jsx(ro,{className:"size-4"})})}var rL=["PageUp","PageDown"],aL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iL={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},gc="Slider",[yS,PZ,kZ]=kp(gc),[oL]=jn(gc,[kZ]),[$Z,bv]=oL(gc),sL=w.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:l="horizontal",disabled:u=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[r],value:v,onValueChange:m=()=>{},onValueCommit:g=()=>{},inverted:b=!1,form:O,...S}=e,x=w.useRef(new Set),E=w.useRef(0),_=l==="horizontal"?IZ:LZ,[C=[],A]=Nn({prop:v,defaultProp:h,onChange:L=>{var W;(W=[...x.current][E.current])==null||W.focus(),m(L)}}),M=w.useRef(C);function R(L){const F=HZ(C,L);G(L,F)}function D(L){G(L,E.current)}function z(){const L=M.current[E.current];C[E.current]!==L&&g(C)}function G(L,F,{commit:W}={commit:!1}){const Q=YZ(o),X=WZ(Math.round((L-r)/o)*o+r,Q),k=xm(X,[r,i]);A((H=[])=>{const B=qZ(H,k,F);if(VZ(B,d*o)){E.current=B.indexOf(k);const Z=String(B)!==String(H);return Z&&W&&g(B),Z?B:H}else return H})}return c.jsx($Z,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:i,valueIndexToChangeRef:E,thumbs:x.current,values:C,orientation:l,form:O,children:c.jsx(yS.Provider,{scope:e.__scopeSlider,children:c.jsx(yS.Slot,{scope:e.__scopeSlider,children:c.jsx(_,{"aria-disabled":u,"data-disabled":u?"":void 0,...S,ref:t,onPointerDown:ye(S.onPointerDown,()=>{u||(M.current=C)}),min:r,max:i,inverted:b,onSlideStart:u?void 0:R,onSlideMove:u?void 0:D,onSlideEnd:u?void 0:z,onHomeKeyDown:()=>!u&&G(r,0,{commit:!0}),onEndKeyDown:()=>!u&&G(i,C.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:F})=>{if(!u){const X=rL.includes(L.key)||L.shiftKey&&aL.includes(L.key)?10:1,k=E.current,H=C[k],B=o*X*F;G(H+B,k,{commit:!0})}}})})})})});sL.displayName=gc;var[lL,cL]=oL(gc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),IZ=w.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:l,onSlideMove:u,onSlideEnd:d,onStepKeyDown:h,...v}=e,[m,g]=w.useState(null),b=Ue(t,_=>g(_)),O=w.useRef(void 0),S=lc(i),x=S==="ltr",E=x&&!o||!x&&o;function N(_){const C=O.current||m.getBoundingClientRect(),A=[0,C.width],R=UO(A,E?[n,r]:[r,n]);return O.current=C,R(_-C.left)}return c.jsx(lL,{scope:e.__scopeSlider,startEdge:E?"left":"right",endEdge:E?"right":"left",direction:E?1:-1,size:"width",children:c.jsx(uL,{dir:S,"data-orientation":"horizontal",...v,ref:b,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:_=>{const C=N(_.clientX);l==null||l(C)},onSlideMove:_=>{const C=N(_.clientX);u==null||u(C)},onSlideEnd:()=>{O.current=void 0,d==null||d()},onStepKeyDown:_=>{const A=iL[E?"from-left":"from-right"].includes(_.key);h==null||h({event:_,direction:A?-1:1})}})})}),LZ=w.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:l,onSlideEnd:u,onStepKeyDown:d,...h}=e,v=w.useRef(null),m=Ue(t,v),g=w.useRef(void 0),b=!i;function O(S){const x=g.current||v.current.getBoundingClientRect(),E=[0,x.height],_=UO(E,b?[r,n]:[n,r]);return g.current=x,_(S-x.top)}return c.jsx(lL,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:c.jsx(uL,{"data-orientation":"vertical",...h,ref:m,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const x=O(S.clientY);o==null||o(x)},onSlideMove:S=>{const x=O(S.clientY);l==null||l(x)},onSlideEnd:()=>{g.current=void 0,u==null||u()},onStepKeyDown:S=>{const E=iL[b?"from-bottom":"from-top"].includes(S.key);d==null||d({event:S,direction:E?-1:1})}})})}),uL=w.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:u,onStepKeyDown:d,...h}=e,v=bv(gc,n);return c.jsx(Ne.span,{...h,ref:t,onKeyDown:ye(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(u(m),m.preventDefault()):rL.concat(aL).includes(m.key)&&(d(m),m.preventDefault())}),onPointerDown:ye(e.onPointerDown,m=>{const g=m.target;g.setPointerCapture(m.pointerId),m.preventDefault(),v.thumbs.has(g)?g.focus():r(m)}),onPointerMove:ye(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:ye(e.onPointerUp,m=>{const g=m.target;g.hasPointerCapture(m.pointerId)&&(g.releasePointerCapture(m.pointerId),o(m))})})}),fL="SliderTrack",dL=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=bv(fL,n);return c.jsx(Ne.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});dL.displayName=fL;var bS="SliderRange",hL=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=bv(bS,n),o=cL(bS,n),l=w.useRef(null),u=Ue(t,l),d=i.values.length,h=i.values.map(g=>vL(g,i.min,i.max)),v=d>1?Math.min(...h):0,m=100-Math.max(...h);return c.jsx(Ne.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:u,style:{...e.style,[o.startEdge]:v+"%",[o.endEdge]:m+"%"}})});hL.displayName=bS;var xS="SliderThumb",mL=w.forwardRef((e,t)=>{const n=PZ(e.__scopeSlider),[r,i]=w.useState(null),o=Ue(t,u=>i(u)),l=w.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return c.jsx(zZ,{...e,ref:o,index:l})}),zZ=w.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,l=bv(xS,n),u=cL(xS,n),[d,h]=w.useState(null),v=Ue(t,N=>h(N)),m=d?l.form||!!d.closest("form"):!0,g=qp(d),b=l.values[r],O=b===void 0?0:vL(b,l.min,l.max),S=UZ(r,l.values.length),x=g==null?void 0:g[u.size],E=x?FZ(x,O,u.direction):0;return w.useEffect(()=>{if(d)return l.thumbs.add(d),()=>{l.thumbs.delete(d)}},[d,l.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${O}% + ${E}px)`},children:[c.jsx(yS.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(Ne.span,{role:"slider","aria-label":e["aria-label"]||S,"aria-valuemin":l.min,"aria-valuenow":b,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...o,ref:v,style:b===void 0?{display:"none"}:e.style,onFocus:ye(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),m&&c.jsx(pL,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:b},r)]})});mL.displayName=xS;var BZ="RadioBubbleInput",pL=w.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=w.useRef(null),o=Ue(i,r),l=ov(t);return w.useEffect(()=>{const u=i.current;if(!u)return;const d=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&v){const m=new Event("input",{bubbles:!0});v.call(u,t),u.dispatchEvent(m)}},[l,t]),c.jsx(Ne.input,{style:{display:"none"},...n,ref:o,defaultValue:t})});pL.displayName=BZ;function qZ(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function vL(e,t,n){const o=100/(n-t)*(e-t);return xm(o,[0,100])}function UZ(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function HZ(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function FZ(e,t,n){const r=e/2,o=UO([0,50],[0,r]);return(r-o(t)*n)*n}function GZ(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function VZ(e,t){if(t>0){const n=GZ(e);return Math.min(...n)>=t}return!0}function UO(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function YZ(e){return(String(e).split(".")[1]||"").length}function WZ(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var KZ=sL,XZ=dL,QZ=hL,ZZ=mL;function JZ({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const l=w.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return c.jsxs(KZ,{className:me("relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",e),"data-slot":"slider",defaultValue:t,max:i,min:r,value:n,...o,children:[c.jsx(XZ,{className:me("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5"),"data-slot":"slider-track",children:c.jsx(QZ,{className:me("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"),"data-slot":"slider-range"})}),Array.from({length:l.length},(u,d)=>c.jsx(ZZ,{className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50","data-slot":"slider-thumb"},`thumb-${l[d]}-${d}`))]})}var xv="Switch",[eJ]=jn(xv),[tJ,nJ]=eJ(xv),gL=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:l,disabled:u,value:d="on",onCheckedChange:h,form:v,...m}=e,[g,b]=w.useState(null),O=Ue(t,_=>b(_)),S=w.useRef(!1),x=g?v||!!g.closest("form"):!0,[E,N]=Nn({prop:i,defaultProp:o??!1,onChange:h,caller:xv});return c.jsxs(tJ,{scope:n,checked:E,disabled:u,children:[c.jsx(Ne.button,{type:"button",role:"switch","aria-checked":E,"aria-required":l,"data-state":wL(E),"data-disabled":u?"":void 0,disabled:u,value:d,...m,ref:O,onClick:ye(e.onClick,_=>{N(C=>!C),x&&(S.current=_.isPropagationStopped(),S.current||_.stopPropagation())})}),x&&c.jsx(xL,{control:g,bubbles:!S.current,name:r,value:d,checked:E,required:l,disabled:u,form:v,style:{transform:"translateX(-100%)"}})]})});gL.displayName=xv;var yL="SwitchThumb",bL=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=nJ(yL,n);return c.jsx(Ne.span,{"data-state":wL(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});bL.displayName=yL;var rJ="SwitchBubbleInput",xL=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const l=w.useRef(null),u=Ue(l,o),d=ov(n),h=qp(t);return w.useEffect(()=>{const v=l.current;if(!v)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"checked").set;if(d!==n&&b){const O=new Event("click",{bubbles:r});b.call(v,n),v.dispatchEvent(O)}},[d,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:u,style:{...i.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xL.displayName=rJ;function wL(e){return e?"checked":"unchecked"}var aJ=gL,iJ=bL;function oJ({className:e,...t}){return c.jsx(aJ,{className:me("peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),"data-slot":"switch",...t,children:c.jsx(iJ,{className:me("pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"),"data-slot":"switch-thumb"})})}async function nT(e){try{const t=document.createElement("canvas");return t.width=1,t.height=1,t.toDataURL(e).startsWith(`data:${e}`)}catch{return!1}}async function sJ(){const[e,t]=await Promise.all([nT("image/webp"),nT("image/avif")]);return{webp:e,avif:t,offscreenCanvas:typeof OffscreenCanvas<"u",webWorker:typeof Worker<"u",wasm:typeof WebAssembly<"u"}}let Ch=null;async function lJ(){return Ch||(Ch=await sJ(),Ch)}async function cJ(e){if(e.type!=="image/gif")return{isAnimated:!1,frameCount:1,size:e.size};try{const t=await e.arrayBuffer(),n=new Uint8Array(t);let r=0;for(let i=0;i<n.length-2;i++)n[i]===33&&n[i+1]===249&&r++;return{isAnimated:r>1,frameCount:Math.max(1,r),size:e.size}}catch{return{isAnimated:!1,frameCount:1,size:e.size}}}function uJ(e){return e.type==="image/gif"}function fJ(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("Failed to read blob")),r.readAsDataURL(e)})}function SL(e){return fJ(e)}function Th(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**r).toFixed(1))} ${n[r]}`}function dJ(e){return new Promise((t,n)=>{const r=new Image,i=URL.createObjectURL(e);r.onload=()=>{URL.revokeObjectURL(i),t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=()=>{URL.revokeObjectURL(i),n(new Error("Failed to load image"))},r.src=i})}class hJ{constructor(){fb(this,"worker",null);fb(this,"pending",new Map)}getWorker(){return this.worker||(this.worker=new Worker(new URL("/assets/optimizer.worker-CeufIUo5.js",import.meta.url),{type:"module"}),this.worker.onmessage=this.handleMessage.bind(this),this.worker.onerror=this.handleError.bind(this)),this.worker}handleMessage(t){const{id:n,result:r,error:i,progress:o}=t.data,l=this.pending.get(n);if(l){if(o!==void 0&&o<100&&l.onProgress){l.onProgress(o);return}if(i){l.reject(new Error(i)),this.pending.delete(n);return}r&&(l.resolve(r),this.pending.delete(n))}}handleError(t){console.error("Image optimizer worker error:",t);for(const[n,r]of this.pending)r.reject(new Error(`Worker error: ${t.message}`)),this.pending.delete(n);this.terminate()}generateId(){return crypto.randomUUID()}async optimize(t,n,r){const i=this.generateId();return new Promise((o,l)=>{this.pending.set(i,{resolve:o,reject:l,onProgress:r}),this.getWorker().postMessage({id:i,type:"optimize",file:t,options:n})})}async preview(t,n,r){const i=await SL(t);return{...await this.optimize(t,n,r),originalDataUrl:i}}cancelAll(){for(const[t,n]of this.pending)n.reject(new Error("Operation cancelled")),this.pending.delete(t)}terminate(){this.cancelAll(),this.worker&&(this.worker.terminate(),this.worker=null)}get isActive(){return this.worker!==null}get pendingCount(){return this.pending.size}}const mJ=new hJ;async function pJ(e,t,n){return mJ.preview(e,t,n)}const vJ=[{value:"webp",label:"WebP",description:"Best balance of size and quality"},{value:"avif",label:"AVIF",description:"Best compression"},{value:"jpeg",label:"JPEG",description:"Universal compatibility"},{value:"png",label:"PNG",description:"Lossless, supports transparency"},{value:"original",label:"Original",description:"Keep original format"}],gJ=[{value:1,label:"1x",description:"Standard displays"},{value:2,label:"2x",description:"Retina / HiDPI (recommended)"},{value:3,label:"3x",description:"iPhone Pro / flagship phones"}];function wS(e){const t=e/1024,n=t/1024;return n>2?{level:"error",message:"This image will cause delivery issues (>2MB)",suggestion:"Reduce dimensions or increase compression to under 1MB"}:n>1?{level:"warning",message:"Most email clients struggle with images >1MB",suggestion:"Consider reducing to under 500KB for best deliverability"}:t>500?{level:"info",message:"Larger than recommended for email (>500KB)",suggestion:"This may slow load times on mobile devices"}:null}function qb(e){const t=wS(e);if(!t)return{label:"Good",color:"text-green-600"};switch(t.level){case"info":return{label:"OK",color:"text-yellow-600"};case"warning":return{label:"Large",color:"text-orange-600"};case"error":return{label:"Too Large",color:"text-red-600"};default:return{label:"Unknown",color:"text-muted-foreground"}}}const yJ=[{value:"none",label:"Original size",description:"Keep original dimensions"},{value:"600",label:"Email (600px)",description:"Standard email width"},{value:"800",label:"Medium (800px)",description:"Blog posts, cards"},{value:"1200",label:"Large (1200px)",description:"Full-width content"},{value:"1440",label:"Hero (1440px)",description:"Banner images"},{value:"1920",label:"Full HD (1920px)",description:"Desktop screens"}];function bJ({files:e,onComplete:t,onClose:n,open:r}){var q;const[i,o]=w.useState([]),[l,u]=w.useState(null),[d,h]=w.useState(!1),v=i.reduce((U,ne)=>U+ne.file.size,0),m=i.reduce((U,ne)=>{var fe;return U+(((fe=ne.preview)==null?void 0:fe.optimizedSize)??ne.file.size)},0),g=v>0?Math.round((1-m/v)*100):0,b=i.length>0&&i.every(U=>U.status==="ready"||U.status==="done"||U.isAnimatedGif),O=i.some(U=>U.status==="pending"&&!U.isAnimatedGif),S=i.some(U=>U.status==="processing"),[x,E]=w.useState(!0),[N,_]=w.useState(!1),[C,A]=w.useState({format:"webp",quality:85}),[M,R]=w.useState(85),[D,z]=w.useState("none"),[G,L]=w.useState(2),[F,W]=w.useState(!0);w.useEffect(()=>{lJ().then(U=>{W(U.wasm&&U.webWorker&&U.offscreenCanvas)})},[]),w.useEffect(()=>{var ne;if(!r||e.length===0)return;const U=e.map((fe,ie)=>({id:`${fe.name}-${ie}-${Date.now()}`,file:fe,status:"pending"}));o(U),u(((ne=U[0])==null?void 0:ne.id)??null),_(!1),h(!1);for(const fe of U)SL(fe.file).then(ie=>{o(pe=>pe.map(re=>re.id===fe.id?{...re,thumbnailUrl:ie}:re))}),uJ(fe.file)&&cJ(fe.file).then(ie=>{ie.isAnimated&&o(pe=>pe.map(re=>re.id===fe.id?{...re,isAnimatedGif:!0,status:"ready"}:re))})},[r,e]);const Q=w.useCallback(async()=>{const U=i.filter(ne=>ne.status==="pending"&&!ne.isAnimatedGif);if(U.length===0){h(!1);return}for(const ne of U){o(fe=>fe.map(ie=>ie.id===ne.id?{...ie,status:"processing"}:ie));try{let fe;if(D==="none"){if(G>1){const re=await dJ(ne.file);fe=Math.round(re.width/G)}}else fe=Number(D)*G;const ie={...C,maxWidth:fe},pe=await pJ(ne.file,ie);o(re=>re.map(ve=>ve.id===ne.id?{...ve,status:"ready",preview:pe}:ve))}catch{o(fe=>fe.map(ie=>ie.id===ne.id?{...ie,status:"ready"}:ie))}}h(!1)},[i,C,D,G]),X=`${C.format}-${C.quality}-${D}-${G}`,k=w.useRef(X);w.useEffect(()=>{k.current!==X&&(k.current=X,o(U=>U.map(ne=>ne.isAnimatedGif?ne:{...ne,status:"pending",preview:void 0})),h(!1))},[X]);const H=U=>{const ne=U.name.replace(/\.[^/.]+$/,""),fe=C.format==="original"?U.name.split(".").pop():C.format;return`${ne}.${fe}`},B=()=>{h(!0),Q()},Z=()=>{const U=i.map(ne=>!x||ne.isAnimatedGif||!ne.preview?{file:ne.file,cdnFilename:ne.file.name}:{file:ne.preview.blob,cdnFilename:H(ne.file)});t(U),n()},le=()=>{const U=i.map(ne=>({file:ne.file,cdnFilename:ne.file.name}));t(U),n()};if(!r)return null;const $=i.length===1,Y=$?i[0]:null;return c.jsx(RO,{onOpenChange:U=>!U&&n(),open:r,children:c.jsxs(DO,{className:"max-w-lg",children:[c.jsx(n3,{children:c.jsx(a3,{className:"flex items-center gap-2",children:$?c.jsxs(c.Fragment,{children:[c.jsx(Sb,{className:"h-5 w-5 text-muted-foreground"}),c.jsx("span",{className:"truncate",children:Y==null?void 0:Y.file.name})]}):c.jsxs(c.Fragment,{children:[c.jsx(Sb,{className:"h-5 w-5 text-muted-foreground"}),i.length," images selected"]})})}),c.jsxs("div",{className:"space-y-4",children:[!$&&c.jsxs("div",{className:"grid grid-cols-6 gap-2",children:[i.slice(0,11).map(U=>c.jsxs(tv,{children:[c.jsx(nv,{asChild:!0,children:c.jsxs("div",{className:`relative aspect-square overflow-hidden rounded-md border bg-muted ${U.id===l?"ring-2 ring-primary":""}`,children:[U.thumbnailUrl?c.jsx("img",{alt:U.file.name,className:"h-full w-full object-cover",src:U.thumbnailUrl}):c.jsx("div",{className:"flex h-full items-center justify-center",children:c.jsx(Sb,{className:"h-4 w-4 text-muted-foreground"})}),U.status==="processing"&&c.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:c.jsx(Va,{className:"h-3 w-3 animate-spin"})}),U.status==="ready"&&U.preview&&c.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-green-500/20",children:c.jsx(ri,{className:"h-4 w-4 text-green-600"})}),U.isAnimatedGif&&c.jsx(qe,{className:"absolute right-0.5 bottom-0.5 h-4 px-1 text-[10px]",children:"GIF"})]})}),c.jsxs(rv,{side:"bottom",children:[c.jsx("p",{className:"font-medium text-xs",children:U.file.name}),c.jsxs("p",{className:"text-muted-foreground text-xs",children:[Th(U.file.size),U.preview&&` → ${Th(U.preview.optimizedSize)}`]})]})]},U.id)),i.length>11&&c.jsxs("div",{className:"flex aspect-square items-center justify-center rounded-md border bg-muted text-muted-foreground text-xs",children:["+",i.length-11]})]}),$&&Y&&c.jsxs("div",{className:"relative aspect-video overflow-hidden rounded-lg border bg-muted",children:[Y.thumbnailUrl?c.jsx("img",{alt:Y.file.name,className:"h-full w-full object-contain",src:Y.thumbnailUrl}):c.jsx("div",{className:"flex h-full items-center justify-center",children:c.jsx(Va,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),Y.status==="processing"&&c.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:c.jsx(Va,{className:"h-6 w-6 animate-spin"})}),Y.status==="ready"&&Y.preview&&c.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-green-500/10",children:c.jsx(ri,{className:"h-8 w-8 text-green-600"})})]}),c.jsxs("div",{className:"rounded-lg border bg-muted/30 p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"text-muted-foreground text-sm",children:[c.jsx("span",{className:qb(v).color,children:Th(v)}),x&&b&&g>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mx-2",children:"→"}),c.jsx("span",{className:`font-medium ${qb(m).color}`,children:Th(m)})]})]}),S&&c.jsx("p",{className:"text-muted-foreground text-xs",children:"Optimizing..."}),!S&&wS(b?m:v)&&c.jsx("p",{className:`text-xs ${qb(b?m:v).color}`,children:(q=wS(b?m:v))==null?void 0:q.suggestion})]}),x&&b&&g>0&&c.jsxs(qe,{className:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300",variant:"secondary",children:[c.jsx(kF,{className:"mr-1 h-3 w-3"}),"Save ",g,"%"]})]}),S&&c.jsx(pv,{className:"mt-3 h-1",value:i.filter(U=>U.status==="ready"||U.isAnimatedGif).length/i.length*100})]}),F&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(qo,{className:"cursor-pointer",htmlFor:"optimize-toggle",children:"Optimize before uploading"}),c.jsx(oJ,{checked:x,id:"optimize-toggle",onCheckedChange:E})]}),x&&F&&c.jsxs(fs,{onOpenChange:_,open:N,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"w-full justify-start text-muted-foreground",size:"sm",variant:"ghost",children:[N?c.jsx(ro,{className:"mr-2 h-4 w-4"}):c.jsx(jF,{className:"mr-2 h-4 w-4"}),"Options"]})}),c.jsxs(hs,{className:"space-y-4 pt-2",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(qo,{className:"text-muted-foreground text-xs",children:"Format"}),c.jsxs(ma,{onValueChange:U=>A({...C,format:U}),value:C.format||"webp",children:[c.jsx(va,{className:"h-9",children:c.jsx(pa,{})}),c.jsx(ga,{children:vJ.map(U=>c.jsx(Fe,{value:U.value,children:U.label},U.value))})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(qo,{className:"text-muted-foreground text-xs",children:"Quality"}),c.jsxs("span",{className:"text-muted-foreground text-xs",children:[M,"%"]})]}),c.jsx(JZ,{className:"mt-2",max:100,min:50,onValueChange:([U])=>R(U),onValueCommit:([U])=>A({...C,quality:U}),step:5,value:[M]})]})]}),c.jsxs("div",{className:"space-y-3 rounded-lg border bg-muted/20 p-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(qo,{className:"font-medium text-xs",children:"Resize Image"}),c.jsx("span",{className:"text-muted-foreground text-xs",children:"Maintains aspect ratio"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(qo,{className:"text-muted-foreground text-xs",children:"Max Width"}),c.jsxs(ma,{onValueChange:z,value:D,children:[c.jsx(va,{className:"h-9",children:c.jsx(pa,{})}),c.jsx(ga,{children:yJ.map(U=>c.jsx(Fe,{value:U.value,children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{children:U.label}),c.jsx("span",{className:"text-muted-foreground text-xs",children:U.description})]})},U.value))})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(qo,{className:"text-muted-foreground text-xs",children:"Pixel Density"}),c.jsxs(ma,{onValueChange:U=>L(Number(U)),value:String(G),children:[c.jsx(va,{className:"h-9",children:c.jsx(pa,{})}),c.jsx(ga,{children:gJ.map(U=>c.jsx(Fe,{value:String(U.value),children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{children:U.label}),c.jsx("span",{className:"text-muted-foreground text-xs",children:U.description})]})},U.value))})]})]})]}),c.jsx("p",{className:"text-muted-foreground text-xs",children:D==="none"?G===1?"Original dimensions preserved":`Scales to 1/${G} original size`:`Output: ${Number(D)*G}px actual width`})]})]})]})]}),c.jsxs(r3,{className:"gap-2 sm:gap-0",children:[c.jsx(Ce,{onClick:n,variant:"ghost",children:"Cancel"}),x&&F?c.jsxs(c.Fragment,{children:[c.jsx(Ce,{onClick:le,variant:"outline",children:"Upload originals"}),b?c.jsxs(Ce,{onClick:Z,children:[c.jsx(Yu,{className:"mr-2 h-4 w-4"}),"Upload",g>0&&` (save ${g}%)`]}):c.jsxs(Ce,{disabled:d||!O,onClick:B,children:[d?c.jsx(Va,{className:"mr-2 h-4 w-4 animate-spin"}):c.jsx(BF,{className:"mr-2 h-4 w-4"}),d?"Optimizing...":"Optimize"]})]}):c.jsxs(Ce,{onClick:le,children:[c.jsx(Yu,{className:"mr-2 h-4 w-4"}),"Upload"]})]})]})})}const xJ=mc("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[1rem_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Un({className:e,variant:t,...n}){return c.jsx("div",{className:me(xJ({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function to({className:e,...t}){return c.jsx("div",{className:me("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),"data-slot":"alert-title",...t})}function Hn({className:e,...t}){return c.jsx("div",{className:me("col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed",e),"data-slot":"alert-description",...t})}var jL="AlertDialog",[wJ]=jn(jL,[mI]),di=mI(),OL=e=>{const{__scopeAlertDialog:t,...n}=e,r=di(t);return c.jsx(OO,{...r,...n,modal:!0})};OL.displayName=jL;var SJ="AlertDialogTrigger",jJ=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=di(n);return c.jsx(bW,{...i,...r,ref:t})});jJ.displayName=SJ;var OJ="AlertDialogPortal",EL=e=>{const{__scopeAlertDialog:t,...n}=e,r=di(t);return c.jsx(EO,{...r,...n})};EL.displayName=OJ;var EJ="AlertDialogOverlay",_L=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=di(n);return c.jsx(_O,{...i,...r,ref:t})});_L.displayName=EJ;var jl="AlertDialogContent",[_J,NJ]=wJ(jl),AJ=U$("AlertDialogContent"),NL=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=di(n),l=w.useRef(null),u=Ue(t,l),d=w.useRef(null);return c.jsx(pW,{contentName:jl,titleName:AL,docsSlug:"alert-dialog",children:c.jsx(_J,{scope:n,cancelRef:d,children:c.jsxs(NO,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:ye(i.onOpenAutoFocus,h=>{var v;h.preventDefault(),(v=d.current)==null||v.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[c.jsx(AJ,{children:r}),c.jsx(TJ,{contentRef:l})]})})})});NL.displayName=jl;var AL="AlertDialogTitle",CL=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=di(n);return c.jsx(AO,{...i,...r,ref:t})});CL.displayName=AL;var TL="AlertDialogDescription",ML=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=di(n);return c.jsx(CO,{...i,...r,ref:t})});ML.displayName=TL;var CJ="AlertDialogAction",RL=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=di(n);return c.jsx(Zp,{...i,...r,ref:t})});RL.displayName=CJ;var DL="AlertDialogCancel",PL=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=NJ(DL,n),o=di(n),l=Ue(t,i);return c.jsx(Zp,{...o,...r,ref:l})});PL.displayName=DL;var TJ=({contentRef:e})=>{const t=`\`${jl}\` requires a description for the component to be accessible for screen reader users.
|
|
423
|
+
|
|
424
|
+
You can add a description to the \`${jl}\` by passing a \`${TL}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
425
|
+
|
|
426
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${jl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
427
|
+
|
|
428
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},MJ=OL,RJ=EL,DJ=_L,PJ=NL,kJ=RL,$J=PL,IJ=CL,LJ=ML;function Sm({...e}){return c.jsx(MJ,{"data-slot":"alert-dialog",...e})}function zJ({...e}){return c.jsx(RJ,{"data-slot":"alert-dialog-portal",...e})}function BJ({className:e,...t}){return c.jsx(DJ,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-slot":"alert-dialog-overlay",...t})}function jm({className:e,...t}){return c.jsxs(zJ,{children:[c.jsx(BJ,{}),c.jsx(PJ,{className:me("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",e),"data-slot":"alert-dialog-content",...t})]})}function Om({className:e,...t}){return c.jsx("div",{className:me("flex flex-col gap-2 text-center sm:text-left",e),"data-slot":"alert-dialog-header",...t})}function Em({className:e,...t}){return c.jsx("div",{className:me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),"data-slot":"alert-dialog-footer",...t})}function _m({className:e,...t}){return c.jsx(IJ,{className:me("font-semibold text-lg",e),"data-slot":"alert-dialog-title",...t})}function Nm({className:e,...t}){return c.jsx(LJ,{className:me("text-muted-foreground text-sm",e),"data-slot":"alert-dialog-description",...t})}function Am({className:e,...t}){return c.jsx(kJ,{className:me(xO(),e),...t})}function Cm({className:e,...t}){return c.jsx($J,{className:me(xO({variant:"outline"}),e),...t})}var kL="Toggle",$L=w.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[l,u]=Nn({prop:n,onChange:i,defaultProp:r??!1,caller:kL});return c.jsx(Ne.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:ye(e.onClick,()=>{e.disabled||u(!l)})})});$L.displayName=kL;var co="ToggleGroup",[IL]=jn(co,[hc]),LL=hc(),HO=I.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return c.jsx(qJ,{...i,ref:t})}if(n==="multiple"){const i=r;return c.jsx(UJ,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${co}\``)});HO.displayName=co;var[zL,BL]=IL(co),qJ=I.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[l,u]=Nn({prop:n,defaultProp:r??"",onChange:i,caller:co});return c.jsx(zL,{scope:e.__scopeToggleGroup,type:"single",value:I.useMemo(()=>l?[l]:[],[l]),onItemActivate:u,onItemDeactivate:I.useCallback(()=>u(""),[u]),children:c.jsx(qL,{...o,ref:t})})}),UJ=I.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[l,u]=Nn({prop:n,defaultProp:r??[],onChange:i,caller:co}),d=I.useCallback(v=>u((m=[])=>[...m,v]),[u]),h=I.useCallback(v=>u((m=[])=>m.filter(g=>g!==v)),[u]);return c.jsx(zL,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:d,onItemDeactivate:h,children:c.jsx(qL,{...o,ref:t})})});HO.displayName=co;var[HJ,FJ]=IL(co),qL=I.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:l,loop:u=!0,...d}=e,h=LL(n),v=lc(l),m={role:"group",dir:v,...d};return c.jsx(HJ,{scope:n,rovingFocus:i,disabled:r,children:i?c.jsx(uO,{asChild:!0,...h,orientation:o,dir:v,loop:u,children:c.jsx(Ne.div,{...m,ref:t})}):c.jsx(Ne.div,{...m,ref:t})})}),Tm="ToggleGroupItem",UL=I.forwardRef((e,t)=>{const n=BL(Tm,e.__scopeToggleGroup),r=FJ(Tm,e.__scopeToggleGroup),i=LL(e.__scopeToggleGroup),o=n.value.includes(e.value),l=r.disabled||e.disabled,u={...e,pressed:o,disabled:l},d=I.useRef(null);return r.rovingFocus?c.jsx(fO,{asChild:!0,...i,focusable:!l,active:o,ref:d,children:c.jsx(rT,{...u,ref:t})}):c.jsx(rT,{...u,ref:t})});UL.displayName=Tm;var rT=I.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=BL(Tm,n),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=o.type==="single"?l:void 0;return c.jsx($L,{...u,...i,ref:t,onPressedChange:d=>{d?o.onItemActivate(r):o.onItemDeactivate(r)}})}),GJ=HO,VJ=UL;const YJ=mc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-[color,box-shadow] hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}}),HL=w.createContext({size:"default",variant:"default",spacing:0});function WJ({className:e,variant:t,size:n,spacing:r=0,children:i,...o}){return c.jsx(GJ,{className:me("group/toggle-group flex w-fit items-center gap-[var(--gap)] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",e),"data-size":n,"data-slot":"toggle-group","data-spacing":r,"data-variant":t,style:{"--gap":r},...o,children:c.jsx(HL.Provider,{value:{variant:t,size:n,spacing:r},children:i})})}function aT({className:e,children:t,variant:n,size:r,...i}){const o=w.useContext(HL);return c.jsx(VJ,{className:me(YJ({variant:o.variant||n,size:o.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:first:border-l data-[spacing=0]:first:rounded-l-md",e),"data-size":o.size||r,"data-slot":"toggle-group-item","data-spacing":o.spacing,"data-variant":o.variant||n,...i,children:t})}function KJ(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function XJ({url:e}){const[t,n]=w.useState(!1),r=async()=>{await navigator.clipboard.writeText(e),n(!0),Ot.success("URL copied to clipboard"),setTimeout(()=>n(!1),2e3)};return c.jsx(Ce,{onClick:r,size:"sm",variant:"outline",children:t?c.jsx(ri,{className:"h-3 w-3 text-green-500"}):c.jsx("span",{className:"text-xs",children:"Copy"})})}function QJ(){return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx(Re,{className:"mb-2 h-8 w-36"}),c.jsx(Re,{className:"h-4 w-48"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Re,{className:"h-9 w-9"}),c.jsx(Re,{className:"h-9 w-24"})]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Re,{className:"h-9 min-w-[200px] flex-1"}),c.jsx(Re,{className:"h-9 w-40"}),c.jsx(Re,{className:"h-9 w-20"})]}),c.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6",children:[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>c.jsxs("div",{className:"overflow-hidden rounded-xl bg-muted shadow-sm",children:[c.jsx(Re,{className:"aspect-square w-full"}),c.jsxs("div",{className:"space-y-2 p-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Re,{className:"h-4 w-4"}),c.jsx(Re,{className:"h-4 flex-1"})]}),c.jsxs("div",{className:"flex items-center gap-2 pl-6",children:[c.jsx(Re,{className:"h-4 w-10"}),c.jsx(Re,{className:"h-4 w-12"})]})]})]},e))})]})}function ZJ(){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[c.jsx(zf,{className:"mb-4 h-16 w-16 text-muted-foreground opacity-50"}),c.jsx("h2",{className:"mb-2 font-semibold text-xl",children:"No Storage Configured"}),c.jsxs("p",{className:"mb-6 max-w-md text-center text-muted-foreground",children:["Storage infrastructure has not been deployed yet. Run"," ",c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:"wraps storage init"})," ","to get started."]})]})}function JJ({onUploadClick:e}){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[c.jsx(m$,{className:"mb-4 h-16 w-16 text-muted-foreground opacity-50"}),c.jsx("h3",{className:"mb-2 font-semibold text-lg",children:"No Files Yet"}),c.jsx("p",{className:"mb-6 max-w-md text-center text-muted-foreground",children:"Upload your first file to get started with your CDN library"}),c.jsxs(Ce,{onClick:e,children:[c.jsx(Yu,{className:"mr-2 h-4 w-4"}),"Upload Files"]})]})}function eee({upload:e,onRemove:t}){return c.jsx("div",{className:"flex items-center gap-3 rounded-lg border bg-muted/30 p-3",children:c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsx("span",{className:"truncate font-medium text-sm",children:e.filename}),c.jsxs("div",{className:"flex items-center gap-2",children:[e.status==="uploading"&&c.jsx(Va,{className:"h-4 w-4 animate-spin text-primary"}),e.status==="success"&&c.jsx(ao,{className:"h-4 w-4 text-green-500"}),e.status==="error"&&c.jsx(cr,{className:"h-4 w-4 text-red-500"}),c.jsx(Ce,{className:"h-6 w-6",onClick:t,size:"icon",variant:"ghost",children:c.jsx(or,{className:"h-3 w-3"})})]})]}),e.status==="uploading"&&c.jsx(pv,{className:"h-1",value:e.progress}),e.status==="success"&&e.cdnUrl&&c.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[c.jsx("span",{className:"truncate text-muted-foreground text-xs",children:e.cdnUrl}),c.jsx(XJ,{url:e.cdnUrl})]}),e.status==="error"&&c.jsx("span",{className:"text-red-500 text-xs",children:e.error})]})})}function tee({uploads:e,onFilesSelected:t,onRemoveUpload:n}){const[r,i]=w.useState(!1),o=w.useRef(null),l=v=>{v.preventDefault(),i(!0)},u=v=>{v.preventDefault(),i(!1)},d=v=>{v.preventDefault(),i(!1),v.dataTransfer.files.length>0&&t(v.dataTransfer.files)},h=v=>{v.target.files&&v.target.files.length>0&&t(v.target.files)};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Upload Files"}),c.jsx(We,{children:"Drag and drop files or click to browse"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:`cursor-pointer rounded-lg border-2 border-dashed p-8 text-center transition-colors ${r?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-primary/50"}`,onClick:()=>{var v;return(v=o.current)==null?void 0:v.click()},onDragLeave:u,onDragOver:l,onDrop:d,children:[c.jsx(Yu,{className:"mx-auto mb-4 h-10 w-10 text-muted-foreground"}),c.jsx("p",{className:"mb-1 font-medium text-sm",children:"Drop files here or click to upload"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Images will be optimized before uploading"}),c.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:h,ref:o,type:"file"})]}),e.length>0&&c.jsx("div",{className:"space-y-2",children:e.map((v,m)=>c.jsx(eee,{onRemove:()=>n(m),upload:v},`${v.filename}-${m}`))})]})]})}function nee(){const[e,t]=w.useState(null),[n,r]=w.useState(!0),[i,o]=w.useState(null),[l,u]=w.useState(()=>{if(typeof window<"u"){const q=localStorage.getItem("cdn-library-view-mode");if(q==="grid"||q==="table")return q}return"grid"}),d=w.useCallback(q=>{u(q),localStorage.setItem("cdn-library-view-mode",q)},[]),[h,v]=w.useState(""),[m,g]=w.useState({starred:!1,formats:[]}),[b,O]=w.useState([]),[S,x]=w.useState(null),[E,N]=w.useState(!1),[_,C]=w.useState([]),[A,M]=w.useState({keys:[],isOpen:!1}),[R,D]=w.useState([]),[z,G]=w.useState(!1),L=w.useCallback(async()=>{try{r(!0),o(null);const q=sessionStorage.getItem("wraps-auth-token"),U=await fetch(`/api/cdn/files?token=${q}`);if(!U.ok){if(U.status===404){t(null);return}throw new Error("Failed to fetch storage files")}const ne=await U.json();t(ne)}catch(q){o(q instanceof Error?q.message:"An error occurred")}finally{r(!1)}},[]);w.useEffect(()=>{L()},[L]);const F=w.useCallback(async(q,U)=>{const ne=sessionStorage.getItem("wraps-auth-token");try{if(!(await fetch(`/api/cdn/files/${encodeURIComponent(q)}/star?token=${ne}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({starred:U})})).ok)throw new Error("Failed to update star status");t(ie=>ie&&{...ie,files:ie.files.map(pe=>pe.key===q?{...pe,starred:U}:pe)}),(S==null?void 0:S.key)===q&&x(ie=>ie?{...ie,starred:U}:null),Ot.success(U?"File starred":"Star removed")}catch{Ot.error("Failed to update star status")}},[S]),W=w.useCallback(async q=>{const U=sessionStorage.getItem("wraps-auth-token");try{await Promise.all(q.map(ne=>fetch(`/api/cdn/files/${encodeURIComponent(ne)}?token=${U}`,{method:"DELETE"}))),Ot.success(q.length===1?"File deleted":`${q.length} files deleted`),O([]),x(null),L()}catch{Ot.error("Failed to delete file(s)")}},[L]),Q=w.useCallback(async(q,U,ne)=>{const fe=sessionStorage.getItem("wraps-auth-token"),ie=q instanceof File,pe=ne||(ie?q.name:"file"),re=q.type||"application/octet-stream";try{C(ke=>ke.map((we,ze)=>ze===U?{...we,status:"uploading",progress:0}:we));const ve=await fetch(`/api/cdn/upload-url?token=${fe}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:pe,contentType:re})});if(!ve.ok)throw new Error("Failed to get upload URL");const{uploadUrl:ge,cdnUrl:oe}=await ve.json();await new Promise((ke,we)=>{const ze=new XMLHttpRequest;ze.upload.addEventListener("progress",Ze=>{if(Ze.lengthComputable){const lt=Math.round(Ze.loaded/Ze.total*100);C(tn=>tn.map((pt,dr)=>dr===U?{...pt,progress:lt}:pt))}}),ze.addEventListener("load",()=>{ze.status>=200&&ze.status<300?ke():we(new Error(`Upload failed with status ${ze.status}`))}),ze.addEventListener("error",()=>we(new Error("Upload failed"))),ze.open("PUT",ge),ze.setRequestHeader("Content-Type",re),ze.send(q)}),C(ke=>ke.map((we,ze)=>ze===U?{...we,status:"success",progress:100,cdnUrl:oe}:we)),Ot.success(`Uploaded ${pe}`),L()}catch(ve){C(ge=>ge.map((oe,ke)=>ke===U?{...oe,status:"error",error:ve instanceof Error?ve.message:"Upload failed"}:oe)),Ot.error(`Failed to upload ${pe}`)}},[L]),X=w.useCallback(q=>{const U=Array.from(q),ne=U.filter(ie=>ie.type.startsWith("image/")),fe=U.filter(ie=>!ie.type.startsWith("image/"));if(fe.length>0){const ie=fe.map(re=>({file:re,filename:re.name,progress:0,status:"pending"}));C(re=>[...re,...ie]),N(!0);const pe=_.length;fe.forEach((re,ve)=>{Q(re,pe+ve,re.name)})}ne.length>0&&(D(ne),G(!0))},[_.length,Q]),k=w.useCallback(q=>{if(!q||q.length===0)return;const U=_.length,ne=q.map(fe=>({file:fe.file,filename:fe.cdnFilename,progress:0,status:"pending"}));C(fe=>[...fe,...ne]),N(!0),q.forEach((fe,ie)=>{Q(fe.file,U+ie,fe.cdnFilename)})},[_.length,Q]),H=w.useMemo(()=>e!=null&&e.files?e.files.filter(q=>{var U;if(h&&!q.key.toLowerCase().includes(h.toLowerCase())||m.starred&&!q.starred)return!1;if(m.formats.length>0){const ne=((U=q.key.split(".").pop())==null?void 0:U.toLowerCase())||"";if(!m.formats.includes(ne))return!1}return!0}):[],[e==null?void 0:e.files,h,m]),B=w.useCallback(q=>{O(U=>U.includes(q)?U.filter(ne=>ne!==q):[...U,q])},[]),Z=w.useCallback(()=>{if(!(e!=null&&e.files))return;const q=H.map(U=>U.key);b.length===q.length?O([]):O(q)},[e==null?void 0:e.files,b.length,H]),le=w.useCallback(async()=>{await Promise.all(b.map(q=>F(q,!0))),O([])},[b,F]),$=w.useCallback(()=>{M({keys:b,isOpen:!0})},[b]),Y=w.useMemo(()=>{if(!(e!=null&&e.files))return[];const q=new Set;return e.files.forEach(U=>{var fe;const ne=(fe=U.key.split(".").pop())==null?void 0:fe.toLowerCase();ne&&q.add(ne)}),Array.from(q).sort()},[e==null?void 0:e.files]);return n?c.jsx(QJ,{}):i?c.jsxs(Un,{variant:"destructive",children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Error"}),c.jsx(Hn,{children:i})]}):e?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-bold text-2xl",children:"CDN Library"}),c.jsx("p",{className:"text-muted-foreground",children:e.fileCount>0?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-foreground",children:e.fileCount})," File",e.fileCount!==1?"s":""," · Total"," ",c.jsx("span",{className:"text-foreground",children:KJ(e.totalSize)})]}):"Manage and organize your files"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ce,{onClick:L,size:"icon",variant:"outline",children:c.jsx(Bf,{className:"h-4 w-4"})}),c.jsxs(Ce,{onClick:()=>N(!E),children:[c.jsx(Yu,{className:"mr-2 h-4 w-4"}),"Upload"]})]})]}),E&&c.jsx(tee,{onFilesSelected:X,onRemoveUpload:q=>C(U=>U.filter((ne,fe)=>fe!==q)),uploads:_}),e.files.length>0&&c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[b.length>0&&c.jsxs("div",{className:"flex items-center rounded-lg border",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-r px-2.5 py-1.5 font-medium text-sm",children:[b.length," selected"]}),c.jsx(iv,{className:"rounded-none border-0",label:"Star",onToggle:le,size:"sm"}),c.jsx(XI,{className:"rounded-none border-0 border-l",label:"Delete",onDelete:$,size:"sm",variant:"ghost"}),c.jsx(Ce,{className:"rounded-l-none border-0 border-l",onClick:()=>O([]),size:"sm",variant:"ghost",children:c.jsx(or,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"relative min-w-[200px] flex-1",children:[c.jsx(Pp,{className:"-translate-y-1/2 absolute top-1/2 left-3 h-4 w-4 text-muted-foreground"}),c.jsx(oo,{className:"pl-9",onChange:q=>v(q.target.value),placeholder:"Search files...",type:"search",value:h})]}),c.jsxs("div",{className:"flex items-center rounded-lg border",children:[c.jsxs(Ce,{className:"rounded-r-none border-0",onClick:()=>g({...m,starred:!m.starred}),size:"sm",variant:m.starred?"secondary":"ghost",children:[c.jsx(y$,{className:`mr-1.5 h-4 w-4 ${m.starred?"fill-current":""}`}),"Starred"]}),Y.length>0&&c.jsxs(lI,{children:[c.jsx(cI,{asChild:!0,children:c.jsxs(Ce,{className:"rounded-l-none border-0 border-l",size:"sm",variant:"ghost",children:[c.jsx(AF,{className:"mr-1.5 h-4 w-4"}),"Formats",m.formats.length>0&&c.jsx(qe,{className:"ml-1.5 px-1.5 py-0 text-xs",variant:"secondary",children:m.formats.length})]})}),c.jsxs(uI,{align:"end",className:"w-48",children:[c.jsx(fI,{children:"File Format"}),c.jsx(rS,{}),Y.map(q=>c.jsx(aW,{checked:m.formats.includes(q),onCheckedChange:U=>{g({...m,formats:U?[...m.formats,q]:m.formats.filter(ne=>ne!==q)})},children:q.toUpperCase()},q))]})]})]}),c.jsxs(WJ,{className:"rounded-lg border",onValueChange:q=>q&&d(q),type:"single",value:l,children:[c.jsx(aT,{"aria-label":"Grid view",className:"rounded-r-none border-0",value:"grid",children:c.jsx(CF,{className:"h-4 w-4"})}),c.jsx(aT,{"aria-label":"Table view",className:"rounded-l-none border-0 border-l",value:"table",children:c.jsx(MF,{className:"h-4 w-4"})})]})]}),e.files.length===0?c.jsx(JJ,{onUploadClick:()=>N(!0)}):H.length===0?c.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"No files match your search or filters"}):l==="grid"?c.jsx(bQ,{files:H,onFileClick:x,onSelectFile:B,onToggleStar:F,selectedFiles:b}):c.jsx($Q,{files:H,onFileClick:x,onSelectAll:Z,onSelectFile:B,onToggleStar:F,selectedFiles:b}),S&&c.jsx(fQ,{file:S,onClose:()=>x(null),onDelete:q=>{M({keys:[q],isOpen:!0})},onToggleStar:F}),c.jsx(Sm,{onOpenChange:q=>M(U=>({...U,isOpen:q})),open:A.isOpen,children:c.jsxs(jm,{children:[c.jsxs(Om,{children:[c.jsxs(_m,{children:["Delete File",A.keys.length>1?"s":""]}),c.jsxs(Nm,{children:["Are you sure you want to delete"," ",A.keys.length===1?c.jsx("strong",{children:A.keys[0].split("/").pop()}):c.jsxs("strong",{children:[A.keys.length," files"]}),"? This action cannot be undone."]})]}),c.jsxs(Em,{children:[c.jsx(Cm,{children:"Cancel"}),c.jsx(Am,{className:"bg-red-600 hover:bg-red-700",onClick:()=>{W(A.keys),M({keys:[],isOpen:!1})},children:"Delete"})]})]})}),c.jsx(bJ,{files:R,onClose:()=>{G(!1),D([])},onComplete:k,open:z})]}):c.jsx(ZJ,{})}var Ub,iT;function Vn(){if(iT)return Ub;iT=1;var e=Array.isArray;return Ub=e,Ub}var Hb,oT;function FL(){if(oT)return Hb;oT=1;var e=typeof gh=="object"&&gh&&gh.Object===Object&&gh;return Hb=e,Hb}var Fb,sT;function Oa(){if(sT)return Fb;sT=1;var e=FL(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Fb=n,Fb}var Gb,lT;function Wf(){if(lT)return Gb;lT=1;var e=Oa(),t=e.Symbol;return Gb=t,Gb}var Vb,cT;function ree(){if(cT)return Vb;cT=1;var e=Wf(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=n.call(l,i),d=l[i];try{l[i]=void 0;var h=!0}catch{}var v=r.call(l);return h&&(u?l[i]=d:delete l[i]),v}return Vb=o,Vb}var Yb,uT;function aee(){if(uT)return Yb;uT=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Yb=n,Yb}var Wb,fT;function hi(){if(fT)return Wb;fT=1;var e=Wf(),t=ree(),n=aee(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?i:r:o&&o in Object(u)?t(u):n(u)}return Wb=l,Wb}var Kb,dT;function mi(){if(dT)return Kb;dT=1;function e(t){return t!=null&&typeof t=="object"}return Kb=e,Kb}var Xb,hT;function yc(){if(hT)return Xb;hT=1;var e=hi(),t=mi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Xb=r,Xb}var Qb,mT;function FO(){if(mT)return Qb;mT=1;var e=Vn(),t=yc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return Qb=i,Qb}var Zb,pT;function uo(){if(pT)return Zb;pT=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Zb=e,Zb}var Jb,vT;function GO(){if(vT)return Jb;vT=1;var e=hi(),t=uo(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var d=e(u);return d==r||d==i||d==n||d==o}return Jb=l,Jb}var ex,gT;function iee(){if(gT)return ex;gT=1;var e=Oa(),t=e["__core-js_shared__"];return ex=t,ex}var tx,yT;function oee(){if(yT)return tx;yT=1;var e=iee(),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 tx=n,tx}var nx,bT;function GL(){if(bT)return nx;bT=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 nx=n,nx}var rx,xT;function see(){if(xT)return rx;xT=1;var e=GO(),t=oee(),n=uo(),r=GL(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,h=u.hasOwnProperty,v=RegExp("^"+d.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var b=e(g)?v:o;return b.test(r(g))}return rx=m,rx}var ax,wT;function lee(){if(wT)return ax;wT=1;function e(t,n){return t==null?void 0:t[n]}return ax=e,ax}var ix,ST;function ms(){if(ST)return ix;ST=1;var e=see(),t=lee();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return ix=n,ix}var ox,jT;function wv(){if(jT)return ox;jT=1;var e=ms(),t=e(Object,"create");return ox=t,ox}var sx,OT;function cee(){if(OT)return sx;OT=1;var e=wv();function t(){this.__data__=e?e(null):{},this.size=0}return sx=t,sx}var lx,ET;function uee(){if(ET)return lx;ET=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return lx=e,lx}var cx,_T;function fee(){if(_T)return cx;_T=1;var e=wv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return r.call(l,o)?l[o]:void 0}return cx=i,cx}var ux,NT;function dee(){if(NT)return ux;NT=1;var e=wv(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return ux=r,ux}var fx,AT;function hee(){if(AT)return fx;AT=1;var e=wv(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return fx=n,fx}var dx,CT;function mee(){if(CT)return dx;CT=1;var e=cee(),t=uee(),n=fee(),r=dee(),i=hee();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,dx=o,dx}var hx,TT;function pee(){if(TT)return hx;TT=1;function e(){this.__data__=[],this.size=0}return hx=e,hx}var mx,MT;function VO(){if(MT)return mx;MT=1;function e(t,n){return t===n||t!==t&&n!==n}return mx=e,mx}var px,RT;function Sv(){if(RT)return px;RT=1;var e=VO();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return px=t,px}var vx,DT;function vee(){if(DT)return vx;DT=1;var e=Sv(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,l=e(o,i);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():n.call(o,l,1),--this.size,!0}return vx=r,vx}var gx,PT;function gee(){if(PT)return gx;PT=1;var e=Sv();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return gx=t,gx}var yx,kT;function yee(){if(kT)return yx;kT=1;var e=Sv();function t(n){return e(this.__data__,n)>-1}return yx=t,yx}var bx,$T;function bee(){if($T)return bx;$T=1;var e=Sv();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return bx=t,bx}var xx,IT;function jv(){if(IT)return xx;IT=1;var e=pee(),t=vee(),n=gee(),r=yee(),i=bee();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,xx=o,xx}var wx,LT;function YO(){if(LT)return wx;LT=1;var e=ms(),t=Oa(),n=e(t,"Map");return wx=n,wx}var Sx,zT;function xee(){if(zT)return Sx;zT=1;var e=mee(),t=jv(),n=YO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Sx=r,Sx}var jx,BT;function wee(){if(BT)return jx;BT=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return jx=e,jx}var Ox,qT;function Ov(){if(qT)return Ox;qT=1;var e=wee();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Ox=t,Ox}var Ex,UT;function See(){if(UT)return Ex;UT=1;var e=Ov();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ex=t,Ex}var _x,HT;function jee(){if(HT)return _x;HT=1;var e=Ov();function t(n){return e(this,n).get(n)}return _x=t,_x}var Nx,FT;function Oee(){if(FT)return Nx;FT=1;var e=Ov();function t(n){return e(this,n).has(n)}return Nx=t,Nx}var Ax,GT;function Eee(){if(GT)return Ax;GT=1;var e=Ov();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Ax=t,Ax}var Cx,VT;function WO(){if(VT)return Cx;VT=1;var e=xee(),t=See(),n=jee(),r=Oee(),i=Eee();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Cx=o,Cx}var Tx,YT;function VL(){if(YT)return Tx;YT=1;var e=WO(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var l=arguments,u=i?i.apply(this,l):l[0],d=o.cache;if(d.has(u))return d.get(u);var h=r.apply(this,l);return o.cache=d.set(u,h)||d,h};return o.cache=new(n.Cache||e),o}return n.Cache=e,Tx=n,Tx}var Mx,WT;function _ee(){if(WT)return Mx;WT=1;var e=VL(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return Mx=n,Mx}var Rx,KT;function Nee(){if(KT)return Rx;KT=1;var e=_ee(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,u,d,h){o.push(d?h.replace(n,"$1"):u||l)}),o});return Rx=r,Rx}var Dx,XT;function KO(){if(XT)return Dx;XT=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return Dx=e,Dx}var Px,QT;function Aee(){if(QT)return Px;QT=1;var e=Wf(),t=KO(),n=Vn(),r=yc(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function l(u){if(typeof u=="string")return u;if(n(u))return t(u,l)+"";if(r(u))return o?o.call(u):"";var d=u+"";return d=="0"&&1/u==-1/0?"-0":d}return Px=l,Px}var kx,ZT;function YL(){if(ZT)return kx;ZT=1;var e=Aee();function t(n){return n==null?"":e(n)}return kx=t,kx}var $x,JT;function WL(){if(JT)return $x;JT=1;var e=Vn(),t=FO(),n=Nee(),r=YL();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return $x=i,$x}var Ix,eM;function Ev(){if(eM)return Ix;eM=1;var e=yc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Ix=t,Ix}var Lx,tM;function XO(){if(tM)return Lx;tM=1;var e=WL(),t=Ev();function n(r,i){i=e(i,r);for(var o=0,l=i.length;r!=null&&o<l;)r=r[t(i[o++])];return o&&o==l?r:void 0}return Lx=n,Lx}var zx,nM;function KL(){if(nM)return zx;nM=1;var e=XO();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return zx=t,zx}var Cee=KL();const Rr=xt(Cee);var Bx,rM;function Tee(){if(rM)return Bx;rM=1;function e(t){return t==null}return Bx=e,Bx}var Mee=Tee();const Qe=xt(Mee);var qx,aM;function Ree(){if(aM)return qx;aM=1;var e=hi(),t=Vn(),n=mi(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return qx=i,qx}var Dee=Ree();const ns=xt(Dee);var Pee=GO();const Ye=xt(Pee);var kee=uo();const bc=xt(kee);var Ux={exports:{}},ct={};/**
|
|
429
|
+
* @license React
|
|
430
|
+
* react-is.production.min.js
|
|
431
|
+
*
|
|
432
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
433
|
+
*
|
|
434
|
+
* This source code is licensed under the MIT license found in the
|
|
435
|
+
* LICENSE file in the root directory of this source tree.
|
|
436
|
+
*/var iM;function $ee(){if(iM)return ct;iM=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"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),O;O=Symbol.for("react.module.reference");function S(x){if(typeof x=="object"&&x!==null){var E=x.$$typeof;switch(E){case e:switch(x=x.type,x){case n:case i:case r:case h:case v:return x;default:switch(x=x&&x.$$typeof,x){case u:case l:case d:case g:case m:case o:return x;default:return E}}case t:return E}}}return ct.ContextConsumer=l,ct.ContextProvider=o,ct.Element=e,ct.ForwardRef=d,ct.Fragment=n,ct.Lazy=g,ct.Memo=m,ct.Portal=t,ct.Profiler=i,ct.StrictMode=r,ct.Suspense=h,ct.SuspenseList=v,ct.isAsyncMode=function(){return!1},ct.isConcurrentMode=function(){return!1},ct.isContextConsumer=function(x){return S(x)===l},ct.isContextProvider=function(x){return S(x)===o},ct.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},ct.isForwardRef=function(x){return S(x)===d},ct.isFragment=function(x){return S(x)===n},ct.isLazy=function(x){return S(x)===g},ct.isMemo=function(x){return S(x)===m},ct.isPortal=function(x){return S(x)===t},ct.isProfiler=function(x){return S(x)===i},ct.isStrictMode=function(x){return S(x)===r},ct.isSuspense=function(x){return S(x)===h},ct.isSuspenseList=function(x){return S(x)===v},ct.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===i||x===r||x===h||x===v||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===m||x.$$typeof===o||x.$$typeof===l||x.$$typeof===d||x.$$typeof===O||x.getModuleId!==void 0)},ct.typeOf=S,ct}var oM;function Iee(){return oM||(oM=1,Ux.exports=$ee()),Ux.exports}var Lee=Iee(),Hx,sM;function XL(){if(sM)return Hx;sM=1;var e=hi(),t=mi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return Hx=r,Hx}var Fx,lM;function zee(){if(lM)return Fx;lM=1;var e=XL();function t(n){return e(n)&&n!=+n}return Fx=t,Fx}var Bee=zee();const Kf=xt(Bee);var qee=XL();const Uee=xt(qee);var Yr=function(t){return t===0?0:t>0?1:-1},Fo=function(t){return ns(t)&&t.indexOf("%")===t.length-1},be=function(t){return Uee(t)&&!Kf(t)},Hee=function(t){return Qe(t)},Jt=function(t){return be(t)||ns(t)},Fee=0,Xf=function(t){var n=++Fee;return"".concat(t||"").concat(n)},rs=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(!be(t)&&!ns(t))return r;var o;if(Fo(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Kf(o)&&(o=r),i&&o>n&&(o=n),o},Yi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Gee=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},Gr=function(t,n){return be(t)&&be(n)?function(r){return t+r*(n-t)}:function(){return n}};function Mm(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Rr(r,t))===n})}var Vee=function(t,n){return be(t)&&be(n)?t-n:ns(t)&&ns(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Ol(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 SS(e){"@babel/helpers - typeof";return SS=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},SS(e)}var Yee=["viewBox","children"],Wee=["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"],cM=["points","pathLength"],Gx={svg:Yee,polygon:cM,polyline:cM},QO=["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"],Rm=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(w.isValidElement(t)&&(r=t.props),!bc(r))return null;var i={};return Object.keys(r).forEach(function(o){QO.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},Kee=function(t,n,r){return function(i){return t(n,r,i),null}},Dm=function(t,n,r){if(!bc(t)||SS(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];QO.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=Kee(l,n,r))}),i},Xee=["children"],Qee=["children"];function uM(e,t){if(e==null)return{};var n=Zee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zee(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 jS(e){"@babel/helpers - typeof";return jS=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},jS(e)}var fM={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"},Za=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},dM=null,Vx=null,ZO=function e(t){if(t===dM&&Array.isArray(Vx))return Vx;var n=[];return w.Children.forEach(t,function(r){Qe(r)||(Lee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Vx=n,dM=t,n};function Dr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Za(i)}):r=[Za(t)],ZO(e).forEach(function(i){var o=Rr(i,"type.displayName")||Rr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function rr(e,t){var n=Dr(e,t);return n&&n[0]}var hM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!be(r)||r<=0||!be(i)||i<=0)},Jee=["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"],ete=function(t){return t&&t.type&&ns(t.type)&&Jee.indexOf(t.type)>=0},tte=function(t){return t&&jS(t)==="object"&&"clipDot"in t},nte=function(t,n,r,i){var o,l=(o=Gx==null?void 0:Gx[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Ye(t)&&(i&&l.includes(n)||Wee.includes(n))||r&&QO.includes(n)},nt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!bc(i))return null;var o={};return Object.keys(i).forEach(function(l){var u;nte((u=i)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=i[l])}),o},OS=function e(t,n){if(t===n)return!0;var r=w.Children.count(t);if(r!==w.Children.count(n))return!1;if(r===0)return!0;if(r===1)return mM(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],l=n[i];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!mM(o,l))return!1}return!0},mM=function(t,n){if(Qe(t)&&Qe(n))return!0;if(!Qe(t)&&!Qe(n)){var r=t.props||{},i=r.children,o=uM(r,Xee),l=n.props||{},u=l.children,d=uM(l,Qee);return i&&u?Ol(o,d)&&OS(i,u):!i&&!u?Ol(o,d):!1}return!1},pM=function(t,n){var r=[],i={};return ZO(t).forEach(function(o,l){if(ete(o))r.push(o);else if(o){var u=Za(o.type),d=n[u]||{},h=d.handler,v=d.once;if(h&&(!v||!i[u])){var m=h(o,u,l);r.push(m),i[u]=!0}}}),r},rte=function(t){var n=t&&t.type;return n&&fM[n]?fM[n]:null},ate=function(t,n){return ZO(n).indexOf(t)},ite=["children","width","height","viewBox","className","style","title","desc"];function ES(){return ES=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},ES.apply(this,arguments)}function ote(e,t){if(e==null)return{};var n=ste(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ste(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 _S(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,l=e.style,u=e.title,d=e.desc,h=ote(e,ite),v=i||{width:n,height:r,x:0,y:0},m=rt("recharts-surface",o);return I.createElement("svg",ES({},nt(h,!0,"svg"),{className:m,width:n,height:r,style:l,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height)}),I.createElement("title",null,u),I.createElement("desc",null,d),t)}var lte=["children","className"];function NS(){return NS=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},NS.apply(this,arguments)}function cte(e,t){if(e==null)return{};var n=ute(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ute(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 Bt=I.forwardRef(function(e,t){var n=e.children,r=e.className,i=cte(e,lte),o=rt("recharts-layer",r);return I.createElement("g",NS({className:o},nt(i,!0),{ref:t}),n)}),Ja=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},Yx,vM;function fte(){if(vM)return Yx;vM=1;function e(t,n,r){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++i<o;)l[i]=t[i+n];return l}return Yx=e,Yx}var Wx,gM;function dte(){if(gM)return Wx;gM=1;var e=fte();function t(n,r,i){var o=n.length;return i=i===void 0?o:i,!r&&i>=o?n:e(n,r,i)}return Wx=t,Wx}var Kx,yM;function QL(){if(yM)return Kx;yM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+i+o+"]");function d(h){return u.test(h)}return Kx=d,Kx}var Xx,bM;function hte(){if(bM)return Xx;bM=1;function e(t){return t.split("")}return Xx=e,Xx}var Qx,xM;function mte(){if(xM)return Qx;xM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",u="["+i+"]",d="\\ud83c[\\udffb-\\udfff]",h="(?:"+u+"|"+d+")",v="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",O=h+"?",S="["+o+"]?",x="(?:"+b+"(?:"+[v,m,g].join("|")+")"+S+O+")*",E=S+O+x,N="(?:"+[v+u+"?",u,m,g,l].join("|")+")",_=RegExp(d+"(?="+d+")|"+N+E,"g");function C(A){return A.match(_)||[]}return Qx=C,Qx}var Zx,wM;function pte(){if(wM)return Zx;wM=1;var e=hte(),t=QL(),n=mte();function r(i){return t(i)?n(i):e(i)}return Zx=r,Zx}var Jx,SM;function vte(){if(SM)return Jx;SM=1;var e=dte(),t=QL(),n=pte(),r=YL();function i(o){return function(l){l=r(l);var u=t(l)?n(l):void 0,d=u?u[0]:l.charAt(0),h=u?e(u,1).join(""):l.slice(1);return d[o]()+h}}return Jx=i,Jx}var e0,jM;function gte(){if(jM)return e0;jM=1;var e=vte(),t=e("toUpperCase");return e0=t,e0}var yte=gte();const _v=xt(yte);function jt(e){return function(){return e}}const ZL=Math.cos,Pm=Math.sin,ea=Math.sqrt,km=Math.PI,Nv=2*km,AS=Math.PI,CS=2*AS,Uo=1e-6,bte=CS-Uo;function JL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function xte(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return JL;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class wte{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?JL:xte(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,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,d=r-t,h=i-n,v=l-t,m=u-n,g=v*v+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Uo)if(!(Math.abs(m*d-h*v)>Uo)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,O=i-u,S=d*d+h*h,x=b*b+O*O,E=Math.sqrt(S),N=Math.sqrt(g),_=o*Math.tan((AS-Math.acos((S+g-x)/(2*E*N)))/2),C=_/N,A=_/E;Math.abs(C-1)>Uo&&this._append`L${t+C*v},${n+C*m}`,this._append`A${o},${o},0,0,${+(m*b>v*O)},${this._x1=t+A*d},${this._y1=n+A*h}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),d=r*Math.sin(i),h=t+u,v=n+d,m=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${h},${v}`:(Math.abs(this._x1-h)>Uo||Math.abs(this._y1-v)>Uo)&&this._append`L${h},${v}`,r&&(g<0&&(g=g%CS+CS),g>bte?this._append`A${r},${r},0,1,${m},${t-u},${n-d}A${r},${r},0,1,${m},${this._x1=h},${this._y1=v}`:g>Uo&&this._append`A${r},${r},0,${+(g>=AS)},${m},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 JO(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 wte(t)}function eE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ez(e){this._context=e}ez.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 Av(e){return new ez(e)}function tz(e){return e[0]}function nz(e){return e[1]}function rz(e,t){var n=jt(!0),r=null,i=Av,o=null,l=JO(u);e=typeof e=="function"?e:e===void 0?tz:jt(e),t=typeof t=="function"?t:t===void 0?nz:jt(t);function u(d){var h,v=(d=eE(d)).length,m,g=!1,b;for(r==null&&(o=i(b=l())),h=0;h<=v;++h)!(h<v&&n(m=d[h],h,d))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,h,d),+t(m,h,d));if(b)return o=null,b+""||null}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:jt(+d),u):e},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:jt(+d),u):t},u.defined=function(d){return arguments.length?(n=typeof d=="function"?d:jt(!!d),u):n},u.curve=function(d){return arguments.length?(i=d,r!=null&&(o=i(r)),u):i},u.context=function(d){return arguments.length?(d==null?r=o=null:o=i(r=d),u):r},u}function Mh(e,t,n){var r=null,i=jt(!0),o=null,l=Av,u=null,d=JO(h);e=typeof e=="function"?e:e===void 0?tz:jt(+e),t=typeof t=="function"?t:jt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?nz:jt(+n);function h(m){var g,b,O,S=(m=eE(m)).length,x,E=!1,N,_=new Array(S),C=new Array(S);for(o==null&&(u=l(N=d())),g=0;g<=S;++g){if(!(g<S&&i(x=m[g],g,m))===E)if(E=!E)b=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),O=g-1;O>=b;--O)u.point(_[O],C[O]);u.lineEnd(),u.areaEnd()}E&&(_[g]=+e(x,g,m),C[g]=+t(x,g,m),u.point(r?+r(x,g,m):_[g],n?+n(x,g,m):C[g]))}if(N)return u=null,N+""||null}function v(){return rz().defined(i).curve(l).context(o)}return h.x=function(m){return arguments.length?(e=typeof m=="function"?m:jt(+m),r=null,h):e},h.x0=function(m){return arguments.length?(e=typeof m=="function"?m:jt(+m),h):e},h.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:jt(+m),h):r},h.y=function(m){return arguments.length?(t=typeof m=="function"?m:jt(+m),n=null,h):t},h.y0=function(m){return arguments.length?(t=typeof m=="function"?m:jt(+m),h):t},h.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:jt(+m),h):n},h.lineX0=h.lineY0=function(){return v().x(e).y(t)},h.lineY1=function(){return v().x(e).y(n)},h.lineX1=function(){return v().x(r).y(t)},h.defined=function(m){return arguments.length?(i=typeof m=="function"?m:jt(!!m),h):i},h.curve=function(m){return arguments.length?(l=m,o!=null&&(u=l(o)),h):l},h.context=function(m){return arguments.length?(m==null?o=u=null:u=l(o=m),h):o},h}class az{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 Ste(e){return new az(e,!0)}function jte(e){return new az(e,!1)}const tE={draw(e,t){const n=ea(t/km);e.moveTo(n,0),e.arc(0,0,n,0,Nv)}},Ote={draw(e,t){const n=ea(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()}},iz=ea(1/3),Ete=iz*2,_te={draw(e,t){const n=ea(t/Ete),r=n*iz;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=ea(t),r=-n/2;e.rect(r,r,n,n)}},Ate=.8908130915292852,oz=Pm(km/10)/Pm(7*km/10),Cte=Pm(Nv/10)*oz,Tte=-ZL(Nv/10)*oz,Mte={draw(e,t){const n=ea(t*Ate),r=Cte*n,i=Tte*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Nv*o/5,u=ZL(l),d=Pm(l);e.lineTo(d*n,-u*n),e.lineTo(u*r-d*i,d*r+u*i)}e.closePath()}},t0=ea(3),Rte={draw(e,t){const n=-ea(t/(t0*3));e.moveTo(0,n*2),e.lineTo(-t0*n,-n),e.lineTo(t0*n,-n),e.closePath()}},Or=-.5,Er=ea(3)/2,TS=1/ea(12),Dte=(TS/2+1)*3,Pte={draw(e,t){const n=ea(t/Dte),r=n/2,i=n*TS,o=r,l=n*TS+n,u=-o,d=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,d),e.lineTo(Or*r-Er*i,Er*r+Or*i),e.lineTo(Or*o-Er*l,Er*o+Or*l),e.lineTo(Or*u-Er*d,Er*u+Or*d),e.lineTo(Or*r+Er*i,Or*i-Er*r),e.lineTo(Or*o+Er*l,Or*l-Er*o),e.lineTo(Or*u+Er*d,Or*d-Er*u),e.closePath()}};function kte(e,t){let n=null,r=JO(i);e=typeof e=="function"?e:jt(e||tE),t=typeof t=="function"?t:jt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:jt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:jt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function $m(){}function Im(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 sz(e){this._context=e}sz.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:Im(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:Im(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $te(e){return new sz(e)}function lz(e){this._context=e}lz.prototype={areaStart:$m,areaEnd:$m,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:Im(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new lz(e)}function cz(e){this._context=e}cz.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:Im(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new cz(e)}function uz(e){this._context=e}uz.prototype={areaStart:$m,areaEnd:$m,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 zte(e){return new uz(e)}function OM(e){return e<0?-1:1}function EM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),u=(o*i+l*r)/(r+i);return(OM(o)+OM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function _M(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function n0(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,l-u*n,o,l)}function Lm(e){this._context=e}Lm.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:n0(this,this._t0,_M(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,n0(this,_M(this,n=EM(this,e,t)),n);break;default:n0(this,this._t0,n=EM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function fz(e){this._context=new dz(e)}(fz.prototype=Object.create(Lm.prototype)).point=function(e,t){Lm.prototype.point.call(this,t,e)};function dz(e){this._context=e}dz.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function Bte(e){return new Lm(e)}function qte(e){return new fz(e)}function hz(e){this._context=e}hz.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=NM(e),i=NM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(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 NM(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Ute(e){return new hz(e)}function Cv(e,t){this._context=e,this._t=t}Cv.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 Hte(e){return new Cv(e,.5)}function Fte(e){return new Cv(e,0)}function Gte(e){return new Cv(e,1)}function Dl(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,u=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function MS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Vte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Wte(){var e=jt([]),t=MS,n=Dl,r=Vte;function i(o){var l=Array.from(e.apply(this,arguments),Yte),u,d=l.length,h=-1,v;for(const m of o)for(u=0,++h;u<d;++u)(l[u][h]=[0,+r(m,l[u].key,h,o)]).data=m;for(u=0,v=eE(t(l));u<d;++u)l[v[u]].index=u;return n(l,v),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:jt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:jt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?MS:typeof o=="function"?o:jt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Dl,i):n},i}function Kte(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}Dl(e,t)}}function Xte(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,u=0;l<i;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}Dl(e,t)}}function Qte(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var u=0,d=0,h=0;u<l;++u){for(var v=e[t[u]],m=v[r][1]||0,g=v[r-1][1]||0,b=(m-g)/2,O=0;O<u;++O){var S=e[t[O]],x=S[r][1]||0,E=S[r-1][1]||0;b+=x-E}d+=m,h+=b*m}i[r-1][1]+=i[r-1][0]=n,d&&(n-=h/d)}i[r-1][1]+=i[r-1][0]=n,Dl(e,t)}}function ef(e){"@babel/helpers - typeof";return ef=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},ef(e)}var Zte=["type","size","sizeType"];function RS(){return RS=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},RS.apply(this,arguments)}function AM(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 CM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AM(Object(n),!0).forEach(function(r){Jte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jte(e,t,n){return t=ene(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ene(e){var t=tne(e,"string");return ef(t)=="symbol"?t:t+""}function tne(e,t){if(ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nne(e,t){if(e==null)return{};var n=rne(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rne(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 mz={symbolCircle:tE,symbolCross:Ote,symbolDiamond:_te,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:Pte},ane=Math.PI/180,ine=function(t){var n="symbol".concat(_v(t));return mz[n]||tE},one=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*ane;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}},sne=function(t,n){mz["symbol".concat(_v(t))]=n},nE=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,l=t.sizeType,u=l===void 0?"area":l,d=nne(t,Zte),h=CM(CM({},d),{},{type:r,size:o,sizeType:u}),v=function(){var x=ine(r),E=kte().type(x).size(one(o,u,r));return E()},m=h.className,g=h.cx,b=h.cy,O=nt(h,!0);return g===+g&&b===+b&&o===+o?I.createElement("path",RS({},O,{className:rt("recharts-symbols",m),transform:"translate(".concat(g,", ").concat(b,")"),d:v()})):null};nE.registerSymbol=sne;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 DS(){return DS=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},DS.apply(this,arguments)}function TM(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 lne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TM(Object(n),!0).forEach(function(r){tf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function une(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,vz(r.key),r)}}function fne(e,t,n){return t&&une(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dne(e,t,n){return t=zm(t),hne(e,pz()?Reflect.construct(t,n||[],zm(e).constructor):t.apply(e,n))}function hne(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 mne(e)}function mne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pz=function(){return!!e})()}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zm(e)}function pne(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&&PS(e,t)}function PS(e,t){return PS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PS(e,t)}function tf(e,t,n){return t=vz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vz(e){var t=vne(e,"string");return Pl(t)=="symbol"?t:t+""}function vne(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 _r=32,rE=(function(e){function t(){return cne(this,t),dne(this,t,arguments)}return pne(t,e),fne(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=_r/2,l=_r/6,u=_r/3,d=r.inactive?i:r.color;if(r.type==="plainline")return I.createElement("line",{strokeWidth:4,fill:"none",stroke:d,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:_r,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return I.createElement("path",{strokeWidth:4,fill:"none",stroke:d,d:"M0,".concat(o,"h").concat(u,`
|
|
437
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
|
|
438
|
+
H`).concat(_r,"M").concat(2*u,",").concat(o,`
|
|
439
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return I.createElement("path",{stroke:"none",fill:d,d:"M0,".concat(_r/8,"h").concat(_r,"v").concat(_r*3/4,"h").concat(-_r,"z"),className:"recharts-legend-icon"});if(I.isValidElement(r.legendIcon)){var h=lne({},r);return delete h.legendIcon,I.cloneElement(r.legendIcon,h)}return I.createElement(nE,{fill:d,cx:o,cy:o,size:_r,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,l=i.iconSize,u=i.layout,d=i.formatter,h=i.inactiveColor,v={x:0,y:0,width:_r,height:_r},m={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(b,O){var S=b.formatter||d,x=rt(tf(tf({"recharts-legend-item":!0},"legend-item-".concat(O),!0),"inactive",b.inactive));if(b.type==="none")return null;var E=Ye(b.value)?null:b.value;Ja(!Ye(b.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 N=b.inactive?h:b.color;return I.createElement("li",DS({className:x,style:m,key:"legend-item-".concat(O)},Dm(r.props,b,O)),I.createElement(_S,{width:l,height:l,viewBox:v,style:g},r.renderIcon(b)),I.createElement("span",{className:"recharts-legend-item-text",style:{color:N}},S?S(E,b,O):E))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,l=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return I.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(w.PureComponent);tf(rE,"displayName","Legend");tf(rE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var r0,MM;function gne(){if(MM)return r0;MM=1;var e=jv();function t(){this.__data__=new e,this.size=0}return r0=t,r0}var a0,RM;function yne(){if(RM)return a0;RM=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return a0=e,a0}var i0,DM;function bne(){if(DM)return i0;DM=1;function e(t){return this.__data__.get(t)}return i0=e,i0}var o0,PM;function xne(){if(PM)return o0;PM=1;function e(t){return this.__data__.has(t)}return o0=e,o0}var s0,kM;function wne(){if(kM)return s0;kM=1;var e=jv(),t=YO(),n=WO(),r=200;function i(o,l){var u=this.__data__;if(u instanceof e){var d=u.__data__;if(!t||d.length<r-1)return d.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(d)}return u.set(o,l),this.size=u.size,this}return s0=i,s0}var l0,$M;function gz(){if($M)return l0;$M=1;var e=jv(),t=gne(),n=yne(),r=bne(),i=xne(),o=wne();function l(u){var d=this.__data__=new e(u);this.size=d.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=o,l0=l,l0}var c0,IM;function Sne(){if(IM)return c0;IM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return c0=t,c0}var u0,LM;function jne(){if(LM)return u0;LM=1;function e(t){return this.__data__.has(t)}return u0=e,u0}var f0,zM;function yz(){if(zM)return f0;zM=1;var e=WO(),t=Sne(),n=jne();function r(i){var o=-1,l=i==null?0:i.length;for(this.__data__=new e;++o<l;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,f0=r,f0}var d0,BM;function bz(){if(BM)return d0;BM=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 d0=e,d0}var h0,qM;function xz(){if(qM)return h0;qM=1;function e(t,n){return t.has(n)}return h0=e,h0}var m0,UM;function wz(){if(UM)return m0;UM=1;var e=yz(),t=bz(),n=xz(),r=1,i=2;function o(l,u,d,h,v,m){var g=d&r,b=l.length,O=u.length;if(b!=O&&!(g&&O>b))return!1;var S=m.get(l),x=m.get(u);if(S&&x)return S==u&&x==l;var E=-1,N=!0,_=d&i?new e:void 0;for(m.set(l,u),m.set(u,l);++E<b;){var C=l[E],A=u[E];if(h)var M=g?h(A,C,E,u,l,m):h(C,A,E,l,u,m);if(M!==void 0){if(M)continue;N=!1;break}if(_){if(!t(u,function(R,D){if(!n(_,D)&&(C===R||v(C,R,d,h,m)))return _.push(D)})){N=!1;break}}else if(!(C===A||v(C,A,d,h,m))){N=!1;break}}return m.delete(l),m.delete(u),N}return m0=o,m0}var p0,HM;function One(){if(HM)return p0;HM=1;var e=Oa(),t=e.Uint8Array;return p0=t,p0}var v0,FM;function Ene(){if(FM)return v0;FM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return v0=e,v0}var g0,GM;function aE(){if(GM)return g0;GM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return g0=e,g0}var y0,VM;function _ne(){if(VM)return y0;VM=1;var e=Wf(),t=One(),n=VO(),r=wz(),i=Ene(),o=aE(),l=1,u=2,d="[object Boolean]",h="[object Date]",v="[object Error]",m="[object Map]",g="[object Number]",b="[object RegExp]",O="[object Set]",S="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",N="[object DataView]",_=e?e.prototype:void 0,C=_?_.valueOf:void 0;function A(M,R,D,z,G,L,F){switch(D){case N:if(M.byteLength!=R.byteLength||M.byteOffset!=R.byteOffset)return!1;M=M.buffer,R=R.buffer;case E:return!(M.byteLength!=R.byteLength||!L(new t(M),new t(R)));case d:case h:case g:return n(+M,+R);case v:return M.name==R.name&&M.message==R.message;case b:case S:return M==R+"";case m:var W=i;case O:var Q=z&l;if(W||(W=o),M.size!=R.size&&!Q)return!1;var X=F.get(M);if(X)return X==R;z|=u,F.set(M,R);var k=r(W(M),W(R),z,G,L,F);return F.delete(M),k;case x:if(C)return C.call(M)==C.call(R)}return!1}return y0=A,y0}var b0,YM;function Sz(){if(YM)return b0;YM=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return b0=e,b0}var x0,WM;function Nne(){if(WM)return x0;WM=1;var e=Sz(),t=Vn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return x0=n,x0}var w0,KM;function Ane(){if(KM)return w0;KM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,l=[];++r<i;){var u=t[r];n(u,r,t)&&(l[o++]=u)}return l}return w0=e,w0}var S0,XM;function Cne(){if(XM)return S0;XM=1;function e(){return[]}return S0=e,S0}var j0,QM;function Tne(){if(QM)return j0;QM=1;var e=Ane(),t=Cne(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(u){return r.call(l,u)}))}:t;return j0=o,j0}var O0,ZM;function Mne(){if(ZM)return O0;ZM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return O0=e,O0}var E0,JM;function Rne(){if(JM)return E0;JM=1;var e=hi(),t=mi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return E0=r,E0}var _0,eR;function iE(){if(eR)return _0;eR=1;var e=Rne(),t=mi(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!i.call(l,"callee")};return _0=o,_0}var Pu={exports:{}},N0,tR;function Dne(){if(tR)return N0;tR=1;function e(){return!1}return N0=e,N0}Pu.exports;var nR;function jz(){return nR||(nR=1,(function(e,t){var n=Oa(),r=Dne(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?n.Buffer:void 0,d=u?u.isBuffer:void 0,h=d||r;e.exports=h})(Pu,Pu.exports)),Pu.exports}var A0,rR;function oE(){if(rR)return A0;rR=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return A0=n,A0}var C0,aR;function sE(){if(aR)return C0;aR=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return C0=t,C0}var T0,iR;function Pne(){if(iR)return T0;iR=1;var e=hi(),t=sE(),n=mi(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",v="[object Number]",m="[object Object]",g="[object RegExp]",b="[object Set]",O="[object String]",S="[object WeakMap]",x="[object ArrayBuffer]",E="[object DataView]",N="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",z="[object Uint16Array]",G="[object Uint32Array]",L={};L[N]=L[_]=L[C]=L[A]=L[M]=L[R]=L[D]=L[z]=L[G]=!0,L[r]=L[i]=L[x]=L[o]=L[E]=L[l]=L[u]=L[d]=L[h]=L[v]=L[m]=L[g]=L[b]=L[O]=L[S]=!1;function F(W){return n(W)&&t(W.length)&&!!L[e(W)]}return T0=F,T0}var M0,oR;function Oz(){if(oR)return M0;oR=1;function e(t){return function(n){return t(n)}}return M0=e,M0}var ku={exports:{}};ku.exports;var sR;function kne(){return sR||(sR=1,(function(e,t){var n=FL(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,l=o&&n.process,u=(function(){try{var d=i&&i.require&&i.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(ku,ku.exports)),ku.exports}var R0,lR;function Ez(){if(lR)return R0;lR=1;var e=Pne(),t=Oz(),n=kne(),r=n&&n.isTypedArray,i=r?t(r):e;return R0=i,R0}var D0,cR;function $ne(){if(cR)return D0;cR=1;var e=Mne(),t=iE(),n=Vn(),r=jz(),i=oE(),o=Ez(),l=Object.prototype,u=l.hasOwnProperty;function d(h,v){var m=n(h),g=!m&&t(h),b=!m&&!g&&r(h),O=!m&&!g&&!b&&o(h),S=m||g||b||O,x=S?e(h.length,String):[],E=x.length;for(var N in h)(v||u.call(h,N))&&!(S&&(N=="length"||b&&(N=="offset"||N=="parent")||O&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||i(N,E)))&&x.push(N);return x}return D0=d,D0}var P0,uR;function Ine(){if(uR)return P0;uR=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return P0=t,P0}var k0,fR;function _z(){if(fR)return k0;fR=1;function e(t,n){return function(r){return t(n(r))}}return k0=e,k0}var $0,dR;function Lne(){if(dR)return $0;dR=1;var e=_z(),t=e(Object.keys,Object);return $0=t,$0}var I0,hR;function zne(){if(hR)return I0;hR=1;var e=Ine(),t=Lne(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&l.push(u);return l}return I0=i,I0}var L0,mR;function Qf(){if(mR)return L0;mR=1;var e=GO(),t=sE();function n(r){return r!=null&&t(r.length)&&!e(r)}return L0=n,L0}var z0,pR;function Tv(){if(pR)return z0;pR=1;var e=$ne(),t=zne(),n=Qf();function r(i){return n(i)?e(i):t(i)}return z0=r,z0}var B0,vR;function Bne(){if(vR)return B0;vR=1;var e=Nne(),t=Tne(),n=Tv();function r(i){return e(i,n,t)}return B0=r,B0}var q0,gR;function qne(){if(gR)return q0;gR=1;var e=Bne(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,u,d,h,v){var m=u&t,g=e(o),b=g.length,O=e(l),S=O.length;if(b!=S&&!m)return!1;for(var x=b;x--;){var E=g[x];if(!(m?E in l:r.call(l,E)))return!1}var N=v.get(o),_=v.get(l);if(N&&_)return N==l&&_==o;var C=!0;v.set(o,l),v.set(l,o);for(var A=m;++x<b;){E=g[x];var M=o[E],R=l[E];if(d)var D=m?d(R,M,E,l,o,v):d(M,R,E,o,l,v);if(!(D===void 0?M===R||h(M,R,u,d,v):D)){C=!1;break}A||(A=E=="constructor")}if(C&&!A){var z=o.constructor,G=l.constructor;z!=G&&"constructor"in o&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof G=="function"&&G instanceof G)&&(C=!1)}return v.delete(o),v.delete(l),C}return q0=i,q0}var U0,yR;function Une(){if(yR)return U0;yR=1;var e=ms(),t=Oa(),n=e(t,"DataView");return U0=n,U0}var H0,bR;function Hne(){if(bR)return H0;bR=1;var e=ms(),t=Oa(),n=e(t,"Promise");return H0=n,H0}var F0,xR;function Nz(){if(xR)return F0;xR=1;var e=ms(),t=Oa(),n=e(t,"Set");return F0=n,F0}var G0,wR;function Fne(){if(wR)return G0;wR=1;var e=ms(),t=Oa(),n=e(t,"WeakMap");return G0=n,G0}var V0,SR;function Gne(){if(SR)return V0;SR=1;var e=Une(),t=YO(),n=Hne(),r=Nz(),i=Fne(),o=hi(),l=GL(),u="[object Map]",d="[object Object]",h="[object Promise]",v="[object Set]",m="[object WeakMap]",g="[object DataView]",b=l(e),O=l(t),S=l(n),x=l(r),E=l(i),N=o;return(e&&N(new e(new ArrayBuffer(1)))!=g||t&&N(new t)!=u||n&&N(n.resolve())!=h||r&&N(new r)!=v||i&&N(new i)!=m)&&(N=function(_){var C=o(_),A=C==d?_.constructor:void 0,M=A?l(A):"";if(M)switch(M){case b:return g;case O:return u;case S:return h;case x:return v;case E:return m}return C}),V0=N,V0}var Y0,jR;function Vne(){if(jR)return Y0;jR=1;var e=gz(),t=wz(),n=_ne(),r=qne(),i=Gne(),o=Vn(),l=jz(),u=Ez(),d=1,h="[object Arguments]",v="[object Array]",m="[object Object]",g=Object.prototype,b=g.hasOwnProperty;function O(S,x,E,N,_,C){var A=o(S),M=o(x),R=A?v:i(S),D=M?v:i(x);R=R==h?m:R,D=D==h?m:D;var z=R==m,G=D==m,L=R==D;if(L&&l(S)){if(!l(x))return!1;A=!0,z=!1}if(L&&!z)return C||(C=new e),A||u(S)?t(S,x,E,N,_,C):n(S,x,R,E,N,_,C);if(!(E&d)){var F=z&&b.call(S,"__wrapped__"),W=G&&b.call(x,"__wrapped__");if(F||W){var Q=F?S.value():S,X=W?x.value():x;return C||(C=new e),_(Q,X,E,N,C)}}return L?(C||(C=new e),r(S,x,E,N,_,C)):!1}return Y0=O,Y0}var W0,OR;function lE(){if(OR)return W0;OR=1;var e=Vne(),t=mi();function n(r,i,o,l,u){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,l,n,u)}return W0=n,W0}var K0,ER;function Yne(){if(ER)return K0;ER=1;var e=gz(),t=lE(),n=1,r=2;function i(o,l,u,d){var h=u.length,v=h,m=!d;if(o==null)return!v;for(o=Object(o);h--;){var g=u[h];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++h<v;){g=u[h];var b=g[0],O=o[b],S=g[1];if(m&&g[2]){if(O===void 0&&!(b in o))return!1}else{var x=new e;if(d)var E=d(O,S,b,o,l,x);if(!(E===void 0?t(S,O,n|r,d,x):E))return!1}}return!0}return K0=i,K0}var X0,_R;function Az(){if(_R)return X0;_R=1;var e=uo();function t(n){return n===n&&!e(n)}return X0=t,X0}var Q0,NR;function Wne(){if(NR)return Q0;NR=1;var e=Az(),t=Tv();function n(r){for(var i=t(r),o=i.length;o--;){var l=i[o],u=r[l];i[o]=[l,u,e(u)]}return i}return Q0=n,Q0}var Z0,AR;function Cz(){if(AR)return Z0;AR=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Z0=e,Z0}var J0,CR;function Kne(){if(CR)return J0;CR=1;var e=Yne(),t=Wne(),n=Cz();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===i||e(l,i,o)}}return J0=r,J0}var ew,TR;function Xne(){if(TR)return ew;TR=1;function e(t,n){return t!=null&&n in Object(t)}return ew=e,ew}var tw,MR;function Qne(){if(MR)return tw;MR=1;var e=WL(),t=iE(),n=Vn(),r=oE(),i=sE(),o=Ev();function l(u,d,h){d=e(d,u);for(var v=-1,m=d.length,g=!1;++v<m;){var b=o(d[v]);if(!(g=u!=null&&h(u,b)))break;u=u[b]}return g||++v!=m?g:(m=u==null?0:u.length,!!m&&i(m)&&r(b,m)&&(n(u)||t(u)))}return tw=l,tw}var nw,RR;function Zne(){if(RR)return nw;RR=1;var e=Xne(),t=Qne();function n(r,i){return r!=null&&t(r,i,e)}return nw=n,nw}var rw,DR;function Jne(){if(DR)return rw;DR=1;var e=lE(),t=KL(),n=Zne(),r=FO(),i=Az(),o=Cz(),l=Ev(),u=1,d=2;function h(v,m){return r(v)&&i(m)?o(l(v),m):function(g){var b=t(g,v);return b===void 0&&b===m?n(g,v):e(m,b,u|d)}}return rw=h,rw}var aw,PR;function xc(){if(PR)return aw;PR=1;function e(t){return t}return aw=e,aw}var iw,kR;function ere(){if(kR)return iw;kR=1;function e(t){return function(n){return n==null?void 0:n[t]}}return iw=e,iw}var ow,$R;function tre(){if($R)return ow;$R=1;var e=XO();function t(n){return function(r){return e(r,n)}}return ow=t,ow}var sw,IR;function nre(){if(IR)return sw;IR=1;var e=ere(),t=tre(),n=FO(),r=Ev();function i(o){return n(o)?e(r(o)):t(o)}return sw=i,sw}var lw,LR;function fo(){if(LR)return lw;LR=1;var e=Kne(),t=Jne(),n=xc(),r=Vn(),i=nre();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return lw=o,lw}var cw,zR;function Tz(){if(zR)return cw;zR=1;function e(t,n,r,i){for(var o=t.length,l=r+(i?1:-1);i?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return cw=e,cw}var uw,BR;function rre(){if(BR)return uw;BR=1;function e(t){return t!==t}return uw=e,uw}var fw,qR;function are(){if(qR)return fw;qR=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return fw=e,fw}var dw,UR;function ire(){if(UR)return dw;UR=1;var e=Tz(),t=rre(),n=are();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return dw=r,dw}var hw,HR;function ore(){if(HR)return hw;HR=1;var e=ire();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return hw=t,hw}var mw,FR;function sre(){if(FR)return mw;FR=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return mw=e,mw}var pw,GR;function lre(){if(GR)return pw;GR=1;function e(){}return pw=e,pw}var vw,VR;function cre(){if(VR)return vw;VR=1;var e=Nz(),t=lre(),n=aE(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return vw=i,vw}var gw,YR;function ure(){if(YR)return gw;YR=1;var e=yz(),t=ore(),n=sre(),r=xz(),i=cre(),o=aE(),l=200;function u(d,h,v){var m=-1,g=t,b=d.length,O=!0,S=[],x=S;if(v)O=!1,g=n;else if(b>=l){var E=h?null:i(d);if(E)return o(E);O=!1,g=r,x=new e}else x=h?[]:S;e:for(;++m<b;){var N=d[m],_=h?h(N):N;if(N=v||N!==0?N:0,O&&_===_){for(var C=x.length;C--;)if(x[C]===_)continue e;h&&x.push(_),S.push(N)}else g(x,_,v)||(x!==S&&x.push(_),S.push(N))}return S}return gw=u,gw}var yw,WR;function fre(){if(WR)return yw;WR=1;var e=fo(),t=ure();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return yw=n,yw}var dre=fre();const KR=xt(dre);function Mz(e,t,n){return t===!0?KR(e,n):Ye(t)?KR(e,t):e}function kl(e){"@babel/helpers - typeof";return kl=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},kl(e)}var hre=["ref"];function XR(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 Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XR(Object(n),!0).forEach(function(r){Mv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QR(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,Dz(r.key),r)}}function pre(e,t,n){return t&&QR(e.prototype,t),n&&QR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vre(e,t,n){return t=Bm(t),gre(e,Rz()?Reflect.construct(t,n||[],Bm(e).constructor):t.apply(e,n))}function gre(e,t){if(t&&(kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yre(e)}function yre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rz=function(){return!!e})()}function Bm(e){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bm(e)}function bre(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&&kS(e,t)}function kS(e,t){return kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kS(e,t)}function Mv(e,t,n){return t=Dz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dz(e){var t=xre(e,"string");return kl(t)=="symbol"?t:t+""}function xre(e,t){if(kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wre(e,t){if(e==null)return{};var n=Sre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sre(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 jre(e){return e.value}function Ore(e,t){if(I.isValidElement(e))return I.cloneElement(e,t);if(typeof e=="function")return I.createElement(e,t);t.ref;var n=wre(t,hre);return I.createElement(rE,n)}var ZR=1,ei=(function(e){function t(){var n;mre(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=vre(this,t,[].concat(i)),Mv(n,"lastBoundingBox",{width:-1,height:-1}),n}return bre(t,e),pre(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)>ZR||Math.abs(i.height-this.lastBoundingBox.height)>ZR)&&(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?Ga({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,l=i.align,u=i.verticalAlign,d=i.margin,h=i.chartWidth,v=i.chartHeight,m,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var b=this.getBBoxSnapshot();m={left:((h||0)-b.width)/2}}else m=l==="right"?{right:d&&d.right||0}:{left:d&&d.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var O=this.getBBoxSnapshot();g={top:((v||0)-O.height)/2}}else g=u==="bottom"?{bottom:d&&d.bottom||0}:{top:d&&d.top||0};return Ga(Ga({},m),g)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,l=i.width,u=i.height,d=i.wrapperStyle,h=i.payloadUniqBy,v=i.payload,m=Ga(Ga({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(d)),d);return I.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(b){r.wrapperNode=b}},Ore(o,Ga(Ga({},this.props),{},{payload:Mz(v,h,jre)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Ga(Ga({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&be(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(w.PureComponent);Mv(ei,"displayName","Legend");Mv(ei,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var bw,JR;function Ere(){if(JR)return bw;JR=1;var e=Wf(),t=iE(),n=Vn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return bw=i,bw}var xw,eD;function Pz(){if(eD)return xw;eD=1;var e=Sz(),t=Ere();function n(r,i,o,l,u){var d=-1,h=r.length;for(o||(o=t),u||(u=[]);++d<h;){var v=r[d];i>0&&o(v)?i>1?n(v,i-1,o,l,u):e(u,v):l||(u[u.length]=v)}return u}return xw=n,xw}var ww,tD;function _re(){if(tD)return ww;tD=1;function e(t){return function(n,r,i){for(var o=-1,l=Object(n),u=i(n),d=u.length;d--;){var h=u[t?d:++o];if(r(l[h],h,l)===!1)break}return n}}return ww=e,ww}var Sw,nD;function Nre(){if(nD)return Sw;nD=1;var e=_re(),t=e();return Sw=t,Sw}var jw,rD;function kz(){if(rD)return jw;rD=1;var e=Nre(),t=Tv();function n(r,i){return r&&e(r,i,t)}return jw=n,jw}var Ow,aD;function Are(){if(aD)return Ow;aD=1;var e=Qf();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var l=i.length,u=r?l:-1,d=Object(i);(r?u--:++u<l)&&o(d[u],u,d)!==!1;);return i}}return Ow=t,Ow}var Ew,iD;function cE(){if(iD)return Ew;iD=1;var e=kz(),t=Are(),n=t(e);return Ew=n,Ew}var _w,oD;function $z(){if(oD)return _w;oD=1;var e=cE(),t=Qf();function n(r,i){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,d,h){l[++o]=i(u,d,h)}),l}return _w=n,_w}var Nw,sD;function Cre(){if(sD)return Nw;sD=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Nw=e,Nw}var Aw,lD;function Tre(){if(lD)return Aw;lD=1;var e=yc();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,l=n===n,u=e(n),d=r!==void 0,h=r===null,v=r===r,m=e(r);if(!h&&!m&&!u&&n>r||u&&d&&v&&!h&&!m||o&&d&&v||!i&&v||!l)return 1;if(!o&&!u&&!m&&n<r||m&&i&&l&&!o&&!u||h&&i&&l||!d&&l||!v)return-1}return 0}return Aw=t,Aw}var Cw,cD;function Mre(){if(cD)return Cw;cD=1;var e=Tre();function t(n,r,i){for(var o=-1,l=n.criteria,u=r.criteria,d=l.length,h=i.length;++o<d;){var v=e(l[o],u[o]);if(v){if(o>=h)return v;var m=i[o];return v*(m=="desc"?-1:1)}}return n.index-r.index}return Cw=t,Cw}var Tw,uD;function Rre(){if(uD)return Tw;uD=1;var e=KO(),t=XO(),n=fo(),r=$z(),i=Cre(),o=Oz(),l=Mre(),u=xc(),d=Vn();function h(v,m,g){m.length?m=e(m,function(S){return d(S)?function(x){return t(x,S.length===1?S[0]:S)}:S}):m=[u];var b=-1;m=e(m,o(n));var O=r(v,function(S,x,E){var N=e(m,function(_){return _(S)});return{criteria:N,index:++b,value:S}});return i(O,function(S,x){return l(S,x,g)})}return Tw=h,Tw}var Mw,fD;function Dre(){if(fD)return Mw;fD=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 Mw=e,Mw}var Rw,dD;function Pre(){if(dD)return Rw;dD=1;var e=Dre(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,u=-1,d=t(l.length-i,0),h=Array(d);++u<d;)h[u]=l[i+u];u=-1;for(var v=Array(i+1);++u<i;)v[u]=l[u];return v[i]=o(h),e(r,this,v)}}return Rw=n,Rw}var Dw,hD;function kre(){if(hD)return Dw;hD=1;function e(t){return function(){return t}}return Dw=e,Dw}var Pw,mD;function Iz(){if(mD)return Pw;mD=1;var e=ms(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Pw=t,Pw}var kw,pD;function $re(){if(pD)return kw;pD=1;var e=kre(),t=Iz(),n=xc(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return kw=r,kw}var $w,vD;function Ire(){if(vD)return $w;vD=1;var e=800,t=16,n=Date.now;function r(i){var o=0,l=0;return function(){var u=n(),d=t-(u-l);if(l=u,d>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return $w=r,$w}var Iw,gD;function Lre(){if(gD)return Iw;gD=1;var e=$re(),t=Ire(),n=t(e);return Iw=n,Iw}var Lw,yD;function zre(){if(yD)return Lw;yD=1;var e=xc(),t=Pre(),n=Lre();function r(i,o){return n(t(i,o,e),i+"")}return Lw=r,Lw}var zw,bD;function Rv(){if(bD)return zw;bD=1;var e=VO(),t=Qf(),n=oE(),r=uo();function i(o,l,u){if(!r(u))return!1;var d=typeof l;return(d=="number"?t(u)&&n(l,u.length):d=="string"&&l in u)?e(u[l],o):!1}return zw=i,zw}var Bw,xD;function Bre(){if(xD)return Bw;xD=1;var e=Pz(),t=Rre(),n=zre(),r=Rv(),i=n(function(o,l){if(o==null)return[];var u=l.length;return u>1&&r(o,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return Bw=i,Bw}var qre=Bre();const uE=xt(qre);function nf(e){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function $S(){return $S=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},$S.apply(this,arguments)}function Ure(e,t){return Vre(e)||Gre(e,t)||Fre(e,t)||Hre()}function Hre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fre(e,t){if(e){if(typeof e=="string")return wD(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 wD(e,t)}}function wD(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 Gre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Vre(e){if(Array.isArray(e))return e}function SD(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 qw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SD(Object(n),!0).forEach(function(r){Yre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yre(e,t,n){return t=Wre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wre(e){var t=Kre(e,"string");return nf(t)=="symbol"?t:t+""}function Kre(e,t){if(nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xre(e){return Array.isArray(e)&&Jt(e[0])&&Jt(e[1])?e.join(" ~ "):e}var Qre=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,l=t.itemStyle,u=l===void 0?{}:l,d=t.labelStyle,h=d===void 0?{}:d,v=t.payload,m=t.formatter,g=t.itemSorter,b=t.wrapperClassName,O=t.labelClassName,S=t.label,x=t.labelFormatter,E=t.accessibilityLayer,N=E===void 0?!1:E,_=function(){if(v&&v.length){var F={padding:0,margin:0},W=(g?uE(v,g):v).map(function(Q,X){if(Q.type==="none")return null;var k=qw({display:"block",paddingTop:4,paddingBottom:4,color:Q.color||"#000"},u),H=Q.formatter||m||Xre,B=Q.value,Z=Q.name,le=B,$=Z;if(H&&le!=null&&$!=null){var Y=H(B,Z,Q,X,v);if(Array.isArray(Y)){var q=Ure(Y,2);le=q[0],$=q[1]}else le=Y}return I.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(X),style:k},Jt($)?I.createElement("span",{className:"recharts-tooltip-item-name"},$):null,Jt($)?I.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,I.createElement("span",{className:"recharts-tooltip-item-value"},le),I.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return I.createElement("ul",{className:"recharts-tooltip-item-list",style:F},W)}return null},C=qw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),A=qw({margin:0},h),M=!Qe(S),R=M?S:"",D=rt("recharts-default-tooltip",b),z=rt("recharts-tooltip-label",O);M&&x&&v!==void 0&&v!==null&&(R=x(S,v));var G=N?{role:"status","aria-live":"assertive"}:{};return I.createElement("div",$S({className:D,style:C},G),I.createElement("p",{className:z,style:A},I.isValidElement(R)?R:"".concat(R)),_())};function rf(e){"@babel/helpers - typeof";return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function Rh(e,t,n){return t=Zre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zre(e){var t=Jre(e,"string");return rf(t)=="symbol"?t:t+""}function Jre(e,t){if(rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ju="recharts-tooltip-wrapper",eae={visibility:"hidden"};function tae(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return rt(ju,Rh(Rh(Rh(Rh({},"".concat(ju,"-right"),be(n)&&t&&be(t.x)&&n>=t.x),"".concat(ju,"-left"),be(n)&&t&&be(t.x)&&n<t.x),"".concat(ju,"-bottom"),be(r)&&t&&be(t.y)&&r>=t.y),"".concat(ju,"-top"),be(r)&&t&&be(t.y)&&r<t.y))}function jD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,d=e.viewBox,h=e.viewBoxDimension;if(o&&be(o[r]))return o[r];var v=n[r]-u-i,m=n[r]+i;if(t[r])return l[r]?v:m;if(l[r]){var g=v,b=d[r];return g<b?Math.max(m,d[r]):Math.max(v,d[r])}var O=m+u,S=d[r]+h;return O>S?Math.max(v,d[r]):Math.max(m,d[r])}function nae(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 rae(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox,h,v,m;return l.height>0&&l.width>0&&n?(v=jD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),m=jD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),h=nae({translateX:v,translateY:m,useTranslate3d:u})):h=eae,{cssProperties:h,cssClasses:tae({translateX:v,translateY:m,coordinate:n})}}function $l(e){"@babel/helpers - typeof";return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function OD(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 ED(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OD(Object(n),!0).forEach(function(r){LS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iae(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,zz(r.key),r)}}function oae(e,t,n){return t&&iae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sae(e,t,n){return t=qm(t),lae(e,Lz()?Reflect.construct(t,n||[],qm(e).constructor):t.apply(e,n))}function lae(e,t){if(t&&($l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cae(e)}function cae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lz=function(){return!!e})()}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function uae(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&&IS(e,t)}function IS(e,t){return IS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},IS(e,t)}function LS(e,t,n){return t=zz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zz(e){var t=fae(e,"string");return $l(t)=="symbol"?t:t+""}function fae(e,t){if($l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _D=1,dae=(function(e){function t(){var n;aae(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=sae(this,t,[].concat(i)),LS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),LS(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,d,h,v;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.x)!==null&&u!==void 0?u:0,y:(h=(v=n.props.coordinate)===null||v===void 0?void 0:v.y)!==null&&h!==void 0?h:0}})}}),n}return uae(t,e),oae(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>_D||Math.abs(r.height-this.state.lastBoundingBox.height)>_D)&&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,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,d=i.animationEasing,h=i.children,v=i.coordinate,m=i.hasPayload,g=i.isAnimationActive,b=i.offset,O=i.position,S=i.reverseDirection,x=i.useTranslate3d,E=i.viewBox,N=i.wrapperStyle,_=rae({allowEscapeViewBox:l,coordinate:v,offsetTopLeft:b,position:O,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:E}),C=_.cssClasses,A=_.cssProperties,M=ED(ED({transition:g&&o?"transform ".concat(u,"ms ").concat(d):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&m?"visible":"hidden",position:"absolute",top:0,left:0},N);return I.createElement("div",{tabIndex:-1,className:C,style:M,ref:function(D){r.wrapperNode=D}},h)}}])})(w.PureComponent),hae=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},wc={isSsr:hae()};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 ND(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 AD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){fE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pae(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,qz(r.key),r)}}function vae(e,t,n){return t&&pae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gae(e,t,n){return t=Um(t),yae(e,Bz()?Reflect.construct(t,n||[],Um(e).constructor):t.apply(e,n))}function yae(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 bae(e)}function bae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bz=function(){return!!e})()}function Um(e){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Um(e)}function xae(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&&zS(e,t)}function zS(e,t){return zS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zS(e,t)}function fE(e,t,n){return t=qz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qz(e){var t=wae(e,"string");return Il(t)=="symbol"?t:t+""}function wae(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 String(e)}function Sae(e){return e.dataKey}function jae(e,t){return I.isValidElement(e)?I.cloneElement(e,t):typeof e=="function"?I.createElement(e,t):I.createElement(Qre,t)}var Nr=(function(e){function t(){return mae(this,t),gae(this,t,arguments)}return xae(t,e),vae(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,d=i.animationEasing,h=i.content,v=i.coordinate,m=i.filterNull,g=i.isAnimationActive,b=i.offset,O=i.payload,S=i.payloadUniqBy,x=i.position,E=i.reverseDirection,N=i.useTranslate3d,_=i.viewBox,C=i.wrapperStyle,A=O??[];m&&A.length&&(A=Mz(O.filter(function(R){return R.value!=null&&(R.hide!==!0||r.props.includeHidden)}),S,Sae));var M=A.length>0;return I.createElement(dae,{allowEscapeViewBox:l,animationDuration:u,animationEasing:d,isAnimationActive:g,active:o,coordinate:v,hasPayload:M,offset:b,position:x,reverseDirection:E,useTranslate3d:N,viewBox:_,wrapperStyle:C},jae(h,AD(AD({},this.props),{},{payload:A})))}}])})(w.PureComponent);fE(Nr,"displayName","Tooltip");fE(Nr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!wc.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 Uw,CD;function Oae(){if(CD)return Uw;CD=1;var e=Oa(),t=function(){return e.Date.now()};return Uw=t,Uw}var Hw,TD;function Eae(){if(TD)return Hw;TD=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Hw=t,Hw}var Fw,MD;function _ae(){if(MD)return Fw;MD=1;var e=Eae(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Fw=n,Fw}var Gw,RD;function Uz(){if(RD)return Gw;RD=1;var e=_ae(),t=uo(),n=yc(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function d(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var v=typeof h.valueOf=="function"?h.valueOf():h;h=t(v)?v+"":v}if(typeof h!="string")return h===0?h:+h;h=e(h);var m=o.test(h);return m||l.test(h)?u(h.slice(2),m?2:8):i.test(h)?r:+h}return Gw=d,Gw}var Vw,DD;function Nae(){if(DD)return Vw;DD=1;var e=uo(),t=Oae(),n=Uz(),r="Expected a function",i=Math.max,o=Math.min;function l(u,d,h){var v,m,g,b,O,S,x=0,E=!1,N=!1,_=!0;if(typeof u!="function")throw new TypeError(r);d=n(d)||0,e(h)&&(E=!!h.leading,N="maxWait"in h,g=N?i(n(h.maxWait)||0,d):g,_="trailing"in h?!!h.trailing:_);function C(W){var Q=v,X=m;return v=m=void 0,x=W,b=u.apply(X,Q),b}function A(W){return x=W,O=setTimeout(D,d),E?C(W):b}function M(W){var Q=W-S,X=W-x,k=d-Q;return N?o(k,g-X):k}function R(W){var Q=W-S,X=W-x;return S===void 0||Q>=d||Q<0||N&&X>=g}function D(){var W=t();if(R(W))return z(W);O=setTimeout(D,M(W))}function z(W){return O=void 0,_&&v?C(W):(v=m=void 0,b)}function G(){O!==void 0&&clearTimeout(O),x=0,v=S=m=O=void 0}function L(){return O===void 0?b:z(t())}function F(){var W=t(),Q=R(W);if(v=arguments,m=this,S=W,Q){if(O===void 0)return A(S);if(N)return clearTimeout(O),O=setTimeout(D,d),C(S)}return O===void 0&&(O=setTimeout(D,d)),b}return F.cancel=G,F.flush=L,F}return Vw=l,Vw}var Yw,PD;function Aae(){if(PD)return Yw;PD=1;var e=Nae(),t=uo(),n="Expected a function";function r(i,o,l){var u=!0,d=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,d="trailing"in l?!!l.trailing:d),e(i,o,{leading:u,maxWait:o,trailing:d})}return Yw=r,Yw}var Cae=Aae();const Hz=xt(Cae);function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function kD(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 Dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kD(Object(n),!0).forEach(function(r){Tae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tae(e,t,n){return t=Mae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mae(e){var t=Rae(e,"string");return af(t)=="symbol"?t:t+""}function Rae(e,t){if(af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dae(e,t){return Iae(e)||$ae(e,t)||kae(e,t)||Pae()}function Pae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
441
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kae(e,t){if(e){if(typeof e=="string")return $D(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 $D(e,t)}}function $D(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 $ae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Iae(e){if(Array.isArray(e))return e}var dE=w.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,u=e.height,d=u===void 0?"100%":u,h=e.minWidth,v=h===void 0?0:h,m=e.minHeight,g=e.maxHeight,b=e.children,O=e.debounce,S=O===void 0?0:O,x=e.id,E=e.className,N=e.onResize,_=e.style,C=_===void 0?{}:_,A=w.useRef(null),M=w.useRef();M.current=N,w.useImperativeHandle(t,function(){return Object.defineProperty(A.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),A.current},configurable:!0})});var R=w.useState({containerWidth:i.width,containerHeight:i.height}),D=Dae(R,2),z=D[0],G=D[1],L=w.useCallback(function(W,Q){G(function(X){var k=Math.round(W),H=Math.round(Q);return X.containerWidth===k&&X.containerHeight===H?X:{containerWidth:k,containerHeight:H}})},[]);w.useEffect(function(){var W=function(Z){var le,$=Z[0].contentRect,Y=$.width,q=$.height;L(Y,q),(le=M.current)===null||le===void 0||le.call(M,Y,q)};S>0&&(W=Hz(W,S,{trailing:!0,leading:!1}));var Q=new ResizeObserver(W),X=A.current.getBoundingClientRect(),k=X.width,H=X.height;return L(k,H),Q.observe(A.current),function(){Q.disconnect()}},[L,S]);var F=w.useMemo(function(){var W=z.containerWidth,Q=z.containerHeight;if(W<0||Q<0)return null;Ja(Fo(l)||Fo(d),`The width(%s) and height(%s) are both fixed numbers,
|
|
442
|
+
maybe you don't need to use a ResponsiveContainer.`,l,d),Ja(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Fo(l)?W:l,k=Fo(d)?Q:d;n&&n>0&&(X?k=X/n:k&&(X=k*n),g&&k>g&&(k=g)),Ja(X>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
443
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
444
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
445
|
+
height and width.`,X,k,l,d,v,m,n);var H=!Array.isArray(b)&&Za(b.type).endsWith("Chart");return I.Children.map(b,function(B){return I.isValidElement(B)?w.cloneElement(B,Dh({width:X,height:k},H?{style:Dh({height:"100%",width:"100%",maxHeight:k,maxWidth:X},B.props.style)}:{})):B})},[n,b,d,g,m,v,z,l]);return I.createElement("div",{id:x?"".concat(x):void 0,className:rt("recharts-responsive-container",E),style:Dh(Dh({},C),{},{width:l,height:d,minWidth:v,minHeight:m,maxHeight:g}),ref:A},F)}),Fz=function(t){return null};Fz.displayName="Cell";function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function ID(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 BS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ID(Object(n),!0).forEach(function(r){Lae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lae(e,t,n){return t=zae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zae(e){var t=Bae(e,"string");return of(t)=="symbol"?t:t+""}function Bae(e,t){if(of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dl={widthCache:{},cacheCount:0},qae=2e3,Uae={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LD="recharts_measurement_span";function Hae(e){var t=BS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Iu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||wc.isSsr)return{width:0,height:0};var r=Hae(n),i=JSON.stringify({text:t,copyStyle:r});if(dl.widthCache[i])return dl.widthCache[i];try{var o=document.getElementById(LD);o||(o=document.createElement("span"),o.setAttribute("id",LD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=BS(BS({},Uae),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),d={width:u.width,height:u.height};return dl.widthCache[i]=d,++dl.cacheCount>qae&&(dl.cacheCount=0,dl.widthCache={}),d}catch{return{width:0,height:0}}},Fae=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function Hm(e,t){return Wae(e)||Yae(e,t)||Vae(e,t)||Gae()}function Gae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
446
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vae(e,t){if(e){if(typeof e=="string")return zD(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 zD(e,t)}}function zD(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 Yae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Wae(e){if(Array.isArray(e))return e}function Kae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(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,Qae(r.key),r)}}function Xae(e,t,n){return t&&BD(e.prototype,t),n&&BD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qae(e){var t=Zae(e,"string");return sf(t)=="symbol"?t:t+""}function Zae(e,t){if(sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,UD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Jae=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,eie=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Gz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},tie=Object.keys(Gz),vl="NaN";function nie(e,t){return e*Gz[t]}var Ph=(function(){function e(t,n){Kae(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Jae.test(n)&&(this.num=NaN,this.unit=""),tie.includes(n)&&(this.num=nie(t,n),this.unit="px")}return Xae(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=eie.exec(n))!==null&&r!==void 0?r:[],o=Hm(i,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function Vz(e){if(e.includes(vl))return vl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=qD.exec(t))!==null&&n!==void 0?n:[],i=Hm(r,4),o=i[1],l=i[2],u=i[3],d=Ph.parse(o??""),h=Ph.parse(u??""),v=l==="*"?d.multiply(h):d.divide(h);if(v.isNaN())return vl;t=t.replace(qD,v.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,g=(m=UD.exec(t))!==null&&m!==void 0?m:[],b=Hm(g,4),O=b[1],S=b[2],x=b[3],E=Ph.parse(O??""),N=Ph.parse(x??""),_=S==="+"?E.add(N):E.subtract(N);if(_.isNaN())return vl;t=t.replace(UD,_.toString())}return t}var HD=/\(([^()]*)\)/;function rie(e){for(var t=e;t.includes("(");){var n=HD.exec(t),r=Hm(n,2),i=r[1];t=t.replace(HD,Vz(i))}return t}function aie(e){var t=e.replace(/\s+/g,"");return t=rie(t),t=Vz(t),t}function iie(e){try{return aie(e)}catch{return vl}}function Ww(e){var t=iie(e.slice(5,-1));return t===vl?"":t}var oie=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],sie=["dx","dy","angle","className","breakAll"];function qS(){return qS=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},qS.apply(this,arguments)}function FD(e,t){if(e==null)return{};var n=lie(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lie(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 GD(e,t){return die(e)||fie(e,t)||uie(e,t)||cie()}function cie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
447
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uie(e,t){if(e){if(typeof e=="string")return VD(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 VD(e,t)}}function VD(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 fie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function die(e){if(Array.isArray(e))return e}var Yz=/[ \f\n\r\t\v\u2028\u2029]+/,Wz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Qe(n)||(r?o=n.toString().split(""):o=n.toString().split(Yz));var l=o.map(function(d){return{word:d,width:Iu(d,i).width}}),u=r?0:Iu(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},hie=function(t,n,r,i,o){var l=t.maxLines,u=t.children,d=t.style,h=t.breakAll,v=be(l),m=u,g=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(k,H){var B=H.word,Z=H.width,le=k[k.length-1];if(le&&(i==null||o||le.width+Z+r<Number(i)))le.words.push(B),le.width+=Z+r;else{var $={words:[B],width:Z};k.push($)}return k},[])},b=g(n),O=function(X){return X.reduce(function(k,H){return k.width>H.width?k:H})};if(!v)return b;for(var S="…",x=function(X){var k=m.slice(0,X),H=Wz({breakAll:h,style:d,children:k+S}).wordsWithComputedWidth,B=g(H),Z=B.length>l||O(B).width>Number(i);return[Z,B]},E=0,N=m.length-1,_=0,C;E<=N&&_<=m.length-1;){var A=Math.floor((E+N)/2),M=A-1,R=x(M),D=GD(R,2),z=D[0],G=D[1],L=x(A),F=GD(L,1),W=F[0];if(!z&&!W&&(E=A+1),z&&W&&(N=A-1),!z&&W){C=G;break}_++}return C||b},YD=function(t){var n=Qe(t)?[]:t.toString().split(Yz);return[{words:n}]},mie=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!wc.isSsr){var d,h,v=Wz({breakAll:l,children:i,style:o});if(v){var m=v.wordsWithComputedWidth,g=v.spaceWidth;d=m,h=g}else return YD(i);return hie({breakAll:l,children:i,maxLines:u,style:o},d,h,n,r)}return YD(i)},WD="#808080",Fm=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.lineHeight,u=l===void 0?"1em":l,d=t.capHeight,h=d===void 0?"0.71em":d,v=t.scaleToFit,m=v===void 0?!1:v,g=t.textAnchor,b=g===void 0?"start":g,O=t.verticalAnchor,S=O===void 0?"end":O,x=t.fill,E=x===void 0?WD:x,N=FD(t,oie),_=w.useMemo(function(){return mie({breakAll:N.breakAll,children:N.children,maxLines:N.maxLines,scaleToFit:m,style:N.style,width:N.width})},[N.breakAll,N.children,N.maxLines,m,N.style,N.width]),C=N.dx,A=N.dy,M=N.angle,R=N.className,D=N.breakAll,z=FD(N,sie);if(!Jt(r)||!Jt(o))return null;var G=r+(be(C)?C:0),L=o+(be(A)?A:0),F;switch(S){case"start":F=Ww("calc(".concat(h,")"));break;case"middle":F=Ww("calc(".concat((_.length-1)/2," * -").concat(u," + (").concat(h," / 2))"));break;default:F=Ww("calc(".concat(_.length-1," * -").concat(u,")"));break}var W=[];if(m){var Q=_[0].width,X=N.width;W.push("scale(".concat((be(X)?X/Q:1)/Q,")"))}return M&&W.push("rotate(".concat(M,", ").concat(G,", ").concat(L,")")),W.length&&(z.transform=W.join(" ")),I.createElement("text",qS({},nt(z,!0),{x:G,y:L,className:rt("recharts-text",R),textAnchor:b,fill:E.includes("url")?WD:E}),_.map(function(k,H){var B=k.words.join(D?"":" ");return I.createElement("tspan",{x:G,dy:H===0?F:u,key:"".concat(B,"-").concat(H)},B)}))};function Xi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pie(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hE(e){let t,n,r;e.length!==2?(t=Xi,n=(u,d)=>Xi(e(u),d),r=(u,d)=>e(u)-d):(t=e===Xi||e===pie?e:vie,n=e,r=e);function i(u,d,h=0,v=u.length){if(h<v){if(t(d,d)!==0)return v;do{const m=h+v>>>1;n(u[m],d)<0?h=m+1:v=m}while(h<v)}return h}function o(u,d,h=0,v=u.length){if(h<v){if(t(d,d)!==0)return v;do{const m=h+v>>>1;n(u[m],d)<=0?h=m+1:v=m}while(h<v)}return h}function l(u,d,h=0,v=u.length){const m=i(u,d,h,v-1);return m>h&&r(u[m-1],d)>-r(u[m],d)?m-1:m}return{left:i,center:l,right:o}}function vie(){return 0}function Kz(e){return e===null?NaN:+e}function*gie(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const yie=hE(Xi),Zf=yie.right;hE(Kz).center;class KD extends Map{constructor(t,n=wie){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(XD(this,t))}has(t){return super.has(XD(this,t))}set(t,n){return super.set(bie(this,t),n)}delete(t){return super.delete(xie(this,t))}}function XD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function bie({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function xie({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function wie(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Sie(e=Xi){if(e===Xi)return Xz;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 Xz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const jie=Math.sqrt(50),Oie=Math.sqrt(10),Eie=Math.sqrt(2);function Gm(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=jie?10:o>=Oie?5:o>=Eie?2:1;let u,d,h;return i<0?(h=Math.pow(10,-i)/l,u=Math.round(e*h),d=Math.round(t*h),u/h<e&&++u,d/h>t&&--d,h=-h):(h=Math.pow(10,i)*l,u=Math.round(e/h),d=Math.round(t/h),u*h<e&&++u,d*h>t&&--d),d<u&&.5<=n&&n<2?Gm(e,t,n*2):[u,d,h]}function US(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?Gm(t,e,n):Gm(e,t,n);if(!(o>=i))return[];const u=o-i+1,d=new Array(u);if(r)if(l<0)for(let h=0;h<u;++h)d[h]=(o-h)/-l;else for(let h=0;h<u;++h)d[h]=(o-h)*l;else if(l<0)for(let h=0;h<u;++h)d[h]=(i+h)/-l;else for(let h=0;h<u;++h)d[h]=(i+h)*l;return d}function HS(e,t,n){return t=+t,e=+e,n=+n,Gm(e,t,n)[2]}function FS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?HS(t,e,n):HS(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function QD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function ZD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Qz(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?Xz:Sie(i);r>n;){if(r-n>600){const d=r-n+1,h=t-n+1,v=Math.log(d),m=.5*Math.exp(2*v/3),g=.5*Math.sqrt(v*m*(d-m)/d)*(h-d/2<0?-1:1),b=Math.max(n,Math.floor(t-h*m/d+g)),O=Math.min(r,Math.floor(t+(d-h)*m/d+g));Qz(e,t,b,O,i)}const o=e[t];let l=n,u=r;for(Ou(e,n,t),i(e[r],o)>0&&Ou(e,n,r);l<u;){for(Ou(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?Ou(e,n,u):(++u,Ou(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Ou(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _ie(e,t,n){if(e=Float64Array.from(gie(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ZD(e);if(t>=1)return QD(e);var r,i=(r-1)*t,o=Math.floor(i),l=QD(Qz(e,o).subarray(0,o+1)),u=ZD(e.subarray(o+1));return l+(u-l)*(i-o)}}function Nie(e,t,n=Kz){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,o=Math.floor(i),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function Aie(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function kr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function pi(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 GS=Symbol("implicit");function mE(){var e=new KD,t=[],n=[],r=GS;function i(o){let l=e.get(o);if(l===void 0){if(r!==GS)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new KD;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return mE(t,n).unknown(r)},kr.apply(i,arguments),i}function lf(){var e=mE().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,d=0,h=0,v=.5;delete e.unknown;function m(){var g=t().length,b=i<r,O=b?i:r,S=b?r:i;o=(S-O)/Math.max(1,g-d+h*2),u&&(o=Math.floor(o)),O+=(S-O-o*(g-d))*v,l=o*(1-d),u&&(O=Math.round(O),l=Math.round(l));var x=Aie(g).map(function(E){return O+o*E});return n(b?x.reverse():x)}return e.domain=function(g){return arguments.length?(t(g),m()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,m()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,u=!0,m()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(u=!!g,m()):u},e.padding=function(g){return arguments.length?(d=Math.min(1,h=+g),m()):d},e.paddingInner=function(g){return arguments.length?(d=Math.min(1,g),m()):d},e.paddingOuter=function(g){return arguments.length?(h=+g,m()):h},e.align=function(g){return arguments.length?(v=Math.max(0,Math.min(1,g)),m()):v},e.copy=function(){return lf(t(),[r,i]).round(u).paddingInner(d).paddingOuter(h).align(v)},kr.apply(m(),arguments)}function Zz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Zz(t())},e}function Lu(){return Zz(lf.apply(null,arguments).paddingInner(1))}function pE(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jf(){}var cf=.7,Vm=1/cf,El="\\s*([+-]?\\d+)\\s*",uf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cie=/^#([0-9a-f]{3,8})$/,Tie=new RegExp(`^rgb\\(${El},${El},${El}\\)$`),Mie=new RegExp(`^rgb\\(${ya},${ya},${ya}\\)$`),Rie=new RegExp(`^rgba\\(${El},${El},${El},${uf}\\)$`),Die=new RegExp(`^rgba\\(${ya},${ya},${ya},${uf}\\)$`),Pie=new RegExp(`^hsl\\(${uf},${ya},${ya}\\)$`),kie=new RegExp(`^hsla\\(${uf},${ya},${ya},${uf}\\)$`),JD={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};pE(Jf,ff,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eP,formatHex:eP,formatHex8:$ie,formatHsl:Iie,formatRgb:tP,toString:tP});function eP(){return this.rgb().formatHex()}function $ie(){return this.rgb().formatHex8()}function Iie(){return eB(this).formatHsl()}function tP(){return this.rgb().formatRgb()}function ff(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cie.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?nP(t):n===3?new Gn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?kh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?kh(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=Tie.exec(e))?new Gn(t[1],t[2],t[3],1):(t=Mie.exec(e))?new Gn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Rie.exec(e))?kh(t[1],t[2],t[3],t[4]):(t=Die.exec(e))?kh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Pie.exec(e))?iP(t[1],t[2]/100,t[3]/100,1):(t=kie.exec(e))?iP(t[1],t[2]/100,t[3]/100,t[4]):JD.hasOwnProperty(e)?nP(JD[e]):e==="transparent"?new Gn(NaN,NaN,NaN,0):null}function nP(e){return new Gn(e>>16&255,e>>8&255,e&255,1)}function kh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Gn(e,t,n,r)}function Lie(e){return e instanceof Jf||(e=ff(e)),e?(e=e.rgb(),new Gn(e.r,e.g,e.b,e.opacity)):new Gn}function VS(e,t,n,r){return arguments.length===1?Lie(e):new Gn(e,t,n,r??1)}function Gn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}pE(Gn,VS,Jz(Jf,{brighter(e){return e=e==null?Vm:Math.pow(Vm,e),new Gn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cf:Math.pow(cf,e),new Gn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gn(Ko(this.r),Ko(this.g),Ko(this.b),Ym(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:rP,formatHex:rP,formatHex8:zie,formatRgb:aP,toString:aP}));function rP(){return`#${Go(this.r)}${Go(this.g)}${Go(this.b)}`}function zie(){return`#${Go(this.r)}${Go(this.g)}${Go(this.b)}${Go((isNaN(this.opacity)?1:this.opacity)*255)}`}function aP(){const e=Ym(this.opacity);return`${e===1?"rgb(":"rgba("}${Ko(this.r)}, ${Ko(this.g)}, ${Ko(this.b)}${e===1?")":`, ${e})`}`}function Ym(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ko(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Go(e){return e=Ko(e),(e<16?"0":"")+e.toString(16)}function iP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vr(e,t,n,r)}function eB(e){if(e instanceof Vr)return new Vr(e.h,e.s,e.l,e.opacity);if(e instanceof Jf||(e=ff(e)),!e)return new Vr;if(e instanceof Vr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-i,d=(o+i)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=d<.5?o+i:2-o-i,l*=60):u=d>0&&d<1?0:l,new Vr(l,u,d,e.opacity)}function Bie(e,t,n,r){return arguments.length===1?eB(e):new Vr(e,t,n,r??1)}function Vr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}pE(Vr,Bie,Jz(Jf,{brighter(e){return e=e==null?Vm:Math.pow(Vm,e),new Vr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cf:Math.pow(cf,e),new Vr(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 Gn(Kw(e>=240?e-240:e+120,i,r),Kw(e,i,r),Kw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Vr(oP(this.h),$h(this.s),$h(this.l),Ym(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=Ym(this.opacity);return`${e===1?"hsl(":"hsla("}${oP(this.h)}, ${$h(this.s)*100}%, ${$h(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oP(e){return e=(e||0)%360,e<0?e+360:e}function $h(e){return Math.max(0,Math.min(1,e||0))}function Kw(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 vE=e=>()=>e;function qie(e,t){return function(n){return e+n*t}}function Uie(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 Hie(e){return(e=+e)==1?tB:function(t,n){return n-t?Uie(t,n,e):vE(isNaN(t)?n:t)}}function tB(e,t){var n=t-e;return n?qie(e,n):vE(isNaN(e)?t:e)}const sP=(function e(t){var n=Hie(t);function r(i,o){var l=n((i=VS(i)).r,(o=VS(o)).r),u=n(i.g,o.g),d=n(i.b,o.b),h=tB(i.opacity,o.opacity);return function(v){return i.r=l(v),i.g=u(v),i.b=d(v),i.opacity=h(v),i+""}}return r.gamma=e,r})(1);function Fie(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Gie(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vie(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=Sc(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=i[l](u);return o}}function Yie(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Wie(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]=Sc(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var YS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xw=new RegExp(YS.source,"g");function Kie(e){return function(){return e}}function Xie(e){return function(t){return e(t)+""}}function Qie(e,t){var n=YS.lastIndex=Xw.lastIndex=0,r,i,o,l=-1,u=[],d=[];for(e=e+"",t=t+"";(r=YS.exec(e))&&(i=Xw.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,d.push({i:l,x:Wm(r,i)})),n=Xw.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?Xie(d[0].x):Kie(t):(t=d.length,function(h){for(var v=0,m;v<t;++v)u[(m=d[v]).i]=m.x(h);return u.join("")})}function Sc(e,t){var n=typeof t,r;return t==null||n==="boolean"?vE(t):(n==="number"?Wm:n==="string"?(r=ff(t))?(t=r,sP):Qie:t instanceof ff?sP:t instanceof Date?Yie:Gie(t)?Fie:Array.isArray(t)?Vie:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Wie:Wm)(e,t)}function gE(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Zie(e,t){t===void 0&&(t=e,e=Sc);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function Jie(e){return function(){return e}}function Km(e){return+e}var lP=[0,1];function _n(e){return e}function WS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Jie(isNaN(t)?NaN:.5)}function eoe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function toe(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=WS(i,r),o=n(l,o)):(r=WS(r,i),o=n(o,l)),function(u){return o(r(u))}}function noe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=WS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var d=Zf(e,u,1,r)-1;return o[d](i[d](u))}}function ed(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Dv(){var e=lP,t=lP,n=Sc,r,i,o,l=_n,u,d,h;function v(){var g=Math.min(e.length,t.length);return l!==_n&&(l=eoe(e[0],e[g-1])),u=g>2?noe:toe,d=h=null,m}function m(g){return g==null||isNaN(g=+g)?o:(d||(d=u(e.map(r),t,n)))(r(l(g)))}return m.invert=function(g){return l(i((h||(h=u(t,e.map(r),Wm)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,Km),v()):e.slice()},m.range=function(g){return arguments.length?(t=Array.from(g),v()):t.slice()},m.rangeRound=function(g){return t=Array.from(g),n=gE,v()},m.clamp=function(g){return arguments.length?(l=g?!0:_n,v()):l!==_n},m.interpolate=function(g){return arguments.length?(n=g,v()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,b){return r=g,i=b,v()}}function yE(){return Dv()(_n,_n)}function roe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xm(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ll(e){return e=Xm(Math.abs(e)),e?e[1]:NaN}function aoe(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],d=0;i>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),o.push(n.substring(i-=u,i+u)),!((d+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function ioe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ooe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function df(e){if(!(t=ooe.exec(e)))throw new Error("invalid format: "+e);var t;return new bE({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]})}df.prototype=bE.prototype;function bE(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+""}bE.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 soe(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 nB;function loe(e,t){var n=Xm(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(nB=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xm(e,Math.max(0,t+o-1))[0]}function cP(e,t){var n=Xm(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 uP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:roe,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)=>cP(e*100,t),r:cP,s:loe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fP(e){return e}var dP=Array.prototype.map,hP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function coe(e){var t=e.grouping===void 0||e.thousands===void 0?fP:aoe(dP.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+"",o=e.numerals===void 0?fP:ioe(dP.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function h(m){m=df(m);var g=m.fill,b=m.align,O=m.sign,S=m.symbol,x=m.zero,E=m.width,N=m.comma,_=m.precision,C=m.trim,A=m.type;A==="n"?(N=!0,A="g"):uP[A]||(_===void 0&&(_=12),C=!0,A="g"),(x||g==="0"&&b==="=")&&(x=!0,g="0",b="=");var M=S==="$"?n:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",R=S==="$"?r:/[%p]/.test(A)?l:"",D=uP[A],z=/[defgprs%]/.test(A);_=_===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function G(L){var F=M,W=R,Q,X,k;if(A==="c")W=D(L)+W,L="";else{L=+L;var H=L<0||1/L<0;if(L=isNaN(L)?d:D(Math.abs(L),_),C&&(L=soe(L)),H&&+L==0&&O!=="+"&&(H=!1),F=(H?O==="("?O:u:O==="-"||O==="("?"":O)+F,W=(A==="s"?hP[8+nB/3]:"")+W+(H&&O==="("?")":""),z){for(Q=-1,X=L.length;++Q<X;)if(k=L.charCodeAt(Q),48>k||k>57){W=(k===46?i+L.slice(Q+1):L.slice(Q))+W,L=L.slice(0,Q);break}}}N&&!x&&(L=t(L,1/0));var B=F.length+L.length+W.length,Z=B<E?new Array(E-B+1).join(g):"";switch(N&&x&&(L=t(Z+L,Z.length?E-W.length:1/0),Z=""),b){case"<":L=F+L+W+Z;break;case"=":L=F+Z+L+W;break;case"^":L=Z.slice(0,B=Z.length>>1)+F+L+W+Z.slice(B);break;default:L=Z+F+L+W;break}return o(L)}return G.toString=function(){return m+""},G}function v(m,g){var b=h((m=df(m),m.type="f",m)),O=Math.max(-8,Math.min(8,Math.floor(Ll(g)/3)))*3,S=Math.pow(10,-O),x=hP[8+O/3];return function(E){return b(S*E)+x}}return{format:h,formatPrefix:v}}var Ih,xE,rB;uoe({thousands:",",grouping:[3],currency:["$",""]});function uoe(e){return Ih=coe(e),xE=Ih.format,rB=Ih.formatPrefix,Ih}function foe(e){return Math.max(0,-Ll(Math.abs(e)))}function doe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ll(t)/3)))*3-Ll(Math.abs(e)))}function hoe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ll(t)-Ll(e))+1}function aB(e,t,n,r){var i=FS(e,t,n),o;switch(r=df(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=doe(i,l))&&(r.precision=o),rB(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=hoe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=foe(i))&&(r.precision=o-(r.type==="%")*2);break}}return xE(r)}function ho(e){var t=e.domain;return e.ticks=function(n){var r=t();return US(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return aB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],u=r[o],d,h,v=10;for(u<l&&(h=l,l=u,u=h,h=i,i=o,o=h);v-- >0;){if(h=HS(l,u,n),h===d)return r[i]=l,r[o]=u,t(r);if(h>0)l=Math.floor(l/h)*h,u=Math.ceil(u/h)*h;else if(h<0)l=Math.ceil(l*h)/h,u=Math.floor(u*h)/h;else break;d=h}return e},e}function Qm(){var e=yE();return e.copy=function(){return ed(e,Qm())},kr.apply(e,arguments),ho(e)}function iB(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,Km),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return iB(e).unknown(t)},e=arguments.length?Array.from(e,Km):[0,1],ho(n)}function oB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function mP(e){return Math.log(e)}function pP(e){return Math.exp(e)}function moe(e){return-Math.log(-e)}function poe(e){return-Math.exp(-e)}function voe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function goe(e){return e===10?voe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function yoe(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 vP(e){return(t,n)=>-e(-t,n)}function wE(e){const t=e(mP,pP),n=t.domain;let r=10,i,o;function l(){return i=yoe(r),o=goe(r),n()[0]<0?(i=vP(i),o=vP(o),e(moe,poe)):e(mP,pP),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const d=n();let h=d[0],v=d[d.length-1];const m=v<h;m&&([h,v]=[v,h]);let g=i(h),b=i(v),O,S;const x=u==null?10:+u;let E=[];if(!(r%1)&&b-g<x){if(g=Math.floor(g),b=Math.ceil(b),h>0){for(;g<=b;++g)for(O=1;O<r;++O)if(S=g<0?O/o(-g):O*o(g),!(S<h)){if(S>v)break;E.push(S)}}else for(;g<=b;++g)for(O=r-1;O>=1;--O)if(S=g>0?O/o(-g):O*o(g),!(S<h)){if(S>v)break;E.push(S)}E.length*2<x&&(E=US(h,v,x))}else E=US(g,b,Math.min(b-g,x)).map(o);return m?E.reverse():E},t.tickFormat=(u,d)=>{if(u==null&&(u=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=df(d)).precision==null&&(d.trim=!0),d=xE(d)),u===1/0)return d;const h=Math.max(1,r*u/t.ticks().length);return v=>{let m=v/o(Math.round(i(v)));return m*r<r-.5&&(m*=r),m<=h?d(v):""}},t.nice=()=>n(oB(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function sB(){const e=wE(Dv()).domain([1,10]);return e.copy=()=>ed(e,sB()).base(e.base()),kr.apply(e,arguments),e}function gP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function yP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function SE(e){var t=1,n=e(gP(t),yP(t));return n.constant=function(r){return arguments.length?e(gP(t=+r),yP(t)):t},ho(n)}function lB(){var e=SE(Dv());return e.copy=function(){return ed(e,lB()).constant(e.constant())},kr.apply(e,arguments)}function bP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function boe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xoe(e){return e<0?-e*e:e*e}function jE(e){var t=e(_n,_n),n=1;function r(){return n===1?e(_n,_n):n===.5?e(boe,xoe):e(bP(n),bP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ho(t)}function OE(){var e=jE(Dv());return e.copy=function(){return ed(e,OE()).exponent(e.exponent())},kr.apply(e,arguments),e}function woe(){return OE.apply(null,arguments).exponent(.5)}function xP(e){return Math.sign(e)*e*e}function Soe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function cB(){var e=yE(),t=[0,1],n=!1,r;function i(o){var l=Soe(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(xP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Km)).map(xP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return cB(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},kr.apply(i,arguments),ho(i)}function uB(){var e=[],t=[],n=[],r;function i(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=Nie(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Zf(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Xi),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return uB().domain(e).range(t).unknown(r)},kr.apply(o,arguments)}function fB(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(d){return d!=null&&d<=d?i[Zf(r,d,0,n)]:o}function u(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return l}return l.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,u()):[e,t]},l.range=function(d){return arguments.length?(n=(i=Array.from(d)).length-1,u()):i.slice()},l.invertExtent=function(d){var h=i.indexOf(d);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(d){return arguments.length&&(o=d),l},l.thresholds=function(){return r.slice()},l.copy=function(){return fB().domain([e,t]).range(i).unknown(o)},kr.apply(ho(l),arguments)}function dB(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Zf(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return dB().domain(e).range(t).unknown(n)},kr.apply(i,arguments)}const Qw=new Date,Zw=new Date;function en(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,u)=>{const d=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return d;let h;do d.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<l);return d},i.filter=o=>en(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(Qw.setTime(+o),Zw.setTime(+l),e(Qw),e(Zw),Math.floor(n(Qw,Zw))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const Zm=en(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?en(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Zm);Zm.range;const Ya=1e3,Cr=Ya*60,Wa=Cr*60,si=Wa*24,EE=si*7,wP=si*30,Jw=si*365,Vo=en(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ya)},(e,t)=>(t-e)/Ya,e=>e.getUTCSeconds());Vo.range;const _E=en(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ya)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getMinutes());_E.range;const NE=en(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCMinutes());NE.range;const AE=en(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ya-e.getMinutes()*Cr)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getHours());AE.range;const CE=en(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getUTCHours());CE.range;const td=en(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Cr)/si,e=>e.getDate()-1);td.range;const Pv=en(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/si,e=>e.getUTCDate()-1);Pv.range;const hB=en(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/si,e=>Math.floor(e/si));hB.range;function ps(e){return en(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())*Cr)/EE)}const kv=ps(0),Jm=ps(1),joe=ps(2),Ooe=ps(3),zl=ps(4),Eoe=ps(5),_oe=ps(6);kv.range;Jm.range;joe.range;Ooe.range;zl.range;Eoe.range;_oe.range;function vs(e){return en(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)/EE)}const $v=vs(0),ep=vs(1),Noe=vs(2),Aoe=vs(3),Bl=vs(4),Coe=vs(5),Toe=vs(6);$v.range;ep.range;Noe.range;Aoe.range;Bl.range;Coe.range;Toe.range;const TE=en(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());TE.range;const ME=en(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());ME.range;const li=en(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());li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:en(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)});li.range;const ci=en(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());ci.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:en(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)});ci.range;function mB(e,t,n,r,i,o){const l=[[Vo,1,Ya],[Vo,5,5*Ya],[Vo,15,15*Ya],[Vo,30,30*Ya],[o,1,Cr],[o,5,5*Cr],[o,15,15*Cr],[o,30,30*Cr],[i,1,Wa],[i,3,3*Wa],[i,6,6*Wa],[i,12,12*Wa],[r,1,si],[r,2,2*si],[n,1,EE],[t,1,wP],[t,3,3*wP],[e,1,Jw]];function u(h,v,m){const g=v<h;g&&([h,v]=[v,h]);const b=m&&typeof m.range=="function"?m:d(h,v,m),O=b?b.range(h,+v+1):[];return g?O.reverse():O}function d(h,v,m){const g=Math.abs(v-h)/m,b=hE(([,,x])=>x).right(l,g);if(b===l.length)return e.every(FS(h/Jw,v/Jw,m));if(b===0)return Zm.every(Math.max(FS(h,v,m),1));const[O,S]=l[g/l[b-1][2]<l[b][2]/g?b-1:b];return O.every(S)}return[u,d]}const[Moe,Roe]=mB(ci,ME,$v,hB,CE,NE),[Doe,Poe]=mB(li,TE,kv,td,AE,_E);function e1(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 t1(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 Eu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function koe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,d=e.shortMonths,h=_u(i),v=Nu(i),m=_u(o),g=Nu(o),b=_u(l),O=Nu(l),S=_u(u),x=Nu(u),E=_u(d),N=Nu(d),_={a:H,A:B,b:Z,B:le,c:null,d:NP,e:NP,f:ase,g:mse,G:vse,H:tse,I:nse,j:rse,L:pB,m:ise,M:ose,p:$,q:Y,Q:TP,s:MP,S:sse,u:lse,U:cse,V:use,w:fse,W:dse,x:null,X:null,y:hse,Y:pse,Z:gse,"%":CP},C={a:q,A:U,b:ne,B:fe,c:null,d:AP,e:AP,f:wse,g:Mse,G:Dse,H:yse,I:bse,j:xse,L:gB,m:Sse,M:jse,p:ie,q:pe,Q:TP,s:MP,S:Ose,u:Ese,U:_se,V:Nse,w:Ase,W:Cse,x:null,X:null,y:Tse,Y:Rse,Z:Pse,"%":CP},A={a:G,A:L,b:F,B:W,c:Q,d:EP,e:EP,f:Qoe,g:OP,G:jP,H:_P,I:_P,j:Yoe,L:Xoe,m:Voe,M:Woe,p:z,q:Goe,Q:Joe,s:ese,S:Koe,u:Boe,U:qoe,V:Uoe,w:zoe,W:Hoe,x:X,X:k,y:OP,Y:jP,Z:Foe,"%":Zoe};_.x=M(n,_),_.X=M(r,_),_.c=M(t,_),C.x=M(n,C),C.X=M(r,C),C.c=M(t,C);function M(re,ve){return function(ge){var oe=[],ke=-1,we=0,ze=re.length,Ze,lt,tn;for(ge instanceof Date||(ge=new Date(+ge));++ke<ze;)re.charCodeAt(ke)===37&&(oe.push(re.slice(we,ke)),(lt=SP[Ze=re.charAt(++ke)])!=null?Ze=re.charAt(++ke):lt=Ze==="e"?" ":"0",(tn=ve[Ze])&&(Ze=tn(ge,lt)),oe.push(Ze),we=ke+1);return oe.push(re.slice(we,ke)),oe.join("")}}function R(re,ve){return function(ge){var oe=Eu(1900,void 0,1),ke=D(oe,re,ge+="",0),we,ze;if(ke!=ge.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(ve&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(we=t1(Eu(oe.y,0,1)),ze=we.getUTCDay(),we=ze>4||ze===0?ep.ceil(we):ep(we),we=Pv.offset(we,(oe.V-1)*7),oe.y=we.getUTCFullYear(),oe.m=we.getUTCMonth(),oe.d=we.getUTCDate()+(oe.w+6)%7):(we=e1(Eu(oe.y,0,1)),ze=we.getDay(),we=ze>4||ze===0?Jm.ceil(we):Jm(we),we=td.offset(we,(oe.V-1)*7),oe.y=we.getFullYear(),oe.m=we.getMonth(),oe.d=we.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),ze="Z"in oe?t1(Eu(oe.y,0,1)).getUTCDay():e1(Eu(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(ze+5)%7:oe.w+oe.U*7-(ze+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,t1(oe)):e1(oe)}}function D(re,ve,ge,oe){for(var ke=0,we=ve.length,ze=ge.length,Ze,lt;ke<we;){if(oe>=ze)return-1;if(Ze=ve.charCodeAt(ke++),Ze===37){if(Ze=ve.charAt(ke++),lt=A[Ze in SP?ve.charAt(ke++):Ze],!lt||(oe=lt(re,ge,oe))<0)return-1}else if(Ze!=ge.charCodeAt(oe++))return-1}return oe}function z(re,ve,ge){var oe=h.exec(ve.slice(ge));return oe?(re.p=v.get(oe[0].toLowerCase()),ge+oe[0].length):-1}function G(re,ve,ge){var oe=b.exec(ve.slice(ge));return oe?(re.w=O.get(oe[0].toLowerCase()),ge+oe[0].length):-1}function L(re,ve,ge){var oe=m.exec(ve.slice(ge));return oe?(re.w=g.get(oe[0].toLowerCase()),ge+oe[0].length):-1}function F(re,ve,ge){var oe=E.exec(ve.slice(ge));return oe?(re.m=N.get(oe[0].toLowerCase()),ge+oe[0].length):-1}function W(re,ve,ge){var oe=S.exec(ve.slice(ge));return oe?(re.m=x.get(oe[0].toLowerCase()),ge+oe[0].length):-1}function Q(re,ve,ge){return D(re,t,ve,ge)}function X(re,ve,ge){return D(re,n,ve,ge)}function k(re,ve,ge){return D(re,r,ve,ge)}function H(re){return l[re.getDay()]}function B(re){return o[re.getDay()]}function Z(re){return d[re.getMonth()]}function le(re){return u[re.getMonth()]}function $(re){return i[+(re.getHours()>=12)]}function Y(re){return 1+~~(re.getMonth()/3)}function q(re){return l[re.getUTCDay()]}function U(re){return o[re.getUTCDay()]}function ne(re){return d[re.getUTCMonth()]}function fe(re){return u[re.getUTCMonth()]}function ie(re){return i[+(re.getUTCHours()>=12)]}function pe(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var ve=M(re+="",_);return ve.toString=function(){return re},ve},parse:function(re){var ve=R(re+="",!1);return ve.toString=function(){return re},ve},utcFormat:function(re){var ve=M(re+="",C);return ve.toString=function(){return re},ve},utcParse:function(re){var ve=R(re+="",!0);return ve.toString=function(){return re},ve}}}var SP={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,$oe=/^%/,Ioe=/[\\^$*+?|[\]().{}]/g;function ot(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Loe(e){return e.replace(Ioe,"\\$&")}function _u(e){return new RegExp("^(?:"+e.map(Loe).join("|")+")","i")}function Nu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function zoe(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Boe(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qoe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Uoe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Hoe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jP(e,t,n){var r=cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function OP(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Foe(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 Goe(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Voe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function EP(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Yoe(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _P(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Woe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Koe(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Xoe(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Qoe(e,t,n){var r=cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zoe(e,t,n){var r=$oe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Joe(e,t,n){var r=cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ese(e,t,n){var r=cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function NP(e,t){return ot(e.getDate(),t,2)}function tse(e,t){return ot(e.getHours(),t,2)}function nse(e,t){return ot(e.getHours()%12||12,t,2)}function rse(e,t){return ot(1+td.count(li(e),e),t,3)}function pB(e,t){return ot(e.getMilliseconds(),t,3)}function ase(e,t){return pB(e,t)+"000"}function ise(e,t){return ot(e.getMonth()+1,t,2)}function ose(e,t){return ot(e.getMinutes(),t,2)}function sse(e,t){return ot(e.getSeconds(),t,2)}function lse(e){var t=e.getDay();return t===0?7:t}function cse(e,t){return ot(kv.count(li(e)-1,e),t,2)}function vB(e){var t=e.getDay();return t>=4||t===0?zl(e):zl.ceil(e)}function use(e,t){return e=vB(e),ot(zl.count(li(e),e)+(li(e).getDay()===4),t,2)}function fse(e){return e.getDay()}function dse(e,t){return ot(Jm.count(li(e)-1,e),t,2)}function hse(e,t){return ot(e.getFullYear()%100,t,2)}function mse(e,t){return e=vB(e),ot(e.getFullYear()%100,t,2)}function pse(e,t){return ot(e.getFullYear()%1e4,t,4)}function vse(e,t){var n=e.getDay();return e=n>=4||n===0?zl(e):zl.ceil(e),ot(e.getFullYear()%1e4,t,4)}function gse(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ot(t/60|0,"0",2)+ot(t%60,"0",2)}function AP(e,t){return ot(e.getUTCDate(),t,2)}function yse(e,t){return ot(e.getUTCHours(),t,2)}function bse(e,t){return ot(e.getUTCHours()%12||12,t,2)}function xse(e,t){return ot(1+Pv.count(ci(e),e),t,3)}function gB(e,t){return ot(e.getUTCMilliseconds(),t,3)}function wse(e,t){return gB(e,t)+"000"}function Sse(e,t){return ot(e.getUTCMonth()+1,t,2)}function jse(e,t){return ot(e.getUTCMinutes(),t,2)}function Ose(e,t){return ot(e.getUTCSeconds(),t,2)}function Ese(e){var t=e.getUTCDay();return t===0?7:t}function _se(e,t){return ot($v.count(ci(e)-1,e),t,2)}function yB(e){var t=e.getUTCDay();return t>=4||t===0?Bl(e):Bl.ceil(e)}function Nse(e,t){return e=yB(e),ot(Bl.count(ci(e),e)+(ci(e).getUTCDay()===4),t,2)}function Ase(e){return e.getUTCDay()}function Cse(e,t){return ot(ep.count(ci(e)-1,e),t,2)}function Tse(e,t){return ot(e.getUTCFullYear()%100,t,2)}function Mse(e,t){return e=yB(e),ot(e.getUTCFullYear()%100,t,2)}function Rse(e,t){return ot(e.getUTCFullYear()%1e4,t,4)}function Dse(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Bl(e):Bl.ceil(e),ot(e.getUTCFullYear()%1e4,t,4)}function Pse(){return"+0000"}function CP(){return"%"}function TP(e){return+e}function MP(e){return Math.floor(+e/1e3)}var hl,bB,xB;kse({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 kse(e){return hl=koe(e),bB=hl.format,hl.parse,xB=hl.utcFormat,hl.utcParse,hl}function $se(e){return new Date(e)}function Ise(e){return e instanceof Date?+e:+new Date(+e)}function RE(e,t,n,r,i,o,l,u,d,h){var v=yE(),m=v.invert,g=v.domain,b=h(".%L"),O=h(":%S"),S=h("%I:%M"),x=h("%I %p"),E=h("%a %d"),N=h("%b %d"),_=h("%B"),C=h("%Y");function A(M){return(d(M)<M?b:u(M)<M?O:l(M)<M?S:o(M)<M?x:r(M)<M?i(M)<M?E:N:n(M)<M?_:C)(M)}return v.invert=function(M){return new Date(m(M))},v.domain=function(M){return arguments.length?g(Array.from(M,Ise)):g().map($se)},v.ticks=function(M){var R=g();return e(R[0],R[R.length-1],M??10)},v.tickFormat=function(M,R){return R==null?A:h(R)},v.nice=function(M){var R=g();return(!M||typeof M.range!="function")&&(M=t(R[0],R[R.length-1],M??10)),M?g(oB(R,M)):v},v.copy=function(){return ed(v,RE(e,t,n,r,i,o,l,u,d,h))},v}function Lse(){return kr.apply(RE(Doe,Poe,li,TE,kv,td,AE,_E,Vo,bB).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zse(){return kr.apply(RE(Moe,Roe,ci,ME,$v,Pv,CE,NE,Vo,xB).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Iv(){var e=0,t=1,n,r,i,o,l=_n,u=!1,d;function h(m){return m==null||isNaN(m=+m)?d:l(i===0?.5:(m=(o(m)-n)*i,u?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t]=m,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(m){return arguments.length?(u=!!m,h):u},h.interpolator=function(m){return arguments.length?(l=m,h):l};function v(m){return function(g){var b,O;return arguments.length?([b,O]=g,l=m(b,O),h):[l(0),l(1)]}}return h.range=v(Sc),h.rangeRound=v(gE),h.unknown=function(m){return arguments.length?(d=m,h):d},function(m){return o=m,n=m(e),r=m(t),i=n===r?0:1/(r-n),h}}function mo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function wB(){var e=ho(Iv()(_n));return e.copy=function(){return mo(e,wB())},pi.apply(e,arguments)}function SB(){var e=wE(Iv()).domain([1,10]);return e.copy=function(){return mo(e,SB()).base(e.base())},pi.apply(e,arguments)}function jB(){var e=SE(Iv());return e.copy=function(){return mo(e,jB()).constant(e.constant())},pi.apply(e,arguments)}function DE(){var e=jE(Iv());return e.copy=function(){return mo(e,DE()).exponent(e.exponent())},pi.apply(e,arguments)}function Bse(){return DE.apply(null,arguments).exponent(.5)}function OB(){var e=[],t=_n;function n(r){if(r!=null&&!isNaN(r=+r))return t((Zf(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(Xi),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,o)=>_ie(e,o/r))},n.copy=function(){return OB(t).domain(e)},pi.apply(n,arguments)}function Lv(){var e=0,t=.5,n=1,r=1,i,o,l,u,d,h=_n,v,m=!1,g;function b(S){return isNaN(S=+S)?g:(S=.5+((S=+v(S))-o)*(r*S<r*o?u:d),h(m?Math.max(0,Math.min(1,S)):S))}b.domain=function(S){return arguments.length?([e,t,n]=S,i=v(e=+e),o=v(t=+t),l=v(n=+n),u=i===o?0:.5/(o-i),d=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(S){return arguments.length?(m=!!S,b):m},b.interpolator=function(S){return arguments.length?(h=S,b):h};function O(S){return function(x){var E,N,_;return arguments.length?([E,N,_]=x,h=Zie(S,[E,N,_]),b):[h(0),h(.5),h(1)]}}return b.range=O(Sc),b.rangeRound=O(gE),b.unknown=function(S){return arguments.length?(g=S,b):g},function(S){return v=S,i=S(e),o=S(t),l=S(n),u=i===o?0:.5/(o-i),d=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function EB(){var e=ho(Lv()(_n));return e.copy=function(){return mo(e,EB())},pi.apply(e,arguments)}function _B(){var e=wE(Lv()).domain([.1,1,10]);return e.copy=function(){return mo(e,_B()).base(e.base())},pi.apply(e,arguments)}function NB(){var e=SE(Lv());return e.copy=function(){return mo(e,NB()).constant(e.constant())},pi.apply(e,arguments)}function PE(){var e=jE(Lv());return e.copy=function(){return mo(e,PE()).exponent(e.exponent())},pi.apply(e,arguments)}function qse(){return PE.apply(null,arguments).exponent(.5)}const RP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:lf,scaleDiverging:EB,scaleDivergingLog:_B,scaleDivergingPow:PE,scaleDivergingSqrt:qse,scaleDivergingSymlog:NB,scaleIdentity:iB,scaleImplicit:GS,scaleLinear:Qm,scaleLog:sB,scaleOrdinal:mE,scalePoint:Lu,scalePow:OE,scaleQuantile:uB,scaleQuantize:fB,scaleRadial:cB,scaleSequential:wB,scaleSequentialLog:SB,scaleSequentialPow:DE,scaleSequentialQuantile:OB,scaleSequentialSqrt:Bse,scaleSequentialSymlog:jB,scaleSqrt:woe,scaleSymlog:lB,scaleThreshold:dB,scaleTime:Lse,scaleUtc:zse,tickFormat:aB},Symbol.toStringTag,{value:"Module"}));var n1,DP;function AB(){if(DP)return n1;DP=1;var e=yc();function t(n,r,i){for(var o=-1,l=n.length;++o<l;){var u=n[o],d=r(u);if(d!=null&&(h===void 0?d===d&&!e(d):i(d,h)))var h=d,v=u}return v}return n1=t,n1}var r1,PP;function Use(){if(PP)return r1;PP=1;function e(t,n){return t>n}return r1=e,r1}var a1,kP;function Hse(){if(kP)return a1;kP=1;var e=AB(),t=Use(),n=xc();function r(i){return i&&i.length?e(i,n,t):void 0}return a1=r,a1}var Fse=Hse();const zv=xt(Fse);var i1,$P;function Gse(){if($P)return i1;$P=1;function e(t,n){return t<n}return i1=e,i1}var o1,IP;function Vse(){if(IP)return o1;IP=1;var e=AB(),t=Gse(),n=xc();function r(i){return i&&i.length?e(i,n,t):void 0}return o1=r,o1}var Yse=Vse();const Bv=xt(Yse);var s1,LP;function Wse(){if(LP)return s1;LP=1;var e=KO(),t=fo(),n=$z(),r=Vn();function i(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return s1=i,s1}var l1,zP;function Kse(){if(zP)return l1;zP=1;var e=Pz(),t=Wse();function n(r,i){return e(t(r,i),1)}return l1=n,l1}var Xse=Kse();const Qse=xt(Xse);var c1,BP;function Zse(){if(BP)return c1;BP=1;var e=lE();function t(n,r){return e(n,r)}return c1=t,c1}var Jse=Zse();const qv=xt(Jse);var jc=1e9,ele={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},$E,Tt=!0,Pr="[DecimalError] ",Xo=Pr+"Invalid argument: ",kE=Pr+"Exponent out of range: ",Oc=Math.floor,Ho=Math.pow,tle=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ir,sn=1e7,Nt=7,CB=9007199254740991,tp=Oc(CB/Nt),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return ti(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return St(ti(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return Yt(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(ir))throw Error(Pr+"NaN");if(n.s<1)throw Error(Pr+(n.s?"NaN":"-Infinity"));return n.eq(ir)?new r(0):(Tt=!1,t=ti(hf(n,o),hf(e,o),o),Tt=!0,St(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?RB(t,e):TB(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Pr+"NaN");return n.s?(Tt=!1,t=ti(n,e,0,1).times(e),Tt=!0,n.minus(t)):St(new r(n),i)};xe.naturalExponential=xe.exp=function(){return MB(this)};xe.naturalLogarithm=xe.ln=function(){return hf(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TB(t,e):RB(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Xo+e);if(t=Yt(i)+1,r=i.d.length-1,n=r*Nt+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};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,o,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Pr+"NaN")}for(e=Yt(u),Tt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=da(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Oc((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 d(t)):r=new d(i.toString()),n=d.precision,i=l=n+3;;)if(o=r,r=o.plus(ti(u,o,l+2)).times(.5),da(o.d).slice(0,l)===(t=da(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(St(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return Tt=!0,St(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,o,l,u,d,h,v=this,m=v.constructor,g=v.d,b=(e=new m(e)).d;if(!v.s||!e.s)return new m(0);for(e.s*=v.s,n=v.e+e.e,d=g.length,h=b.length,d<h&&(o=g,g=b,b=o,l=d,d=h,h=l),o=[],l=d+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=d+r;i>r;)u=o[i]+b[r]*g[i-r-1]+t,o[i--]=u%sn|0,t=u/sn|0;o[i]=(o[i]+t)%sn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Tt?St(e,m.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(wa(e,0,jc),t===void 0?t=r.rounding:wa(t,0,8),St(n,e+Yt(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=as(r,!0):(wa(e,0,jc),t===void 0?t=i.rounding:wa(t,0,8),r=St(new i(r),e+1,t),n=as(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?as(i):(wa(e,0,jc),t===void 0?t=o.rounding:wa(t,0,8),r=St(new o(i),e+Yt(i)+1,t),n=as(r.abs(),!1,e+Yt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return St(new t(e),Yt(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,o,l,u=this,d=u.constructor,h=12,v=+(e=new d(e));if(!e.s)return new d(ir);if(u=new d(u),!u.s){if(e.s<1)throw Error(Pr+"Infinity");return u}if(u.eq(ir))return u;if(r=d.precision,e.eq(ir))return St(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=v<0?-v:v)<=CB){for(i=new d(ir),t=Math.ceil(r/Nt+4),Tt=!1;n%2&&(i=i.times(u),UP(i.d,t)),n=Oc(n/2),n!==0;)u=u.times(u),UP(u.d,t);return Tt=!0,e.s<0?new d(ir).div(i):St(i,r)}}else if(o<0)throw Error(Pr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Tt=!1,i=e.times(hf(u,r+h)),Tt=!0,i=MB(i),i.s=o,i};xe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Yt(i),r=as(i,n<=o.toExpNeg||n>=o.toExpPos)):(wa(e,1,jc),t===void 0?t=o.rounding:wa(t,0,8),i=St(new o(i),e,t),n=Yt(i),r=as(i,e<=n||n<=o.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(wa(e,1,jc),t===void 0?t=r.rounding:wa(t,0,8)),St(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Yt(e),n=e.constructor;return as(e,t<=n.toExpNeg||t>=n.toExpPos)};function TB(e,t){var n,r,i,o,l,u,d,h,v=e.constructor,m=v.precision;if(!e.s||!t.s)return t.s||(t=new v(e)),Tt?St(t,m):t;if(d=e.d,h=t.d,l=e.e,i=t.e,d=d.slice(),o=l-i,o){for(o<0?(r=d,o=-o,u=h.length):(r=h,i=l,u=d.length),l=Math.ceil(m/Nt),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=d.length,o=h.length,u-o<0&&(o=u,r=h,h=d,d=r),n=0;o;)n=(d[--o]=d[o]+h[o]+n)/sn|0,d[o]%=sn;for(n&&(d.unshift(n),++i),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=i,Tt?St(t,m):t}function wa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Xo+e)}function da(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=Nt-r.length,n&&(o+=Vi(n)),o+=r;l=e[t],r=l+"",n=Nt-r.length,n&&(o+=Vi(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var ti=(function(){function e(r,i){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*i+l,r[u]=o%sn|0,l=o/sn|0;return l&&r.unshift(l),r}function t(r,i,o,l){var u,d;if(o!=l)d=o>l?1:-1;else for(u=d=0;u<o;u++)if(r[u]!=i[u]){d=r[u]>i[u]?1:-1;break}return d}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*sn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var u,d,h,v,m,g,b,O,S,x,E,N,_,C,A,M,R,D,z=r.constructor,G=r.s==i.s?1:-1,L=r.d,F=i.d;if(!r.s)return new z(r);if(!i.s)throw Error(Pr+"Division by zero");for(d=r.e-i.e,R=F.length,A=L.length,b=new z(G),O=b.d=[],h=0;F[h]==(L[h]||0);)++h;if(F[h]>(L[h]||0)&&--d,o==null?N=o=z.precision:l?N=o+(Yt(r)-Yt(i))+1:N=o,N<0)return new z(0);if(N=N/Nt+2|0,h=0,R==1)for(v=0,F=F[0],N++;(h<A||v)&&N--;h++)_=v*sn+(L[h]||0),O[h]=_/F|0,v=_%F|0;else{for(v=sn/(F[0]+1)|0,v>1&&(F=e(F,v),L=e(L,v),R=F.length,A=L.length),C=R,S=L.slice(0,R),x=S.length;x<R;)S[x++]=0;D=F.slice(),D.unshift(0),M=F[0],F[1]>=sn/2&&++M;do v=0,u=t(F,S,R,x),u<0?(E=S[0],R!=x&&(E=E*sn+(S[1]||0)),v=E/M|0,v>1?(v>=sn&&(v=sn-1),m=e(F,v),g=m.length,x=S.length,u=t(m,S,g,x),u==1&&(v--,n(m,R<g?D:F,g))):(v==0&&(u=v=1),m=F.slice()),g=m.length,g<x&&m.unshift(0),n(S,m,x),u==-1&&(x=S.length,u=t(F,S,R,x),u<1&&(v++,n(S,R<x?D:F,x))),x=S.length):u===0&&(v++,S=[0]),O[h++]=v,u&&S[0]?S[x++]=L[C]||0:(S=[L[C]],x=1);while((C++<A||S[0]!==void 0)&&N--)}return O[0]||O.shift(),b.e=d,St(b,l?o+Yt(b)+1:o)}})();function MB(e,t){var n,r,i,o,l,u,d=0,h=0,v=e.constructor,m=v.precision;if(Yt(e)>16)throw Error(kE+Yt(e));if(!e.s)return new v(ir);for(Tt=!1,u=m,l=new v(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(r=Math.log(Ho(2,h))/Math.LN10*2+5|0,u+=r,n=i=o=new v(ir),v.precision=u;;){if(i=St(i.times(e),u),n=n.times(++d),l=o.plus(ti(i,n,u)),da(l.d).slice(0,u)===da(o.d).slice(0,u)){for(;h--;)o=St(o.times(o),u);return v.precision=m,t==null?(Tt=!0,St(o,m)):o}o=l}}function Yt(e){for(var t=e.e*Nt,n=e.d[0];n>=10;n/=10)t++;return t}function u1(e,t,n){if(t>e.LN10.sd())throw Tt=!0,n&&(e.precision=n),Error(Pr+"LN10 precision limit exceeded");return St(new e(e.LN10),t)}function Vi(e){for(var t="";e--;)t+="0";return t}function hf(e,t){var n,r,i,o,l,u,d,h,v,m=1,g=10,b=e,O=b.d,S=b.constructor,x=S.precision;if(b.s<1)throw Error(Pr+(b.s?"NaN":"-Infinity"));if(b.eq(ir))return new S(0);if(t==null?(Tt=!1,h=x):h=t,b.eq(10))return t==null&&(Tt=!0),u1(S,h);if(h+=g,S.precision=h,n=da(O),r=n.charAt(0),o=Yt(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=da(b.d),r=n.charAt(0),m++;o=Yt(b),r>1?(b=new S("0."+n),o++):b=new S(r+"."+n.slice(1))}else return d=u1(S,h+2,x).times(o+""),b=hf(new S(r+"."+n.slice(1)),h-g).plus(d),S.precision=x,t==null?(Tt=!0,St(b,x)):b;for(u=l=b=ti(b.minus(ir),b.plus(ir),h),v=St(b.times(b),h),i=3;;){if(l=St(l.times(v),h),d=u.plus(ti(l,new S(i),h)),da(d.d).slice(0,h)===da(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus(u1(S,h+2,x).times(o+""))),u=ti(u,new S(m),h),S.precision=x,t==null?(Tt=!0,St(u,x)):u;u=d,i+=2}}function qP(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=Oc(n/Nt),e.d=[],r=(n+1)%Nt,n<0&&(r+=Nt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Nt;r<i;)e.d.push(+t.slice(r,r+=Nt));t=t.slice(r),r=Nt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Tt&&(e.e>tp||e.e<-tp))throw Error(kE+n)}else e.s=0,e.e=0,e.d=[0];return e}function St(e,t,n){var r,i,o,l,u,d,h,v,m=e.d;for(l=1,o=m[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Nt,i=t,h=m[v=0];else{if(v=Math.ceil((r+1)/Nt),o=m.length,v>=o)return e;for(h=o=m[v],l=1;o>=10;o/=10)l++;r%=Nt,i=r-Nt+l}if(n!==void 0&&(o=Ho(10,l-i-1),u=h/o%10|0,d=t<0||m[v+1]!==void 0||h%o,d=n<4?(u||d)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||d||n==6&&(r>0?i>0?h/Ho(10,l-i):0:m[v-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return d?(o=Yt(e),m.length=1,t=t-o-1,m[0]=Ho(10,(Nt-t%Nt)%Nt),e.e=Oc(-t/Nt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=v,o=1,v--):(m.length=v+1,o=Ho(10,Nt-r),m[v]=i>0?(h/Ho(10,l-i)%Ho(10,i)|0)*o:0),d)for(;;)if(v==0){(m[0]+=o)==sn&&(m[0]=1,++e.e);break}else{if(m[v]+=o,m[v]!=sn)break;m[v--]=0,o=1}for(r=m.length;m[--r]===0;)m.pop();if(Tt&&(e.e>tp||e.e<-tp))throw Error(kE+Yt(e));return e}function RB(e,t){var n,r,i,o,l,u,d,h,v,m,g=e.constructor,b=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Tt?St(t,b):t;if(d=e.d,m=t.d,r=t.e,h=e.e,d=d.slice(),l=h-r,l){for(v=l<0,v?(n=d,l=-l,u=m.length):(n=m,r=h,u=d.length),i=Math.max(Math.ceil(b/Nt),u)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=d.length,u=m.length,v=i<u,v&&(u=i),i=0;i<u;i++)if(d[i]!=m[i]){v=d[i]<m[i];break}l=0}for(v&&(n=d,d=m,m=n,t.s=-t.s),u=d.length,i=m.length-u;i>0;--i)d[u++]=0;for(i=m.length;i>l;){if(d[--i]<m[i]){for(o=i;o&&d[--o]===0;)d[o]=sn-1;--d[o],d[i]+=sn}d[i]-=m[i]}for(;d[--u]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,Tt?St(t,b):t):new g(0)}function as(e,t,n){var r,i=Yt(e),o=da(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Vi(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Vi(-i-1)+o,n&&(r=n-l)>0&&(o+=Vi(r))):i>=l?(o+=Vi(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Vi(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Vi(r))),e.s<0?"-"+o:o}function UP(e,t){if(e.length>t)return e.length=t,!0}function DB(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Xo+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return qP(l,o.toString())}else if(typeof o!="string")throw Error(Xo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,tle.test(o))qP(l,o);else throw Error(Xo+o)}if(i.prototype=xe,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=DB,i.config=i.set=nle,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 nle(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,n,r,i=["precision",1,jc,"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(Oc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Xo+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Xo+n+": "+r);return this}var $E=DB(ele);ir=new $E(1);const bt=$E;function rle(e){return sle(e)||ole(e)||ile(e)||ale()}function ale(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
448
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ile(e,t){if(e){if(typeof e=="string")return KS(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 KS(e,t)}}function ole(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sle(e){if(Array.isArray(e))return KS(e)}function KS(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 lle=function(t){return t},PB={},kB=function(t){return t===PB},HP=function(t){return function n(){return arguments.length===0||arguments.length===1&&kB(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},cle=function e(t,n){return t===1?n:HP(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.filter(function(u){return u!==PB}).length;return l>=t?n.apply(void 0,i):e(t-l,HP(function(){for(var u=arguments.length,d=new Array(u),h=0;h<u;h++)d[h]=arguments[h];var v=i.map(function(m){return kB(m)?d.shift():m});return n.apply(void 0,rle(v).concat(d))}))})},Uv=function(t){return cle(t.length,t)},XS=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},ule=Uv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),fle=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return lle;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce(function(u,d){return d(u)},o.apply(void 0,arguments))}},QS=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},$B=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n&&o.every(function(u,d){return u===n[d]})||(n=o,r=t.apply(void 0,o)),r}};function dle(e){var t;return e===0?t=1:t=Math.floor(new bt(e).abs().log(10).toNumber())+1,t}function hle(e,t,n){for(var r=new bt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var mle=Uv(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),ple=Uv(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),vle=Uv(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Hv={rangeStep:hle,getDigitCount:dle,interpolateNumber:mle,uninterpolateNumber:ple,uninterpolateTruncation:vle};function ZS(e){return ble(e)||yle(e)||IB(e)||gle()}function gle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
449
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yle(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ble(e){if(Array.isArray(e))return JS(e)}function mf(e,t){return Sle(e)||wle(e,t)||IB(e,t)||xle()}function xle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
450
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IB(e,t){if(e){if(typeof e=="string")return JS(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 JS(e,t)}}function JS(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 wle(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(d){i=!0,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw o}}return n}}function Sle(e){if(Array.isArray(e))return e}function LB(e){var t=mf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function zB(e,t,n){if(e.lte(0))return new bt(0);var r=Hv.getDigitCount(e.toNumber()),i=new bt(10).pow(r),o=e.div(i),l=r!==1?.05:.1,u=new bt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),d=u.mul(i);return t?d:new bt(Math.ceil(d))}function jle(e,t,n){var r=1,i=new bt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new bt(10).pow(Hv.getDigitCount(e)-1),i=new bt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new bt(Math.floor(e)))}else e===0?i=new bt(Math.floor((t-1)/2)):n||(i=new bt(Math.floor(e)));var l=Math.floor((t-1)/2),u=fle(ule(function(d){return i.add(new bt(d-l).mul(r)).toNumber()}),XS);return u(0,t)}function BB(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 bt(0),tickMin:new bt(0),tickMax:new bt(0)};var o=zB(new bt(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new bt(0):(l=new bt(e).add(t).div(2),l=l.sub(new bt(l).mod(o)));var u=Math.ceil(l.sub(e).div(o).toNumber()),d=Math.ceil(new bt(t).sub(l).div(o).toNumber()),h=u+d+1;return h>n?BB(e,t,n,r,i+1):(h<n&&(d=t>0?d+(n-h):d,u=t>0?u:u+(n-h)),{step:o,tickMin:l.sub(new bt(u).mul(o)),tickMax:l.add(new bt(d).mul(o))})}function Ole(e){var t=mf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),u=LB([n,r]),d=mf(u,2),h=d[0],v=d[1];if(h===-1/0||v===1/0){var m=v===1/0?[h].concat(ZS(XS(0,i-1).map(function(){return 1/0}))):[].concat(ZS(XS(0,i-1).map(function(){return-1/0})),[v]);return n>r?QS(m):m}if(h===v)return jle(h,i,o);var g=BB(h,v,l,o),b=g.step,O=g.tickMin,S=g.tickMax,x=Hv.rangeStep(O,S.add(new bt(.1).mul(b)),b);return n>r?QS(x):x}function Ele(e,t){var n=mf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=LB([r,i]),u=mf(l,2),d=u[0],h=u[1];if(d===-1/0||h===1/0)return[r,i];if(d===h)return[d];var v=Math.max(t,2),m=zB(new bt(h).sub(d).div(v-1),o,0),g=[].concat(ZS(Hv.rangeStep(new bt(d),new bt(h).sub(new bt(.99).mul(m)),m)),[h]);return r>i?QS(g):g}var _le=$B(Ole),Nle=$B(Ele),Ale="Invariant failed";function is(e,t){throw new Error(Ale)}var Cle=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ql(e){"@babel/helpers - typeof";return ql=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},ql(e)}function np(){return np=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},np.apply(this,arguments)}function Tle(e,t){return Ple(e)||Dle(e,t)||Rle(e,t)||Mle()}function Mle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
451
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rle(e,t){if(e){if(typeof e=="string")return FP(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 FP(e,t)}}function FP(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 Dle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Ple(e){if(Array.isArray(e))return e}function kle(e,t){if(e==null)return{};var n=$le(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $le(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 Ile(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lle(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,HB(r.key),r)}}function zle(e,t,n){return t&&Lle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ble(e,t,n){return t=rp(t),qle(e,qB()?Reflect.construct(t,n||[],rp(e).constructor):t.apply(e,n))}function qle(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ule(e)}function Ule(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qB=function(){return!!e})()}function rp(e){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rp(e)}function Hle(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&&ej(e,t)}function ej(e,t){return ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ej(e,t)}function UB(e,t,n){return t=HB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HB(e){var t=Fle(e,"string");return ql(t)=="symbol"?t:t+""}function Fle(e,t){if(ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nd=(function(e){function t(){return Ile(this,t),Ble(this,t,arguments)}return Hle(t,e),zle(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,l=r.width,u=r.dataKey,d=r.data,h=r.dataPointFormatter,v=r.xAxis,m=r.yAxis,g=kle(r,Cle),b=nt(g,!1);this.props.direction==="x"&&v.type!=="number"&&is();var O=d.map(function(S){var x=h(S,u),E=x.x,N=x.y,_=x.value,C=x.errorVal;if(!C)return null;var A=[],M,R;if(Array.isArray(C)){var D=Tle(C,2);M=D[0],R=D[1]}else M=R=C;if(o==="vertical"){var z=v.scale,G=N+i,L=G+l,F=G-l,W=z(_-M),Q=z(_+R);A.push({x1:Q,y1:L,x2:Q,y2:F}),A.push({x1:W,y1:G,x2:Q,y2:G}),A.push({x1:W,y1:L,x2:W,y2:F})}else if(o==="horizontal"){var X=m.scale,k=E+i,H=k-l,B=k+l,Z=X(_-M),le=X(_+R);A.push({x1:H,y1:le,x2:B,y2:le}),A.push({x1:k,y1:Z,x2:k,y2:le}),A.push({x1:H,y1:Z,x2:B,y2:Z})}return I.createElement(Bt,np({className:"recharts-errorBar",key:"bar-".concat(A.map(function($){return"".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))},b),A.map(function($){return I.createElement("line",np({},$,{key:"line-".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))}))});return I.createElement(Bt,{className:"recharts-errorBars"},O)}}])})(I.Component);UB(nd,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});UB(nd,"displayName","ErrorBar");function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf(e)}function GP(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 zo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GP(Object(n),!0).forEach(function(r){Gle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gle(e,t,n){return t=Vle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vle(e){var t=Yle(e,"string");return pf(t)=="symbol"?t:t+""}function Yle(e,t){if(pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FB=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=rr(n,ei);if(!l)return null;var u=ei.defaultProps,d=u!==void 0?zo(zo({},u),l.props):{},h;return l.props&&l.props.payload?h=l.props&&l.props.payload:o==="children"?h=(r||[]).reduce(function(v,m){var g=m.item,b=m.props,O=b.sectors||b.data||[];return v.concat(O.map(function(S){return{type:l.props.iconType||g.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):h=(r||[]).map(function(v){var m=v.item,g=m.type.defaultProps,b=g!==void 0?zo(zo({},g),m.props):{},O=b.dataKey,S=b.name,x=b.legendType,E=b.hide;return{inactive:E,dataKey:O,type:d.iconType||x||"square",color:IE(m),value:S||O,payload:b}}),zo(zo(zo({},d),ei.getWithHeight(l,i)),{},{payload:h,item:l})};function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}function VP(e){return Qle(e)||Xle(e)||Kle(e)||Wle()}function Wle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
452
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kle(e,t){if(e){if(typeof e=="string")return tj(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 tj(e,t)}}function Xle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qle(e){if(Array.isArray(e))return tj(e)}function tj(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 YP(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 It(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(n),!0).forEach(function(r){_l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _l(e,t,n){return t=Zle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zle(e){var t=Jle(e,"string");return vf(t)=="symbol"?t:t+""}function Jle(e,t){if(vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ur(e,t,n){return Qe(e)||Qe(t)?n:Jt(t)?Rr(e,t,n):Ye(t)?t(e):n}function zu(e,t,n,r){var i=Qse(e,function(u){return ur(u,t)});if(n==="number"){var o=i.filter(function(u){return be(u)||parseFloat(u)});return o.length?[Bv(o),zv(o)]:[1/0,-1/0]}var l=r?i.filter(function(u){return!Qe(u)}):i;return l.map(function(u){return Jt(u)||u instanceof Date?u:""})}var ece=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,u=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var d=o.range,h=0;h<u;h++){var v=h>0?i[h-1].coordinate:i[u-1].coordinate,m=i[h].coordinate,g=h>=u-1?i[0].coordinate:i[h+1].coordinate,b=void 0;if(Yr(m-v)!==Yr(g-m)){var O=[];if(Yr(g-m)===Yr(d[1]-d[0])){b=g;var S=m+d[1]-d[0];O[0]=Math.min(S,(S+v)/2),O[1]=Math.max(S,(S+v)/2)}else{b=v;var x=g+d[1]-d[0];O[0]=Math.min(m,(x+m)/2),O[1]=Math.max(m,(x+m)/2)}var E=[Math.min(m,(b+m)/2),Math.max(m,(b+m)/2)];if(t>E[0]&&t<=E[1]||t>=O[0]&&t<=O[1]){l=i[h].index;break}}else{var N=Math.min(v,g),_=Math.max(v,g);if(t>(N+m)/2&&t<=(_+m)/2){l=i[h].index;break}}}else for(var C=0;C<u;C++)if(C===0&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){l=r[C].index;break}return l},IE=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,l=o.stroke,u=o.fill,d;switch(i){case"Line":d=l;break;case"Area":case"Radar":d=l&&l!=="none"?l:u;break;default:d=u;break}return d},tce=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var l={},u=Object.keys(o),d=0,h=u.length;d<h;d++)for(var v=o[u[d]].stackGroups,m=Object.keys(v),g=0,b=m.length;g<b;g++){var O=v[m[g]],S=O.items,x=O.cateAxisId,E=S.filter(function(R){return Za(R.type).indexOf("Bar")>=0});if(E&&E.length){var N=E[0].type.defaultProps,_=N!==void 0?It(It({},N),E[0].props):E[0].props,C=_.barSize,A=_[x];l[A]||(l[A]=[]);var M=Qe(C)?n:C;l[A].push({item:E[0],stackList:E.slice(1),barSize:Qe(M)?void 0:rs(M,r,0)})}}return l},nce=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,d=l.length;if(d<1)return null;var h=rs(n,i,0,!0),v,m=[];if(l[0].barSize===+l[0].barSize){var g=!1,b=i/d,O=l.reduce(function(C,A){return C+A.barSize||0},0);O+=(d-1)*h,O>=i&&(O-=(d-1)*h,h=0),O>=i&&b>0&&(g=!0,b*=.9,O=d*b);var S=(i-O)/2>>0,x={offset:S-h,size:0};v=l.reduce(function(C,A){var M={item:A.item,position:{offset:x.offset+x.size+h,size:g?b:A.barSize}},R=[].concat(VP(C),[M]);return x=R[R.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(D){R.push({item:D,position:x})}),R},m)}else{var E=rs(r,i,0,!0);i-2*E-(d-1)*h<=0&&(h=0);var N=(i-2*E-(d-1)*h)/d;N>1&&(N>>=0);var _=u===+u?Math.min(N,u):N;v=l.reduce(function(C,A,M){var R=[].concat(VP(C),[{item:A.item,position:{offset:E+(N+h)*M+(N-_)/2,size:_}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(D){R.push({item:D,position:R[R.length-1].position})}),R},m)}return v},rce=function(t,n,r,i){var o=r.children,l=r.width,u=r.margin,d=l-(u.left||0)-(u.right||0),h=FB({children:o,legendWidth:d});if(h){var v=i||{},m=v.width,g=v.height,b=h.align,O=h.verticalAlign,S=h.layout;if((S==="vertical"||S==="horizontal"&&O==="middle")&&b!=="center"&&be(t[b]))return It(It({},t),{},_l({},b,t[b]+(m||0)));if((S==="horizontal"||S==="vertical"&&b==="center")&&O!=="middle"&&be(t[O]))return It(It({},t),{},_l({},O,t[O]+(g||0)))}return t},ace=function(t,n,r){return Qe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},GB=function(t,n,r,i,o){var l=n.props.children,u=Dr(l,nd).filter(function(h){return ace(i,o,h.props.direction)});if(u&&u.length){var d=u.map(function(h){return h.props.dataKey});return t.reduce(function(h,v){var m=ur(v,r);if(Qe(m))return h;var g=Array.isArray(m)?[Bv(m),zv(m)]:[m,m],b=d.reduce(function(O,S){var x=ur(v,S,0),E=g[0]-Math.abs(Array.isArray(x)?x[0]:x),N=g[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(E,O[0]),Math.max(N,O[1])]},[1/0,-1/0]);return[Math.min(b[0],h[0]),Math.max(b[1],h[1])]},[1/0,-1/0])}return null},ice=function(t,n,r,i,o){var l=n.map(function(u){return GB(t,u,r,o,i)}).filter(function(u){return!Qe(u)});return l&&l.length?l.reduce(function(u,d){return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]):null},VB=function(t,n,r,i,o){var l=n.map(function(d){var h=d.props.dataKey;return r==="number"&&h&&GB(t,d,h,i)||zu(t,h,r,o)});if(r==="number")return l.reduce(function(d,h){return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);var u={};return l.reduce(function(d,h){for(var v=0,m=h.length;v<m;v++)u[h[v]]||(u[h[v]]=!0,d.push(h[v]));return d},[])},YB=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},WB=function(t,n,r,i){if(i)return t.map(function(d){return d.coordinate});var o,l,u=t.map(function(d){return d.coordinate===n&&(o=!0),d.coordinate===r&&(l=!0),d.coordinate});return o||u.push(n),l||u.push(r),u},Ka=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,l=t.type,u=t.range,d=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/d:0;if(h=t.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?Yr(u[0]-u[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var v=(t.ticks||t.niceTicks).map(function(m){var g=o?o.indexOf(m):m;return{coordinate:i(g)+h,value:m,offset:h}});return v.filter(function(m){return!Kf(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,g){return{coordinate:i(m)+h,value:m,index:g,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(m){return{coordinate:i(m)+h,value:m,offset:h}}):i.domain().map(function(m,g){return{coordinate:i(m)+h,value:o?o[m]:m,index:g,offset:h}})},f1=new WeakMap,Lh=function(t,n){if(typeof n!="function")return t;f1.has(t)||f1.set(t,new WeakMap);var r=f1.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},oce=function(t,n,r){var i=t.scale,o=t.type,l=t.layout,u=t.axisType;if(i==="auto")return l==="radial"&&u==="radiusAxis"?{scale:lf(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:Qm(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Lu(),realScaleType:"point"}:o==="category"?{scale:lf(),realScaleType:"band"}:{scale:Qm(),realScaleType:"linear"};if(ns(i)){var d="scale".concat(_v(i));return{scale:(RP[d]||Lu)(),realScaleType:RP[d]?d:"point"}}return Ye(i)?{scale:i}:{scale:Lu(),realScaleType:"point"}},WP=1e-4,sce=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-WP,l=Math.max(i[0],i[1])+WP,u=t(n[0]),d=t(n[r-1]);(u<o||u>l||d<o||d>l)&&t.domain([n[0],n[r-1]])}},lce=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},cce=function(t,n){if(!n||n.length!==2||!be(n[0])||!be(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!be(t[0])||t[0]<r)&&(o[0]=r),(!be(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},uce=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0,u=0;u<n;++u){var d=Kf(t[u][r][1])?t[u][r][0]:t[u][r][1];d>=0?(t[u][r][0]=o,t[u][r][1]=o+d,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+d,l=t[u][r][1])}},fce=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0;l<n;++l){var u=Kf(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},dce={sign:uce,expand:Kte,none:Dl,silhouette:Xte,wiggle:Qte,positive:fce},hce=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=dce[r],l=Wte().keys(i).value(function(u,d){return+ur(u,d,0)}).order(MS).offset(o);return l(t)},mce=function(t,n,r,i,o,l){if(!t)return null;var u=l?n.reverse():n,d={},h=u.reduce(function(m,g){var b,O=(b=g.type)!==null&&b!==void 0&&b.defaultProps?It(It({},g.type.defaultProps),g.props):g.props,S=O.stackId,x=O.hide;if(x)return m;var E=O[r],N=m[E]||{hasStack:!1,stackGroups:{}};if(Jt(S)){var _=N.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(g),N.hasStack=!0,N.stackGroups[S]=_}else N.stackGroups[Xf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return It(It({},m),{},_l({},E,N))},d),v={};return Object.keys(h).reduce(function(m,g){var b=h[g];if(b.hasStack){var O={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(S,x){var E=b.stackGroups[x];return It(It({},S),{},_l({},x,{numericAxisId:r,cateAxisId:i,items:E.items,stackedData:hce(t,E.items,o)}))},O)}return It(It({},m),{},_l({},g,b))},v)},pce=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,d=r||n.scale;if(d!=="auto"&&d!=="linear")return null;if(o&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var h=t.domain();if(!h.length)return null;var v=_le(h,o,u);return t.domain([Bv(v),zv(v)]),{niceTicks:v}}if(o&&i==="number"){var m=t.domain(),g=Nle(m,o,u);return{niceTicks:g}}return null};function KP(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Qe(i[t.dataKey])){var u=Mm(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var d=ur(i,Qe(l)?t.dataKey:l);return Qe(d)?null:t.scale(d)}var XP=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var d=ur(l,n.dataKey,n.domain[u]);return Qe(d)?null:n.scale(d)-o/2+i},vce=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},gce=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Jt(o)){var l=n[o];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},yce=function(t){return t.reduce(function(n,r){return[Bv(r.concat([n[0]]).filter(be)),zv(r.concat([n[1]]).filter(be))]},[1/0,-1/0])},KB=function(t,n,r){return Object.keys(t).reduce(function(i,o){var l=t[o],u=l.stackedData,d=u.reduce(function(h,v){var m=yce(v.slice(n,r+1));return[Math.min(h[0],m[0]),Math.max(h[1],m[1])]},[1/0,-1/0]);return[Math.min(d[0],i[0]),Math.max(d[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},QP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ZP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nj=function(t,n,r){if(Ye(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(be(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(QP.test(t[0])){var o=+QP.exec(t[0])[1];i[0]=n[0]-o}else Ye(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(be(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(ZP.test(t[1])){var l=+ZP.exec(t[1])[1];i[1]=n[1]+l}else Ye(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},ap=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 o=uE(n,function(m){return m.coordinate}),l=1/0,u=1,d=o.length;u<d;u++){var h=o[u],v=o[u-1];l=Math.min((h.coordinate||0)-(v.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},JP=function(t,n,r){return!t||!t.length||qv(t,Rr(r,"type.defaultProps.domain"))?n:t},XB=function(t,n){var r=t.type.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,l=r.unit,u=r.formatter,d=r.tooltipType,h=r.chartType,v=r.hide;return It(It({},nt(t,!1)),{},{dataKey:i,unit:l,formatter:u,name:o||i,color:IE(t),value:ur(n,i),type:d,payload:n,chartType:h,hide:v})};function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(e)}function ek(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 tk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ek(Object(n),!0).forEach(function(r){bce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ek(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bce(e,t,n){return t=xce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xce(e){var t=wce(e,"string");return gf(t)=="symbol"?t:t+""}function wce(e,t){if(gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ip=Math.PI/180,Sce=function(t){return t*180/Math.PI},vn=function(t,n,r,i){return{x:t+Math.cos(-ip*i)*r,y:n+Math.sin(-ip*i)*r}},jce=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-l,2))},Oce=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,u=jce({x:r,y:i},{x:o,y:l});if(u<=0)return{radius:u};var d=(r-o)/u,h=Math.acos(d);return i>l&&(h=2*Math.PI-h),{radius:u,angle:Sce(h),angleInRadian:h}},Ece=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return{startAngle:n-l*360,endAngle:r-l*360}},_ce=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),l=Math.floor(i/360),u=Math.min(o,l);return t+u*360},nk=function(t,n){var r=t.x,i=t.y,o=Oce({x:r,y:i},n),l=o.radius,u=o.angle,d=n.innerRadius,h=n.outerRadius;if(l<d||l>h)return!1;if(l===0)return!0;var v=Ece(n),m=v.startAngle,g=v.endAngle,b=u,O;if(m<=g){for(;b>g;)b-=360;for(;b<m;)b+=360;O=b>=m&&b<=g}else{for(;b>m;)b-=360;for(;b<g;)b+=360;O=b>=g&&b<=m}return O?tk(tk({},n),{},{radius:l,angle:_ce(b,n)}):null};function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}var Nce=["offset"];function Ace(e){return Rce(e)||Mce(e)||Tce(e)||Cce()}function Cce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
453
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tce(e,t){if(e){if(typeof e=="string")return rj(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 rj(e,t)}}function Mce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rce(e){if(Array.isArray(e))return rj(e)}function rj(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 Dce(e,t){if(e==null)return{};var n=Pce(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pce(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 rk(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 Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rk(Object(n),!0).forEach(function(r){kce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kce(e,t,n){return t=$ce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ce(e){var t=Ice(e,"string");return yf(t)=="symbol"?t:t+""}function Ice(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bf(){return bf=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},bf.apply(this,arguments)}var Lce=function(t){var n=t.value,r=t.formatter,i=Qe(t.children)?n:t.children;return Ye(r)?r(i):i},zce=function(t,n){var r=Yr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Bce=function(t,n,r){var i=t.position,o=t.viewBox,l=t.offset,u=t.className,d=o,h=d.cx,v=d.cy,m=d.innerRadius,g=d.outerRadius,b=d.startAngle,O=d.endAngle,S=d.clockWise,x=(m+g)/2,E=zce(b,O),N=E>=0?1:-1,_,C;i==="insideStart"?(_=b+N*l,C=S):i==="insideEnd"?(_=O-N*l,C=!S):i==="end"&&(_=O+N*l,C=S),C=E<=0?C:!C;var A=vn(h,v,x,_),M=vn(h,v,x,_+(C?1:-1)*359),R="M".concat(A.x,",").concat(A.y,`
|
|
454
|
+
A`).concat(x,",").concat(x,",0,1,").concat(C?0:1,`,
|
|
455
|
+
`).concat(M.x,",").concat(M.y),D=Qe(t.id)?Xf("recharts-radial-line-"):t.id;return I.createElement("text",bf({},r,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),I.createElement("defs",null,I.createElement("path",{id:D,d:R})),I.createElement("textPath",{xlinkHref:"#".concat(D)},n))},qce=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,l=o.cx,u=o.cy,d=o.innerRadius,h=o.outerRadius,v=o.startAngle,m=o.endAngle,g=(v+m)/2;if(i==="outside"){var b=vn(l,u,h+r,g),O=b.x,S=b.y;return{x:O,y:S,textAnchor:O>=l?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"end"};var x=(d+h)/2,E=vn(l,u,x,g),N=E.x,_=E.y;return{x:N,y:_,textAnchor:"middle",verticalAnchor:"middle"}},Uce=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,l=n,u=l.x,d=l.y,h=l.width,v=l.height,m=v>=0?1:-1,g=m*i,b=m>0?"end":"start",O=m>0?"start":"end",S=h>=0?1:-1,x=S*i,E=S>0?"end":"start",N=S>0?"start":"end";if(o==="top"){var _={x:u+h/2,y:d-m*i,textAnchor:"middle",verticalAnchor:b};return Zt(Zt({},_),r?{height:Math.max(d-r.y,0),width:h}:{})}if(o==="bottom"){var C={x:u+h/2,y:d+v+g,textAnchor:"middle",verticalAnchor:O};return Zt(Zt({},C),r?{height:Math.max(r.y+r.height-(d+v),0),width:h}:{})}if(o==="left"){var A={x:u-x,y:d+v/2,textAnchor:E,verticalAnchor:"middle"};return Zt(Zt({},A),r?{width:Math.max(A.x-r.x,0),height:v}:{})}if(o==="right"){var M={x:u+h+x,y:d+v/2,textAnchor:N,verticalAnchor:"middle"};return Zt(Zt({},M),r?{width:Math.max(r.x+r.width-M.x,0),height:v}:{})}var R=r?{width:h,height:v}:{};return o==="insideLeft"?Zt({x:u+x,y:d+v/2,textAnchor:N,verticalAnchor:"middle"},R):o==="insideRight"?Zt({x:u+h-x,y:d+v/2,textAnchor:E,verticalAnchor:"middle"},R):o==="insideTop"?Zt({x:u+h/2,y:d+g,textAnchor:"middle",verticalAnchor:O},R):o==="insideBottom"?Zt({x:u+h/2,y:d+v-g,textAnchor:"middle",verticalAnchor:b},R):o==="insideTopLeft"?Zt({x:u+x,y:d+g,textAnchor:N,verticalAnchor:O},R):o==="insideTopRight"?Zt({x:u+h-x,y:d+g,textAnchor:E,verticalAnchor:O},R):o==="insideBottomLeft"?Zt({x:u+x,y:d+v-g,textAnchor:N,verticalAnchor:b},R):o==="insideBottomRight"?Zt({x:u+h-x,y:d+v-g,textAnchor:E,verticalAnchor:b},R):bc(o)&&(be(o.x)||Fo(o.x))&&(be(o.y)||Fo(o.y))?Zt({x:u+rs(o.x,h),y:d+rs(o.y,v),textAnchor:"end",verticalAnchor:"end"},R):Zt({x:u+h/2,y:d+v/2,textAnchor:"middle",verticalAnchor:"middle"},R)},Hce=function(t){return"cx"in t&&be(t.cx)};function wn(e){var t=e.offset,n=t===void 0?5:t,r=Dce(e,Nce),i=Zt({offset:n},r),o=i.viewBox,l=i.position,u=i.value,d=i.children,h=i.content,v=i.className,m=v===void 0?"":v,g=i.textBreakAll;if(!o||Qe(u)&&Qe(d)&&!w.isValidElement(h)&&!Ye(h))return null;if(w.isValidElement(h))return w.cloneElement(h,i);var b;if(Ye(h)){if(b=w.createElement(h,i),w.isValidElement(b))return b}else b=Lce(i);var O=Hce(o),S=nt(i,!0);if(O&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Bce(i,b,S);var x=O?qce(i):Uce(i);return I.createElement(Fm,bf({className:rt("recharts-label",m)},S,x,{breakAll:g}),b)}wn.displayName="Label";var QB=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,l=t.endAngle,u=t.r,d=t.radius,h=t.innerRadius,v=t.outerRadius,m=t.x,g=t.y,b=t.top,O=t.left,S=t.width,x=t.height,E=t.clockWise,N=t.labelViewBox;if(N)return N;if(be(S)&&be(x)){if(be(m)&&be(g))return{x:m,y:g,width:S,height:x};if(be(b)&&be(O))return{x:b,y:O,width:S,height:x}}return be(m)&&be(g)?{x:m,y:g,width:0,height:0}:be(n)&&be(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:l||i||0,innerRadius:h||0,outerRadius:v||d||u||0,clockWise:E}:t.viewBox?t.viewBox:{}},Fce=function(t,n){return t?t===!0?I.createElement(wn,{key:"label-implicit",viewBox:n}):Jt(t)?I.createElement(wn,{key:"label-implicit",viewBox:n,value:t}):w.isValidElement(t)?t.type===wn?w.cloneElement(t,{key:"label-implicit",viewBox:n}):I.createElement(wn,{key:"label-implicit",content:t,viewBox:n}):Ye(t)?I.createElement(wn,{key:"label-implicit",content:t,viewBox:n}):bc(t)?I.createElement(wn,bf({viewBox:n},t,{key:"label-implicit"})):null:null},Gce=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,o=QB(t),l=Dr(i,wn).map(function(d,h){return w.cloneElement(d,{viewBox:n||o,key:"label-".concat(h)})});if(!r)return l;var u=Fce(t.label,n||o);return[u].concat(Ace(l))};wn.parseViewBox=QB;wn.renderCallByParent=Gce;var d1,ak;function Vce(){if(ak)return d1;ak=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return d1=e,d1}var Yce=Vce();const Wce=xt(Yce);function xf(e){"@babel/helpers - typeof";return xf=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},xf(e)}var Kce=["valueAccessor"],Xce=["data","dataKey","clockWise","id","textBreakAll"];function Qce(e){return tue(e)||eue(e)||Jce(e)||Zce()}function Zce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
456
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jce(e,t){if(e){if(typeof e=="string")return aj(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 aj(e,t)}}function eue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tue(e){if(Array.isArray(e))return aj(e)}function aj(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 op(){return op=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},op.apply(this,arguments)}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 ok(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){nue(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 nue(e,t,n){return t=rue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rue(e){var t=aue(e,"string");return xf(t)=="symbol"?t:t+""}function aue(e,t){if(xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sk(e,t){if(e==null)return{};var n=iue(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iue(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 oue=function(t){return Array.isArray(t.value)?Wce(t.value):t.value};function Qi(e){var t=e.valueAccessor,n=t===void 0?oue:t,r=sk(e,Kce),i=r.data,o=r.dataKey,l=r.clockWise,u=r.id,d=r.textBreakAll,h=sk(r,Xce);return!i||!i.length?null:I.createElement(Bt,{className:"recharts-label-list"},i.map(function(v,m){var g=Qe(o)?n(v,m):ur(v&&v.payload,o),b=Qe(u)?{}:{id:"".concat(u,"-").concat(m)};return I.createElement(wn,op({},nt(v,!0),h,b,{parentViewBox:v.parentViewBox,value:g,textBreakAll:d,viewBox:wn.parseViewBox(Qe(l)?v:ok(ok({},v),{},{clockWise:l})),key:"label-".concat(m),index:m}))}))}Qi.displayName="LabelList";function sue(e,t){return e?e===!0?I.createElement(Qi,{key:"labelList-implicit",data:t}):I.isValidElement(e)||Ye(e)?I.createElement(Qi,{key:"labelList-implicit",data:t,content:e}):bc(e)?I.createElement(Qi,op({data:t},e,{key:"labelList-implicit"})):null:null}function lue(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=Dr(r,Qi).map(function(l,u){return w.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=sue(e.label,t);return[o].concat(Qce(i))}Qi.renderCallByParent=lue;function wf(e){"@babel/helpers - typeof";return wf=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},wf(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 lk(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 ck(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lk(Object(n),!0).forEach(function(r){cue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cue(e,t,n){return t=uue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uue(e){var t=fue(e,"string");return wf(t)=="symbol"?t:t+""}function fue(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var due=function(t,n){var r=Yr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},zh=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,l=t.sign,u=t.isExternal,d=t.cornerRadius,h=t.cornerIsExternal,v=d*(u?1:-1)+i,m=Math.asin(d/v)/ip,g=h?o:o+l*m,b=vn(n,r,v,g),O=vn(n,r,i,g),S=h?o-l*m:o,x=vn(n,r,v*Math.cos(m*ip),S);return{center:b,circleTangency:O,lineTangency:x,theta:m}},ZB=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,d=due(l,u),h=l+d,v=vn(n,r,o,l),m=vn(n,r,o,h),g="M ".concat(v.x,",").concat(v.y,`
|
|
457
|
+
A `).concat(o,",").concat(o,`,0,
|
|
458
|
+
`).concat(+(Math.abs(d)>180),",").concat(+(l>h),`,
|
|
459
|
+
`).concat(m.x,",").concat(m.y,`
|
|
460
|
+
`);if(i>0){var b=vn(n,r,i,l),O=vn(n,r,i,h);g+="L ".concat(O.x,",").concat(O.y,`
|
|
461
|
+
A `).concat(i,",").concat(i,`,0,
|
|
462
|
+
`).concat(+(Math.abs(d)>180),",").concat(+(l<=h),`,
|
|
463
|
+
`).concat(b.x,",").concat(b.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},hue=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,h=t.startAngle,v=t.endAngle,m=Yr(v-h),g=zh({cx:n,cy:r,radius:o,angle:h,sign:m,cornerRadius:l,cornerIsExternal:d}),b=g.circleTangency,O=g.lineTangency,S=g.theta,x=zh({cx:n,cy:r,radius:o,angle:v,sign:-m,cornerRadius:l,cornerIsExternal:d}),E=x.circleTangency,N=x.lineTangency,_=x.theta,C=d?Math.abs(h-v):Math.abs(h-v)-S-_;if(C<0)return u?"M ".concat(O.x,",").concat(O.y,`
|
|
464
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
|
|
465
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
|
|
466
|
+
`):ZB({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:v});var A="M ".concat(O.x,",").concat(O.y,`
|
|
467
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(b.x,",").concat(b.y,`
|
|
468
|
+
A`).concat(o,",").concat(o,",0,").concat(+(C>180),",").concat(+(m<0),",").concat(E.x,",").concat(E.y,`
|
|
469
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(N.x,",").concat(N.y,`
|
|
470
|
+
`);if(i>0){var M=zh({cx:n,cy:r,radius:i,angle:h,sign:m,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),R=M.circleTangency,D=M.lineTangency,z=M.theta,G=zh({cx:n,cy:r,radius:i,angle:v,sign:-m,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),L=G.circleTangency,F=G.lineTangency,W=G.theta,Q=d?Math.abs(h-v):Math.abs(h-v)-z-W;if(Q<0&&l===0)return"".concat(A,"L").concat(n,",").concat(r,"Z");A+="L".concat(F.x,",").concat(F.y,`
|
|
471
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(L.x,",").concat(L.y,`
|
|
472
|
+
A`).concat(i,",").concat(i,",0,").concat(+(Q>180),",").concat(+(m>0),",").concat(R.x,",").concat(R.y,`
|
|
473
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(D.x,",").concat(D.y,"Z")}else A+="L".concat(n,",").concat(r,"Z");return A},mue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JB=function(t){var n=ck(ck({},mue),t),r=n.cx,i=n.cy,o=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,d=n.forceCornerRadius,h=n.cornerIsExternal,v=n.startAngle,m=n.endAngle,g=n.className;if(l<o||v===m)return null;var b=rt("recharts-sector",g),O=l-o,S=rs(u,O,0,!0),x;return S>0&&Math.abs(v-m)<360?x=hue({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,O/2),forceCornerRadius:d,cornerIsExternal:h,startAngle:v,endAngle:m}):x=ZB({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:v,endAngle:m}),I.createElement("path",ij({},nt(n,!0),{className:b,d:x,role:"img"}))};function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function oj(){return oj=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},oj.apply(this,arguments)}function uk(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 fk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(r){pue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pue(e,t,n){return t=vue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vue(e){var t=gue(e,"string");return Sf(t)=="symbol"?t:t+""}function gue(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dk={curveBasisClosed:Ite,curveBasisOpen:Lte,curveBasis:$te,curveBumpX:Ste,curveBumpY:jte,curveLinearClosed:zte,curveLinear:Av,curveMonotoneX:Bte,curveMonotoneY:qte,curveNatural:Ute,curveStep:Hte,curveStepAfter:Gte,curveStepBefore:Fte},Bh=function(t){return t.x===+t.x&&t.y===+t.y},Au=function(t){return t.x},Cu=function(t){return t.y},yue=function(t,n){if(Ye(t))return t;var r="curve".concat(_v(t));return(r==="curveMonotone"||r==="curveBump")&&n?dk["".concat(r).concat(n==="vertical"?"Y":"X")]:dk[r]||Av},bue=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,l=t.baseLine,u=t.layout,d=t.connectNulls,h=d===void 0?!1:d,v=yue(r,u),m=h?o.filter(function(S){return Bh(S)}):o,g;if(Array.isArray(l)){var b=h?l.filter(function(S){return Bh(S)}):l,O=m.map(function(S,x){return fk(fk({},S),{},{base:b[x]})});return u==="vertical"?g=Mh().y(Cu).x1(Au).x0(function(S){return S.base.x}):g=Mh().x(Au).y1(Cu).y0(function(S){return S.base.y}),g.defined(Bh).curve(v),g(O)}return u==="vertical"&&be(l)?g=Mh().y(Cu).x1(Au).x0(l):be(l)?g=Mh().x(Au).y1(Cu).y0(l):g=rz().x(Au).y(Cu),g.defined(Bh).curve(v),g(m)},sj=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var l=r&&r.length?bue(t):i;return w.createElement("path",oj({},nt(t,!1),Rm(t),{className:rt("recharts-curve",n),d:l,ref:o}))},h1={exports:{}},m1,hk;function xue(){if(hk)return m1;hk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return m1=e,m1}var p1,mk;function wue(){if(mk)return p1;mk=1;var e=xue();function t(){}function n(){}return n.resetWarningCache=t,p1=function(){function r(l,u,d,h,v,m){if(m!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var o={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 o.PropTypes=o,o},p1}var pk;function Sue(){return pk||(pk=1,h1.exports=wue()()),h1.exports}var jue=Sue();const ut=xt(jue),{getOwnPropertyNames:Oue,getOwnPropertySymbols:Eue}=Object,{hasOwnProperty:_ue}=Object.prototype;function v1(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function qh(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,l=o.get(n),u=o.get(r);if(l&&u)return l===r&&u===n;o.set(n,r),o.set(r,n);const d=e(n,r,i);return o.delete(n),o.delete(r),d}}function Nue(e){return e!=null?e[Symbol.toStringTag]:void 0}function vk(e){return Oue(e).concat(Eue(e))}const Aue=Object.hasOwn||((e,t)=>_ue.call(e,t));function gs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Cue="__v",Tue="__o",Mue="_owner",{getOwnPropertyDescriptor:gk,keys:yk}=Object;function Rue(e,t){return e.byteLength===t.byteLength&&sp(new Uint8Array(e),new Uint8Array(t))}function Due(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 Pue(e,t){return e.byteLength===t.byteLength&&sp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function kue(e,t){return gs(e.getTime(),t.getTime())}function $ue(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Iue(e,t){return e===t}function bk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let l,u,d=0;for(;(l=o.next())&&!l.done;){const h=t.entries();let v=!1,m=0;for(;(u=h.next())&&!u.done;){if(i[m]){m++;continue}const g=l.value,b=u.value;if(n.equals(g[0],b[0],d,m,e,t,n)&&n.equals(g[1],b[1],g[0],b[0],e,t,n)){v=i[m]=!0;break}m++}if(!v)return!1;d++}return!0}const Lue=gs;function zue(e,t,n){const r=yk(e);let i=r.length;if(yk(t).length!==i)return!1;for(;i-- >0;)if(!e6(e,t,n,r[i]))return!1;return!0}function Tu(e,t,n){const r=vk(e);let i=r.length;if(vk(t).length!==i)return!1;let o,l,u;for(;i-- >0;)if(o=r[i],!e6(e,t,n,o)||(l=gk(e,o),u=gk(t,o),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function Bue(e,t){return gs(e.valueOf(),t.valueOf())}function que(e,t){return e.source===t.source&&e.flags===t.flags}function xk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let l,u;for(;(l=o.next())&&!l.done;){const d=t.values();let h=!1,v=0;for(;(u=d.next())&&!u.done;){if(!i[v]&&n.equals(l.value,u.value,l.value,u.value,e,t,n)){h=i[v]=!0;break}v++}if(!h)return!1}return!0}function sp(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 Uue(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 e6(e,t,n,r){return(r===Mue||r===Tue||r===Cue)&&(e.$$typeof||t.$$typeof)?!0:Aue(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Hue="[object ArrayBuffer]",Fue="[object Arguments]",Gue="[object Boolean]",Vue="[object DataView]",Yue="[object Date]",Wue="[object Error]",Kue="[object Map]",Xue="[object Number]",Que="[object Object]",Zue="[object RegExp]",Jue="[object Set]",efe="[object String]",tfe={"[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},nfe="[object URL]",rfe=Object.prototype.toString;function afe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:u,areObjectsEqual:d,arePrimitiveWrappersEqual:h,areRegExpsEqual:v,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:b,unknownTagComparators:O}){return function(x,E,N){if(x===E)return!0;if(x==null||E==null)return!1;const _=typeof x;if(_!==typeof E)return!1;if(_!=="object")return _==="number"?u(x,E,N):_==="function"?o(x,E,N):!1;const C=x.constructor;if(C!==E.constructor)return!1;if(C===Object)return d(x,E,N);if(Array.isArray(x))return t(x,E,N);if(C===Date)return r(x,E,N);if(C===RegExp)return v(x,E,N);if(C===Map)return l(x,E,N);if(C===Set)return m(x,E,N);const A=rfe.call(x);if(A===Yue)return r(x,E,N);if(A===Zue)return v(x,E,N);if(A===Kue)return l(x,E,N);if(A===Jue)return m(x,E,N);if(A===Que)return typeof x.then!="function"&&typeof E.then!="function"&&d(x,E,N);if(A===nfe)return b(x,E,N);if(A===Wue)return i(x,E,N);if(A===Fue)return d(x,E,N);if(tfe[A])return g(x,E,N);if(A===Hue)return e(x,E,N);if(A===Vue)return n(x,E,N);if(A===Gue||A===Xue||A===efe)return h(x,E,N);if(O){let M=O[A];if(!M){const R=Nue(x);R&&(M=O[R])}if(M)return M(x,E,N)}return!1}}function ife({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Rue,areArraysEqual:n?Tu:Due,areDataViewsEqual:Pue,areDatesEqual:kue,areErrorsEqual:$ue,areFunctionsEqual:Iue,areMapsEqual:n?v1(bk,Tu):bk,areNumbersEqual:Lue,areObjectsEqual:n?Tu:zue,arePrimitiveWrappersEqual:Bue,areRegExpsEqual:que,areSetsEqual:n?v1(xk,Tu):xk,areTypedArraysEqual:n?v1(sp,Tu):sp,areUrlsEqual:Uue,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=qh(r.areArraysEqual),o=qh(r.areMapsEqual),l=qh(r.areObjectsEqual),u=qh(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return r}function ofe(e){return function(t,n,r,i,o,l,u){return e(t,n,u)}}function sfe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(u,d){const{cache:h=e?new WeakMap:void 0,meta:v}=n();return t(u,d,{cache:h,equals:r,meta:v,strict:i})};if(e)return function(u,d){return t(u,d,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,d){return t(u,d,o)}}const lfe=po();po({strict:!0});po({circular:!0});po({circular:!0,strict:!0});po({createInternalComparator:()=>gs});po({strict:!0,createInternalComparator:()=>gs});po({circular:!0,createInternalComparator:()=>gs});po({circular:!0,createInternalComparator:()=>gs,strict:!0});function po(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=ife(e),l=afe(o),u=n?n(l):ofe(l);return sfe({circular:t,comparator:l,createState:r,equals:u,strict:i})}function cfe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function wk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):cfe(i)};requestAnimationFrame(r)}function lj(e){"@babel/helpers - typeof";return lj=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},lj(e)}function ufe(e){return mfe(e)||hfe(e)||dfe(e)||ffe()}function ffe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
474
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dfe(e,t){if(e){if(typeof e=="string")return Sk(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 Sk(e,t)}}function Sk(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 hfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mfe(e){if(Array.isArray(e))return e}function pfe(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,u=ufe(l),d=u[0],h=u.slice(1);if(typeof d=="number"){wk(i.bind(null,h),d);return}i(d),wk(i.bind(null,h));return}lj(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function jf(e){"@babel/helpers - typeof";return jf=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},jf(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 Ok(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){t6(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 t6(e,t,n){return t=vfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vfe(e){var t=gfe(e,"string");return jf(t)==="symbol"?t:String(t)}function gfe(e,t){if(jf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yfe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},bfe=function(t){return t},xfe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Bu=function(t,n){return Object.keys(n).reduce(function(r,i){return Ok(Ok({},r),{},t6({},i,t(i,n[i])))},{})},Ek=function(t,n,r){return t.map(function(i){return"".concat(xfe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function wfe(e,t){return Ofe(e)||jfe(e,t)||n6(e,t)||Sfe()}function Sfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
475
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Ofe(e){if(Array.isArray(e))return e}function Efe(e){return Afe(e)||Nfe(e)||n6(e)||_fe()}function _fe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
476
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n6(e,t){if(e){if(typeof e=="string")return cj(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 cj(e,t)}}function Nfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Afe(e){if(Array.isArray(e))return cj(e)}function cj(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 lp=1e-4,r6=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},a6=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},_k=function(t,n){return function(r){var i=r6(t,n);return a6(i,r)}},Cfe=function(t,n){return function(r){var i=r6(t,n),o=[].concat(Efe(i.map(function(l,u){return l*u}).slice(1)),[0]);return a6(o,r)}},Nk=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],l=n[2],u=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,l=1,u=1;break;case"ease":i=.25,o=.1,l=.25,u=1;break;case"ease-in":i=.42,o=0,l=1,u=1;break;case"ease-out":i=.42,o=0,l=.58,u=1;break;case"ease-in-out":i=0,o=0,l=.58,u=1;break;default:{var d=n[0].split("(");if(d[0]==="cubic-bezier"&&d[1].split(")")[0].split(",").length===4){var h=d[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),v=wfe(h,4);i=v[0],o=v[1],l=v[2],u=v[3]}}}var m=_k(i,l),g=_k(o,u),b=Cfe(i,l),O=function(E){return E>1?1:E<0?0:E},S=function(E){for(var N=E>1?1:E,_=N,C=0;C<8;++C){var A=m(_)-N,M=b(_);if(Math.abs(A-N)<lp||M<lp)return g(_);_=O(_-A/M)}return g(_)};return S.isStepper=!1,S},Tfe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,l=t.dt,u=l===void 0?17:l,d=function(v,m,g){var b=-(v-m)*r,O=g*o,S=g+(b-O)*u/1e3,x=g*u/1e3+v;return Math.abs(x-m)<lp&&Math.abs(S)<lp?[m,0]:[x,S]};return d.isStepper=!0,d.dt=u,d},Mfe=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 Nk(i);case"spring":return Tfe();default:if(i.split("(")[0]==="cubic-bezier")return Nk(i)}return typeof i=="function"?i:null};function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function Ak(e){return Pfe(e)||Dfe(e)||i6(e)||Rfe()}function Rfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
477
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pfe(e){if(Array.isArray(e))return fj(e)}function Ck(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 pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(r){uj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uj(e,t,n){return t=kfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kfe(e){var t=$fe(e,"string");return Of(t)==="symbol"?t:String(t)}function $fe(e,t){if(Of(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ife(e,t){return Bfe(e)||zfe(e,t)||i6(e,t)||Lfe()}function Lfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
478
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i6(e,t){if(e){if(typeof e=="string")return fj(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 fj(e,t)}}function fj(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 zfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Bfe(e){if(Array.isArray(e))return e}var cp=function(t,n,r){return t+(n-t)*r},dj=function(t){var n=t.from,r=t.to;return n!==r},qfe=function e(t,n,r){var i=Bu(function(o,l){if(dj(l)){var u=t(l.from,l.to,l.velocity),d=Ife(u,2),h=d[0],v=d[1];return pn(pn({},l),{},{from:h,velocity:v})}return l},n);return r<1?Bu(function(o,l){return dj(l)?pn(pn({},l),{},{velocity:cp(l.velocity,i[o].velocity,r),from:cp(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const Ufe=(function(e,t,n,r,i){var o=yfe(e,t),l=o.reduce(function(x,E){return pn(pn({},x),{},uj({},E,[e[E],t[E]]))},{}),u=o.reduce(function(x,E){return pn(pn({},x),{},uj({},E,{from:e[E],velocity:0,to:t[E]}))},{}),d=-1,h,v,m=function(){return null},g=function(){return Bu(function(E,N){return N.from},u)},b=function(){return!Object.values(u).filter(dj).length},O=function(E){h||(h=E);var N=E-h,_=N/n.dt;u=qfe(n,u,_),i(pn(pn(pn({},e),t),g())),h=E,b()||(d=requestAnimationFrame(m))},S=function(E){v||(v=E);var N=(E-v)/r,_=Bu(function(A,M){return cp.apply(void 0,Ak(M).concat([n(N)]))},l);if(i(pn(pn(pn({},e),t),_)),N<1)d=requestAnimationFrame(m);else{var C=Bu(function(A,M){return cp.apply(void 0,Ak(M).concat([n(1)]))},l);i(pn(pn(pn({},e),t),C))}};return m=n.isStepper?O:S,function(){return requestAnimationFrame(m),function(){cancelAnimationFrame(d)}}});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)}var Hfe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Ffe(e,t){if(e==null)return{};var n=Gfe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function g1(e){return Kfe(e)||Wfe(e)||Yfe(e)||Vfe()}function Vfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
479
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yfe(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 Wfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kfe(e){if(Array.isArray(e))return hj(e)}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 Tk(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 qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(n),!0).forEach(function(r){$u(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $u(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 Xfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qfe(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 Zfe(e,t,n){return t&&Qfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o6(e){var t=Jfe(e,"string");return Ul(t)==="symbol"?t:String(t)}function Jfe(e,t){if(Ul(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function ede(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 tde(e){var t=nde();return function(){var r=up(e),i;if(t){var o=up(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return pj(this,i)}}function pj(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 vj(e)}function vj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nde(){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 up(e){return up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},up(e)}var ui=(function(e){ede(n,e);var t=tde(n);function n(r,i){var o;Xfe(this,n),o=t.call(this,r,i);var l=o.props,u=l.isActive,d=l.attributeName,h=l.from,v=l.to,m=l.steps,g=l.children,b=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(vj(o)),o.changeStyle=o.changeStyle.bind(vj(o)),!u||b<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:v}),pj(o);if(m&&m.length)o.state={style:m[0].style};else if(h){if(typeof g=="function")return o.state={style:h},pj(o);o.state={style:d?$u({},d,h):h}}else o.state={style:{}};return o}return Zfe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,l=i.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isActive,u=o.canBegin,d=o.attributeName,h=o.shouldReAnimate,v=o.to,m=o.from,g=this.state.style;if(u){if(!l){var b={style:d?$u({},d,v):v};this.state&&g&&(d&&g[d]!==v||!d&&g!==v)&&this.setState(b);return}if(!(lfe(i.to,v)&&i.canBegin&&i.isActive)){var O=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=O||h?m:i.to;if(this.state&&g){var x={style:d?$u({},d,S):S};(d&&g[d]!==S||!d&&g!==S)&&this.setState(x)}this.runAnimation(qr(qr({},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 o=this,l=i.from,u=i.to,d=i.duration,h=i.easing,v=i.begin,m=i.onAnimationEnd,g=i.onAnimationStart,b=Ufe(l,u,Mfe(h),d,this.changeStyle),O=function(){o.stopJSAnimation=b()};this.manager.start([g,v,O,d,m])}},{key:"runStepAnimation",value:function(i){var o=this,l=i.steps,u=i.begin,d=i.onAnimationStart,h=l[0],v=h.style,m=h.duration,g=m===void 0?0:m,b=function(S,x,E){if(E===0)return S;var N=x.duration,_=x.easing,C=_===void 0?"ease":_,A=x.style,M=x.properties,R=x.onAnimationEnd,D=E>0?l[E-1]:x,z=M||Object.keys(A);if(typeof C=="function"||C==="spring")return[].concat(g1(S),[o.runJSAnimation.bind(o,{from:D.style,to:A,duration:N,easing:C}),N]);var G=Ek(z,N,C),L=qr(qr(qr({},D.style),A),{},{transition:G});return[].concat(g1(S),[L,N,R]).filter(bfe)};return this.manager.start([d].concat(g1(l.reduce(b,[v,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=pfe());var o=i.begin,l=i.duration,u=i.attributeName,d=i.to,h=i.easing,v=i.onAnimationStart,m=i.onAnimationEnd,g=i.steps,b=i.children,O=this.manager;if(this.unSubscribe=O.subscribe(this.handleStyleChange),typeof h=="function"||typeof b=="function"||h==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var S=u?$u({},u,d):d,x=Ek(Object.keys(S),l,h);O.start([v,o,qr(qr({},S),{},{transition:x}),l,m])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var l=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var d=Ffe(i,Hfe),h=w.Children.count(o),v=this.state.style;if(typeof o=="function")return o(v);if(!u||h===0||l<=0)return o;var m=function(b){var O=b.props,S=O.style,x=S===void 0?{}:S,E=O.className,N=w.cloneElement(b,qr(qr({},d),{},{style:qr(qr({},x),v),className:E}));return N};return h===1?m(w.Children.only(o)):I.createElement("div",null,w.Children.map(o,function(g){return m(g)}))}}]),n})(w.PureComponent);ui.displayName="Animate";ui.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ui.propTypes={from:ut.oneOfType([ut.object,ut.string]),to:ut.oneOfType([ut.object,ut.string]),attributeName:ut.string,duration:ut.number,begin:ut.number,easing:ut.oneOfType([ut.string,ut.func]),steps:ut.arrayOf(ut.shape({duration:ut.number.isRequired,style:ut.object.isRequired,easing:ut.oneOfType([ut.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ut.func]),properties:ut.arrayOf("string"),onAnimationEnd:ut.func})),children:ut.oneOfType([ut.node,ut.func]),isActive:ut.bool,canBegin:ut.bool,onAnimationEnd:ut.func,shouldReAnimate:ut.bool,onAnimationStart:ut.func,onAnimationReStart:ut.func};function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function fp(){return fp=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},fp.apply(this,arguments)}function rde(e,t){return sde(e)||ode(e,t)||ide(e,t)||ade()}function ade(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
480
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ide(e,t){if(e){if(typeof e=="string")return Mk(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 Mk(e,t)}}function Mk(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 ode(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function sde(e){if(Array.isArray(e))return e}function Rk(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 Dk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rk(Object(n),!0).forEach(function(r){lde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lde(e,t,n){return t=cde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cde(e){var t=ude(e,"string");return Ef(t)=="symbol"?t:t+""}function ude(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pk=function(t,n,r,i,o){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),u=i>=0?1:-1,d=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,v;if(l>0&&o instanceof Array){for(var m=[0,0,0,0],g=0,b=4;g<b;g++)m[g]=o[g]>l?l:o[g];v="M".concat(t,",").concat(n+u*m[0]),m[0]>0&&(v+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(h,",").concat(t+d*m[0],",").concat(n)),v+="L ".concat(t+r-d*m[1],",").concat(n),m[1]>0&&(v+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(h,`,
|
|
481
|
+
`).concat(t+r,",").concat(n+u*m[1])),v+="L ".concat(t+r,",").concat(n+i-u*m[2]),m[2]>0&&(v+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(h,`,
|
|
482
|
+
`).concat(t+r-d*m[2],",").concat(n+i)),v+="L ".concat(t+d*m[3],",").concat(n+i),m[3]>0&&(v+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(h,`,
|
|
483
|
+
`).concat(t,",").concat(n+i-u*m[3])),v+="Z"}else if(l>0&&o===+o&&o>0){var O=Math.min(l,o);v="M ".concat(t,",").concat(n+u*O,`
|
|
484
|
+
A `).concat(O,",").concat(O,",0,0,").concat(h,",").concat(t+d*O,",").concat(n,`
|
|
485
|
+
L `).concat(t+r-d*O,",").concat(n,`
|
|
486
|
+
A `).concat(O,",").concat(O,",0,0,").concat(h,",").concat(t+r,",").concat(n+u*O,`
|
|
487
|
+
L `).concat(t+r,",").concat(n+i-u*O,`
|
|
488
|
+
A `).concat(O,",").concat(O,",0,0,").concat(h,",").concat(t+r-d*O,",").concat(n+i,`
|
|
489
|
+
L `).concat(t+d*O,",").concat(n+i,`
|
|
490
|
+
A `).concat(O,",").concat(O,",0,0,").concat(h,",").concat(t,",").concat(n+i-u*O," Z")}else v="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return v},fde=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,l=n.y,u=n.width,d=n.height;if(Math.abs(u)>0&&Math.abs(d)>0){var h=Math.min(o,o+u),v=Math.max(o,o+u),m=Math.min(l,l+d),g=Math.max(l,l+d);return r>=h&&r<=v&&i>=m&&i<=g}return!1},dde={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},LE=function(t){var n=Dk(Dk({},dde),t),r=w.useRef(),i=w.useState(-1),o=rde(i,2),l=o[0],u=o[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&u(C)}catch{}},[]);var d=n.x,h=n.y,v=n.width,m=n.height,g=n.radius,b=n.className,O=n.animationEasing,S=n.animationDuration,x=n.animationBegin,E=n.isAnimationActive,N=n.isUpdateAnimationActive;if(d!==+d||h!==+h||v!==+v||m!==+m||v===0||m===0)return null;var _=rt("recharts-rectangle",b);return N?I.createElement(ui,{canBegin:l>0,from:{width:v,height:m,x:d,y:h},to:{width:v,height:m,x:d,y:h},duration:S,animationEasing:O,isActive:N},function(C){var A=C.width,M=C.height,R=C.x,D=C.y;return I.createElement(ui,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:S,isActive:E,easing:O},I.createElement("path",fp({},nt(n,!0),{className:_,d:Pk(R,D,A,M,g),ref:r})))}):I.createElement("path",fp({},nt(n,!0),{className:_,d:Pk(d,h,v,m,g)}))};function gj(){return gj=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},gj.apply(this,arguments)}var zE=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,l=rt("recharts-dot",o);return n===+n&&r===+r&&i===+i?w.createElement("circle",gj({},nt(t,!1),Rm(t),{className:l,cx:n,cy:r,r:i})):null};function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}var hde=["x","y","top","left","width","height","className"];function yj(){return yj=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},yj.apply(this,arguments)}function kk(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 mde(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(n),!0).forEach(function(r){pde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pde(e,t,n){return t=vde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vde(e){var t=gde(e,"string");return _f(t)=="symbol"?t:t+""}function gde(e,t){if(_f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yde(e,t){if(e==null)return{};var n=bde(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bde(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 xde=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},wde=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.top,u=l===void 0?0:l,d=t.left,h=d===void 0?0:d,v=t.width,m=v===void 0?0:v,g=t.height,b=g===void 0?0:g,O=t.className,S=yde(t,hde),x=mde({x:r,y:o,top:u,left:h,width:m,height:b},S);return!be(r)||!be(o)||!be(m)||!be(b)||!be(u)||!be(h)?null:I.createElement("path",yj({},nt(x,!0),{className:rt("recharts-cross",O),d:xde(r,o,m,b,u,h)}))},y1,$k;function Sde(){if($k)return y1;$k=1;var e=_z(),t=e(Object.getPrototypeOf,Object);return y1=t,y1}var b1,Ik;function jde(){if(Ik)return b1;Ik=1;var e=hi(),t=Sde(),n=mi(),r="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,d=l.call(Object);function h(v){if(!n(v)||e(v)!=r)return!1;var m=t(v);if(m===null)return!0;var g=u.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==d}return b1=h,b1}var Ode=jde();const Ede=xt(Ode);var x1,Lk;function _de(){if(Lk)return x1;Lk=1;var e=hi(),t=mi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return x1=r,x1}var Nde=_de();const Ade=xt(Nde);function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function dp(){return dp=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},dp.apply(this,arguments)}function Cde(e,t){return Dde(e)||Rde(e,t)||Mde(e,t)||Tde()}function Tde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
491
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mde(e,t){if(e){if(typeof e=="string")return zk(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 zk(e,t)}}function zk(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 Rde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Dde(e){if(Array.isArray(e))return e}function Bk(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?Bk(Object(n),!0).forEach(function(r){Pde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pde(e,t,n){return t=kde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kde(e){var t=$de(e,"string");return Nf(t)=="symbol"?t:t+""}function $de(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uk=function(t,n,r,i,o){var l=r-i,u;return u="M ".concat(t,",").concat(n),u+="L ".concat(t+r,",").concat(n),u+="L ".concat(t+r-l/2,",").concat(n+o),u+="L ".concat(t+r-l/2-i,",").concat(n+o),u+="L ".concat(t,",").concat(n," Z"),u},Ide={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Lde=function(t){var n=qk(qk({},Ide),t),r=w.useRef(),i=w.useState(-1),o=Cde(i,2),l=o[0],u=o[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&u(_)}catch{}},[]);var d=n.x,h=n.y,v=n.upperWidth,m=n.lowerWidth,g=n.height,b=n.className,O=n.animationEasing,S=n.animationDuration,x=n.animationBegin,E=n.isUpdateAnimationActive;if(d!==+d||h!==+h||v!==+v||m!==+m||g!==+g||v===0&&m===0||g===0)return null;var N=rt("recharts-trapezoid",b);return E?I.createElement(ui,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:d,y:h},to:{upperWidth:v,lowerWidth:m,height:g,x:d,y:h},duration:S,animationEasing:O,isActive:E},function(_){var C=_.upperWidth,A=_.lowerWidth,M=_.height,R=_.x,D=_.y;return I.createElement(ui,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:S,easing:O},I.createElement("path",dp({},nt(n,!0),{className:N,d:Uk(R,D,C,A,M),ref:r})))}):I.createElement("g",null,I.createElement("path",dp({},nt(n,!0),{className:N,d:Uk(d,h,v,m,g)})))},zde=["option","shapeType","propTransformer","activeClassName","isActive"];function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function Bde(e,t){if(e==null)return{};var n=qde(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qde(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 Hk(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 hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hk(Object(n),!0).forEach(function(r){Ude(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ude(e,t,n){return t=Hde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hde(e){var t=Fde(e,"string");return Af(t)=="symbol"?t:t+""}function Fde(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gde(e,t){return hp(hp({},t),e)}function Vde(e,t){return e==="symbols"}function Fk(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return I.createElement(LE,n);case"trapezoid":return I.createElement(Lde,n);case"sector":return I.createElement(JB,n);case"symbols":if(Vde(t))return I.createElement(nE,n);break;default:return null}}function Yde(e){return w.isValidElement(e)?e.props:e}function Wde(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Gde:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,d=Bde(e,zde),h;if(w.isValidElement(t))h=w.cloneElement(t,hp(hp({},d),Yde(t)));else if(Ye(t))h=t(d);else if(Ede(t)&&!Ade(t)){var v=i(t,d);h=I.createElement(Fk,{shapeType:n,elementProps:v})}else{var m=d;h=I.createElement(Fk,{shapeType:n,elementProps:m})}return u?I.createElement(Bt,{className:l},h):h}function Fv(e,t){return t!=null&&"trapezoids"in e.props}function Gv(e,t){return t!=null&&"sectors"in e.props}function Cf(e,t){return t!=null&&"points"in e.props}function Kde(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,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function Xde(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Qde(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Zde(e,t){var n;return Fv(e,t)?n=Kde:Gv(e,t)?n=Xde:Cf(e,t)&&(n=Qde),n}function Jde(e,t){var n;return Fv(e,t)?n="trapezoids":Gv(e,t)?n="sectors":Cf(e,t)&&(n="points"),n}function ehe(e,t){if(Fv(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(Gv(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 Cf(e,t)?t.payload:{}}function the(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Jde(n,t),o=ehe(n,t),l=r.filter(function(d,h){var v=qv(o,d),m=n.props[i].filter(function(O){var S=Zde(n,t);return S(O,t)}),g=n.props[i].indexOf(m[m.length-1]),b=h===g;return v&&b}),u=r.indexOf(l[l.length-1]);return u}var w1,Gk;function nhe(){if(Gk)return w1;Gk=1;var e=Math.ceil,t=Math.max;function n(r,i,o,l){for(var u=-1,d=t(e((i-r)/(o||1)),0),h=Array(d);d--;)h[l?d:++u]=r,r+=o;return h}return w1=n,w1}var S1,Vk;function s6(){if(Vk)return S1;Vk=1;var e=Uz(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return S1=r,S1}var j1,Yk;function rhe(){if(Yk)return j1;Yk=1;var e=nhe(),t=Rv(),n=s6();function r(i){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),u=u===void 0?o<l?1:-1:n(u),e(o,l,u,i)}}return j1=r,j1}var O1,Wk;function ahe(){if(Wk)return O1;Wk=1;var e=rhe(),t=e();return O1=t,O1}var ihe=ahe();const mp=xt(ihe);function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function Kk(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 Xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(n),!0).forEach(function(r){l6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l6(e,t,n){return t=ohe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ohe(e){var t=she(e,"string");return Tf(t)=="symbol"?t:t+""}function she(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lhe=["Webkit","Moz","O","ms"],che=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=lhe.reduce(function(o,l){return Xk(Xk({},o),{},l6({},l+r,n))},{});return i[t]=n,i};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 pp(){return pp=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},pp.apply(this,arguments)}function Qk(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 E1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(n),!0).forEach(function(r){nr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zk(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,u6(r.key),r)}}function fhe(e,t,n){return t&&Zk(e.prototype,t),n&&Zk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dhe(e,t,n){return t=vp(t),hhe(e,c6()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function hhe(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 mhe(e)}function mhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c6=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function phe(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&&bj(e,t)}function bj(e,t){return bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bj(e,t)}function nr(e,t,n){return t=u6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u6(e){var t=vhe(e,"string");return Hl(t)=="symbol"?t:t+""}function vhe(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 ghe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var d=n.length,h=Lu().domain(mp(0,d)).range([o,o+l-u]),v=h.domain().map(function(m){return h(m)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:v}},Jk=function(t){return t.changedTouches&&!!t.changedTouches.length},Fl=(function(e){function t(n){var r;return uhe(this,t),r=dhe(this,t,[n]),nr(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),nr(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),nr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,l=i.onDragEnd,u=i.startIndex;l==null||l({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),nr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),nr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),nr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),nr(r,"handleSlideDragStart",function(i){var o=Jk(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return phe(t,e),fhe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,l=this.state.scaleValues,u=this.props,d=u.gap,h=u.data,v=h.length-1,m=Math.min(i,o),g=Math.max(i,o),b=t.getIndexInRange(l,m),O=t.getIndexInRange(l,g);return{startIndex:b-b%d,endIndex:O===v?v:O-O%d}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,u=i.dataKey,d=ur(o[r],u,r);return Ye(l)?l(d,r):d}},{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,o=i.slideMoveStartX,l=i.startX,u=i.endX,d=this.props,h=d.x,v=d.width,m=d.travellerWidth,g=d.startIndex,b=d.endIndex,O=d.onChange,S=r.pageX-o;S>0?S=Math.min(S,h+v-m-u,h+v-m-l):S<0&&(S=Math.max(S,h-l,h-u));var x=this.getIndex({startX:l+S,endX:u+S});(x.startIndex!==g||x.endIndex!==b)&&O&&O(x),this.setState({startX:l+S,endX:u+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=Jk(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,l=i.movingTravellerId,u=i.endX,d=i.startX,h=this.state[l],v=this.props,m=v.x,g=v.width,b=v.travellerWidth,O=v.onChange,S=v.gap,x=v.data,E={startX:this.state.startX,endX:this.state.endX},N=r.pageX-o;N>0?N=Math.min(N,m+g-b-h):N<0&&(N=Math.max(N,m-h)),E[l]=h+N;var _=this.getIndex(E),C=_.startIndex,A=_.endIndex,M=function(){var D=x.length-1;return l==="startX"&&(u>d?C%S===0:A%S===0)||u<d&&A===D||l==="endX"&&(u>d?A%S===0:C%S===0)||u>d&&A===D};this.setState(nr(nr({},l,h+N),"brushMoveStartX",r.pageX),function(){O&&M()&&O(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,l=this.state,u=l.scaleValues,d=l.startX,h=l.endX,v=this.state[i],m=u.indexOf(v);if(m!==-1){var g=m+r;if(!(g===-1||g>=u.length)){var b=u[g];i==="startX"&&b>=h||i==="endX"&&b<=d||this.setState(nr({},i,b),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,d=r.fill,h=r.stroke;return I.createElement("rect",{stroke:h,fill:d,x:i,y:o,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,d=r.data,h=r.children,v=r.padding,m=w.Children.only(h);return m?I.cloneElement(m,{x:i,y:o,width:l,height:u,margin:v,compact:!0,data:d}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,l,u=this,d=this.props,h=d.y,v=d.travellerWidth,m=d.height,g=d.traveller,b=d.ariaLabel,O=d.data,S=d.startIndex,x=d.endIndex,E=Math.max(r,this.props.x),N=E1(E1({},nt(this.props,!1)),{},{x:E,y:h,width:v,height:m}),_=b||"Min value: ".concat((o=O[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=O[x])===null||l===void 0?void 0:l.name);return I.createElement(Bt,{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(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),u.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,N))}},{key:"renderSlide",value:function(r,i){var o=this.props,l=o.y,u=o.height,d=o.stroke,h=o.travellerWidth,v=Math.min(r,i)+h,m=Math.max(Math.abs(i-r)-h,0);return I.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:d,fillOpacity:.2,x:v,y:l,width:m,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,l=r.y,u=r.height,d=r.travellerWidth,h=r.stroke,v=this.state,m=v.startX,g=v.endX,b=5,O={pointerEvents:"none",fill:h};return I.createElement(Bt,{className:"recharts-brush-texts"},I.createElement(Fm,pp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,g)-b,y:l+u/2},O),this.getTextOfTick(i)),I.createElement(Fm,pp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,g)+d+b,y:l+u/2},O),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,l=r.children,u=r.x,d=r.y,h=r.width,v=r.height,m=r.alwaysShowText,g=this.state,b=g.startX,O=g.endX,S=g.isTextActive,x=g.isSlideMoving,E=g.isTravellerMoving,N=g.isTravellerFocused;if(!i||!i.length||!be(u)||!be(d)||!be(h)||!be(v)||h<=0||v<=0)return null;var _=rt("recharts-brush",o),C=I.Children.count(l)===1,A=che("userSelect","none");return I.createElement(Bt,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(b,O),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(O,"endX"),(S||x||E||N||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,l=r.width,u=r.height,d=r.stroke,h=Math.floor(o+u/2)-1;return I.createElement(I.Fragment,null,I.createElement("rect",{x:i,y:o,width:l,height:u,fill:d,stroke:"none"}),I.createElement("line",{x1:i+1,y1:h,x2:i+l-1,y2:h,fill:"none",stroke:"#fff"}),I.createElement("line",{x1:i+1,y1:h+2,x2:i+l-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return I.isValidElement(r)?o=I.cloneElement(r,i):Ye(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,l=r.width,u=r.x,d=r.travellerWidth,h=r.updateId,v=r.startIndex,m=r.endIndex;if(o!==i.prevData||h!==i.prevUpdateId)return E1({prevData:o,prevTravellerWidth:d,prevUpdateId:h,prevX:u,prevWidth:l},o&&o.length?ghe({data:o,width:l,x:u,travellerWidth:d,startIndex:v,endIndex:m}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||u!==i.prevX||d!==i.prevTravellerWidth)){i.scale.range([u,u+l-d]);var g=i.scale.domain().map(function(b){return i.scale(b)});return{prevData:o,prevTravellerWidth:d,prevUpdateId:h,prevX:u,prevWidth:l,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,l=0,u=o-1;u-l>1;){var d=Math.floor((l+u)/2);r[d]>i?u=d:l=d}return i>=r[u]?u:l}}])})(w.PureComponent);nr(Fl,"displayName","Brush");nr(Fl,"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 _1,e4;function yhe(){if(e4)return _1;e4=1;var e=cE();function t(n,r){var i;return e(n,function(o,l,u){return i=r(o,l,u),!i}),!!i}return _1=t,_1}var N1,t4;function bhe(){if(t4)return N1;t4=1;var e=bz(),t=fo(),n=yhe(),r=Vn(),i=Rv();function o(l,u,d){var h=r(l)?e:n;return d&&i(l,u,d)&&(u=void 0),h(l,t(u,3))}return N1=o,N1}var xhe=bhe();const whe=xt(xhe);var ba=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},A1,n4;function She(){if(n4)return A1;n4=1;var e=Iz();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 C1,r4;function jhe(){if(r4)return C1;r4=1;var e=She(),t=kz(),n=fo();function r(i,o){var l={};return o=n(o,3),t(i,function(u,d,h){e(l,d,o(u,d,h))}),l}return C1=r,C1}var Ohe=jhe();const Ehe=xt(Ohe);var T1,a4;function _he(){if(a4)return T1;a4=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 T1=e,T1}var M1,i4;function Nhe(){if(i4)return M1;i4=1;var e=cE();function t(n,r){var i=!0;return e(n,function(o,l,u){return i=!!r(o,l,u),i}),i}return M1=t,M1}var R1,o4;function Ahe(){if(o4)return R1;o4=1;var e=_he(),t=Nhe(),n=fo(),r=Vn(),i=Rv();function o(l,u,d){var h=r(l)?e:t;return d&&i(l,u,d)&&(u=void 0),h(l,n(u,3))}return R1=o,R1}var Che=Ahe();const f6=xt(Che);var The=["x","y"];function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function xj(){return xj=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},xj.apply(this,arguments)}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 Mu(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){Mhe(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 Mhe(e,t,n){return t=Rhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rhe(e){var t=Dhe(e,"string");return Mf(t)=="symbol"?t:t+""}function Dhe(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Phe(e,t){if(e==null)return{};var n=khe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function khe(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 $he(e,t){var n=e.x,r=e.y,i=Phe(e,The),o="".concat(n),l=parseInt(o,10),u="".concat(r),d=parseInt(u,10),h="".concat(t.height||i.height),v=parseInt(h,10),m="".concat(t.width||i.width),g=parseInt(m,10);return Mu(Mu(Mu(Mu(Mu({},t),i),l?{x:l}:{}),d?{y:d}:{}),{},{height:v,width:g,name:t.name,radius:t.radius})}function l4(e){return I.createElement(Wde,xj({shapeType:"rectangle",propTransformer:$he,activeClassName:"recharts-active-bar"},e))}var Ihe=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 o=be(r)||Hee(r);return o?t(r,i):(o||is(),n)}},Lhe=["value","background"],d6;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 zhe(e,t){if(e==null)return{};var n=Bhe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bhe(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 gp(){return gp=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},gp.apply(this,arguments)}function c4(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 Vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c4(Object(n),!0).forEach(function(r){Wi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u4(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,m6(r.key),r)}}function Uhe(e,t,n){return t&&u4(e.prototype,t),n&&u4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hhe(e,t,n){return t=yp(t),Fhe(e,h6()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function Fhe(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 Ghe(e)}function Ghe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h6=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yp(e)}function Vhe(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&&wj(e,t)}function wj(e,t){return wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wj(e,t)}function Wi(e,t,n){return t=m6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m6(e){var t=Yhe(e,"string");return Gl(t)=="symbol"?t:t+""}function Yhe(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)}var no=(function(e){function t(){var n;qhe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Hhe(this,t,[].concat(i)),Wi(n,"state",{isAnimationFinished:!1}),Wi(n,"id",Xf("recharts-bar-")),Wi(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Wi(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Vhe(t,e),Uhe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,l=o.shape,u=o.dataKey,d=o.activeIndex,h=o.activeBar,v=nt(this.props,!1);return r&&r.map(function(m,g){var b=g===d,O=b?h:l,S=Vt(Vt(Vt({},v),m),{},{isActive:b,option:O,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return I.createElement(Bt,gp({className:"recharts-bar-rectangle"},Dm(i.props,m,g),{key:"rectangle-".concat(m==null?void 0:m.x,"-").concat(m==null?void 0:m.y,"-").concat(m==null?void 0:m.value,"-").concat(g)}),I.createElement(l4,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,l=i.layout,u=i.isAnimationActive,d=i.animationBegin,h=i.animationDuration,v=i.animationEasing,m=i.animationId,g=this.state.prevData;return I.createElement(ui,{begin:d,duration:h,isActive:u,easing:v,from:{t:0},to:{t:1},key:"bar-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var O=b.t,S=o.map(function(x,E){var N=g&&g[E];if(N){var _=Gr(N.x,x.x),C=Gr(N.y,x.y),A=Gr(N.width,x.width),M=Gr(N.height,x.height);return Vt(Vt({},x),{},{x:_(O),y:C(O),width:A(O),height:M(O)})}if(l==="horizontal"){var R=Gr(0,x.height),D=R(O);return Vt(Vt({},x),{},{y:x.y+x.height-D,height:D})}var z=Gr(0,x.width),G=z(O);return Vt(Vt({},x),{},{width:G})});return I.createElement(Bt,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&i&&i.length&&(!l||!qv(l,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,l=i.dataKey,u=i.activeIndex,d=nt(this.props.background,!1);return o.map(function(h,v){h.value;var m=h.background,g=zhe(h,Lhe);if(!m)return null;var b=Vt(Vt(Vt(Vt(Vt({},g),{},{fill:"#eee"},m),d),Dm(r.props,h,v)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:v,className:"recharts-bar-background-rectangle"});return I.createElement(l4,gp({key:"background-bar-".concat(v),option:r.props.background,isActive:v===u},b))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,u=o.xAxis,d=o.yAxis,h=o.layout,v=o.children,m=Dr(v,nd);if(!m)return null;var g=h==="vertical"?l[0].height/2:l[0].width/2,b=function(x,E){var N=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:N,errorVal:ur(x,E)}},O={clipPath:r?"url(#clipPath-".concat(i,")"):null};return I.createElement(Bt,O,m.map(function(S){return I.cloneElement(S,{key:"error-bar-".concat(i,"-").concat(S.props.dataKey),data:l,xAxis:u,yAxis:d,layout:h,offset:g,dataPointFormatter:b})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,l=r.className,u=r.xAxis,d=r.yAxis,h=r.left,v=r.top,m=r.width,g=r.height,b=r.isAnimationActive,O=r.background,S=r.id;if(i||!o||!o.length)return null;var x=this.state.isAnimationFinished,E=rt("recharts-bar",l),N=u&&u.allowDataOverflow,_=d&&d.allowDataOverflow,C=N||_,A=Qe(S)?this.id:S;return I.createElement(Bt,{className:E},N||_?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(A)},I.createElement("rect",{x:N?h:h-m/2,y:_?v:v-g/2,width:N?m:m*2,height:_?g:g*2}))):null,I.createElement(Bt,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(A,")"):null},O?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,A),(!b||x)&&Qi.renderCallByParent(this.props,o))}}],[{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}}])})(w.PureComponent);d6=no;Wi(no,"displayName","Bar");Wi(no,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!wc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Wi(no,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,l=e.yAxis,u=e.xAxisTicks,d=e.yAxisTicks,h=e.stackedData,v=e.dataStartIndex,m=e.displayedData,g=e.offset,b=lce(r,n);if(!b)return null;var O=t.layout,S=n.type.defaultProps,x=S!==void 0?Vt(Vt({},S),n.props):n.props,E=x.dataKey,N=x.children,_=x.minPointSize,C=O==="horizontal"?l:o,A=h?C.scale.domain():null,M=vce({numericAxis:C}),R=Dr(N,Fz),D=m.map(function(z,G){var L,F,W,Q,X,k;h?L=cce(h[v+G],A):(L=ur(z,E),Array.isArray(L)||(L=[M,L]));var H=Ihe(_,d6.defaultProps.minPointSize)(L[1],G);if(O==="horizontal"){var B,Z=[l.scale(L[0]),l.scale(L[1])],le=Z[0],$=Z[1];F=XP({axis:o,ticks:u,bandSize:i,offset:b.offset,entry:z,index:G}),W=(B=$??le)!==null&&B!==void 0?B:void 0,Q=b.size;var Y=le-$;if(X=Number.isNaN(Y)?0:Y,k={x:F,y:l.y,width:Q,height:l.height},Math.abs(H)>0&&Math.abs(X)<Math.abs(H)){var q=Yr(X||H)*(Math.abs(H)-Math.abs(X));W-=q,X+=q}}else{var U=[o.scale(L[0]),o.scale(L[1])],ne=U[0],fe=U[1];if(F=ne,W=XP({axis:l,ticks:d,bandSize:i,offset:b.offset,entry:z,index:G}),Q=fe-ne,X=b.size,k={x:o.x,y:W,width:o.width,height:X},Math.abs(H)>0&&Math.abs(Q)<Math.abs(H)){var ie=Yr(Q||H)*(Math.abs(H)-Math.abs(Q));Q+=ie}}return Vt(Vt(Vt({},z),{},{x:F,y:W,width:Q,height:X,value:h?L:L[1],payload:z,background:k},R&&R[G]&&R[G].props),{},{tooltipPayload:[XB(n,z)],tooltipPosition:{x:F+Q/2,y:W+X/2}})});return Vt({data:D,layout:O},g)});function Rf(e){"@babel/helpers - typeof";return Rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rf(e)}function Whe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f4(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,p6(r.key),r)}}function Khe(e,t,n){return t&&f4(e.prototype,t),n&&f4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}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 Hr(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){Vv(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 Vv(e,t,n){return t=p6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p6(e){var t=Xhe(e,"string");return Rf(t)=="symbol"?t:t+""}function Xhe(e,t){if(Rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v6=function(t,n,r,i,o){var l=t.width,u=t.height,d=t.layout,h=t.children,v=Object.keys(n),m={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:u-r.bottom,bottomMirror:u-r.bottom},g=!!rr(h,no);return v.reduce(function(b,O){var S=n[O],x=S.orientation,E=S.domain,N=S.padding,_=N===void 0?{}:N,C=S.mirror,A=S.reversed,M="".concat(x).concat(C?"Mirror":""),R,D,z,G,L;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var F=E[1]-E[0],W=1/0,Q=S.categoricalDomain.sort(Vee);if(Q.forEach(function(U,ne){ne>0&&(W=Math.min((U||0)-(Q[ne-1]||0),W))}),Number.isFinite(W)){var X=W/F,k=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(R=X*k/2),S.padding==="no-gap"){var H=rs(t.barCategoryGap,X*k),B=X*k/2;R=B-H-(B-H)/k*H}}}i==="xAxis"?D=[r.left+(_.left||0)+(R||0),r.left+r.width-(_.right||0)-(R||0)]:i==="yAxis"?D=d==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(R||0),r.top+r.height-(_.bottom||0)-(R||0)]:D=S.range,A&&(D=[D[1],D[0]]);var Z=oce(S,o,g),le=Z.scale,$=Z.realScaleType;le.domain(E).range(D),sce(le);var Y=pce(le,Hr(Hr({},S),{},{realScaleType:$}));i==="xAxis"?(L=x==="top"&&!C||x==="bottom"&&C,z=r.left,G=m[M]-L*S.height):i==="yAxis"&&(L=x==="left"&&!C||x==="right"&&C,z=m[M]-L*S.width,G=r.top);var q=Hr(Hr(Hr({},S),Y),{},{realScaleType:$,x:z,y:G,scale:le,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return q.bandSize=ap(q,Y),!S.hide&&i==="xAxis"?m[M]+=(L?-1:1)*q.height:S.hide||(m[M]+=(L?-1:1)*q.width),Hr(Hr({},b),{},Vv({},O,q))},{})},g6=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(i,l),width:Math.abs(o-r),height:Math.abs(l-i)}},Qhe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return g6({x:n,y:r},{x:i,y:o})},y6=(function(){function e(t){Whe(this,e),this.scale=t}return Khe(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,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var d=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+d}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Vv(y6,"EPS",1e-4);var BE=function(t){var n=Object.keys(t).reduce(function(r,i){return Hr(Hr({},r),{},Vv({},i,y6.create(t[i])))},{});return Hr(Hr({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,u=o.position;return Ehe(i,function(d,h){return n[h].apply(d,{bandAware:l,position:u})})},isInRange:function(i){return f6(i,function(o,l){return n[l].isInRange(o)})}})};function Zhe(e){return(e%180+180)%180}var Jhe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Zhe(i),l=o*Math.PI/180,u=Math.atan(r/n),d=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(d)},D1,h4;function eme(){if(h4)return D1;h4=1;var e=fo(),t=Qf(),n=Tv();function r(i){return function(o,l,u){var d=Object(o);if(!t(o)){var h=e(l,3);o=n(o),l=function(m){return h(d[m],m,d)}}var v=i(o,l,u);return v>-1?d[h?o[v]:v]:void 0}}return D1=r,D1}var P1,m4;function tme(){if(m4)return P1;m4=1;var e=s6();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return P1=t,P1}var k1,p4;function nme(){if(p4)return k1;p4=1;var e=Tz(),t=fo(),n=tme(),r=Math.max;function i(o,l,u){var d=o==null?0:o.length;if(!d)return-1;var h=u==null?0:n(u);return h<0&&(h=r(d+h,0)),e(o,t(l,3),h)}return k1=i,k1}var $1,v4;function rme(){if(v4)return $1;v4=1;var e=eme(),t=nme(),n=e(t);return $1=n,$1}var ame=rme();const ime=xt(ame);var ome=VL();const sme=xt(ome);var lme=sme(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("")}),qE=w.createContext(void 0),UE=w.createContext(void 0),b6=w.createContext(void 0),x6=w.createContext({}),w6=w.createContext(void 0),S6=w.createContext(0),j6=w.createContext(0),g4=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,d=t.width,h=t.height,v=lme(o);return I.createElement(qE.Provider,{value:r},I.createElement(UE.Provider,{value:i},I.createElement(x6.Provider,{value:o},I.createElement(b6.Provider,{value:v},I.createElement(w6.Provider,{value:l},I.createElement(S6.Provider,{value:h},I.createElement(j6.Provider,{value:d},u)))))))},cme=function(){return w.useContext(w6)},O6=function(t){var n=w.useContext(qE);n==null&&is();var r=n[t];return r==null&&is(),r},ume=function(){var t=w.useContext(qE);return Yi(t)},fme=function(){var t=w.useContext(UE),n=ime(t,function(r){return f6(r.domain,Number.isFinite)});return n||Yi(t)},E6=function(t){var n=w.useContext(UE);n==null&&is();var r=n[t];return r==null&&is(),r},dme=function(){var t=w.useContext(b6);return t},hme=function(){return w.useContext(x6)},HE=function(){return w.useContext(j6)},FE=function(){return w.useContext(S6)};function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function mme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pme(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,N6(r.key),r)}}function vme(e,t,n){return t&&pme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gme(e,t,n){return t=bp(t),yme(e,_6()?Reflect.construct(t,n||[],bp(e).constructor):t.apply(e,n))}function yme(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bme(e)}function bme(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 bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bp(e)}function xme(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&&Sj(e,t)}function Sj(e,t){return Sj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Sj(e,t)}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 b4(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){GE(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 GE(e,t,n){return t=N6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N6(e){var t=wme(e,"string");return Vl(t)=="symbol"?t:t+""}function wme(e,t){if(Vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Sme(e,t){return _me(e)||Eme(e,t)||Ome(e,t)||jme()}function jme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
492
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ome(e,t){if(e){if(typeof e=="string")return x4(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 x4(e,t)}}function x4(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 Eme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function _me(e){if(Array.isArray(e))return e}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)}var Nme=function(t,n){var r;return I.isValidElement(t)?r=I.cloneElement(t,n):Ye(t)?r=t(n):r=I.createElement("line",jj({},n,{className:"recharts-reference-line-line"})),r},Ame=function(t,n,r,i,o,l,u,d,h){var v=o.x,m=o.y,g=o.width,b=o.height;if(r){var O=h.y,S=t.y.apply(O,{position:l});if(ba(h,"discard")&&!t.y.isInRange(S))return null;var x=[{x:v+g,y:S},{x:v,y:S}];return d==="left"?x.reverse():x}if(n){var E=h.x,N=t.x.apply(E,{position:l});if(ba(h,"discard")&&!t.x.isInRange(N))return null;var _=[{x:N,y:m+b},{x:N,y:m}];return u==="top"?_.reverse():_}if(i){var C=h.segment,A=C.map(function(M){return t.apply(M,{position:l})});return ba(h,"discard")&&whe(A,function(M){return!t.isInRange(M)})?null:A}return null};function Cme(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,d=e.alwaysShow,h=cme(),v=O6(i),m=E6(o),g=dme();if(!h||!g)return null;Ja(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var b=BE({x:v.scale,y:m.scale}),O=Jt(t),S=Jt(n),x=r&&r.length===2,E=Ame(b,O,S,x,g,e.position,v.orientation,m.orientation,e);if(!E)return null;var N=Sme(E,2),_=N[0],C=_.x,A=_.y,M=N[1],R=M.x,D=M.y,z=ba(e,"hidden")?"url(#".concat(h,")"):void 0,G=b4(b4({clipPath:z},nt(e,!0)),{},{x1:C,y1:A,x2:R,y2:D});return I.createElement(Bt,{className:rt("recharts-reference-line",u)},Nme(l,G),wn.renderCallByParent(e,Qhe({x1:C,y1:A,x2:R,y2:D})))}var VE=(function(e){function t(){return mme(this,t),gme(this,t,arguments)}return xme(t,e),vme(t,[{key:"render",value:function(){return I.createElement(Cme,this.props)}}])})(I.Component);GE(VE,"displayName","ReferenceLine");GE(VE,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Oj(){return Oj=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},Oj.apply(this,arguments)}function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function w4(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 S4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w4(Object(n),!0).forEach(function(r){Yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mme(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,C6(r.key),r)}}function Rme(e,t,n){return t&&Mme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dme(e,t,n){return t=xp(t),Pme(e,A6()?Reflect.construct(t,n||[],xp(e).constructor):t.apply(e,n))}function Pme(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kme(e)}function kme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A6=function(){return!!e})()}function xp(e){return xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xp(e)}function $me(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&&Ej(e,t)}function Ej(e,t){return Ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ej(e,t)}function Yv(e,t,n){return t=C6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C6(e){var t=Ime(e,"string");return Yl(t)=="symbol"?t:t+""}function Ime(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Lme=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=BE({x:i.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return ba(t,"discard")&&!l.isInRange(u)?null:u},Wv=(function(e){function t(){return Tme(this,t),Dme(this,t,arguments)}return $me(t,e),Rme(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,l=r.r,u=r.alwaysShow,d=r.clipPathId,h=Jt(i),v=Jt(o);if(Ja(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!v)return null;var m=Lme(this.props);if(!m)return null;var g=m.x,b=m.y,O=this.props,S=O.shape,x=O.className,E=ba(this.props,"hidden")?"url(#".concat(d,")"):void 0,N=S4(S4({clipPath:E},nt(this.props,!0)),{},{cx:g,cy:b});return I.createElement(Bt,{className:rt("recharts-reference-dot",x)},t.renderDot(S,N),wn.renderCallByParent(this.props,{x:g-l,y:b-l,width:2*l,height:2*l}))}}])})(I.Component);Yv(Wv,"displayName","ReferenceDot");Yv(Wv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Yv(Wv,"renderDot",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Ye(e)?n=e(t):n=I.createElement(zE,Oj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function _j(){return _j=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},_j.apply(this,arguments)}function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function 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 O4(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){Kv(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 zme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bme(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,M6(r.key),r)}}function qme(e,t,n){return t&&Bme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ume(e,t,n){return t=wp(t),Hme(e,T6()?Reflect.construct(t,n||[],wp(e).constructor):t.apply(e,n))}function Hme(e,t){if(t&&(Wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fme(e)}function Fme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T6=function(){return!!e})()}function wp(e){return wp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wp(e)}function Gme(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&&Nj(e,t)}function Nj(e,t){return Nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nj(e,t)}function Kv(e,t,n){return t=M6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M6(e){var t=Vme(e,"string");return Wl(t)=="symbol"?t:t+""}function Vme(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yme=function(t,n,r,i,o){var l=o.x1,u=o.x2,d=o.y1,h=o.y2,v=o.xAxis,m=o.yAxis;if(!v||!m)return null;var g=BE({x:v.scale,y:m.scale}),b={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(d,{position:"start"}):g.y.rangeMin},O={x:n?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(h,{position:"end"}):g.y.rangeMax};return ba(o,"discard")&&(!g.isInRange(b)||!g.isInRange(O))?null:g6(b,O)},Xv=(function(e){function t(){return zme(this,t),Ume(this,t,arguments)}return Gme(t,e),qme(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,l=r.y1,u=r.y2,d=r.className,h=r.alwaysShow,v=r.clipPathId;Ja(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Jt(i),g=Jt(o),b=Jt(l),O=Jt(u),S=this.props.shape;if(!m&&!g&&!b&&!O&&!S)return null;var x=Yme(m,g,b,O,this.props);if(!x&&!S)return null;var E=ba(this.props,"hidden")?"url(#".concat(v,")"):void 0;return I.createElement(Bt,{className:rt("recharts-reference-area",d)},t.renderRect(S,O4(O4({clipPath:E},nt(this.props,!0)),x)),wn.renderCallByParent(this.props,x))}}])})(I.Component);Kv(Xv,"displayName","ReferenceArea");Kv(Xv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Kv(Xv,"renderRect",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Ye(e)?n=e(t):n=I.createElement(LE,_j({},t,{className:"recharts-reference-area-rect"})),n});function R6(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 Wme(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Jhe(r,n)}function Kme(e,t,n){var r=n==="width",i=e.x,o=e.y,l=e.width,u=e.height;return t===1?{start:r?i:o,end:r?i+l:o+u}:{start:r?i+l:o+u,end:r?i:o}}function Sp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Xme(e,t){return R6(e,t+1)}function Qme(e,t,n,r,i){for(var o=(r||[]).slice(),l=t.start,u=t.end,d=0,h=1,v=l,m=function(){var O=r==null?void 0:r[d];if(O===void 0)return{v:R6(r,h)};var S=d,x,E=function(){return x===void 0&&(x=n(O,S)),x},N=O.coordinate,_=d===0||Sp(e,N,E,v,u);_||(d=0,v=l,h+=1),_&&(v=N+e*(E()/2+i),d+=h)},g;h<=o.length;)if(g=m(),g)return g.v;return[]}function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function E4(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?E4(Object(n),!0).forEach(function(r){Zme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zme(e,t,n){return t=Jme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jme(e){var t=epe(e,"string");return Df(t)=="symbol"?t:t+""}function epe(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tpe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,u=t.start,d=t.end,h=function(g){var b=o[g],O,S=function(){return O===void 0&&(O=n(b,g)),O};if(g===l-1){var x=e*(b.coordinate+e*S()/2-d);o[g]=b=xn(xn({},b),{},{tickCoord:x>0?b.coordinate-x*e:b.coordinate})}else o[g]=b=xn(xn({},b),{},{tickCoord:b.coordinate});var E=Sp(e,b.tickCoord,S,u,d);E&&(d=b.tickCoord-e*(S()/2+i),o[g]=xn(xn({},b),{},{isShow:!0}))},v=l-1;v>=0;v--)h(v);return o}function npe(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,d=t.start,h=t.end;if(o){var v=r[u-1],m=n(v,u-1),g=e*(v.coordinate+e*m/2-h);l[u-1]=v=xn(xn({},v),{},{tickCoord:g>0?v.coordinate-g*e:v.coordinate});var b=Sp(e,v.tickCoord,function(){return m},d,h);b&&(h=v.tickCoord-e*(m/2+i),l[u-1]=xn(xn({},v),{},{isShow:!0}))}for(var O=o?u-1:u,S=function(N){var _=l[N],C,A=function(){return C===void 0&&(C=n(_,N)),C};if(N===0){var M=e*(_.coordinate-e*A()/2-d);l[N]=_=xn(xn({},_),{},{tickCoord:M<0?_.coordinate-M*e:_.coordinate})}else l[N]=_=xn(xn({},_),{},{tickCoord:_.coordinate});var R=Sp(e,_.tickCoord,A,d,h);R&&(d=_.tickCoord+e*(A()/2+i),l[N]=xn(xn({},_),{},{isShow:!0}))},x=0;x<O;x++)S(x);return l}function YE(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,l=e.minTickGap,u=e.orientation,d=e.interval,h=e.tickFormatter,v=e.unit,m=e.angle;if(!i||!i.length||!r)return[];if(be(d)||wc.isSsr)return Xme(i,typeof d=="number"&&be(d)?d:0);var g=[],b=u==="top"||u==="bottom"?"width":"height",O=v&&b==="width"?Iu(v,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(_,C){var A=Ye(h)?h(_.value,C):_.value;return b==="width"?Wme(Iu(A,{fontSize:t,letterSpacing:n}),O,m):Iu(A,{fontSize:t,letterSpacing:n})[b]},x=i.length>=2?Yr(i[1].coordinate-i[0].coordinate):1,E=Kme(o,x,b);return d==="equidistantPreserveStart"?Qme(x,E,S,i,l):(d==="preserveStart"||d==="preserveStartEnd"?g=npe(x,E,S,i,l,d==="preserveStartEnd"):g=tpe(x,E,S,i,l),g.filter(function(N){return N.isShow}))}var rpe=["viewBox"],ape=["viewBox"],ipe=["ticks"];function Kl(e){"@babel/helpers - typeof";return Kl=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},Kl(e)}function gl(){return gl=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},gl.apply(this,arguments)}function _4(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?_4(Object(n),!0).forEach(function(r){WE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I1(e,t){if(e==null)return{};var n=ope(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ope(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 spe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N4(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,P6(r.key),r)}}function lpe(e,t,n){return t&&N4(e.prototype,t),n&&N4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cpe(e,t,n){return t=jp(t),upe(e,D6()?Reflect.construct(t,n||[],jp(e).constructor):t.apply(e,n))}function upe(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fpe(e)}function fpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(D6=function(){return!!e})()}function jp(e){return jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jp(e)}function dpe(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&&Aj(e,t)}function Aj(e,t){return Aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Aj(e,t)}function WE(e,t,n){return t=P6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P6(e){var t=hpe(e,"string");return Kl(t)=="symbol"?t:t+""}function hpe(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ec=(function(e){function t(n){var r;return spe(this,t),r=cpe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return dpe(t,e),lpe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=I1(r,rpe),u=this.props,d=u.viewBox,h=I1(u,ape);return!Ol(o,d)||!Ol(l,h)||!Ol(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,o=i.x,l=i.y,u=i.width,d=i.height,h=i.orientation,v=i.tickSize,m=i.mirror,g=i.tickMargin,b,O,S,x,E,N,_=m?-1:1,C=r.tickSize||v,A=be(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":b=O=r.coordinate,x=l+ +!m*d,S=x-_*C,N=S-_*g,E=A;break;case"left":S=x=r.coordinate,O=o+ +!m*u,b=O-_*C,E=b-_*g,N=A;break;case"right":S=x=r.coordinate,O=o+ +m*u,b=O+_*C,E=b+_*g,N=A;break;default:b=O=r.coordinate,x=l+ +m*d,S=x+_*C,N=S+_*g,E=A;break}return{line:{x1:b,y1:S,x2:O,y2:x},tick:{x:E,y:N}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l;switch(i){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l="end";switch(i){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,d=r.orientation,h=r.mirror,v=r.axisLine,m=Qt(Qt(Qt({},nt(this.props,!1)),nt(v,!1)),{},{fill:"none"});if(d==="top"||d==="bottom"){var g=+(d==="top"&&!h||d==="bottom"&&h);m=Qt(Qt({},m),{},{x1:i,y1:o+g*u,x2:i+l,y2:o+g*u})}else{var b=+(d==="left"&&!h||d==="right"&&h);m=Qt(Qt({},m),{},{x1:i+b*l,y1:o,x2:i+b*l,y2:o+u})}return I.createElement("line",gl({},m,{className:rt("recharts-cartesian-axis-line",Rr(v,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var l=this,u=this.props,d=u.tickLine,h=u.stroke,v=u.tick,m=u.tickFormatter,g=u.unit,b=YE(Qt(Qt({},this.props),{},{ticks:r}),i,o),O=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),x=nt(this.props,!1),E=nt(v,!1),N=Qt(Qt({},x),{},{fill:"none"},nt(d,!1)),_=b.map(function(C,A){var M=l.getTickLineCoord(C),R=M.line,D=M.tick,z=Qt(Qt(Qt(Qt({textAnchor:O,verticalAnchor:S},x),{},{stroke:"none",fill:h},E),D),{},{index:A,payload:C,visibleTicksCount:b.length,tickFormatter:m});return I.createElement(Bt,gl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},Dm(l.props,C,A)),d&&I.createElement("line",gl({},N,R,{className:rt("recharts-cartesian-axis-tick-line",Rr(d,"className"))})),v&&t.renderTickItem(v,z,"".concat(Ye(m)?m(C.value,A):C.value).concat(g||"")))});return I.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,l=i.width,u=i.height,d=i.ticksGenerator,h=i.className,v=i.hide;if(v)return null;var m=this.props,g=m.ticks,b=I1(m,ipe),O=g;return Ye(d)&&(O=g&&g.length>0?d(this.props):d(b)),l<=0||u<=0||!O||!O.length?null:I.createElement(Bt,{className:rt("recharts-cartesian-axis",h),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(O,this.state.fontSize,this.state.letterSpacing),wn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var l,u=rt(i.className,"recharts-cartesian-axis-tick-value");return I.isValidElement(r)?l=I.cloneElement(r,Qt(Qt({},i),{},{className:u})):Ye(r)?l=r(Qt(Qt({},i),{},{className:u})):l=I.createElement(Fm,gl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(w.Component);WE(Ec,"displayName","CartesianAxis");WE(Ec,"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 mpe=["x1","y1","x2","y2","key"],ppe=["offset"];function os(e){"@babel/helpers - typeof";return os=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},os(e)}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 Sn(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){vpe(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 vpe(e,t,n){return t=gpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gpe(e){var t=ype(e,"string");return os(t)=="symbol"?t:t+""}function ype(e,t){if(os(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(os(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yo(){return Yo=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},Yo.apply(this,arguments)}function C4(e,t){if(e==null)return{};var n=bpe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bpe(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 xpe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,l=t.width,u=t.height,d=t.ry;return I.createElement("rect",{x:i,y:o,ry:d,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function k6(e,t){var n;if(I.isValidElement(e))n=I.cloneElement(e,t);else if(Ye(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,l=t.y2,u=t.key,d=C4(t,mpe),h=nt(d,!1);h.offset;var v=C4(h,ppe);n=I.createElement("line",Yo({},v,{x1:r,y1:i,x2:o,y2:l,fill:"none",key:u}))}return n}function wpe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(u,d){var h=Sn(Sn({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(d),index:d});return k6(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Spe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(u,d){var h=Sn(Sn({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(d),index:d});return k6(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function jpe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,l=e.height,u=e.horizontalPoints,d=e.horizontal,h=d===void 0?!0:d;if(!h||!t||!t.length)return null;var v=u.map(function(g){return Math.round(g+i-i)}).sort(function(g,b){return g-b});i!==v[0]&&v.unshift(0);var m=v.map(function(g,b){var O=!v[b+1],S=O?i+l-g:v[b+1]-g;if(S<=0)return null;var x=b%t.length;return I.createElement("rect",{key:"react-".concat(b),y:g,x:r,height:S,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return I.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Ope(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,l=e.y,u=e.width,d=e.height,h=e.verticalPoints;if(!n||!r||!r.length)return null;var v=h.map(function(g){return Math.round(g+o-o)}).sort(function(g,b){return g-b});o!==v[0]&&v.unshift(0);var m=v.map(function(g,b){var O=!v[b+1],S=O?o+u-g:v[b+1]-g;if(S<=0)return null;var x=b%r.length;return I.createElement("rect",{key:"react-".concat(b),x:g,y:l,width:S,height:d,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return I.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Epe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,l=t.offset;return WB(YE(Sn(Sn(Sn({},Ec.defaultProps),r),{},{ticks:Ka(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.left,l.left+l.width,n)},_pe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,l=t.offset;return WB(YE(Sn(Sn(Sn({},Ec.defaultProps),r),{},{ticks:Ka(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.top,l.top+l.height,n)},ml={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Qv(e){var t,n,r,i,o,l,u=HE(),d=FE(),h=hme(),v=Sn(Sn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ml.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:ml.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:ml.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ml.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ml.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:ml.verticalFill,x:be(e.x)?e.x:h.left,y:be(e.y)?e.y:h.top,width:be(e.width)?e.width:h.width,height:be(e.height)?e.height:h.height}),m=v.x,g=v.y,b=v.width,O=v.height,S=v.syncWithTicks,x=v.horizontalValues,E=v.verticalValues,N=ume(),_=fme();if(!be(b)||b<=0||!be(O)||O<=0||!be(m)||m!==+m||!be(g)||g!==+g)return null;var C=v.verticalCoordinatesGenerator||Epe,A=v.horizontalCoordinatesGenerator||_pe,M=v.horizontalPoints,R=v.verticalPoints;if((!M||!M.length)&&Ye(A)){var D=x&&x.length,z=A({yAxis:_?Sn(Sn({},_),{},{ticks:D?x:_.ticks}):void 0,width:u,height:d,offset:h},D?!0:S);Ja(Array.isArray(z),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(os(z),"]")),Array.isArray(z)&&(M=z)}if((!R||!R.length)&&Ye(C)){var G=E&&E.length,L=C({xAxis:N?Sn(Sn({},N),{},{ticks:G?E:N.ticks}):void 0,width:u,height:d,offset:h},G?!0:S);Ja(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(os(L),"]")),Array.isArray(L)&&(R=L)}return I.createElement("g",{className:"recharts-cartesian-grid"},I.createElement(xpe,{fill:v.fill,fillOpacity:v.fillOpacity,x:v.x,y:v.y,width:v.width,height:v.height,ry:v.ry}),I.createElement(wpe,Yo({},v,{offset:h,horizontalPoints:M,xAxis:N,yAxis:_})),I.createElement(Spe,Yo({},v,{offset:h,verticalPoints:R,xAxis:N,yAxis:_})),I.createElement(jpe,Yo({},v,{horizontalPoints:M})),I.createElement(Ope,Yo({},v,{verticalPoints:R})))}Qv.displayName="CartesianGrid";var Npe=["type","layout","connectNulls","ref"],Ape=["key"];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 T4(e,t){if(e==null)return{};var n=Cpe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cpe(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 qu(){return qu=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},qu.apply(this,arguments)}function M4(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 tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M4(Object(n),!0).forEach(function(r){Fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pl(e){return Dpe(e)||Rpe(e)||Mpe(e)||Tpe()}function Tpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
493
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mpe(e,t){if(e){if(typeof e=="string")return Cj(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 Cj(e,t)}}function Rpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dpe(e){if(Array.isArray(e))return Cj(e)}function Cj(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 Ppe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R4(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,I6(r.key),r)}}function kpe(e,t,n){return t&&R4(e.prototype,t),n&&R4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $pe(e,t,n){return t=Op(t),Ipe(e,$6()?Reflect.construct(t,n||[],Op(e).constructor):t.apply(e,n))}function Ipe(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 Lpe(e)}function Lpe(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 Op(e){return Op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Op(e)}function zpe(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&&Tj(e,t)}function Tj(e,t){return Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Tj(e,t)}function Fr(e,t,n){return t=I6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I6(e){var t=Bpe(e,"string");return Xl(t)=="symbol"?t:t+""}function Bpe(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)}var Ar=(function(e){function t(){var n;Ppe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=$pe(this,t,[].concat(i)),Fr(n,"state",{isAnimationFinished:!0,totalLength:0}),Fr(n,"generateSimpleStrokeDasharray",function(l,u){return"".concat(u,"px ").concat(l-u,"px")}),Fr(n,"getStrokeDasharray",function(l,u,d){var h=d.reduce(function(E,N){return E+N});if(!h)return n.generateSimpleStrokeDasharray(u,l);for(var v=Math.floor(l/h),m=l%h,g=u-l,b=[],O=0,S=0;O<d.length;S+=d[O],++O)if(S+d[O]>m){b=[].concat(pl(d.slice(0,O)),[m-S]);break}var x=b.length%2===0?[0,g]:[g];return[].concat(pl(t.repeat(d,v)),pl(b),x).map(function(E){return"".concat(E,"px")}).join(", ")}),Fr(n,"id",Xf("recharts-line-")),Fr(n,"pathRef",function(l){n.mainCurve=l}),Fr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Fr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return zpe(t,e),kpe(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 o=this.props,l=o.points,u=o.xAxis,d=o.yAxis,h=o.layout,v=o.children,m=Dr(v,nd);if(!m)return null;var g=function(S,x){return{x:S.x,y:S.y,value:S.value,errorVal:ur(S.payload,x)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return I.createElement(Bt,b,m.map(function(O){return I.cloneElement(O,{key:"bar-".concat(O.props.dataKey),data:l,xAxis:u,yAxis:d,layout:h,dataPointFormatter:g})}))}},{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var u=this.props,d=u.dot,h=u.points,v=u.dataKey,m=nt(this.props,!1),g=nt(d,!0),b=h.map(function(S,x){var E=tr(tr(tr({key:"dot-".concat(x),r:3},m),g),{},{index:x,cx:S.x,cy:S.y,value:S.value,dataKey:v,payload:S.payload,points:h});return t.renderDotItem(d,E)}),O={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return I.createElement(Bt,qu({className:"recharts-line-dots",key:"dots"},O),b)}},{key:"renderCurveStatically",value:function(r,i,o,l){var u=this.props,d=u.type,h=u.layout,v=u.connectNulls;u.ref;var m=T4(u,Npe),g=tr(tr(tr({},nt(m,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},l),{},{type:d,layout:h,connectNulls:v});return I.createElement(sj,qu({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,d=l.strokeDasharray,h=l.isAnimationActive,v=l.animationBegin,m=l.animationDuration,g=l.animationEasing,b=l.animationId,O=l.animateNewValues,S=l.width,x=l.height,E=this.state,N=E.prevPoints,_=E.totalLength;return I.createElement(ui,{begin:v,duration:m,isActive:h,easing:g,from:{t:0},to:{t:1},key:"line-".concat(b),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var A=C.t;if(N){var M=N.length/u.length,R=u.map(function(F,W){var Q=Math.floor(W*M);if(N[Q]){var X=N[Q],k=Gr(X.x,F.x),H=Gr(X.y,F.y);return tr(tr({},F),{},{x:k(A),y:H(A)})}if(O){var B=Gr(S*2,F.x),Z=Gr(x/2,F.y);return tr(tr({},F),{},{x:B(A),y:Z(A)})}return tr(tr({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(R,r,i)}var D=Gr(0,_),z=D(A),G;if(d){var L="".concat(d).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});G=o.getStrokeDasharray(z,_,L)}else G=o.generateSimpleStrokeDasharray(_,z);return o.renderCurveStatically(u,r,i,{strokeDasharray:G})})}},{key:"renderCurve",value:function(r,i){var o=this.props,l=o.points,u=o.isAnimationActive,d=this.state,h=d.prevPoints,v=d.totalLength;return u&&l&&l.length&&(!h&&v>0||!qv(h,l))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(l,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,l=i.dot,u=i.points,d=i.className,h=i.xAxis,v=i.yAxis,m=i.top,g=i.left,b=i.width,O=i.height,S=i.isAnimationActive,x=i.id;if(o||!u||!u.length)return null;var E=this.state.isAnimationFinished,N=u.length===1,_=rt("recharts-line",d),C=h&&h.allowDataOverflow,A=v&&v.allowDataOverflow,M=C||A,R=Qe(x)?this.id:x,D=(r=nt(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},z=D.r,G=z===void 0?3:z,L=D.strokeWidth,F=L===void 0?2:L,W=tte(l)?l:{},Q=W.clipDot,X=Q===void 0?!0:Q,k=G*2+F;return I.createElement(Bt,{className:_},C||A?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(R)},I.createElement("rect",{x:C?g:g-b/2,y:A?m:m-O/2,width:C?b:b*2,height:A?O:O*2})),!X&&I.createElement("clipPath",{id:"clipPath-dots-".concat(R)},I.createElement("rect",{x:g-k/2,y:m-k/2,width:b+k,height:O+k}))):null,!N&&this.renderCurve(M,R),this.renderErrorBar(M,R),(N||l)&&this.renderDots(M,X,R),(!S||E)&&Qi.renderCallByParent(this.props,u))}}],[{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 o=r.length%2!==0?[].concat(pl(r),[0]):r,l=[],u=0;u<i;++u)l=[].concat(pl(l),pl(o));return l}},{key:"renderDotItem",value:function(r,i){var o;if(I.isValidElement(r))o=I.cloneElement(r,i);else if(Ye(r))o=r(i);else{var l=i.key,u=T4(i,Ape),d=rt("recharts-line-dot",typeof r!="boolean"?r.className:"");o=I.createElement(zE,qu({key:l},u,{className:d}))}return o}}])})(w.PureComponent);Fr(Ar,"displayName","Line");Fr(Ar,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!wc.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Fr(Ar,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,l=e.dataKey,u=e.bandSize,d=e.displayedData,h=e.offset,v=t.layout,m=d.map(function(g,b){var O=ur(g,l);return v==="horizontal"?{x:KP({axis:n,ticks:i,bandSize:u,entry:g,index:b}),y:Qe(O)?null:r.scale(O),value:O,payload:g}:{x:Qe(O)?null:n.scale(O),y:KP({axis:r,ticks:o,bandSize:u,entry:g,index:b}),value:O,payload:g}});return tr({points:m,layout:v},h)});function Ql(e){"@babel/helpers - typeof";return Ql=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},Ql(e)}function qpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Upe(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,B6(r.key),r)}}function Hpe(e,t,n){return t&&Upe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fpe(e,t,n){return t=Ep(t),Gpe(e,L6()?Reflect.construct(t,n||[],Ep(e).constructor):t.apply(e,n))}function Gpe(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vpe(e)}function Vpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L6=function(){return!!e})()}function Ep(e){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ep(e)}function Ype(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 z6(e,t,n){return t=B6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B6(e){var t=Wpe(e,"string");return Ql(t)=="symbol"?t:t+""}function Wpe(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Rj(){return Rj=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},Rj.apply(this,arguments)}function Kpe(e){var t=e.xAxisId,n=HE(),r=FE(),i=O6(t);return i==null?null:w.createElement(Ec,Rj({},i,{className:rt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Ka(l,!0)}}))}var ys=(function(e){function t(){return qpe(this,t),Fpe(this,t,arguments)}return Ype(t,e),Hpe(t,[{key:"render",value:function(){return w.createElement(Kpe,this.props)}}])})(w.Component);z6(ys,"displayName","XAxis");z6(ys,"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 Zl(e){"@babel/helpers - typeof";return Zl=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},Zl(e)}function Xpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qpe(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 Zpe(e,t,n){return t&&Qpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jpe(e,t,n){return t=_p(t),eve(e,q6()?Reflect.construct(t,n||[],_p(e).constructor):t.apply(e,n))}function eve(e,t){if(t&&(Zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tve(e)}function tve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q6=function(){return!!e})()}function _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_p(e)}function nve(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&&Dj(e,t)}function Dj(e,t){return Dj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dj(e,t)}function U6(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=rve(e,"string");return Zl(t)=="symbol"?t:t+""}function rve(e,t){if(Zl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(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)}var ave=function(t){var n=t.yAxisId,r=HE(),i=FE(),o=E6(n);return o==null?null:w.createElement(Ec,Pj({},o,{className:rt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(u){return Ka(u,!0)}}))},fi=(function(e){function t(){return Xpe(this,t),Jpe(this,t,arguments)}return nve(t,e),Zpe(t,[{key:"render",value:function(){return w.createElement(ave,this.props)}}])})(w.Component);U6(fi,"displayName","YAxis");U6(fi,"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 D4(e){return lve(e)||sve(e)||ove(e)||ive()}function ive(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
494
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ove(e,t){if(e){if(typeof e=="string")return kj(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 kj(e,t)}}function sve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lve(e){if(Array.isArray(e))return kj(e)}function kj(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 $j=function(t,n,r,i,o){var l=Dr(t,VE),u=Dr(t,Wv),d=[].concat(D4(l),D4(u)),h=Dr(t,Xv),v="".concat(i,"Id"),m=i[0],g=n;if(d.length&&(g=d.reduce(function(S,x){if(x.props[v]===r&&ba(x.props,"extendDomain")&&be(x.props[m])){var E=x.props[m];return[Math.min(S[0],E),Math.max(S[1],E)]}return S},g)),h.length){var b="".concat(m,"1"),O="".concat(m,"2");g=h.reduce(function(S,x){if(x.props[v]===r&&ba(x.props,"extendDomain")&&be(x.props[b])&&be(x.props[O])){var E=x.props[b],N=x.props[O];return[Math.min(S[0],E,N),Math.max(S[1],E,N)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,x){return be(x)?[Math.min(S[0],x),Math.max(S[1],x)]:S},g)),g},L1={exports:{}},P4;function cve(){return P4||(P4=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(d,h,v){this.fn=d,this.context=h,this.once=v||!1}function o(d,h,v,m,g){if(typeof v!="function")throw new TypeError("The listener must be a function");var b=new i(v,m||d,g),O=n?n+h:h;return d._events[O]?d._events[O].fn?d._events[O]=[d._events[O],b]:d._events[O].push(b):(d._events[O]=b,d._eventsCount++),d}function l(d,h){--d._eventsCount===0?d._events=new r:delete d._events[h]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],v,m;if(this._eventsCount===0)return h;for(m in v=this._events)t.call(v,m)&&h.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(v)):h},u.prototype.listeners=function(h){var v=n?n+h:h,m=this._events[v];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,b=m.length,O=new Array(b);g<b;g++)O[g]=m[g].fn;return O},u.prototype.listenerCount=function(h){var v=n?n+h:h,m=this._events[v];return m?m.fn?1:m.length:0},u.prototype.emit=function(h,v,m,g,b,O){var S=n?n+h:h;if(!this._events[S])return!1;var x=this._events[S],E=arguments.length,N,_;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),E){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,v),!0;case 3:return x.fn.call(x.context,v,m),!0;case 4:return x.fn.call(x.context,v,m,g),!0;case 5:return x.fn.call(x.context,v,m,g,b),!0;case 6:return x.fn.call(x.context,v,m,g,b,O),!0}for(_=1,N=new Array(E-1);_<E;_++)N[_-1]=arguments[_];x.fn.apply(x.context,N)}else{var C=x.length,A;for(_=0;_<C;_++)switch(x[_].once&&this.removeListener(h,x[_].fn,void 0,!0),E){case 1:x[_].fn.call(x[_].context);break;case 2:x[_].fn.call(x[_].context,v);break;case 3:x[_].fn.call(x[_].context,v,m);break;case 4:x[_].fn.call(x[_].context,v,m,g);break;default:if(!N)for(A=1,N=new Array(E-1);A<E;A++)N[A-1]=arguments[A];x[_].fn.apply(x[_].context,N)}}return!0},u.prototype.on=function(h,v,m){return o(this,h,v,m,!1)},u.prototype.once=function(h,v,m){return o(this,h,v,m,!0)},u.prototype.removeListener=function(h,v,m,g){var b=n?n+h:h;if(!this._events[b])return this;if(!v)return l(this,b),this;var O=this._events[b];if(O.fn)O.fn===v&&(!g||O.once)&&(!m||O.context===m)&&l(this,b);else{for(var S=0,x=[],E=O.length;S<E;S++)(O[S].fn!==v||g&&!O[S].once||m&&O[S].context!==m)&&x.push(O[S]);x.length?this._events[b]=x.length===1?x[0]:x:l(this,b)}return this},u.prototype.removeAllListeners=function(h){var v;return h?(v=n?n+h:h,this._events[v]&&l(this,v)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(L1)),L1.exports}var uve=cve();const fve=xt(uve);var z1=new fve,B1="recharts.syncMouseEvents";function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function dve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hve(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,F6(r.key),r)}}function mve(e,t,n){return t&&hve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q1(e,t,n){return t=F6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F6(e){var t=pve(e,"string");return Pf(t)=="symbol"?t:t+""}function pve(e,t){if(Pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vve=(function(){function e(){dve(this,e),q1(this,"activeIndex",0),q1(this,"coordinateList",[]),q1(this,"layout","horizontal")}return mve(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,l=n.container,u=l===void 0?null:l,d=n.layout,h=d===void 0?null:d,v=n.offset,m=v===void 0?null:v,g=n.mouseHandlerCallback,b=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=u??this.container,this.layout=h??this.layout,this.offset=m??this.offset,this.mouseHandlerCallback=b??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(),o=i.x,l=i.y,u=i.height,d=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,v=((r=window)===null||r===void 0?void 0:r.scrollY)||0,m=o+d+h,g=l+this.offset.top+u/2+v;this.mouseHandlerCallback({pageX:m,pageY:g})}}}])})();function gve(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&&be(r)&&be(i))return!0}return!1}function yve(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 G6(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,l=vn(t,n,r,i),u=vn(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function bve(e,t,n){var r,i,o,l;if(e==="horizontal")r=t.x,o=r,i=n.top,l=n.top+n.height;else if(e==="vertical")i=t.y,l=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,d=t.cy,h=t.innerRadius,v=t.outerRadius,m=t.angle,g=vn(u,d,h,m),b=vn(u,d,v,m);r=g.x,i=g.y,o=b.x,l=b.y}else return G6(t);return[{x:r,y:i},{x:o,y:l}]}function kf(e){"@babel/helpers - typeof";return kf=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},kf(e)}function k4(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 Uh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k4(Object(n),!0).forEach(function(r){xve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xve(e,t,n){return t=wve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wve(e){var t=Sve(e,"string");return kf(t)=="symbol"?t:t+""}function Sve(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jve(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,u=e.activePayload,d=e.offset,h=e.activeTooltipIndex,v=e.tooltipAxisBandSize,m=e.layout,g=e.chartName,b=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!b||!o||!l||g!=="ScatterChart"&&i!=="axis")return null;var O,S=sj;if(g==="ScatterChart")O=l,S=wde;else if(g==="BarChart")O=yve(m,l,d,v),S=LE;else if(m==="radial"){var x=G6(l),E=x.cx,N=x.cy,_=x.radius,C=x.startAngle,A=x.endAngle;O={cx:E,cy:N,startAngle:C,endAngle:A,innerRadius:_,outerRadius:_},S=JB}else O={points:bve(m,l,d)},S=sj;var M=Uh(Uh(Uh(Uh({stroke:"#ccc",pointerEvents:"none"},d),O),nt(b,!1)),{},{payload:u,payloadIndex:h,className:rt("recharts-tooltip-cursor",b.className)});return w.isValidElement(b)?w.cloneElement(b,M):w.createElement(S,M)}var Ove=["item"],Eve=["children","className","width","height","style","compact","title","desc"];function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function yl(){return yl=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},yl.apply(this,arguments)}function $4(e,t){return Ave(e)||Nve(e,t)||Y6(e,t)||_ve()}function _ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
495
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(v){h=!0,i=v}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Ave(e){if(Array.isArray(e))return e}function I4(e,t){if(e==null)return{};var n=Cve(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cve(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 Tve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mve(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 Rve(e,t,n){return t&&Mve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dve(e,t,n){return t=Np(t),Pve(e,V6()?Reflect.construct(t,n||[],Np(e).constructor):t.apply(e,n))}function Pve(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kve(e)}function kve(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 Np(e){return Np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Np(e)}function $ve(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&&Ij(e,t)}function Ij(e,t){return Ij=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ij(e,t)}function ec(e){return zve(e)||Lve(e)||Y6(e)||Ive()}function Ive(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
496
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6(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 Lve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zve(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 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 ue(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){Pe(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 Pe(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=Bve(e,"string");return Jl(t)=="symbol"?t:t+""}function Bve(e,t){if(Jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qve={xAxis:["bottom","top"],yAxis:["left","right"]},Uve={width:"100%",height:"100%"},K6={x:0,y:0};function Hh(e){return e}var Hve=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Fve=function(t,n,r,i){var o=n.find(function(v){return v&&v.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,u=i.radius;return ue(ue(ue({},i),vn(i.cx,i.cy,u,l)),{},{angle:l,radius:u})}var d=o.coordinate,h=i.angle;return ue(ue(ue({},i),vn(i.cx,i.cy,d,h)),{},{angle:h,radius:d})}return K6},Zv=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,d){var h=d.props.data;return h&&h.length?[].concat(ec(u),ec(h)):u},[]);return l.length>0?l:t&&t.length&&be(i)&&be(o)?t.slice(i,o+1):[]};function X6(e){return e==="number"?[0,"auto"]:void 0}var zj=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,u=Zv(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(d,h){var v,m=(v=h.props.data)!==null&&v!==void 0?v:n;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var b=m===void 0?u:m;g=Mm(b,l.dataKey,i)}else g=m&&m[r]||u[r];return g?[].concat(ec(d),[XB(h,g)]):d},[])},z4=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=Hve(o,r),u=t.orderedTooltipTicks,d=t.tooltipAxis,h=t.tooltipTicks,v=ece(l,u,h,d);if(v>=0&&h){var m=h[v]&&h[v].value,g=zj(t,n,v,m),b=Fve(r,u,v,o);return{activeTooltipIndex:v,activeLabel:m,activePayload:g,activeCoordinate:b}}return null},Gve=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,v=t.layout,m=t.children,g=t.stackOffset,b=YB(v,o);return r.reduce(function(O,S){var x,E=S.type.defaultProps!==void 0?ue(ue({},S.type.defaultProps),S.props):S.props,N=E.type,_=E.dataKey,C=E.allowDataOverflow,A=E.allowDuplicatedCategory,M=E.scale,R=E.ticks,D=E.includeHidden,z=E[l];if(O[z])return O;var G=Zv(t.data,{graphicalItems:i.filter(function(Y){var q,U=l in Y.props?Y.props[l]:(q=Y.type.defaultProps)===null||q===void 0?void 0:q[l];return U===z}),dataStartIndex:d,dataEndIndex:h}),L=G.length,F,W,Q;gve(E.domain,C,N)&&(F=nj(E.domain,null,C),b&&(N==="number"||M!=="auto")&&(Q=zu(G,_,"category")));var X=X6(N);if(!F||F.length===0){var k,H=(k=E.domain)!==null&&k!==void 0?k:X;if(_){if(F=zu(G,_,N),N==="category"&&b){var B=Gee(F);A&&B?(W=F,F=mp(0,L)):A||(F=JP(H,F,S).reduce(function(Y,q){return Y.indexOf(q)>=0?Y:[].concat(ec(Y),[q])},[]))}else if(N==="category")A?F=F.filter(function(Y){return Y!==""&&!Qe(Y)}):F=JP(H,F,S).reduce(function(Y,q){return Y.indexOf(q)>=0||q===""||Qe(q)?Y:[].concat(ec(Y),[q])},[]);else if(N==="number"){var Z=ice(G,i.filter(function(Y){var q,U,ne=l in Y.props?Y.props[l]:(q=Y.type.defaultProps)===null||q===void 0?void 0:q[l],fe="hide"in Y.props?Y.props.hide:(U=Y.type.defaultProps)===null||U===void 0?void 0:U.hide;return ne===z&&(D||!fe)}),_,o,v);Z&&(F=Z)}b&&(N==="number"||M!=="auto")&&(Q=zu(G,_,"category"))}else b?F=mp(0,L):u&&u[z]&&u[z].hasStack&&N==="number"?F=g==="expand"?[0,1]:KB(u[z].stackGroups,d,h):F=VB(G,i.filter(function(Y){var q=l in Y.props?Y.props[l]:Y.type.defaultProps[l],U="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return q===z&&(D||!U)}),N,v,!0);if(N==="number")F=$j(m,F,z,o,R),H&&(F=nj(H,F,C));else if(N==="category"&&H){var le=H,$=F.every(function(Y){return le.indexOf(Y)>=0});$&&(F=le)}}return ue(ue({},O),{},Pe({},z,ue(ue({},E),{},{axisType:o,domain:F,categoricalDomain:Q,duplicateDomain:W,originalDomain:(x=E.domain)!==null&&x!==void 0?x:X,isCategorical:b,layout:v})))},{})},Vve=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,v=t.layout,m=t.children,g=Zv(t.data,{graphicalItems:r,dataStartIndex:d,dataEndIndex:h}),b=g.length,O=YB(v,o),S=-1;return r.reduce(function(x,E){var N=E.type.defaultProps!==void 0?ue(ue({},E.type.defaultProps),E.props):E.props,_=N[l],C=X6("number");if(!x[_]){S++;var A;return O?A=mp(0,b):u&&u[_]&&u[_].hasStack?(A=KB(u[_].stackGroups,d,h),A=$j(m,A,_,o)):(A=nj(C,VB(g,r.filter(function(M){var R,D,z=l in M.props?M.props[l]:(R=M.type.defaultProps)===null||R===void 0?void 0:R[l],G="hide"in M.props?M.props.hide:(D=M.type.defaultProps)===null||D===void 0?void 0:D.hide;return z===_&&!G}),"number",v),i.defaultProps.allowDataOverflow),A=$j(m,A,_,o)),ue(ue({},x),{},Pe({},_,ue(ue({axisType:o},i.defaultProps),{},{hide:!0,orientation:Rr(qve,"".concat(o,".").concat(S%2),null),domain:A,originalDomain:C,isCategorical:O,layout:v})))}return x},{})},Yve=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,v=t.children,m="".concat(i,"Id"),g=Dr(v,o),b={};return g&&g.length?b=Gve(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:m,stackGroups:u,dataStartIndex:d,dataEndIndex:h}):l&&l.length&&(b=Vve(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:m,stackGroups:u,dataStartIndex:d,dataEndIndex:h})),b},Wve=function(t){var n=Yi(t),r=Ka(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:uE(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:ap(n,r)}},B4=function(t){var n=t.children,r=t.defaultShowTooltip,i=rr(n,Fl),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(l=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Kve=function(t){return!t||!t.length?!1:t.some(function(n){var r=Za(n&&n.type);return r&&r.indexOf("Bar")>=0})},q4=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"}},Xve=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,d=u===void 0?{}:u,h=r.width,v=r.height,m=r.children,g=r.margin||{},b=rr(m,Fl),O=rr(m,ei),S=Object.keys(d).reduce(function(A,M){var R=d[M],D=R.orientation;return!R.mirror&&!R.hide?ue(ue({},A),{},Pe({},D,A[D]+R.width)):A},{left:g.left||0,right:g.right||0}),x=Object.keys(l).reduce(function(A,M){var R=l[M],D=R.orientation;return!R.mirror&&!R.hide?ue(ue({},A),{},Pe({},D,Rr(A,"".concat(D))+R.height)):A},{top:g.top||0,bottom:g.bottom||0}),E=ue(ue({},x),S),N=E.bottom;b&&(E.bottom+=b.props.height||Fl.defaultProps.height),O&&n&&(E=rce(E,i,r,n));var _=h-E.left-E.right,C=v-E.top-E.bottom;return ue(ue({brushBottom:N},E),{},{width:Math.max(_,0),height:Math.max(C,0)})},Qve=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Q6=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,l=t.validateTooltipEventTypes,u=l===void 0?["axis"]:l,d=t.axisComponents,h=t.legendContent,v=t.formatAxisMap,m=t.defaultProps,g=function(E,N){var _=N.graphicalItems,C=N.stackGroups,A=N.offset,M=N.updateId,R=N.dataStartIndex,D=N.dataEndIndex,z=E.barSize,G=E.layout,L=E.barGap,F=E.barCategoryGap,W=E.maxBarSize,Q=q4(G),X=Q.numericAxisName,k=Q.cateAxisName,H=Kve(_),B=[];return _.forEach(function(Z,le){var $=Zv(E.data,{graphicalItems:[Z],dataStartIndex:R,dataEndIndex:D}),Y=Z.type.defaultProps!==void 0?ue(ue({},Z.type.defaultProps),Z.props):Z.props,q=Y.dataKey,U=Y.maxBarSize,ne=Y["".concat(X,"Id")],fe=Y["".concat(k,"Id")],ie={},pe=d.reduce(function(Yn,Rt){var hr=N["".concat(Rt.axisType,"Map")],nn=Y["".concat(Rt.axisType,"Id")];hr&&hr[nn]||Rt.axisType==="zAxis"||is();var bs=hr[nn];return ue(ue({},Yn),{},Pe(Pe({},Rt.axisType,bs),"".concat(Rt.axisType,"Ticks"),Ka(bs)))},ie),re=pe[k],ve=pe["".concat(k,"Ticks")],ge=C&&C[ne]&&C[ne].hasStack&&gce(Z,C[ne].stackGroups),oe=Za(Z.type).indexOf("Bar")>=0,ke=ap(re,ve),we=[],ze=H&&tce({barSize:z,stackGroups:C,totalSize:Qve(pe,k)});if(oe){var Ze,lt,tn=Qe(U)?W:U,pt=(Ze=(lt=ap(re,ve,!0))!==null&<!==void 0?lt:tn)!==null&&Ze!==void 0?Ze:0;we=nce({barGap:L,barCategoryGap:F,bandSize:pt!==ke?pt:ke,sizeList:ze[fe],maxBarSize:tn}),pt!==ke&&(we=we.map(function(Yn){return ue(ue({},Yn),{},{position:ue(ue({},Yn.position),{},{offset:Yn.position.offset-pt/2})})}))}var dr=Z&&Z.type&&Z.type.getComposedData;dr&&B.push({props:ue(ue({},dr(ue(ue({},pe),{},{displayedData:$,props:E,dataKey:q,item:Z,bandSize:ke,barPosition:we,offset:A,stackedData:ge,layout:G,dataStartIndex:R,dataEndIndex:D}))),{},Pe(Pe(Pe({key:Z.key||"item-".concat(le)},X,pe[X]),k,pe[k]),"animationId",M)),childIndex:ate(Z,E.children),item:Z})}),B},b=function(E,N){var _=E.props,C=E.dataStartIndex,A=E.dataEndIndex,M=E.updateId;if(!hM({props:_}))return null;var R=_.children,D=_.layout,z=_.stackOffset,G=_.data,L=_.reverseStackOrder,F=q4(D),W=F.numericAxisName,Q=F.cateAxisName,X=Dr(R,r),k=mce(G,X,"".concat(W,"Id"),"".concat(Q,"Id"),z,L),H=d.reduce(function(Y,q){var U="".concat(q.axisType,"Map");return ue(ue({},Y),{},Pe({},U,Yve(_,ue(ue({},q),{},{graphicalItems:X,stackGroups:q.axisType===W&&k,dataStartIndex:C,dataEndIndex:A}))))},{}),B=Xve(ue(ue({},H),{},{props:_,graphicalItems:X}),N==null?void 0:N.legendBBox);Object.keys(H).forEach(function(Y){H[Y]=v(_,H[Y],B,Y.replace("Map",""),n)});var Z=H["".concat(Q,"Map")],le=Wve(Z),$=g(_,ue(ue({},H),{},{dataStartIndex:C,dataEndIndex:A,updateId:M,graphicalItems:X,stackGroups:k,offset:B}));return ue(ue({formattedGraphicalItems:$,graphicalItems:X,offset:B,stackGroups:k},le),H)},O=(function(x){function E(N){var _,C,A;return Tve(this,E),A=Dve(this,E,[N]),Pe(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Pe(A,"accessibilityManager",new vve),Pe(A,"handleLegendBBoxUpdate",function(M){if(M){var R=A.state,D=R.dataStartIndex,z=R.dataEndIndex,G=R.updateId;A.setState(ue({legendBBox:M},b({props:A.props,dataStartIndex:D,dataEndIndex:z,updateId:G},ue(ue({},A.state),{},{legendBBox:M}))))}}),Pe(A,"handleReceiveSyncEvent",function(M,R,D){if(A.props.syncId===M){if(D===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(R)}}),Pe(A,"handleBrushChange",function(M){var R=M.startIndex,D=M.endIndex;if(R!==A.state.dataStartIndex||D!==A.state.dataEndIndex){var z=A.state.updateId;A.setState(function(){return ue({dataStartIndex:R,dataEndIndex:D},b({props:A.props,dataStartIndex:R,dataEndIndex:D,updateId:z},A.state))}),A.triggerSyncEvent({dataStartIndex:R,dataEndIndex:D})}}),Pe(A,"handleMouseEnter",function(M){var R=A.getMouseInfo(M);if(R){var D=ue(ue({},R),{},{isTooltipActive:!0});A.setState(D),A.triggerSyncEvent(D);var z=A.props.onMouseEnter;Ye(z)&&z(D,M)}}),Pe(A,"triggeredAfterMouseMove",function(M){var R=A.getMouseInfo(M),D=R?ue(ue({},R),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(D),A.triggerSyncEvent(D);var z=A.props.onMouseMove;Ye(z)&&z(D,M)}),Pe(A,"handleItemMouseEnter",function(M){A.setState(function(){return{isTooltipActive:!0,activeItem:M,activePayload:M.tooltipPayload,activeCoordinate:M.tooltipPosition||{x:M.cx,y:M.cy}}})}),Pe(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Pe(A,"handleMouseMove",function(M){M.persist(),A.throttleTriggeredAfterMouseMove(M)}),Pe(A,"handleMouseLeave",function(M){A.throttleTriggeredAfterMouseMove.cancel();var R={isTooltipActive:!1};A.setState(R),A.triggerSyncEvent(R);var D=A.props.onMouseLeave;Ye(D)&&D(R,M)}),Pe(A,"handleOuterEvent",function(M){var R=rte(M),D=Rr(A.props,"".concat(R));if(R&&Ye(D)){var z,G;/.*touch.*/i.test(R)?G=A.getMouseInfo(M.changedTouches[0]):G=A.getMouseInfo(M),D((z=G)!==null&&z!==void 0?z:{},M)}}),Pe(A,"handleClick",function(M){var R=A.getMouseInfo(M);if(R){var D=ue(ue({},R),{},{isTooltipActive:!0});A.setState(D),A.triggerSyncEvent(D);var z=A.props.onClick;Ye(z)&&z(D,M)}}),Pe(A,"handleMouseDown",function(M){var R=A.props.onMouseDown;if(Ye(R)){var D=A.getMouseInfo(M);R(D,M)}}),Pe(A,"handleMouseUp",function(M){var R=A.props.onMouseUp;if(Ye(R)){var D=A.getMouseInfo(M);R(D,M)}}),Pe(A,"handleTouchMove",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(M.changedTouches[0])}),Pe(A,"handleTouchStart",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.handleMouseDown(M.changedTouches[0])}),Pe(A,"handleTouchEnd",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.handleMouseUp(M.changedTouches[0])}),Pe(A,"handleDoubleClick",function(M){var R=A.props.onDoubleClick;if(Ye(R)){var D=A.getMouseInfo(M);R(D,M)}}),Pe(A,"handleContextMenu",function(M){var R=A.props.onContextMenu;if(Ye(R)){var D=A.getMouseInfo(M);R(D,M)}}),Pe(A,"triggerSyncEvent",function(M){A.props.syncId!==void 0&&z1.emit(B1,A.props.syncId,M,A.eventEmitterSymbol)}),Pe(A,"applySyncEvent",function(M){var R=A.props,D=R.layout,z=R.syncMethod,G=A.state.updateId,L=M.dataStartIndex,F=M.dataEndIndex;if(M.dataStartIndex!==void 0||M.dataEndIndex!==void 0)A.setState(ue({dataStartIndex:L,dataEndIndex:F},b({props:A.props,dataStartIndex:L,dataEndIndex:F,updateId:G},A.state)));else if(M.activeTooltipIndex!==void 0){var W=M.chartX,Q=M.chartY,X=M.activeTooltipIndex,k=A.state,H=k.offset,B=k.tooltipTicks;if(!H)return;if(typeof z=="function")X=z(B,M);else if(z==="value"){X=-1;for(var Z=0;Z<B.length;Z++)if(B[Z].value===M.activeLabel){X=Z;break}}var le=ue(ue({},H),{},{x:H.left,y:H.top}),$=Math.min(W,le.x+le.width),Y=Math.min(Q,le.y+le.height),q=B[X]&&B[X].value,U=zj(A.state,A.props.data,X),ne=B[X]?{x:D==="horizontal"?B[X].coordinate:$,y:D==="horizontal"?Y:B[X].coordinate}:K6;A.setState(ue(ue({},M),{},{activeLabel:q,activeCoordinate:ne,activePayload:U,activeTooltipIndex:X}))}else A.setState(M)}),Pe(A,"renderCursor",function(M){var R,D=A.state,z=D.isTooltipActive,G=D.activeCoordinate,L=D.activePayload,F=D.offset,W=D.activeTooltipIndex,Q=D.tooltipAxisBandSize,X=A.getTooltipEventType(),k=(R=M.props.active)!==null&&R!==void 0?R:z,H=A.props.layout,B=M.key||"_recharts-cursor";return I.createElement(jve,{key:B,activeCoordinate:G,activePayload:L,activeTooltipIndex:W,chartName:n,element:M,isActive:k,layout:H,offset:F,tooltipAxisBandSize:Q,tooltipEventType:X})}),Pe(A,"renderPolarAxis",function(M,R,D){var z=Rr(M,"type.axisType"),G=Rr(A.state,"".concat(z,"Map")),L=M.type.defaultProps,F=L!==void 0?ue(ue({},L),M.props):M.props,W=G&&G[F["".concat(z,"Id")]];return w.cloneElement(M,ue(ue({},W),{},{className:rt(z,W.className),key:M.key||"".concat(R,"-").concat(D),ticks:Ka(W,!0)}))}),Pe(A,"renderPolarGrid",function(M){var R=M.props,D=R.radialLines,z=R.polarAngles,G=R.polarRadius,L=A.state,F=L.radiusAxisMap,W=L.angleAxisMap,Q=Yi(F),X=Yi(W),k=X.cx,H=X.cy,B=X.innerRadius,Z=X.outerRadius;return w.cloneElement(M,{polarAngles:Array.isArray(z)?z:Ka(X,!0).map(function(le){return le.coordinate}),polarRadius:Array.isArray(G)?G:Ka(Q,!0).map(function(le){return le.coordinate}),cx:k,cy:H,innerRadius:B,outerRadius:Z,key:M.key||"polar-grid",radialLines:D})}),Pe(A,"renderLegend",function(){var M=A.state.formattedGraphicalItems,R=A.props,D=R.children,z=R.width,G=R.height,L=A.props.margin||{},F=z-(L.left||0)-(L.right||0),W=FB({children:D,formattedGraphicalItems:M,legendWidth:F,legendContent:h});if(!W)return null;var Q=W.item,X=I4(W,Ove);return w.cloneElement(Q,ue(ue({},X),{},{chartWidth:z,chartHeight:G,margin:L,onBBoxUpdate:A.handleLegendBBoxUpdate}))}),Pe(A,"renderTooltip",function(){var M,R=A.props,D=R.children,z=R.accessibilityLayer,G=rr(D,Nr);if(!G)return null;var L=A.state,F=L.isTooltipActive,W=L.activeCoordinate,Q=L.activePayload,X=L.activeLabel,k=L.offset,H=(M=G.props.active)!==null&&M!==void 0?M:F;return w.cloneElement(G,{viewBox:ue(ue({},k),{},{x:k.left,y:k.top}),active:H,label:X,payload:H?Q:[],coordinate:W,accessibilityLayer:z})}),Pe(A,"renderBrush",function(M){var R=A.props,D=R.margin,z=R.data,G=A.state,L=G.offset,F=G.dataStartIndex,W=G.dataEndIndex,Q=G.updateId;return w.cloneElement(M,{key:M.key||"_recharts-brush",onChange:Lh(A.handleBrushChange,M.props.onChange),data:z,x:be(M.props.x)?M.props.x:L.left,y:be(M.props.y)?M.props.y:L.top+L.height+L.brushBottom-(D.bottom||0),width:be(M.props.width)?M.props.width:L.width,startIndex:F,endIndex:W,updateId:"brush-".concat(Q)})}),Pe(A,"renderReferenceElement",function(M,R,D){if(!M)return null;var z=A,G=z.clipPathId,L=A.state,F=L.xAxisMap,W=L.yAxisMap,Q=L.offset,X=M.type.defaultProps||{},k=M.props,H=k.xAxisId,B=H===void 0?X.xAxisId:H,Z=k.yAxisId,le=Z===void 0?X.yAxisId:Z;return w.cloneElement(M,{key:M.key||"".concat(R,"-").concat(D),xAxis:F[B],yAxis:W[le],viewBox:{x:Q.left,y:Q.top,width:Q.width,height:Q.height},clipPathId:G})}),Pe(A,"renderActivePoints",function(M){var R=M.item,D=M.activePoint,z=M.basePoint,G=M.childIndex,L=M.isRange,F=[],W=R.props.key,Q=R.item.type.defaultProps!==void 0?ue(ue({},R.item.type.defaultProps),R.item.props):R.item.props,X=Q.activeDot,k=Q.dataKey,H=ue(ue({index:G,dataKey:k,cx:D.x,cy:D.y,r:4,fill:IE(R.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},nt(X,!1)),Rm(X));return F.push(E.renderActiveDot(X,H,"".concat(W,"-activePoint-").concat(G))),z?F.push(E.renderActiveDot(X,ue(ue({},H),{},{cx:z.x,cy:z.y}),"".concat(W,"-basePoint-").concat(G))):L&&F.push(null),F}),Pe(A,"renderGraphicChild",function(M,R,D){var z=A.filterFormatItem(M,R,D);if(!z)return null;var G=A.getTooltipEventType(),L=A.state,F=L.isTooltipActive,W=L.tooltipAxis,Q=L.activeTooltipIndex,X=L.activeLabel,k=A.props.children,H=rr(k,Nr),B=z.props,Z=B.points,le=B.isRange,$=B.baseLine,Y=z.item.type.defaultProps!==void 0?ue(ue({},z.item.type.defaultProps),z.item.props):z.item.props,q=Y.activeDot,U=Y.hide,ne=Y.activeBar,fe=Y.activeShape,ie=!!(!U&&F&&H&&(q||ne||fe)),pe={};G!=="axis"&&H&&H.props.trigger==="click"?pe={onClick:Lh(A.handleItemMouseEnter,M.props.onClick)}:G!=="axis"&&(pe={onMouseLeave:Lh(A.handleItemMouseLeave,M.props.onMouseLeave),onMouseEnter:Lh(A.handleItemMouseEnter,M.props.onMouseEnter)});var re=w.cloneElement(M,ue(ue({},z.props),pe));function ve(Rt){return typeof W.dataKey=="function"?W.dataKey(Rt.payload):null}if(ie)if(Q>=0){var ge,oe;if(W.dataKey&&!W.allowDuplicatedCategory){var ke=typeof W.dataKey=="function"?ve:"payload.".concat(W.dataKey.toString());ge=Mm(Z,ke,X),oe=le&&$&&Mm($,ke,X)}else ge=Z==null?void 0:Z[Q],oe=le&&$&&$[Q];if(fe||ne){var we=M.props.activeIndex!==void 0?M.props.activeIndex:Q;return[w.cloneElement(M,ue(ue(ue({},z.props),pe),{},{activeIndex:we})),null,null]}if(!Qe(ge))return[re].concat(ec(A.renderActivePoints({item:z,activePoint:ge,basePoint:oe,childIndex:Q,isRange:le})))}else{var ze,Ze=(ze=A.getItemByXY(A.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:re},lt=Ze.graphicalItem,tn=lt.item,pt=tn===void 0?M:tn,dr=lt.childIndex,Yn=ue(ue(ue({},z.props),pe),{},{activeIndex:dr});return[w.cloneElement(pt,Yn),null,null]}return le?[re,null,null]:[re,null]}),Pe(A,"renderCustomized",function(M,R,D){return w.cloneElement(M,ue(ue({key:"recharts-customized-".concat(D)},A.props),A.state))}),Pe(A,"renderMap",{CartesianGrid:{handler:Hh,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Hh},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Hh},YAxis:{handler:Hh},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((_=N.id)!==null&&_!==void 0?_:Xf("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=Hz(A.triggeredAfterMouseMove,(C=N.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return $ve(E,x),Rve(E,[{key:"componentDidMount",value:function(){var _,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,C=_.children,A=_.data,M=_.height,R=_.layout,D=rr(C,Nr);if(D){var z=D.props.defaultIndex;if(!(typeof z!="number"||z<0||z>this.state.tooltipTicks.length-1)){var G=this.state.tooltipTicks[z]&&this.state.tooltipTicks[z].value,L=zj(this.state,A,z,G),F=this.state.tooltipTicks[z].coordinate,W=(this.state.offset.top+M)/2,Q=R==="horizontal",X=Q?{x:F,y:W}:{y:F,x:W},k=this.state.formattedGraphicalItems.find(function(B){var Z=B.item;return Z.type.name==="Scatter"});k&&(X=ue(ue({},X),k.props.points[z].tooltipPosition),L=k.props.points[z].tooltipPayload);var H={activeTooltipIndex:z,isTooltipActive:!0,activeLabel:G,activePayload:L,activeCoordinate:X};this.setState(H),this.renderCursor(D),this.accessibilityManager.setIndex(z)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var A,M;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(M=this.props.margin.top)!==null&&M!==void 0?M:0}})}return null}},{key:"componentDidUpdate",value:function(_){OS([rr(_.children,Nr)],[rr(this.props.children,Nr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=rr(this.props.children,Nr);if(_&&typeof _.props.shared=="boolean"){var C=_.props.shared?"axis":"item";return u.indexOf(C)>=0?C:o}return o}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),M=Fae(A),R={chartX:Math.round(_.pageX-M.left),chartY:Math.round(_.pageY-M.top)},D=A.width/C.offsetWidth||1,z=this.inRange(R.chartX,R.chartY,D);if(!z)return null;var G=this.state,L=G.xAxisMap,F=G.yAxisMap,W=this.getTooltipEventType(),Q=z4(this.state,this.props.data,this.props.layout,z);if(W!=="axis"&&L&&F){var X=Yi(L).scale,k=Yi(F).scale,H=X&&X.invert?X.invert(R.chartX):null,B=k&&k.invert?k.invert(R.chartY):null;return ue(ue({},R),{},{xValue:H,yValue:B},Q)}return Q?ue(ue({},R),Q):null}},{key:"inRange",value:function(_,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=this.props.layout,R=_/A,D=C/A;if(M==="horizontal"||M==="vertical"){var z=this.state.offset,G=R>=z.left&&R<=z.left+z.width&&D>=z.top&&D<=z.top+z.height;return G?{x:R,y:D}:null}var L=this.state,F=L.angleAxisMap,W=L.radiusAxisMap;if(F&&W){var Q=Yi(F);return nk({x:R,y:D},Q)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,C=this.getTooltipEventType(),A=rr(_,Nr),M={};A&&C==="axis"&&(A.props.trigger==="click"?M={onClick:this.handleClick}:M={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 R=Rm(this.props,this.handleOuterEvent);return ue(ue({},R),M)}},{key:"addListener",value:function(){z1.on(B1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){z1.removeListener(B1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,C,A){for(var M=this.state.formattedGraphicalItems,R=0,D=M.length;R<D;R++){var z=M[R];if(z.item===_||z.props.key===_.key||C===Za(z.item.type)&&A===z.childIndex)return z}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,C=this.state.offset,A=C.left,M=C.top,R=C.height,D=C.width;return I.createElement("defs",null,I.createElement("clipPath",{id:_},I.createElement("rect",{x:A,y:M,height:R,width:D})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(C,A){var M=$4(A,2),R=M[0],D=M[1];return ue(ue({},C),{},Pe({},R,D.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(C,A){var M=$4(A,2),R=M[0],D=M[1];return ue(ue({},C),{},Pe({},R,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(_){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(_){var C=this.state,A=C.formattedGraphicalItems,M=C.activeItem;if(A&&A.length)for(var R=0,D=A.length;R<D;R++){var z=A[R],G=z.props,L=z.item,F=L.type.defaultProps!==void 0?ue(ue({},L.type.defaultProps),L.props):L.props,W=Za(L.type);if(W==="Bar"){var Q=(G.data||[]).find(function(B){return fde(_,B)});if(Q)return{graphicalItem:z,payload:Q}}else if(W==="RadialBar"){var X=(G.data||[]).find(function(B){return nk(_,B)});if(X)return{graphicalItem:z,payload:X}}else if(Fv(z,M)||Gv(z,M)||Cf(z,M)){var k=the({graphicalItem:z,activeTooltipItem:M,itemData:F.data}),H=F.activeIndex===void 0?k:F.activeIndex;return{graphicalItem:ue(ue({},z),{},{childIndex:H}),payload:Cf(z,M)?F.data[k]:z.props.data[k]}}}return null}},{key:"render",value:function(){var _=this;if(!hM(this))return null;var C=this.props,A=C.children,M=C.className,R=C.width,D=C.height,z=C.style,G=C.compact,L=C.title,F=C.desc,W=I4(C,Eve),Q=nt(W,!1);if(G)return I.createElement(g4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement(_S,yl({},Q,{width:R,height:D,title:L,desc:F}),this.renderClipPath(),pM(A,this.renderMap)));if(this.props.accessibilityLayer){var X,k;Q.tabIndex=(X=this.props.tabIndex)!==null&&X!==void 0?X:0,Q.role=(k=this.props.role)!==null&&k!==void 0?k:"application",Q.onKeyDown=function(B){_.accessibilityManager.keyboardEvent(B)},Q.onFocus=function(){_.accessibilityManager.focus()}}var H=this.parseEventsOfWrapper();return I.createElement(g4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement("div",yl({className:rt("recharts-wrapper",M),style:ue({position:"relative",cursor:"default",width:R,height:D},z)},H,{ref:function(Z){_.container=Z}}),I.createElement(_S,yl({},Q,{width:R,height:D,title:L,desc:F,style:Uve}),this.renderClipPath(),pM(A,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(w.Component);Pe(O,"displayName",n),Pe(O,"defaultProps",ue({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},m)),Pe(O,"getDerivedStateFromProps",function(x,E){var N=x.dataKey,_=x.data,C=x.children,A=x.width,M=x.height,R=x.layout,D=x.stackOffset,z=x.margin,G=E.dataStartIndex,L=E.dataEndIndex;if(E.updateId===void 0){var F=B4(x);return ue(ue(ue({},F),{},{updateId:0},b(ue(ue({props:x},F),{},{updateId:0}),E)),{},{prevDataKey:N,prevData:_,prevWidth:A,prevHeight:M,prevLayout:R,prevStackOffset:D,prevMargin:z,prevChildren:C})}if(N!==E.prevDataKey||_!==E.prevData||A!==E.prevWidth||M!==E.prevHeight||R!==E.prevLayout||D!==E.prevStackOffset||!Ol(z,E.prevMargin)){var W=B4(x),Q={chartX:E.chartX,chartY:E.chartY,isTooltipActive:E.isTooltipActive},X=ue(ue({},z4(E,_,R)),{},{updateId:E.updateId+1}),k=ue(ue(ue({},W),Q),X);return ue(ue(ue({},k),b(ue({props:x},k),E)),{},{prevDataKey:N,prevData:_,prevWidth:A,prevHeight:M,prevLayout:R,prevStackOffset:D,prevMargin:z,prevChildren:C})}if(!OS(C,E.prevChildren)){var H,B,Z,le,$=rr(C,Fl),Y=$&&(H=(B=$.props)===null||B===void 0?void 0:B.startIndex)!==null&&H!==void 0?H:G,q=$&&(Z=(le=$.props)===null||le===void 0?void 0:le.endIndex)!==null&&Z!==void 0?Z:L,U=Y!==G||q!==L,ne=!Qe(_),fe=ne&&!U?E.updateId:E.updateId+1;return ue(ue({updateId:fe},b(ue(ue({props:x},E),{},{updateId:fe,dataStartIndex:Y,dataEndIndex:q}),E)),{},{prevChildren:C,dataStartIndex:Y,dataEndIndex:q})}return null}),Pe(O,"renderActiveDot",function(x,E,N){var _;return w.isValidElement(x)?_=w.cloneElement(x,E):Ye(x)?_=x(E):_=I.createElement(zE,E),I.createElement(Bt,{className:"recharts-active-dot",key:N},_)});var S=w.forwardRef(function(E,N){return I.createElement(O,yl({},E,{ref:N}))});return S.displayName=O.displayName,S},Z6=Q6({chartName:"LineChart",GraphicalChild:Ar,axisComponents:[{axisType:"xAxis",AxisComp:ys},{axisType:"yAxis",AxisComp:fi}],formatAxisMap:v6}),Zve=Q6({chartName:"BarChart",GraphicalChild:no,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ys},{axisType:"yAxis",AxisComp:fi}],formatAxisMap:v6});function U1(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**r).toFixed(1))} ${n[r]}`}function Wo(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function Fh({title:e,value:t,description:n,icon:r,trend:i}){return c.jsxs(Te,{children:[c.jsxs(Me,{className:"flex flex-row items-center justify-between pb-2",children:[c.jsx(Le,{className:"font-medium text-muted-foreground text-sm",children:e}),c.jsx(r,{className:"h-4 w-4 text-muted-foreground"})]}),c.jsxs($e,{children:[c.jsx("div",{className:"font-bold text-2xl",children:t}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("p",{className:"text-muted-foreground text-xs",children:n}),i!==void 0&&i!==0&&c.jsxs("span",{className:`flex items-center text-xs ${i>0?"text-green-500":"text-red-500"}`,children:[c.jsx(Zj,{className:`h-3 w-3 ${i<0?"rotate-180":""}`}),Math.abs(i),"%"]})]})]})]})}function Jve({data:e}){const t=e.map(n=>({date:new Date(n.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),size:n.size/1073741824,files:n.files}));return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Storage Usage"}),c.jsx(We,{children:"Storage size and file count over time"})]}),c.jsx($e,{children:c.jsx(dE,{height:300,width:"100%",children:c.jsxs(Z6,{data:t,children:[c.jsx(Qv,{className:"stroke-muted",strokeDasharray:"3 3"}),c.jsx(ys,{className:"text-xs",dataKey:"date",stroke:"currentColor",tick:{fill:"currentColor"}}),c.jsx(fi,{className:"text-xs",stroke:"currentColor",tick:{fill:"currentColor"},tickFormatter:n=>`${n} GB`,yAxisId:"left"}),c.jsx(fi,{className:"text-xs",orientation:"right",stroke:"currentColor",tick:{fill:"currentColor"},yAxisId:"right"}),c.jsx(Nr,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},formatter:(n,r)=>[r==="size"?`${n.toFixed(2)} GB`:n,r==="size"?"Storage":"Files"]}),c.jsx(ei,{}),c.jsx(Ar,{dataKey:"size",dot:!1,name:"Storage (GB)",stroke:"hsl(var(--primary))",strokeWidth:2,type:"monotone",yAxisId:"left"}),c.jsx(Ar,{dataKey:"files",dot:!1,name:"File Count",stroke:"hsl(var(--chart-2))",strokeWidth:2,type:"monotone",yAxisId:"right"})]})})})]})}function ege({data:e}){const t=e.map(n=>({date:new Date(n.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),bandwidth:n.bytes/1048576,requests:n.requests}));return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"CDN Traffic"}),c.jsx(We,{children:"Bandwidth and requests over time"})]}),c.jsx($e,{children:c.jsx(dE,{height:300,width:"100%",children:c.jsxs(Zve,{data:t,children:[c.jsx(Qv,{className:"stroke-muted",strokeDasharray:"3 3"}),c.jsx(ys,{className:"text-xs",dataKey:"date",stroke:"currentColor",tick:{fill:"currentColor"}}),c.jsx(fi,{className:"text-xs",stroke:"currentColor",tick:{fill:"currentColor"},tickFormatter:n=>`${n} MB`,yAxisId:"left"}),c.jsx(fi,{className:"text-xs",orientation:"right",stroke:"currentColor",tick:{fill:"currentColor"},tickFormatter:n=>Wo(n),yAxisId:"right"}),c.jsx(Nr,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},formatter:(n,r)=>[r==="bandwidth"?`${n.toFixed(1)} MB`:Wo(n),r==="bandwidth"?"Bandwidth":"Requests"]}),c.jsx(ei,{}),c.jsx(no,{dataKey:"bandwidth",fill:"hsl(var(--primary))",name:"Bandwidth (MB)",radius:[4,4,0,0],yAxisId:"left"}),c.jsx(no,{dataKey:"requests",fill:"hsl(var(--chart-3))",name:"Requests",radius:[4,4,0,0],yAxisId:"right"})]})})})]})}function tge({files:e}){return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Top Files"}),c.jsx(We,{children:"Most requested files this month"})]}),c.jsx($e,{children:e.length===0?c.jsx("div",{className:"py-4 text-center text-muted-foreground",children:"No data available"}):c.jsx("div",{className:"space-y-4",children:e.map((t,n)=>{const r=t.key.split("/").pop()||t.key,i=Math.max(...e.map(l=>l.requests)),o=t.requests/i*100;return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:"text-muted-foreground",children:[n+1,"."]}),c.jsx("span",{className:"max-w-[200px] truncate font-medium",children:r})]}),c.jsxs("span",{className:"text-muted-foreground",children:[Wo(t.requests)," requests"]})]}),c.jsx(pv,{className:"h-2",value:o})]},t.key)})})})]})}function nge(){return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((e,t)=>c.jsxs(Te,{children:[c.jsx(Me,{className:"pb-2",children:c.jsx(Re,{className:"h-4 w-20"})}),c.jsxs($e,{children:[c.jsx(Re,{className:"h-8 w-24"}),c.jsx(Re,{className:"mt-2 h-3 w-32"})]})]},t))}),c.jsxs(Te,{children:[c.jsx(Me,{children:c.jsx(Re,{className:"h-6 w-32"})}),c.jsx($e,{children:c.jsx(Re,{className:"h-[300px] w-full"})})]})]})}function rge(){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[c.jsx(zf,{className:"mb-4 h-16 w-16 text-muted-foreground opacity-50"}),c.jsx("h2",{className:"mb-2 font-semibold text-xl",children:"No Storage Configured"}),c.jsxs("p",{className:"mb-6 max-w-md text-center text-muted-foreground",children:["Storage infrastructure has not been deployed yet. Run"," ",c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:"wraps storage init"})," ","to get started."]})]})}function age(){const[e,t]=w.useState(null),[n,r]=w.useState(!0),[i,o]=w.useState(null),[l,u]=w.useState("7d"),d=w.useCallback(async()=>{try{r(!0),o(null);const h=sessionStorage.getItem("wraps-auth-token"),v=await fetch(`/api/cdn/metrics?token=${h}&range=${l}`);if(!v.ok){if(v.status===404){t(null);return}throw new Error("Failed to fetch storage metrics")}const m=await v.json();t(m)}catch(h){o(h instanceof Error?h.message:"An error occurred")}finally{r(!1)}},[l]);return w.useEffect(()=>{d()},[d]),n?c.jsx(nge,{}):i?c.jsxs(Un,{variant:"destructive",children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Error"}),c.jsx(Hn,{children:i})]}):e?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-bold text-2xl",children:"Storage Metrics"}),c.jsx("p",{className:"text-muted-foreground",children:"Monitor your storage usage and CDN traffic"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(ma,{onValueChange:u,value:l,children:[c.jsx(va,{className:"w-32",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"7d",children:"Last 7 days"}),c.jsx(Fe,{value:"30d",children:"Last 30 days"}),c.jsx(Fe,{value:"90d",children:"Last 90 days"})]})]}),c.jsxs(Ce,{onClick:d,size:"sm",variant:"outline",children:[c.jsx(Bf,{className:"mr-2 h-4 w-4"}),"Refresh"]})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Fh,{description:`${Wo(e.summary.fileCount)} files`,icon:_F,title:"Storage Used",value:U1(e.summary.totalSize)}),c.jsx(Fh,{description:`${U1(e.summary.bandwidth.thisMonth)} this month`,icon:bF,title:"Bandwidth Today",value:U1(e.summary.bandwidth.today)}),c.jsx(Fh,{description:`${Wo(e.summary.requests.thisMonth)} this month`,icon:Vu,title:"Requests Today",value:Wo(e.summary.requests.today)}),c.jsx(Fh,{description:"Files in storage",icon:wF,title:"Total Files",value:Wo(e.summary.fileCount)})]}),c.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[c.jsx(Jve,{data:e.usage}),c.jsx(ege,{data:e.bandwidth})]}),c.jsx(tge,{files:e.topFiles})]}):c.jsx(rge,{})}function Ap({status:e}){const t={SUCCESS:{icon:ao,label:"Active",className:"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20"},PENDING:{icon:Qo,label:"Pending",className:"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20"},FAILED:{icon:d$,label:"Failed",className:"bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20"},DISABLED:{icon:cr,label:"Disabled",className:"bg-gray-500/10 text-gray-700 dark:text-gray-400 border-gray-500/20"}},{icon:n,label:r,className:i}=t[e];return c.jsxs(qe,{className:i,variant:"outline",children:[c.jsx(n,{className:"mr-1 h-3 w-3"}),r]})}function bl({text:e}){const t=async()=>{await navigator.clipboard.writeText(e),Ot.success("Copied to clipboard")};return c.jsx(Ce,{onClick:t,size:"sm",variant:"ghost",children:c.jsx(Kj,{className:"h-3 w-3"})})}function ige({settings:e}){return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(zf,{className:"h-5 w-5"}),c.jsx(Le,{children:"S3 Bucket"})]}),c.jsx(Ap,{status:"SUCCESS"})]}),c.jsx(We,{children:"Your storage bucket for uploading files"})]}),c.jsx($e,{className:"space-y-4",children:c.jsxs("div",{className:"grid gap-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Bucket Name"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:e.bucketName}),c.jsx(bl,{text:e.bucketName})]})]}),c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Region"}),c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:e.region})]}),c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Versioning"}),c.jsx(qe,{variant:e.versioning?"default":"secondary",children:e.versioning?"Enabled":"Disabled"})]}),c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Encryption"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nm,{className:"h-4 w-4 text-green-500"}),c.jsx("span",{className:"text-sm",children:"AES-256"})]})]}),e.retention&&e.retention!=="none"&&c.jsxs(c.Fragment,{children:[c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Auto-Cleanup"}),c.jsx("span",{className:"text-sm",children:e.retention})]})]})]})})]})}function oge({settings:e}){var i,o;const[t,n]=w.useState(!1);if(!((i=e.cdn)!=null&&i.enabled))return c.jsx(Te,{children:c.jsxs(Me,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Vu,{className:"h-5 w-5"}),c.jsx(Le,{children:"CloudFront CDN"})]}),c.jsx(Ap,{status:"DISABLED"})]}),c.jsx(We,{children:"CDN is not enabled for this storage bucket"})]})});const r=e.cdn.status==="Deployed"?"SUCCESS":e.cdn.status==="InProgress"?"PENDING":"FAILED";return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Vu,{className:"h-5 w-5"}),c.jsx(Le,{children:"CloudFront CDN"})]}),c.jsx(Ap,{status:r})]}),c.jsx(We,{children:"Global content delivery network for fast file access"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"grid gap-4",children:[e.cdn.distributionId&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Distribution ID"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:e.cdn.distributionId}),c.jsx(bl,{text:e.cdn.distributionId})]})]}),c.jsx(qt,{})]}),e.cdn.distributionDomain&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"CloudFront URL"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("a",{className:"text-blue-600 text-sm hover:underline dark:text-blue-400",href:`https://${e.cdn.distributionDomain}`,rel:"noopener noreferrer",target:"_blank",children:[e.cdn.distributionDomain,c.jsx(Gu,{className:"ml-1 inline h-3 w-3"})]}),c.jsx(bl,{text:`https://${e.cdn.distributionDomain}`})]})]}),c.jsx(qt,{})]}),e.cdn.customDomain&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Custom Domain"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("a",{className:"text-blue-600 text-sm hover:underline dark:text-blue-400",href:`https://${e.cdn.customDomain}`,rel:"noopener noreferrer",target:"_blank",children:[e.cdn.customDomain,c.jsx(Gu,{className:"ml-1 inline h-3 w-3"})]}),c.jsx(bl,{text:`https://${e.cdn.customDomain}`})]})]})]}),((o=e.certificate)==null?void 0:o.validationRecords)&&e.certificate.validationRecords.length>0&&e.certificate.status==="PENDING_VALIDATION"&&c.jsxs(fs,{onOpenChange:n,open:t,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"w-full justify-between",variant:"ghost",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(cr,{className:"h-4 w-4 text-yellow-500"}),"Certificate DNS Records Required"]}),t?c.jsx("span",{className:"text-xs",children:"Hide"}):c.jsx("span",{className:"text-xs",children:"Show"})]})}),c.jsxs(hs,{className:"mt-2 space-y-2",children:[c.jsxs(Un,{children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Action Required"}),c.jsx(Hn,{children:"Add these DNS records to verify your custom domain certificate"})]}),e.certificate.validationRecords.map((l,u)=>c.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3 font-mono text-xs",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:l.type}),c.jsx(bl,{text:l.value})]}),c.jsx("div",{className:"mt-1 break-all",children:l.name}),c.jsxs("div",{className:"mt-1 break-all text-muted-foreground",children:["→ ",l.value]})]},u))]})]})]})]})}function sge({settings:e}){return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nm,{className:"h-5 w-5"}),c.jsx(Le,{children:"IAM Role"})]}),c.jsx(Ap,{status:"SUCCESS"})]}),c.jsx(We,{children:"Role used by your application to access storage"})]}),c.jsx($e,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Role ARN"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"max-w-[300px] truncate rounded bg-muted px-2 py-1 font-mono text-xs",children:e.roleArn}),c.jsx(bl,{text:e.roleArn})]})]})})]})}function lge(){return c.jsxs("div",{className:"space-y-6",children:[c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-32"}),c.jsx(Re,{className:"h-4 w-64"})]}),c.jsx($e,{children:c.jsxs("div",{className:"space-y-4",children:[c.jsx(Re,{className:"h-8 w-full"}),c.jsx(Re,{className:"h-8 w-full"}),c.jsx(Re,{className:"h-8 w-full"})]})})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-32"}),c.jsx(Re,{className:"h-4 w-64"})]}),c.jsx($e,{children:c.jsxs("div",{className:"space-y-4",children:[c.jsx(Re,{className:"h-8 w-full"}),c.jsx(Re,{className:"h-8 w-full"})]})})]})]})}function cge(){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[c.jsx(zf,{className:"mb-4 h-16 w-16 text-muted-foreground opacity-50"}),c.jsx("h2",{className:"mb-2 font-semibold text-xl",children:"No Storage Configured"}),c.jsxs("p",{className:"mb-6 max-w-md text-center text-muted-foreground",children:["Storage infrastructure has not been deployed yet. Run"," ",c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-sm",children:"wraps storage init"})," ","to get started."]})]})}function uge(){const[e,t]=w.useState(null),[n,r]=w.useState(!0),[i,o]=w.useState(null),l=w.useCallback(async()=>{try{r(!0),o(null);const u=sessionStorage.getItem("wraps-auth-token"),d=await fetch(`/api/cdn/settings?token=${u}`);if(!d.ok){if(d.status===404){t(null);return}throw new Error("Failed to fetch storage settings")}const h=await d.json();t(h)}catch(u){o(u instanceof Error?u.message:"An error occurred")}finally{r(!1)}},[]);return w.useEffect(()=>{l()},[l]),n?c.jsx(lge,{}):i?c.jsxs(Un,{variant:"destructive",children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Error"}),c.jsx(Hn,{children:i})]}):e?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-bold text-2xl",children:"Storage Settings"}),c.jsx("p",{className:"text-muted-foreground",children:"Manage your S3 bucket and CloudFront CDN configuration"})]}),c.jsxs(Ce,{onClick:l,size:"sm",variant:"outline",children:[c.jsx(Bf,{className:"mr-2 h-4 w-4"}),"Refresh"]})]}),c.jsx(ige,{settings:e}),c.jsx(oge,{settings:e}),c.jsx(sge,{settings:e})]}):c.jsx(cge,{})}function Nl({className:e,...t}){return c.jsx("div",{className:me("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),"data-slot":"input-group",role:"group",...t})}const fge=mc("flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 font-medium text-muted-foreground text-sm group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function la({className:e,align:t="inline-start",...n}){return c.jsx("div",{className:me(fge({align:t}),e),"data-align":t,"data-slot":"input-group-addon",onClick:r=>{var i,o;r.target.closest("button")||(o=(i=r.currentTarget.parentElement)==null?void 0:i.querySelector("input"))==null||o.focus()},role:"group",...n})}function Al({className:e,...t}){return c.jsx("span",{className:me("flex items-center gap-2 text-muted-foreground text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",e),...t})}function Cl({className:e,...t}){return c.jsx(oo,{className:me("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),"data-slot":"input-group-control",...t})}var Jv="Tabs",[dge]=jn(Jv,[hc]),J6=hc(),[hge,KE]=dge(Jv),e8=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:d="automatic",...h}=e,v=lc(u),[m,g]=Nn({prop:r,onChange:i,defaultProp:o??"",caller:Jv});return c.jsx(hge,{scope:n,baseId:Tr(),value:m,onValueChange:g,orientation:l,dir:v,activationMode:d,children:c.jsx(Ne.div,{dir:v,"data-orientation":l,...h,ref:t})})});e8.displayName=Jv;var t8="TabsList",n8=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=KE(t8,n),l=J6(n);return c.jsx(uO,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:c.jsx(Ne.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});n8.displayName=t8;var r8="TabsTrigger",a8=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=KE(r8,n),u=J6(n),d=s8(l.baseId,r),h=l8(l.baseId,r),v=r===l.value;return c.jsx(fO,{asChild:!0,...u,focusable:!i,active:v,children:c.jsx(Ne.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:ye(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:ye(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:ye(e.onFocus,()=>{const m=l.activationMode!=="manual";!v&&!i&&m&&l.onValueChange(r)})})})});a8.displayName=r8;var i8="TabsContent",o8=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,u=KE(i8,n),d=s8(u.baseId,r),h=l8(u.baseId,r),v=r===u.value,m=w.useRef(v);return w.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),c.jsx(An,{present:i||v,children:({present:g})=>c.jsx(Ne.div,{"data-state":v?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:h,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&o})})});o8.displayName=i8;function s8(e,t){return`${e}-trigger-${t}`}function l8(e,t){return`${e}-content-${t}`}var mge=e8,pge=n8,vge=a8,gge=o8;function c8({className:e,...t}){return c.jsx(mge,{className:me("flex flex-col gap-2",e),"data-slot":"tabs",...t})}function u8({className:e,...t}){return c.jsx(pge,{className:me("inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-[3px] text-muted-foreground",e),"data-slot":"tabs-list",...t})}function Uu({className:e,...t}){return c.jsx(vge,{className:me("inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 font-medium text-foreground text-sm transition-[color,box-shadow] focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:shadow-sm dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"tabs-trigger",...t})}function Hu({className:e,...t}){return c.jsx(gge,{className:me("flex-1 outline-none",e),"data-slot":"tabs-content",...t})}function yge({messageId:e,archivingEnabled:t}){const[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null);return w.useEffect(()=>{async function d(){if(!t){o(!1);return}try{o(!0),u(null);const h=sessionStorage.getItem("wraps-auth-token");if(!h)throw new Error("Authentication token not found");const v=encodeURIComponent(e),m=await fetch(`/api/emails/${v}/archive?token=${h}`);if(!m.ok){if(m.status===404){r(null),o(!1);return}throw new Error(`Failed to fetch archived email: ${m.statusText}`)}const g=await m.json();r({...g,timestamp:new Date(g.timestamp)})}catch(h){const v=h instanceof Error?h.message:"Unknown error";u(v),console.error("Error fetching archived email:",h)}finally{o(!1)}}d()},[e,t]),t?i?c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Archive"}),c.jsx(We,{children:"Loading archived email content..."})]}),c.jsx($e,{className:"space-y-4",children:c.jsx(Re,{className:"h-[400px] w-full"})})]}):l?c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Archive"}),c.jsx(We,{children:"Failed to load archived email"})]}),c.jsx($e,{children:c.jsx(Un,{variant:"destructive",children:c.jsx(Hn,{children:l})})})]}):n?c.jsxs(Te,{children:[c.jsx(Me,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx(Le,{children:"Email Archive"}),c.jsx(We,{children:"Full email content stored in AWS SES Mail Manager"})]}),n.attachments.length>0&&c.jsxs(qe,{variant:"secondary",children:[n.attachments.length," attachment",n.attachments.length>1?"s":""]})]})}),c.jsxs($e,{children:[c.jsxs(c8,{className:"w-full",defaultValue:"rendered",children:[c.jsxs(u8,{className:"grid w-full grid-cols-3",children:[c.jsxs(Uu,{className:"gap-2",value:"rendered",children:[c.jsx(Vu,{className:"h-4 w-4"}),"Rendered Email"]}),c.jsxs(Uu,{className:"gap-2",value:"text",children:[c.jsx(h$,{className:"h-4 w-4"}),"Plain Text"]}),c.jsxs(Uu,{className:"gap-2",value:"html",children:[c.jsx(EF,{className:"h-4 w-4"}),"HTML Source"]})]}),c.jsxs(Hu,{className:"space-y-4",value:"rendered",children:[n.html?c.jsx("div",{className:"rounded-md border",children:c.jsx("iframe",{className:"h-[600px] w-full rounded-md",sandbox:"allow-same-origin",srcDoc:n.html,title:"Email preview"})}):c.jsx(Un,{children:c.jsx(Hn,{children:"No HTML content available for this email. View the plain text tab instead."})}),n.attachments.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"font-medium text-sm",children:"Attachments"}),c.jsx("div",{className:"space-y-2",children:n.attachments.map((d,h)=>c.jsx("div",{className:"flex items-center justify-between rounded-md border p-3",children:c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"font-mono text-sm",children:d.filename||`Attachment ${h+1}`}),c.jsxs("div",{className:"text-muted-foreground text-xs",children:[d.contentType," •"," ",(d.size/1024).toFixed(2)," KB"]})]})},d.filename||`attachment-${h}`))})]})]}),c.jsx(Hu,{className:"space-y-4",value:"text",children:n.text?c.jsx("div",{className:"rounded-md border bg-muted p-4",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-sm",children:n.text})}):c.jsx(Un,{children:c.jsx(Hn,{children:"No plain text content available for this email."})})}),c.jsx(Hu,{className:"space-y-4",value:"html",children:n.html?c.jsx("div",{className:"rounded-md border bg-muted p-4",children:c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap font-mono text-xs",children:n.html})}):c.jsx(Un,{children:c.jsx(Hn,{children:"No HTML content available for this email."})})})]}),n.metadata&&c.jsxs("div",{className:"mt-6 space-y-3 rounded-md border p-4",children:[c.jsx("div",{className:"font-medium text-sm",children:"SMTP Metadata"}),c.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.metadata.senderIp&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-xs",children:"Sender IP"}),c.jsx("div",{className:"font-mono text-sm",children:n.metadata.senderIp})]}),n.metadata.tlsProtocol&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-xs",children:"TLS Protocol"}),c.jsx("div",{className:"font-mono text-sm",children:n.metadata.tlsProtocol})]}),n.metadata.senderHostname&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-xs",children:"Sender Hostname"}),c.jsx("div",{className:"font-mono text-sm",children:n.metadata.senderHostname})]})]})]})]})]}):c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Archive"}),c.jsx(We,{children:"Email content not available"})]}),c.jsx($e,{children:c.jsx(Un,{children:c.jsx(Hn,{children:"This email was not archived. It may have been sent before email archiving was enabled for this deployment."})})})]}):c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Archive"}),c.jsx(We,{children:"Enable email archiving to view full email content"})]}),c.jsx($e,{children:c.jsx(Un,{children:c.jsxs(Hn,{children:["Email archiving is not enabled for this deployment. Run"," ",c.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs",children:"wraps upgrade"})," ","to enable archiving and view full email content with HTML rendering."]})})})]})}const bge={sent:xl,delivered:ri,bounced:or,suppressed:SF,complained:or,opened:xl,clicked:xl,failed:or},xge={sent:"text-blue-500",delivered:"text-green-500",bounced:"text-red-500",suppressed:"text-amber-500",complained:"text-red-500",opened:"text-purple-500",clicked:"text-indigo-500",failed:"text-red-500"},wge={delivered:"default",sent:"secondary",bounced:"destructive",suppressed:"destructive",complained:"destructive",failed:"destructive",opened:"default",clicked:"default"};function Sge(){const{id:e}=Fj(),t=Sa(),[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null),[d,h]=w.useState(!1);w.useEffect(()=>{async function g(){var b,O,S;try{o(!0),u(null);const x=sessionStorage.getItem("wraps-auth-token");if(!x)throw new Error("Authentication token not found");try{const A=await fetch(`/api/settings/deployment?token=${x}`);if(A.ok){const M=await A.json();h(M.archivingEnabled??!1)}}catch(A){console.warn("Failed to fetch deployment config:",A)}const E=encodeURIComponent(e||"");console.log("Fetching email with ID:",e),console.log("Encoded ID:",E),console.log("Full URL:",`/api/emails/${E}?token=${x.substring(0,8)}...`);const N=await fetch(`/api/emails/${E}?token=${x}`);if(!N.ok){let A="Failed to fetch email details";try{A=(await N.json()).error||A}catch{A=`${N.status}: ${N.statusText}`}throw new Error(A)}const _=N.headers.get("content-type");if(!(_!=null&&_.includes("application/json"))){const A=await N.text();throw console.error("Non-JSON response:",A),new Error("Server returned non-JSON response")}const C=await N.json();console.log("Email data received:",{id:C.id,hasHtmlBody:!!C.htmlBody,hasTextBody:!!C.textBody,htmlBodyLength:((b=C.htmlBody)==null?void 0:b.length)||0,textBodyLength:((O=C.textBody)==null?void 0:O.length)||0,events:((S=C.events)==null?void 0:S.length)||0}),r(C)}catch(x){const E=x instanceof Error?x.message:"Unknown error";u(E),console.error("Error fetching email details:",x)}finally{o(!1)}}e&&g()},[e]);const v=g=>new Date(g).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),m=g=>new Date(g).toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0});return i?c.jsx("div",{className:"flex h-[600px] items-center justify-center",children:c.jsx("div",{className:"text-muted-foreground",children:"Loading email details..."})}):l?c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/email"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to emails"]}),c.jsx("div",{className:"rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:l})]}):n?c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"flex items-center gap-4",children:c.jsxs(Ce,{onClick:()=>t("/email"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back"]})}),c.jsx(Te,{children:c.jsxs(Me,{className:"space-y-1.5",children:[c.jsxs(Le,{className:"flex flex-row items-center gap-2 text-xl",children:[c.jsx("span",{className:"text-xl",children:n.subject||"(no subject)"}),c.jsx(qe,{className:"shrink-0",variant:wge[n.status],children:n.status.charAt(0).toUpperCase()+n.status.slice(1)})]}),c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("code",{className:"min-w-0 truncate rounded bg-muted px-2 py-0.5 font-mono text-muted-foreground text-xs",children:n.messageId}),c.jsx(fa,{className:"h-6 w-6 shrink-0",size:"sm",value:n.messageId,variant:"ghost"})]}),c.jsxs("div",{className:"flex flex-col gap-3 pt-2 sm:flex-row sm:flex-wrap",children:[c.jsxs(Nl,{className:"w-full cursor-text! sm:w-auto sm:min-w-[518px]",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"From"})}),c.jsx(Cl,{className:"min-w-0 cursor-text! truncate font-mono text-sm *:select-all",disabled:!0,readOnly:!0,value:n.from}),c.jsx(la,{align:"inline-end",children:c.jsx(fa,{className:"h-6 w-6",size:"sm",value:n.from,variant:"ghost"})})]}),c.jsxs(Nl,{className:"w-full cursor-text! sm:w-auto sm:min-w-[518px]",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"To"})}),c.jsx(Cl,{className:"min-w-0 cursor-text! truncate font-mono text-sm *:select-all",disabled:!0,readOnly:!0,value:n.to.length>0?n.to.join(", "):"(no recipients)"}),c.jsx(la,{align:"inline-end",children:c.jsx(fa,{className:"h-6 w-6",size:"sm",value:n.to.join(", "),variant:"ghost"})})]}),n.replyTo&&c.jsxs(Nl,{className:"w-full sm:w-auto sm:max-w-md",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"Reply-To"})}),c.jsx(Cl,{className:"min-w-0 truncate font-mono text-sm",readOnly:!0,value:n.replyTo}),c.jsx(la,{align:"inline-end",children:c.jsx(fa,{className:"h-6 w-6",size:"sm",value:n.replyTo,variant:"ghost"})})]})]})]})}),d&&c.jsx(yge,{archivingEnabled:d,messageId:n.messageId}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Events"}),c.jsx(We,{children:"Lifecycle of this email from send to delivery"})]}),c.jsx($e,{children:c.jsx("div",{className:"space-y-4",children:n.events.length===0?c.jsx("div",{className:"text-muted-foreground text-sm",children:"No events recorded yet"}):n.events.map((g,b)=>{const O=bge[g.type]||Qo,S=b===n.events.length-1;return c.jsx("div",{children:c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("div",{className:`rounded-full border-2 border-background bg-muted p-2 ${xge[g.type]}`,children:c.jsx(O,{className:"h-4 w-4"})}),!S&&c.jsx("div",{className:"my-1 w-px flex-1 bg-border"})]}),c.jsxs("div",{className:"flex-1 pb-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"font-medium capitalize",children:g.type}),c.jsx("div",{className:"text-muted-foreground text-sm",children:v(g.timestamp)})]}),c.jsx("div",{className:"text-muted-foreground text-sm",children:m(g.timestamp)}),g.metadata&&Object.keys(g.metadata).length>0&&c.jsx("div",{className:"mt-2 rounded-md border bg-muted/50 p-2 font-mono text-xs",children:c.jsx("pre",{className:"overflow-x-auto",children:JSON.stringify(g.metadata,null,2)})})]})]})},`${g.type}-${g.timestamp}`)})})})]})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/email"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to emails"]}),c.jsx("div",{className:"rounded-md border p-4 text-muted-foreground text-sm",children:"Email not found"})]})}function jge(e){const t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/(1e3*60*60*24));return r===0?t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):r===1?"Yesterday":r<7?`${r} days ago`:t.toLocaleDateString()}function Oge(){const e=Sa(),[t,n]=w.useState([]),[r,i]=w.useState(!0),[o,l]=w.useState(null),[u,d]=w.useState("");w.useEffect(()=>{async function v(){try{i(!0),l(null);const m=sessionStorage.getItem("wraps-auth-token");if(!m)throw new Error("Authentication token not found. Please use the URL provided by 'wraps console' command.");const g=await fetch(`/api/inbound?limit=50&token=${m}`);if(!g.ok){let O="Failed to fetch inbound emails";try{O=(await g.json()).error||O}catch{O=`${g.status}: ${g.statusText}`}throw new Error(O)}const b=await g.json();n(b.emails||[])}catch(m){const g=m instanceof Error?m.message:"Unknown error";l(g),console.error("Error fetching inbound emails:",m)}finally{i(!1)}}v()},[]);const h=t.filter(v=>{if(!u)return!0;const m=u.toLowerCase(),g=v.from.address.toLowerCase().includes(m)||v.from.name.toLowerCase().includes(m),b=v.subject.toLowerCase().includes(m),O=v.to.some(S=>S.address.toLowerCase().includes(m)||S.name.toLowerCase().includes(m));return g||b||O});return c.jsxs("div",{className:"space-y-4",children:[o&&c.jsx("div",{className:"rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:o}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Pp,{className:"absolute top-2.5 left-2.5 h-4 w-4 text-muted-foreground"}),c.jsx(oo,{className:"pl-8",onChange:v=>d(v.target.value),placeholder:"Search inbound emails...",value:u})]})}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(fv,{children:[c.jsx(dv,{children:c.jsxs(Fn,{children:[c.jsx(Pt,{children:"From"}),c.jsx(Pt,{children:"Subject"}),c.jsx(Pt,{children:"Received"}),c.jsx(Pt,{className:"w-[100px]",children:"Attachments"}),c.jsx(Pt,{className:"w-[80px]",children:"Spam"}),c.jsx(Pt,{className:"w-[50px]"})]})}),c.jsx(hv,{children:r?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:6,children:"Loading inbound emails..."})}):h.length===0?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:6,children:t.length===0?"No inbound emails received yet":"No emails match your search"})}):h.map(v=>c.jsxs(Fn,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>e(`/email/inbound/${v.emailId}`),children:[c.jsxs(mt,{className:"font-mono text-sm",children:[v.from.name||v.from.address,v.from.name&&c.jsxs("span",{className:"ml-1 text-muted-foreground text-xs",children:["<",v.from.address,">"]})]}),c.jsx(mt,{className:"max-w-[300px] truncate",children:v.subject||"(no subject)"}),c.jsx(mt,{className:"text-muted-foreground",children:jge(v.receivedAt)}),c.jsx(mt,{children:v.hasAttachments&&c.jsxs(qe,{className:"bg-gray-500/10 text-gray-700 dark:text-gray-400 border-gray-500/20",variant:"outline",children:[c.jsx(p$,{className:"mr-1 h-3 w-3"}),v.attachmentCount]})}),c.jsx(mt,{children:v.spamVerdict==="PASS"?c.jsx(g$,{className:"h-4 w-4 text-green-500"}):v.spamVerdict==="FAIL"?c.jsx(v$,{className:"h-4 w-4 text-red-500"}):null}),c.jsx(mt,{children:c.jsx(xF,{className:"h-4 w-4 text-muted-foreground"})})]},v.emailId))})]})}),h.length>0&&!r&&c.jsx("div",{className:"flex items-center justify-between text-muted-foreground text-sm",children:c.jsxs("div",{children:["Showing ",h.length," of ",t.length," inbound emails"]})})]})}const H1={clicked:{variant:"default",description:"Recipient clicked a link in the email",className:"bg-purple-500/10 text-purple-700 dark:text-purple-400 hover:bg-purple-500/20 border-purple-500/20"},opened:{variant:"default",description:"Recipient opened the email",className:"bg-blue-500/10 text-blue-700 dark:text-blue-400 hover:bg-blue-500/20 border-blue-500/20"},delivered:{variant:"default",description:"Email was successfully delivered to recipient's mailbox",className:"bg-green-500/10 text-green-700 dark:text-green-400 hover:bg-green-500/20 border-green-500/20"},sent:{variant:"secondary",description:"Email was sent but delivery not yet confirmed",className:"bg-gray-500/10 text-gray-700 dark:text-gray-400 hover:bg-gray-500/20 border-gray-500/20"},bounced:{variant:"default",description:"Email bounced - recipient's mailbox may not exist or be full",className:"bg-orange-500/10 text-orange-700 dark:text-orange-400 hover:bg-orange-500/20 border-orange-500/20"},suppressed:{variant:"default",description:"Email blocked - recipient is on the suppression list",className:"bg-amber-500/10 text-amber-700 dark:text-amber-400 hover:bg-amber-500/20 border-amber-500/20"},complained:{variant:"default",description:"Recipient marked this email as spam",className:"bg-red-500/10 text-red-700 dark:text-red-400 hover:bg-red-500/20 border-red-500/20"},failed:{variant:"default",description:"Email failed to send due to an error",className:"bg-red-500/10 text-red-700 dark:text-red-400 hover:bg-red-500/20 border-red-500/20"}};function Ege(){const e=Sa(),[t,n]=w.useState(""),[r,i]=w.useState("15"),[o,l]=w.useState("all"),[u,d]=uF(),[h,v]=w.useState(u.get("tab")==="receiving"?"receiving":"sending"),[m,g]=w.useState([]),[b,O]=w.useState(!0),[S,x]=w.useState(null);w.useEffect(()=>{async function _(){try{O(!0),x(null);let C=sessionStorage.getItem("wraps-auth-token");if(C||(C=new URLSearchParams(window.location.search).get("token"),C&&sessionStorage.setItem("wraps-auth-token",C)),!C)throw new Error("Authentication token not found. Please use the URL provided by 'wraps console' command.");const A=Number.parseInt(r,10),M=Date.now()-A*24*60*60*1e3,R=Date.now(),D=await fetch(`/api/emails?startTime=${M}&endTime=${R}&limit=100&token=${C}`);if(!D.ok){let G="Failed to fetch email logs";try{G=(await D.json()).error||G}catch{G=`${D.status}: ${D.statusText}`}throw new Error(G)}const z=await D.json();g(z.logs.map(G=>({id:G.messageId,to:G.to,from:G.from,subject:G.subject,status:G.status,timestamp:G.sentAt,messageId:G.messageId})))}catch(C){const A=C instanceof Error?C.message:"Unknown error";x(A),console.error("Error fetching email logs:",C)}finally{O(!1)}}_()},[r]);const E=m.filter(_=>{if(t){const C=t.toLowerCase(),A=_.to.some(R=>R.toLowerCase().includes(C)),M=_.subject.toLowerCase().includes(C);if(!(A||M))return!1}return!(o!=="all"&&_.status!==o)}),N=_=>{const C=new Date(_),M=Math.floor((new Date().getTime()-C.getTime())/(1e3*60*60*24));return M===0?"Today":M===1?"Yesterday":M<7?`${M} days ago`:C.toLocaleDateString()};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Emails"}),c.jsx(We,{children:"View and manage your email sending history"})]}),c.jsx($e,{children:c.jsxs(c8,{onValueChange:_=>{v(_),d(_==="sending"?{}:{tab:_})},value:h,children:[c.jsxs(u8,{children:[c.jsx(Uu,{value:"sending",children:"Sending"}),c.jsx(Uu,{value:"receiving",children:"Receiving"})]}),c.jsxs(Hu,{className:"space-y-4",value:"sending",children:[S&&c.jsx("div",{className:"rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:S}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Pp,{className:"absolute top-2.5 left-2.5 h-4 w-4 text-muted-foreground"}),c.jsx(oo,{className:"pl-8",onChange:_=>n(_.target.value),placeholder:"Search...",value:t})]}),c.jsxs(ma,{onValueChange:i,value:r,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"1",children:"Last 24 hours"}),c.jsx(Fe,{value:"7",children:"Last 7 days"}),c.jsx(Fe,{value:"15",children:"Last 15 days"}),c.jsx(Fe,{value:"30",children:"Last 30 days"}),c.jsx(Fe,{value:"90",children:"Last 90 days"})]})]}),c.jsxs(ma,{onValueChange:l,value:o,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"all",children:"All Statuses"}),c.jsx(Fe,{value:"clicked",children:"Clicked"}),c.jsx(Fe,{value:"opened",children:"Opened"}),c.jsx(Fe,{value:"delivered",children:"Delivered"}),c.jsx(Fe,{value:"sent",children:"Sent"}),c.jsx(Fe,{value:"bounced",children:"Bounced"}),c.jsx(Fe,{value:"suppressed",children:"Suppressed"}),c.jsx(Fe,{value:"complained",children:"Complained"}),c.jsx(Fe,{value:"failed",children:"Failed"})]})]}),c.jsxs(Ce,{size:"icon",variant:"outline",children:[c.jsx("span",{className:"sr-only",children:"Download"}),"↓"]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(fv,{children:[c.jsx(dv,{children:c.jsxs(Fn,{children:[c.jsx(Pt,{children:"To"}),c.jsx(Pt,{children:"Status"}),c.jsx(Pt,{children:"Subject"}),c.jsx(Pt,{children:"Sent"}),c.jsx(Pt,{className:"w-[50px]"})]})}),c.jsx(hv,{children:b?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:5,children:"Loading email logs..."})}):E.length===0?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:5,children:"No emails found"})}):E.map(_=>{var C,A,M;return c.jsxs(Fn,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>e(`/email/${_.id}`),children:[c.jsx(mt,{className:"font-mono text-sm",children:_.to.length>0?c.jsxs(c.Fragment,{children:[_.to[0],_.to.length>1&&c.jsxs("span",{className:"ml-1 text-muted-foreground text-xs",children:["+",_.to.length-1," more"]})]}):c.jsx("span",{className:"text-muted-foreground",children:"(no recipients)"})}),c.jsx(mt,{children:c.jsxs(tv,{children:[c.jsx(nv,{asChild:!0,children:c.jsx(qe,{className:(C=H1[_.status])==null?void 0:C.className,variant:((A=H1[_.status])==null?void 0:A.variant)??"default",children:_.status.charAt(0).toUpperCase()+_.status.slice(1)})}),c.jsx(rv,{children:c.jsx("p",{children:((M=H1[_.status])==null?void 0:M.description)??"Unknown status"})})]})}),c.jsx(mt,{className:"max-w-[400px] truncate",children:_.subject}),c.jsx(mt,{className:"text-muted-foreground",children:N(_.timestamp)}),c.jsx(mt,{children:c.jsxs(Ce,{onClick:R=>{R.stopPropagation()},size:"icon",variant:"ghost",children:[c.jsx("span",{className:"sr-only",children:"More options"}),"⋯"]})})]},_.id)})})]})}),E.length>0&&!b&&c.jsx("div",{className:"flex items-center justify-between text-muted-foreground text-sm",children:c.jsxs("div",{children:["Showing ",E.length," of ",m.length," emails"]})})]}),c.jsx(Hu,{className:"space-y-4",value:"receiving",children:c.jsx(Oge,{})})]})})]})}function _ge({data:e}){const t=Nge(e);return t.length===0?c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Metrics"}),c.jsx(We,{children:"Performance over the last 24 hours"})]}),c.jsx($e,{children:c.jsx("div",{className:"flex h-[400px] items-center justify-center text-muted-foreground",children:"No metrics data available yet"})})]}):c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Email Metrics"}),c.jsx(We,{children:"Performance over the last 24 hours"})]}),c.jsx($e,{children:c.jsx(dE,{height:400,width:"100%",children:c.jsxs(Z6,{data:t,children:[c.jsx(Qv,{className:"stroke-muted",strokeDasharray:"3 3"}),c.jsx(ys,{className:"text-xs",dataKey:"timestamp",tickFormatter:n=>fS(new Date(n),"HH:mm")}),c.jsx(fi,{className:"text-xs"}),c.jsx(Nr,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))"},labelFormatter:n=>fS(new Date(n),"MMM d, HH:mm")}),c.jsx(ei,{}),c.jsx(Ar,{dataKey:"sends",name:"Sends",stroke:"hsl(var(--primary))",strokeWidth:2,type:"monotone"}),c.jsx(Ar,{dataKey:"deliveries",name:"Deliveries",stroke:"#82ca9d",strokeWidth:2,type:"monotone"}),c.jsx(Ar,{dataKey:"opens",name:"Opens",stroke:"#8884d8",strokeWidth:2,type:"monotone"}),c.jsx(Ar,{dataKey:"clicks",name:"Clicks",stroke:"#ffc658",strokeWidth:2,type:"monotone"}),c.jsx(Ar,{dataKey:"bounces",name:"Bounces",stroke:"#ff7300",strokeWidth:2,type:"monotone"}),c.jsx(Ar,{dataKey:"complaints",name:"Complaints",stroke:"hsl(var(--destructive))",strokeWidth:2,type:"monotone"})]})})})]})}function Nge(e){const t=new Map;[...e.sends,...e.bounces,...e.complaints,...e.deliveries,...e.opens,...e.clicks].forEach(n=>{t.has(n.timestamp)||t.set(n.timestamp,{timestamp:n.timestamp,sends:0,bounces:0,complaints:0,deliveries:0,opens:0,clicks:0})});for(const n of e.sends)t.get(n.timestamp).sends=n.value;for(const n of e.bounces)t.get(n.timestamp).bounces=n.value;for(const n of e.complaints)t.get(n.timestamp).complaints=n.value;for(const n of e.deliveries)t.get(n.timestamp).deliveries=n.value;for(const n of e.opens)t.get(n.timestamp).opens=n.value;for(const n of e.clicks)t.get(n.timestamp).clicks=n.value;return Array.from(t.values()).sort((n,r)=>n.timestamp-r.timestamp)}function Age({quota:e}){const t=e.sentLast24Hours/e.max24HourSend*100,n=t>90?"destructive":t>70?"warning":"default";return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center justify-between",children:["SES Quota",c.jsxs(qe,{variant:n==="destructive"?"destructive":"secondary",children:[t.toFixed(1),"% used"]})]}),c.jsx(We,{children:"24-hour sending limits"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex justify-between text-sm",children:[c.jsx("span",{className:"text-muted-foreground",children:"Emails sent"}),c.jsxs("span",{className:"font-medium",children:[e.sentLast24Hours.toLocaleString()," /"," ",e.max24HourSend.toLocaleString()]})]}),c.jsx(pv,{className:"h-2",value:t})]}),c.jsxs("div",{className:"flex items-center justify-between border-t pt-2",children:[c.jsx("span",{className:"text-muted-foreground text-sm",children:"Max send rate"}),c.jsxs("span",{className:"font-medium text-sm",children:[e.maxSendRate," emails/sec"]})]})]})]})}function Cge(){const[e,t]=w.useState("1"),[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null);if(w.useEffect(()=>{async function N(){try{o(!0),u(null);let _=sessionStorage.getItem("wraps-auth-token");if(_||(_=new URLSearchParams(window.location.search).get("token"),_&&sessionStorage.setItem("wraps-auth-token",_)),!_)throw new Error("Authentication token not found. Please use the URL provided by 'wraps console' command.");const C=Number.parseInt(e,10),A=Date.now()-C*24*60*60*1e3,M=Date.now(),R=await fetch(`/api/metrics?startTime=${A}&endTime=${M}&token=${_}`);if(!R.ok){let z="Failed to fetch email metrics";try{z=(await R.json()).error||z}catch{z=`${R.status}: ${R.statusText}`}throw new Error(z)}const D=await R.json();r(D)}catch(_){const C=_ instanceof Error?_.message:"Unknown error";u(C),console.error("Error fetching email metrics:",_)}finally{o(!1)}}N()},[e]),l)return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your email campaigns"})]}),c.jsx("div",{className:"mt-4 rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:l})]});if(i||!n)return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your email campaigns"})]}),c.jsx("div",{className:"mt-4 flex h-[400px] items-center justify-center text-muted-foreground",children:"Loading metrics..."})]});const d=n.metrics.sends.reduce((N,_)=>N+_.value,0)||0,h=n.metrics.deliveries.reduce((N,_)=>N+_.value,0)||0,v=n.metrics.bounces.reduce((N,_)=>N+_.value,0)||0,m=n.metrics.complaints.reduce((N,_)=>N+_.value,0)||0,g=n.metrics.opens.reduce((N,_)=>N+_.value,0)||0,b=n.metrics.clicks.reduce((N,_)=>N+_.value,0)||0,O=d>0?h/d*100:0,S=h>0?g/h*100:0,x=g>0?b/g*100:0,E=[{title:"Emails Sent",value:d.toLocaleString(),description:`${e==="1"?"Last 24 hours":`Last ${e} days`}`,icon:xl},{title:"Delivery Rate",value:`${O.toFixed(1)}%`,description:`${h.toLocaleString()} delivered`,icon:Zj},{title:"Open Rate",value:`${S.toFixed(1)}%`,description:`${g.toLocaleString()} opened`,icon:Dp},{title:"Click Rate",value:`${x.toFixed(1)}%`,description:`${b.toLocaleString()} clicked`,icon:zF}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your email campaigns"})]}),c.jsxs(ma,{onValueChange:t,value:e,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"1",children:"Last 24 hours"}),c.jsx(Fe,{value:"7",children:"Last 7 days"}),c.jsx(Fe,{value:"15",children:"Last 15 days"}),c.jsx(Fe,{value:"30",children:"Last 30 days"}),c.jsx(Fe,{value:"90",children:"Last 90 days"})]})]})]}),c.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:E.map(N=>c.jsxs(Te,{children:[c.jsxs(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[c.jsx(Le,{className:"font-medium text-sm",children:N.title}),c.jsx(N.icon,{className:"h-4 w-4 text-muted-foreground"})]}),c.jsxs($e,{children:[c.jsx("div",{className:"font-bold text-2xl",children:N.value}),c.jsx("p",{className:"text-muted-foreground text-xs",children:N.description})]})]},N.title))}),c.jsx(Age,{quota:n.quota}),c.jsx(_ge,{data:n.metrics}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Metrics Summary"}),c.jsx(We,{children:"Detailed breakdown of your email performance"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Total Emails Sent"}),c.jsx(qe,{variant:"outline",children:d.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Successfully Delivered"}),c.jsx(qe,{variant:"default",children:h.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Opened"}),c.jsx(qe,{variant:"default",children:g.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Clicked"}),c.jsx(qe,{variant:"default",children:b.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Bounced"}),c.jsx(qe,{variant:"destructive",children:v.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Complaints"}),c.jsx(qe,{variant:"destructive",children:m.toLocaleString()})]})]})]})]})}async function Tge(){const e=sessionStorage.getItem("wraps-auth-token");if(!e)throw new Error("Authentication token not found");const t=await fetch(`/api/settings?token=${e}`);if(!t.ok)throw new Error(`Failed to fetch settings: ${t.statusText}`);return await t.json()}const f8="wraps-dns-verification",Mge=1e3*60*60;function d8(){try{const e=localStorage.getItem(f8);return e?JSON.parse(e):{}}catch{return{}}}function Cp(e){try{localStorage.setItem(f8,JSON.stringify(e))}catch(t){console.error("Failed to save DNS verification cache:",t)}}function h8(e){return e?Date.now()-e.lastChecked<Mge:!1}async function U4(e,t){var i;console.log("[DNS Verify] verifyTrackingDomain called",{domain:e,expectedTarget:t});const n=d8(),r=`${e}->${t}`;if((i=n.trackingDomain)!=null&&i[r]&&h8(n.trackingDomain[r]))return console.log("[DNS Verify] Returning cached result"),n.trackingDomain[r];try{const l=`/api/settings/verify-tracking-domain?token=${sessionStorage.getItem("wraps-auth-token")}&domain=${encodeURIComponent(e)}&expectedTarget=${encodeURIComponent(t)}`;console.log("[DNS Verify] Fetching:",l);const u=await fetch(l);if(console.log("[DNS Verify] Response status:",u.status),!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const d=await u.json();console.log("[DNS Verify] Response data:",d);const h={verified:d.verified,lastChecked:Date.now(),error:d.error};return n.trackingDomain||(n.trackingDomain={}),n.trackingDomain[r]=h,Cp(n),h}catch(o){console.error("Tracking domain verification request failed:",o);const l={verified:!1,lastChecked:Date.now(),error:o instanceof Error?o.message:"Failed to verify"};return n.trackingDomain||(n.trackingDomain={}),n.trackingDomain[r]=l,Cp(n),l}}async function H4(e){var r;console.log("[DNS Verify] verifyDmarc called",{domain:e});const t=d8(),n=`_dmarc.${e}`;if((r=t.dmarc)!=null&&r[n]&&h8(t.dmarc[n]))return console.log("[DNS Verify] Returning cached DMARC result"),t.dmarc[n];try{const o=`/api/settings/verify-dmarc?token=${sessionStorage.getItem("wraps-auth-token")}&domain=${encodeURIComponent(e)}`;console.log("[DNS Verify] Fetching:",o);const l=await fetch(o);if(console.log("[DNS Verify] Response status:",l.status),!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);const u=await l.json();console.log("[DNS Verify] Response data:",u);const d={verified:u.verified,lastChecked:Date.now(),error:u.error};return t.dmarc||(t.dmarc={}),t.dmarc[n]=d,Cp(t),d}catch(i){console.error("DMARC verification request failed:",i);const o={verified:!1,lastChecked:Date.now(),error:i instanceof Error?i.message:"Failed to verify"};return t.dmarc||(t.dmarc={}),t.dmarc[n]=o,Cp(t),o}}function XE({status:e}){const t={SUCCESS:{icon:ao,label:"Verified",variant:"default",className:"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20"},PENDING:{icon:Qo,label:"Pending",variant:"secondary",className:"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20"},FAILED:{icon:d$,label:"Failed",variant:"destructive",className:"bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20"},TEMPORARY_FAILURE:{icon:cr,label:"Temporary Failure",variant:"secondary",className:"bg-orange-500/10 text-orange-700 dark:text-orange-400 border-orange-500/20"},NOT_STARTED:{icon:Qo,label:"Not Started",variant:"outline",className:"bg-gray-500/10 text-gray-700 dark:text-gray-400 border-gray-500/20"}},{icon:n,label:r,className:i}=t[e];return c.jsxs(qe,{className:i,variant:"outline",children:[c.jsx(n,{className:"mr-1 h-3 w-3"}),r]})}function tc({text:e}){const t=async()=>{await navigator.clipboard.writeText(e),Ot.success("Copied to clipboard",{description:"DNS record value copied successfully"})};return c.jsx(Ce,{onClick:t,size:"sm",variant:"ghost",children:c.jsx(Kj,{className:"h-3 w-3"})})}function Rge({identity:e}){const t=e==null?void 0:e.dkimAttributes,n=(t==null?void 0:t.status)==="SUCCESS",[r,i]=w.useState(!n);return t?c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:"DKIM Authentication"}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:[t.signingEnabled?"Enabled":"Disabled",t.signingKeyLength&&` · ${t.signingKeyLength}`]})]}),c.jsx(XE,{status:t.status})]}),t.tokens&&t.tokens.length>0&&c.jsxs(fs,{onOpenChange:i,open:r,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"h-auto w-full justify-between p-0",size:"sm",variant:"ghost",children:[c.jsx("p",{className:"font-medium text-sm",children:"DNS Records (CNAME)"}),r?c.jsx(ic,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"})]})}),c.jsx(hs,{className:"mt-2 space-y-2",children:t.tokens.map(o=>c.jsxs("div",{className:"rounded-md border bg-muted/50 p-3",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsxs("p",{className:"font-mono text-xs",children:[o,"._domainkey.",e.identityName]}),c.jsx(tc,{text:`${o}._domainkey.${e.identityName}`})]}),c.jsxs("p",{className:"font-mono text-muted-foreground text-xs",children:["CNAME → ",o,".dkim.amazonses.com"]})]},o))})]})]}):c.jsx("div",{className:"space-y-4",children:c.jsx("div",{className:"flex items-center justify-between",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:"DKIM Authentication"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Not configured"})]})})})}function Dge({identity:e}){const t=e==null?void 0:e.mailFromAttributes,n=(t==null?void 0:t.mailFromDomainStatus)==="SUCCESS",[r,i]=w.useState(!n);return c.jsx("div",{className:"space-y-4",children:t!=null&&t.mailFromDomain?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:"Mail-From Domain"}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:[t.mailFromDomain,t.behaviorOnMxFailure&&` · ${t.behaviorOnMxFailure==="USE_DEFAULT_VALUE"?"Fallback enabled":"Reject on failure"}`]})]}),t.mailFromDomainStatus&&c.jsx(XE,{status:t.mailFromDomainStatus})]}),c.jsxs(fs,{onOpenChange:i,open:r,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"h-auto w-full justify-between p-0",size:"sm",variant:"ghost",children:[c.jsx("p",{className:"font-medium text-sm",children:"DNS Record (MX)"}),r?c.jsx(ic,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"})]})}),c.jsx(hs,{className:"mt-2",children:c.jsx("div",{className:"rounded-md border bg-muted/50 p-3",children:c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"font-mono text-xs",children:["MX ",t.mailFromDomain]}),c.jsx(tc,{text:`10 feedback-smtp.${e==null?void 0:e.identityName.split(".")[0]}.amazonses.com`})]}),c.jsxs("p",{className:"font-mono text-muted-foreground text-xs",children:["Priority 10 → feedback-smtp.",e==null?void 0:e.identityName.split(".")[0],".amazonses.com"]})]})})})]})]}):c.jsx("div",{className:"flex items-center justify-between",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:"Mail-From Domain"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Using default amazonses.com domain"})]})})})}function Pge({identity:e}){const[t,n]=w.useState(null),[r,i]=w.useState(!1),[o,l]=w.useState(!(t!=null&&t.verified));w.useEffect(()=>{e!=null&&e.identityName&&H4(e.identityName).then(n)},[e==null?void 0:e.identityName]),w.useEffect(()=>{t&&l(!t.verified)},[t]);const u=async()=>{if(e!=null&&e.identityName){i(!0);try{const d=await H4(e.identityName);n(d),d.verified?Ot.success("DMARC record verified",{description:"DNS TXT record found and configured correctly"}):(console.error("DMARC verification failed:",d.error),Ot.error("Verification failed",{description:d.error||"DMARC record not found"}))}catch(d){console.error("DMARC verification error:",d),Ot.error("Verification error",{description:d instanceof Error?d.message:"Unknown error"})}finally{i(!1)}}};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:"DMARC Policy"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:t!=null&&t.verified?"Configured":"Recommended for better deliverability"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[(t==null?void 0:t.verified)&&c.jsxs(qe,{className:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400",variant:"outline",children:[c.jsx(ao,{className:"mr-1 h-3 w-3"}),"Verified by Wraps"]}),c.jsx(Ce,{className:"h-8 w-8 p-0",disabled:r,onClick:u,size:"sm",variant:"ghost",children:c.jsx(Bf,{className:`h-4 w-4 ${r?"animate-spin":""}`})})]})]}),c.jsxs(fs,{onOpenChange:l,open:o,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"h-auto w-full justify-between p-0",size:"sm",variant:"ghost",children:[c.jsx("p",{className:"font-medium text-sm",children:"DNS Record (TXT)"}),o?c.jsx(ic,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"})]})}),c.jsx(hs,{className:"mt-2",children:c.jsxs("div",{className:"rounded-md border bg-muted/50 p-3",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[c.jsxs("p",{className:"font-mono text-xs",children:["_dmarc.",(e==null?void 0:e.identityName)||"yourdomain.com"]}),c.jsx(tc,{text:`_dmarc.${(e==null?void 0:e.identityName)||"yourdomain.com"}`})]}),c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("p",{className:"font-mono text-muted-foreground text-xs",children:["v=DMARC1; p=quarantine; rua=mailto:dmarc@",(e==null?void 0:e.identityName)||"yourdomain.com"]}),c.jsx(tc,{text:`v=DMARC1; p=quarantine; rua=mailto:dmarc@${(e==null?void 0:e.identityName)||"yourdomain.com"}`})]})]})})]})]})}function kge({configSet:e,region:t,onRefresh:n}){const r=e==null?void 0:e.trackingOptions,[i,o]=w.useState(null),[l,u]=w.useState(!1),[d,h]=w.useState(!1),[v,m]=w.useState(""),[g,b]=w.useState(!1),[O,S]=w.useState(!(i!=null&&i.verified));w.useEffect(()=>{if(r!=null&&r.customRedirectDomain&&t){const _=`r.${t}.awstrack.me`;U4(r.customRedirectDomain,_).then(o)}},[r==null?void 0:r.customRedirectDomain,t]),w.useEffect(()=>{i&&S(!i.verified)},[i]);const x=async()=>{if(r!=null&&r.customRedirectDomain&&t){u(!0);try{const _=`r.${t}.awstrack.me`,C=await U4(r.customRedirectDomain,_);o(C),C.verified?Ot.success("Tracking domain verified",{description:"DNS records are configured correctly"}):(console.error("Tracking domain verification failed:",C.error),Ot.error("Verification failed",{description:C.error||"DNS records not found"}))}catch(_){console.error("Tracking domain verification error:",_),Ot.error("Verification error",{description:_ instanceof Error?_.message:"Unknown error"})}finally{u(!1)}}},E=()=>{m((r==null?void 0:r.customRedirectDomain)||""),h(!0)},N=async()=>{if(!v.trim()){Ot.error("Invalid domain",{description:"Please enter a valid domain name"});return}b(!0);try{const _=sessionStorage.getItem("wraps-auth-token"),C=await fetch(`/api/settings/config-set/tracking-domain?token=${_}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:v})});if(!C.ok){const A=await C.json();throw new Error(A.error||`Failed to update: ${C.statusText}`)}h(!1),Ot.success("Tracking domain updated",{description:"Don't forget to configure the DNS records"}),n&&await n()}catch(_){console.error("Failed to update tracking domain:",_),Ot.error("Failed to update tracking domain",{description:_ instanceof Error?_.message:"Unknown error"})}finally{b(!1)}};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Tracking Domain"}),c.jsx(We,{children:"Custom domain for open and click tracking links"})]}),c.jsx($e,{className:"space-y-4",children:r!=null&&r.customRedirectDomain?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"font-medium",children:r.customRedirectDomain}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Custom Tracking Domain"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[(i==null?void 0:i.verified)&&c.jsxs(qe,{className:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400",variant:"outline",children:[c.jsx(ao,{className:"mr-1 h-3 w-3"}),"Verified by Wraps"]}),c.jsx(qe,{variant:"outline",children:r.httpsPolicy==="REQUIRE"?"HTTPS Only":"HTTPS Optional"}),c.jsx(Ce,{className:"h-8 w-8 p-0",disabled:l,onClick:x,size:"sm",variant:"ghost",children:c.jsx(Bf,{className:`h-4 w-4 ${l?"animate-spin":""}`})}),c.jsx(Ce,{className:"h-8 w-8 p-0",onClick:E,size:"sm",variant:"ghost",children:c.jsx(aC,{className:"h-4 w-4"})})]})]}),c.jsxs(fs,{onOpenChange:S,open:O,children:[c.jsx(ds,{asChild:!0,children:c.jsxs(Ce,{className:"h-auto w-full justify-between p-0",size:"sm",variant:"ghost",children:[c.jsx("p",{className:"font-medium text-sm",children:"Required DNS Record (CNAME)"}),O?c.jsx(ic,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"})]})}),c.jsx(hs,{className:"mt-2",children:c.jsxs("div",{className:"rounded-md border bg-muted/50 p-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"font-mono text-xs",children:r.customRedirectDomain}),c.jsx(tc,{text:r.customRedirectDomain})]}),c.jsxs("div",{className:"mt-1 flex items-start justify-between gap-2",children:[c.jsxs("p",{className:"font-mono text-muted-foreground text-xs",children:["CNAME → r.",(e==null?void 0:e.name)||"region",".awstrack.me"]}),c.jsx(tc,{text:`r.${(e==null?void 0:e.name)||"region"}.awstrack.me`})]})]})})]})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx("p",{className:"text-muted-foreground text-sm",children:"No custom tracking domain configured. Using default awstrack.me domain."}),c.jsxs(Ce,{onClick:E,size:"sm",variant:"outline",children:[c.jsx(aC,{className:"mr-2 h-4 w-4"}),"Configure Tracking Domain"]})]})}),c.jsx(RO,{onOpenChange:h,open:d,children:c.jsxs(DO,{children:[c.jsxs(n3,{children:[c.jsx(a3,{children:"Update Tracking Domain"}),c.jsx(lQ,{children:"Enter the custom domain you want to use for email tracking links. You'll need to configure DNS records after saving."})]}),c.jsx("div",{className:"space-y-4 py-4",children:c.jsxs("div",{className:"space-y-2",children:[c.jsx(qo,{htmlFor:"domain",children:"Tracking Domain"}),c.jsx(oo,{disabled:g,id:"domain",onChange:_=>m(_.target.value),placeholder:"track.example.com",value:v}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Example: track.yourdomain.com or email.yourdomain.com"})]})}),c.jsxs(r3,{children:[c.jsx(Ce,{disabled:g,onClick:()=>h(!1),variant:"outline",children:"Cancel"}),c.jsx(Ce,{disabled:g,onClick:N,children:g?"Updating...":"Update Domain"})]})]})})]})}function $ge({configSet:e,onRefresh:t}){var v,m;const[n,r]=w.useState(!1),[i,o]=w.useState(!1),[l,u]=w.useState(!1);if(!e)return c.jsx(Te,{children:c.jsxs(Me,{children:[c.jsx(Le,{children:"Configuration Set"}),c.jsx(We,{children:"No configuration set found"})]})});const d=async()=>{var g;u(!0);try{const b=sessionStorage.getItem("wraps-auth-token"),O=!((g=e.sendingOptions)!=null&&g.sendingEnabled),S=await fetch(`/api/settings/config-set/sending?token=${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:O})});if(!S.ok)throw new Error(`Failed to update: ${S.statusText}`);r(!1),Ot.success(O?"Email sending enabled":"Email sending disabled"),t&&await t()}catch(b){console.error("Failed to toggle sending:",b),Ot.error("Failed to update setting",{description:b instanceof Error?b.message:"Unknown error"})}finally{u(!1)}},h=async()=>{var g;u(!0);try{const b=sessionStorage.getItem("wraps-auth-token"),O=!((g=e.reputationOptions)!=null&&g.reputationMetricsEnabled),S=await fetch(`/api/settings/config-set/reputation?token=${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:O})});if(!S.ok)throw new Error(`Failed to update: ${S.statusText}`);o(!1),Ot.success(O?"Reputation metrics enabled":"Reputation metrics disabled"),t&&await t()}catch(b){console.error("Failed to toggle reputation:",b),Ot.error("Failed to update setting",{description:b instanceof Error?b.message:"Unknown error"})}finally{u(!1)}};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Configuration Set"}),c.jsx(We,{children:"Email sending and tracking configuration"})]}),c.jsxs($e,{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:e.name}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Configuration Set Name"})]}),c.jsx(qt,{}),e.sendingOptions&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1 space-y-0.5",children:[c.jsx("p",{className:"font-medium text-sm",children:"Email Sending"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.sendingOptions.sendingEnabled?"Emails can be sent":"Email sending is disabled"})]}),c.jsx(Ce,{onClick:()=>r(!0),size:"sm",variant:e.sendingOptions.sendingEnabled?"destructive":"default",children:e.sendingOptions.sendingEnabled?"Disable":"Enable"})]}),c.jsx(Sm,{onOpenChange:r,open:n,children:c.jsxs(jm,{children:[c.jsxs(Om,{children:[c.jsx(_m,{children:e.sendingOptions.sendingEnabled?"Disable email sending?":"Enable email sending?"}),c.jsx(Nm,{children:e.sendingOptions.sendingEnabled?"All outgoing emails will be blocked until you re-enable sending. Emails in the queue will not be sent.":"This will allow emails to be sent through this configuration set. Make sure your domain is verified before enabling."})]}),c.jsxs(Em,{children:[c.jsx(Cm,{disabled:l,children:"Cancel"}),c.jsx(Am,{disabled:l,onClick:d,children:l?"Updating...":e.sendingOptions.sendingEnabled?"Disable sending":"Enable sending"})]})]})})]}),e.reputationOptions&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1 space-y-0.5",children:[c.jsx("p",{className:"font-medium text-sm",children:"Reputation Metrics"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.reputationOptions.reputationMetricsEnabled?"Tracking bounce and complaint rates":"Reputation tracking disabled"})]}),c.jsx(Ce,{onClick:()=>o(!0),size:"sm",variant:"outline",children:e.reputationOptions.reputationMetricsEnabled?"Disable":"Enable"})]}),c.jsx(Sm,{onOpenChange:o,open:i,children:c.jsxs(jm,{children:[c.jsxs(Om,{children:[c.jsx(_m,{children:e.reputationOptions.reputationMetricsEnabled?"Disable reputation metrics?":"Enable reputation metrics?"}),c.jsx(Nm,{children:e.reputationOptions.reputationMetricsEnabled?"You will stop collecting bounce and complaint rate data. Historical data will be preserved but no new metrics will be tracked.":"This will start tracking bounce and complaint rates for your sending domain. This helps monitor your email reputation and deliverability."})]}),c.jsxs(Em,{children:[c.jsx(Cm,{disabled:l,children:"Cancel"}),c.jsx(Am,{disabled:l,onClick:h,children:l?"Updating...":e.reputationOptions.reputationMetricsEnabled?"Disable metrics":"Enable metrics"})]})]})})]}),((v=e.deliveryOptions)==null?void 0:v.tlsPolicy)&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"font-medium text-sm",children:"TLS Encryption"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.deliveryOptions.tlsPolicy==="REQUIRE"?"Required for all connections":"Optional (opportunistic)"})]}),c.jsx(qe,{variant:"outline",children:e.deliveryOptions.tlsPolicy==="REQUIRE"?"Required":"Optional"})]}),e.suppressionOptions&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"font-medium text-sm",children:"Suppression List"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Automatically suppress emails to addresses that bounced or complained"})]}),e.suppressionOptions.suppressedReasons&&e.suppressionOptions.suppressedReasons.length>0?c.jsx("div",{className:"flex gap-2",children:e.suppressionOptions.suppressedReasons.map(g=>c.jsx(qe,{variant:"secondary",children:g},g))}):c.jsx("p",{className:"text-muted-foreground text-sm",children:"Not configured"})]}),((m=e.deliveryOptions)==null?void 0:m.sendingPoolName)&&c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"IP Pool"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.deliveryOptions.sendingPoolName})]})]})]})}function Ige(){var u,d;const[e,t]=w.useState(null),[n,r]=w.useState(!0),[i,o]=w.useState(null),l=w.useCallback(async()=>{try{r(!0);const h=await Tge();t(h),o(null)}catch(h){console.error("Failed to fetch email settings:",h),o(h instanceof Error?h.message:"Failed to load settings")}finally{r(!1)}},[]);return w.useEffect(()=>{l()},[l]),n?c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your email settings and preferences"})]}),c.jsxs("div",{className:"mt-6 grid gap-6 md:grid-cols-2",children:[c.jsxs(Te,{className:"md:row-span-2",children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-48"}),c.jsx(Re,{className:"mt-2 h-4 w-64"})]}),c.jsxs($e,{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Re,{className:"h-4 w-32"}),c.jsx(Re,{className:"h-4 w-24"})]}),c.jsx(Re,{className:"h-px w-full"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Re,{className:"h-4 w-40"}),c.jsx(Re,{className:"h-4 w-28"})]}),c.jsx(Re,{className:"h-px w-full"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Re,{className:"h-4 w-36"}),c.jsx(Re,{className:"h-4 w-32"})]}),c.jsx(Re,{className:"h-px w-full"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Re,{className:"h-4 w-32"}),c.jsx(Re,{className:"h-4 w-44"})]})]})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-48"}),c.jsx(Re,{className:"mt-2 h-4 w-64"})]}),c.jsx($e,{children:c.jsx(Re,{className:"h-20 w-full"})})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-48"}),c.jsx(Re,{className:"mt-2 h-4 w-64"})]}),c.jsx($e,{children:c.jsx(Re,{className:"h-20 w-full"})})]})]})]}):i?c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your email settings and preferences"})]}),c.jsxs(Un,{className:"mt-6",variant:"destructive",children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Error Loading Settings"}),c.jsx(Hn,{children:i})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"Email Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your email settings and preferences"})]}),c.jsxs("div",{className:"mt-6 grid gap-6 md:grid-cols-2",children:[c.jsxs(Te,{className:"md:row-span-2",children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Sending Domain"}),c.jsx(We,{children:"Email domain configuration and authentication"})]}),c.jsxs($e,{className:"space-y-6",children:[c.jsx("div",{className:"space-y-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"font-medium",children:(u=e==null?void 0:e.identity)==null?void 0:u.identityName}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Domain Identity"})]}),c.jsx(XE,{status:((d=e==null?void 0:e.identity)==null?void 0:d.verificationStatus)||"NOT_STARTED"})]})}),c.jsx(qt,{}),c.jsx(Rge,{identity:e==null?void 0:e.identity}),c.jsx(qt,{}),c.jsx(Dge,{identity:e==null?void 0:e.identity}),c.jsx(qt,{}),c.jsx(Pge,{identity:e==null?void 0:e.identity})]})]}),c.jsx($ge,{configSet:e==null?void 0:e.configurationSet,onRefresh:l}),c.jsx(kge,{configSet:e==null?void 0:e.configurationSet,onRefresh:l,region:e==null?void 0:e.region})]})]})}function F1(e){return e.name?`${e.name} <${e.address}>`:e.address}function Lge(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Gh({label:e,verdict:t}){if(!t)return null;const n=t==="PASS";return c.jsxs(qe,{className:n?"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20":"bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20",variant:"outline",children:[n?c.jsx(g$,{className:"mr-1 h-3 w-3"}):c.jsx(v$,{className:"mr-1 h-3 w-3"}),e,": ",t]})}function zge(){const{emailId:e}=Fj(),t=Sa(),[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null),[d,h]=w.useState(!1);return w.useEffect(()=>{async function v(){try{o(!0),u(null);const m=sessionStorage.getItem("wraps-auth-token");if(!m)throw new Error("Authentication token not found");const g=await fetch(`/api/inbound/${encodeURIComponent(e||"")}?token=${m}`);if(!g.ok){let O="Failed to fetch inbound email";try{O=(await g.json()).error||O}catch{O=`${g.status}: ${g.statusText}`}throw new Error(O)}const b=await g.json();r(b)}catch(m){const g=m instanceof Error?m.message:"Unknown error";u(g),console.error("Error fetching inbound email:",m)}finally{o(!1)}}e&&v()},[e]),i?c.jsx("div",{className:"flex h-[600px] items-center justify-center",children:c.jsx("div",{className:"text-muted-foreground",children:"Loading inbound email..."})}):l?c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/email?tab=receiving"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to emails"]}),c.jsx("div",{className:"rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:l})]}):n?c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"flex items-center gap-4",children:c.jsxs(Ce,{onClick:()=>t("/email?tab=receiving"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back"]})}),c.jsx(Te,{children:c.jsxs(Me,{className:"space-y-1.5",children:[c.jsx(Le,{className:"flex flex-row items-center gap-2 text-xl",children:c.jsx("span",{children:n.subject||"(no subject)"})}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx(Gh,{label:"Spam",verdict:n.spamVerdict}),c.jsx(Gh,{label:"Virus",verdict:n.virusVerdict}),n.headers["x-ses-dkim-verdict"]&&c.jsx(Gh,{label:"DKIM",verdict:n.headers["x-ses-dkim-verdict"]}),n.headers["x-ses-spf-verdict"]&&c.jsx(Gh,{label:"SPF",verdict:n.headers["x-ses-spf-verdict"]})]}),c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("code",{className:"min-w-0 truncate rounded bg-muted px-2 py-0.5 font-mono text-muted-foreground text-xs",children:n.messageId}),c.jsx(fa,{className:"h-6 w-6 shrink-0",size:"sm",value:n.messageId,variant:"ghost"})]}),c.jsxs("div",{className:"flex flex-col gap-3 pt-2 sm:flex-row sm:flex-wrap",children:[c.jsxs(Nl,{className:"w-full cursor-text! sm:w-auto sm:min-w-[518px]",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"From"})}),c.jsx(Cl,{className:"min-w-0 cursor-text! truncate font-mono text-sm",disabled:!0,readOnly:!0,value:F1(n.from)}),c.jsx(la,{align:"inline-end",children:c.jsx(fa,{className:"h-6 w-6",size:"sm",value:n.from.address,variant:"ghost"})})]}),c.jsxs(Nl,{className:"w-full cursor-text! sm:w-auto sm:min-w-[518px]",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"To"})}),c.jsx(Cl,{className:"min-w-0 cursor-text! truncate font-mono text-sm",disabled:!0,readOnly:!0,value:n.to.length>0?n.to.map(F1).join(", "):"(no recipients)"})]}),n.cc.length>0&&c.jsxs(Nl,{className:"w-full cursor-text! sm:w-auto sm:min-w-[518px]",children:[c.jsx(la,{align:"inline-start",children:c.jsx(Al,{children:"CC"})}),c.jsx(Cl,{className:"min-w-0 cursor-text! truncate font-mono text-sm",disabled:!0,readOnly:!0,value:n.cc.map(F1).join(", ")})]})]}),c.jsxs("div",{className:"text-muted-foreground text-sm",children:["Received: ",new Date(n.receivedAt).toLocaleString()]})]})}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Message Body"}),n.htmlTruncated&&c.jsx(We,{className:"text-amber-600",children:"HTML content was truncated due to size limits"})]}),c.jsx($e,{children:n.html?c.jsx("iframe",{className:"h-[500px] w-full rounded-md border bg-white",sandbox:"allow-same-origin",srcDoc:n.html,title:"Email content"}):n.text?c.jsx("pre",{className:"max-h-[500px] overflow-auto whitespace-pre-wrap rounded-md border bg-muted/50 p-4 font-mono text-sm",children:n.text}):c.jsx("div",{className:"text-muted-foreground text-sm",children:"No message body"})})]}),n.attachments.length>0&&c.jsxs(Te,{children:[c.jsx(Me,{children:c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(p$,{className:"h-4 w-4"}),"Attachments (",n.attachments.length,")"]})}),c.jsx($e,{children:c.jsx("div",{className:"space-y-2",children:n.attachments.map(v=>c.jsx("div",{className:"flex items-center justify-between rounded-md border p-3",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(h$,{className:"h-5 w-5 text-muted-foreground"}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-sm",children:v.filename}),c.jsxs("div",{className:"text-muted-foreground text-xs",children:[v.contentType," · ",Lge(v.size),v.contentDisposition==="inline"&&c.jsx(qe,{className:"ml-2 bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20",variant:"outline",children:"inline"})]})]})]})},v.id))})})]}),c.jsx(fs,{onOpenChange:h,open:d,children:c.jsxs(Te,{children:[c.jsx(ds,{asChild:!0,children:c.jsx(Me,{className:"cursor-pointer",children:c.jsxs(Le,{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Raw Headers"}),d?c.jsx(ic,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"})]})})}),c.jsx(hs,{children:c.jsx($e,{children:c.jsx("pre",{className:"max-h-[400px] overflow-auto whitespace-pre-wrap rounded-md border bg-muted/50 p-4 font-mono text-xs",children:Object.entries(n.headers).map(([v,m])=>`${v}: ${m}`).join(`
|
|
497
|
+
`)})})})]})})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/email?tab=receiving"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to emails"]}),c.jsx("div",{className:"rounded-md border p-4 text-muted-foreground text-sm",children:"Inbound email not found"})]})}const Bge={sent:Zi,delivered:ri,failed:or,queued:Qo,blocked:or,carrier_unreachable:tm,invalid:or,opted_out:or,ttl_expired:Qo},qge={sent:"text-blue-500",delivered:"text-green-500",failed:"text-red-500",queued:"text-gray-500",blocked:"text-orange-500",carrier_unreachable:"text-red-500",invalid:"text-red-500",opted_out:"text-yellow-500",ttl_expired:"text-gray-500"},Uge={delivered:"default",sent:"secondary",queued:"secondary",failed:"destructive",blocked:"destructive",invalid:"destructive",opted_out:"default"};function Hge(){const{id:e}=Fj(),t=Sa(),[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null);w.useEffect(()=>{async function m(){try{o(!0),u(null);const g=sessionStorage.getItem("wraps-auth-token");if(!g)throw new Error("Authentication token not found");const b=encodeURIComponent(e||""),O=await fetch(`/api/sms/${b}?token=${g}`);if(!O.ok){let E="Failed to fetch SMS details";try{E=(await O.json()).error||E}catch{E=`${O.status}: ${O.statusText}`}throw new Error(E)}const S=O.headers.get("content-type");if(!(S!=null&&S.includes("application/json"))){const E=await O.text();throw console.error("Non-JSON response:",E),new Error("Server returned non-JSON response")}const x=await O.json();r(x)}catch(g){const b=g instanceof Error?g.message:"Unknown error";u(b),console.error("Error fetching SMS details:",g)}finally{o(!1)}}e&&m()},[e]);const d=m=>new Date(m).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),h=m=>new Date(m).toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),v=m=>m.startsWith("+1")&&m.length===12?`(${m.slice(2,5)}) ${m.slice(5,8)}-${m.slice(8)}`:m;return i?c.jsx("div",{className:"flex h-[600px] items-center justify-center",children:c.jsx("div",{className:"text-muted-foreground",children:"Loading SMS details..."})}):l?c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/sms"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to messages"]}),c.jsx("div",{className:"rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:l})]}):n?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(Ce,{onClick:()=>t("/sms"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to messages"]}),c.jsx(qe,{variant:Uge[n.status],children:n.status.charAt(0).toUpperCase()+n.status.slice(1).replace("_"," ")})]}),c.jsxs(Te,{children:[c.jsx(Me,{children:c.jsx("div",{className:"flex items-start justify-between",children:c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs(Le,{className:"flex items-center gap-2 text-2xl",children:[c.jsx(Zi,{className:"h-6 w-6"}),"SMS Message"]}),c.jsx(We,{className:"font-mono text-xs",children:n.messageId})]})})}),c.jsx($e,{className:"space-y-4",children:c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-sm",children:"FROM"}),c.jsx("div",{className:"font-mono text-sm",children:v(n.from)})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-sm",children:"TO"}),c.jsx("div",{className:"font-mono text-sm",children:v(n.to)})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-sm",children:"SEGMENTS"}),c.jsx("div",{className:"font-mono text-sm",children:n.segments})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-muted-foreground text-sm",children:"ID"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-muted px-2 py-1 font-mono text-xs",children:n.id}),c.jsx(Ce,{className:"h-6 w-6",onClick:()=>navigator.clipboard.writeText(n.id),size:"icon",variant:"ghost",children:c.jsx("span",{className:"sr-only",children:"Copy ID"})})]})]})]})})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Message Content"}),c.jsx(We,{children:"The SMS message body"})]}),c.jsx($e,{children:c.jsx("div",{className:"rounded-md border bg-muted/50 p-4",children:c.jsx("p",{className:"whitespace-pre-wrap text-sm",children:n.body})})})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Message Events"}),c.jsx(We,{children:"Lifecycle of this message from send to delivery"})]}),c.jsx($e,{children:c.jsx("div",{className:"space-y-4",children:n.events.length===0?c.jsx("div",{className:"text-muted-foreground text-sm",children:"No events recorded yet"}):n.events.map((m,g)=>{const b=Bge[m.type]||Qo,O=g===n.events.length-1;return c.jsx("div",{children:c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("div",{className:`rounded-full border-2 border-background bg-muted p-2 ${qge[m.type]}`,children:c.jsx(b,{className:"h-4 w-4"})}),!O&&c.jsx("div",{className:"my-1 w-px flex-1 bg-border"})]}),c.jsxs("div",{className:"flex-1 pb-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"font-medium capitalize",children:m.type.replace("_"," ")}),c.jsx("div",{className:"text-muted-foreground text-sm",children:d(m.timestamp)})]}),c.jsx("div",{className:"text-muted-foreground text-sm",children:h(m.timestamp)}),m.metadata&&Object.keys(m.metadata).length>0&&c.jsx("div",{className:"mt-2 rounded-md border bg-muted/50 p-2 font-mono text-xs",children:c.jsx("pre",{className:"overflow-x-auto",children:JSON.stringify(m.metadata,null,2)})})]})]})},`${m.type}-${m.timestamp}`)})})})]})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Ce,{onClick:()=>t("/sms"),size:"sm",variant:"ghost",children:[c.jsx(Qa,{className:"mr-2 h-4 w-4"}),"Back to messages"]}),c.jsx("div",{className:"rounded-md border p-4 text-muted-foreground text-sm",children:"SMS message not found"})]})}const G1={delivered:{variant:"default",description:"Message was delivered to recipient's device",className:"bg-green-500/10 text-green-700 dark:text-green-400 hover:bg-green-500/20 border-green-500/20"},sent:{variant:"secondary",description:"Message was sent but delivery not yet confirmed",className:"bg-blue-500/10 text-blue-700 dark:text-blue-400 hover:bg-blue-500/20 border-blue-500/20"},queued:{variant:"secondary",description:"Message is queued for delivery",className:"bg-gray-500/10 text-gray-700 dark:text-gray-400 hover:bg-gray-500/20 border-gray-500/20"},failed:{variant:"destructive",description:"Message failed to deliver",className:"bg-red-500/10 text-red-700 dark:text-red-400 hover:bg-red-500/20 border-red-500/20"},blocked:{variant:"destructive",description:"Message was blocked by carrier or filter",className:"bg-orange-500/10 text-orange-700 dark:text-orange-400 hover:bg-orange-500/20 border-orange-500/20"},invalid:{variant:"destructive",description:"Invalid phone number or message format",className:"bg-red-500/10 text-red-700 dark:text-red-400 hover:bg-red-500/20 border-red-500/20"},opted_out:{variant:"default",description:"Recipient has opted out of receiving messages",className:"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 hover:bg-yellow-500/20 border-yellow-500/20"}};function Fge(){const e=Sa(),[t,n]=w.useState(""),[r,i]=w.useState("15"),[o,l]=w.useState("all"),[u,d]=w.useState([]),[h,v]=w.useState(!0),[m,g]=w.useState(null);w.useEffect(()=>{async function x(){try{v(!0),g(null);let E=sessionStorage.getItem("wraps-auth-token");if(E||(E=new URLSearchParams(window.location.search).get("token"),E&&sessionStorage.setItem("wraps-auth-token",E)),!E)throw new Error("Authentication token not found. Please use the URL provided by 'wraps console' command.");const N=Number.parseInt(r,10),_=Date.now()-N*24*60*60*1e3,C=Date.now(),A=await fetch(`/api/sms?startTime=${_}&endTime=${C}&limit=100&token=${E}`);if(!A.ok){let R="Failed to fetch SMS logs";try{R=(await A.json()).error||R}catch{R=`${A.status}: ${A.statusText}`}throw new Error(R)}const M=await A.json();d(M.logs.map(R=>({id:R.messageId,to:R.to,from:R.from,body:R.body,status:R.status,timestamp:R.sentAt,messageId:R.messageId,segments:R.segments})))}catch(E){const N=E instanceof Error?E.message:"Unknown error";g(N),console.error("Error fetching SMS logs:",E)}finally{v(!1)}}x()},[r]);const b=u.filter(x=>{if(t){const E=t.toLowerCase(),N=x.to.toLowerCase().includes(E),_=x.body.toLowerCase().includes(E);if(!(N||_))return!1}return!(o!=="all"&&x.status!==o)}),O=x=>{const E=new Date(x),_=Math.floor((new Date().getTime()-E.getTime())/(1e3*60*60*24));return _===0?"Today":_===1?"Yesterday":_<7?`${_} days ago`:E.toLocaleDateString()},S=x=>x.startsWith("+1")&&x.length===12?`(${x.slice(2,5)}) ${x.slice(5,8)}-${x.slice(8)}`:x;return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(Zi,{className:"h-5 w-5"}),"SMS Messages"]}),c.jsx(We,{children:"View and manage your SMS sending history"})]}),c.jsxs($e,{children:[m&&c.jsx("div",{className:"mb-4 rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:m}),c.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Pp,{className:"absolute top-2.5 left-2.5 h-4 w-4 text-muted-foreground"}),c.jsx(oo,{className:"pl-8",onChange:x=>n(x.target.value),placeholder:"Search by phone or message...",value:t})]}),c.jsxs(ma,{onValueChange:i,value:r,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"1",children:"Last 24 hours"}),c.jsx(Fe,{value:"7",children:"Last 7 days"}),c.jsx(Fe,{value:"15",children:"Last 15 days"}),c.jsx(Fe,{value:"30",children:"Last 30 days"}),c.jsx(Fe,{value:"90",children:"Last 90 days"})]})]}),c.jsxs(ma,{onValueChange:l,value:o,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"all",children:"All Statuses"}),c.jsx(Fe,{value:"delivered",children:"Delivered"}),c.jsx(Fe,{value:"sent",children:"Sent"}),c.jsx(Fe,{value:"queued",children:"Queued"}),c.jsx(Fe,{value:"failed",children:"Failed"}),c.jsx(Fe,{value:"blocked",children:"Blocked"}),c.jsx(Fe,{value:"opted_out",children:"Opted Out"})]})]}),c.jsx(Ce,{size:"icon",variant:"outline",children:c.jsx("span",{className:"sr-only",children:"Download"})})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(fv,{children:[c.jsx(dv,{children:c.jsxs(Fn,{children:[c.jsx(Pt,{children:"To"}),c.jsx(Pt,{children:"Status"}),c.jsx(Pt,{children:"Message"}),c.jsx(Pt,{children:"Sent"}),c.jsx(Pt,{className:"w-[50px]"})]})}),c.jsx(hv,{children:h?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:5,children:"Loading SMS logs..."})}):b.length===0?c.jsx(Fn,{children:c.jsx(mt,{className:"h-24 text-center text-muted-foreground",colSpan:5,children:"No SMS messages found"})}):b.map(x=>{var E,N,_;return c.jsxs(Fn,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>e(`/sms/${x.id}`),children:[c.jsx(mt,{className:"font-mono text-sm",children:S(x.to)}),c.jsx(mt,{children:c.jsxs(tv,{children:[c.jsx(nv,{asChild:!0,children:c.jsx(qe,{className:(E=G1[x.status])==null?void 0:E.className,variant:((N=G1[x.status])==null?void 0:N.variant)??"default",children:x.status.charAt(0).toUpperCase()+x.status.slice(1).replace("_"," ")})}),c.jsx(rv,{children:c.jsx("p",{children:((_=G1[x.status])==null?void 0:_.description)??"Unknown status"})})]})}),c.jsx(mt,{className:"max-w-[400px] truncate",children:x.body}),c.jsx(mt,{className:"text-muted-foreground",children:O(x.timestamp)}),c.jsx(mt,{children:c.jsx(Ce,{onClick:C=>{C.stopPropagation()},size:"icon",variant:"ghost",children:c.jsx("span",{className:"sr-only",children:"More options"})})})]},x.id)})})]})}),b.length>0&&!h&&c.jsx("div",{className:"mt-4 flex items-center justify-between text-muted-foreground text-sm",children:c.jsxs("div",{children:["Showing ",b.length," of ",u.length," messages"]})})]})]})}function Gge(){const[e,t]=w.useState("7"),[n,r]=w.useState(null),[i,o]=w.useState(!0),[l,u]=w.useState(null);if(w.useEffect(()=>{async function S(){try{o(!0),u(null);let x=sessionStorage.getItem("wraps-auth-token");if(x||(x=new URLSearchParams(window.location.search).get("token"),x&&sessionStorage.setItem("wraps-auth-token",x)),!x)throw new Error("Authentication token not found. Please use the URL provided by 'wraps console' command.");const E=Number.parseInt(e,10),N=Date.now()-E*24*60*60*1e3,_=Date.now(),C=await fetch(`/api/sms/metrics?startTime=${N}&endTime=${_}&token=${x}`);if(!C.ok){let M="Failed to fetch SMS metrics";try{M=(await C.json()).error||M}catch{M=`${C.status}: ${C.statusText}`}throw new Error(M)}const A=await C.json();r(A)}catch(x){const E=x instanceof Error?x.message:"Unknown error";u(E),console.error("Error fetching SMS metrics:",x)}finally{o(!1)}}S()},[e]),l)return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your SMS messaging"})]}),c.jsx("div",{className:"mt-4 rounded-md border border-destructive bg-destructive/10 p-4 text-destructive text-sm",children:l})]});if(i||!n)return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your SMS messaging"})]}),c.jsx("div",{className:"mt-4 flex h-[400px] items-center justify-center text-muted-foreground",children:"Loading metrics..."})]});const d=n.metrics.sends.reduce((S,x)=>S+x.value,0)||0,h=n.metrics.deliveries.reduce((S,x)=>S+x.value,0)||0,v=n.metrics.failures.reduce((S,x)=>S+x.value,0)||0,m=n.metrics.optOuts.reduce((S,x)=>S+x.value,0)||0,g=d>0?h/d*100:0,b=d>0?v/d*100:0,O=[{title:"Messages Sent",value:d.toLocaleString(),description:`${e==="1"?"Last 24 hours":`Last ${e} days`}`,icon:Zi},{title:"Delivery Rate",value:`${g.toFixed(1)}%`,description:`${h.toLocaleString()} delivered`,icon:Zj},{title:"Failure Rate",value:`${b.toFixed(1)}%`,description:`${v.toLocaleString()} failed`,icon:Dp},{title:"Opt Outs",value:m.toLocaleString(),description:"Recipients unsubscribed",icon:tm}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Metrics"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"View detailed metrics and analytics for your SMS messaging"})]}),c.jsxs(ma,{onValueChange:t,value:e,children:[c.jsx(va,{className:"w-[180px]",children:c.jsx(pa,{})}),c.jsxs(ga,{children:[c.jsx(Fe,{value:"1",children:"Last 24 hours"}),c.jsx(Fe,{value:"7",children:"Last 7 days"}),c.jsx(Fe,{value:"15",children:"Last 15 days"}),c.jsx(Fe,{value:"30",children:"Last 30 days"}),c.jsx(Fe,{value:"90",children:"Last 90 days"})]})]})]}),c.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:O.map(S=>c.jsxs(Te,{children:[c.jsxs(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[c.jsx(Le,{className:"font-medium text-sm",children:S.title}),c.jsx(S.icon,{className:"h-4 w-4 text-muted-foreground"})]}),c.jsxs($e,{children:[c.jsx("div",{className:"font-bold text-2xl",children:S.value}),c.jsx("p",{className:"text-muted-foreground text-xs",children:S.description})]})]},S.title))}),n.phoneNumber&&c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Phone Number"}),c.jsx(We,{children:"Your SMS sending number"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Number"}),c.jsx("span",{className:"font-mono text-sm",children:n.phoneNumber.number})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Type"}),c.jsx(qe,{variant:"outline",children:n.phoneNumber.type})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Status"}),c.jsx(qe,{variant:n.phoneNumber.status==="ACTIVE"?"default":"secondary",children:n.phoneNumber.status})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Throughput"}),c.jsx("span",{className:"text-muted-foreground text-sm",children:n.phoneNumber.throughput})]})]})]}),n.quota&&c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Spend Limits"}),c.jsx(We,{children:"Your AWS SMS spending limits"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Monthly Spend"}),c.jsxs("span",{className:"font-medium",children:["$",n.quota.spentThisMonth.toFixed(2)," / $",n.quota.spendLimitMonthly.toFixed(2)]})]}),c.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:c.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${Math.min(n.quota.spentThisMonth/n.quota.spendLimitMonthly*100,100)}%`}})})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Daily Limit"}),c.jsxs("span",{className:"text-muted-foreground text-sm",children:["$",n.quota.spendLimitDaily.toFixed(2)]})]})]})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Metrics Summary"}),c.jsx(We,{children:"Detailed breakdown of your SMS performance"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Total Messages Sent"}),c.jsx(qe,{variant:"outline",children:d.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Successfully Delivered"}),c.jsx(qe,{variant:"default",children:h.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Failed"}),c.jsx(qe,{variant:"destructive",children:v.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm",children:"Opt Outs"}),c.jsx(qe,{variant:"secondary",children:m.toLocaleString()})]})]})]})]})}function F4({status:e}){const t=e==="ACTIVE"||e==="SUCCESS";return c.jsxs(qe,{className:t?"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400":"border-yellow-500/20 bg-yellow-500/10 text-yellow-700 dark:text-yellow-400",variant:"outline",children:[t?c.jsx(ao,{className:"mr-1 h-3 w-3"}):c.jsx(cr,{className:"mr-1 h-3 w-3"}),e]})}function Vge({phoneNumber:e}){if(!e)return c.jsx(Te,{children:c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(tm,{className:"h-5 w-5"}),"Phone Number"]}),c.jsx(We,{children:"No phone number configured"})]})});const t=r=>r.startsWith("+1")&&r.length===12?`(${r.slice(2,5)}) ${r.slice(5,8)}-${r.slice(8)}`:r,n=r=>{switch(r){case"simulator":return"Simulator";case"toll-free":return"Toll-Free";case"10dlc":return"10DLC";case"short-code":return"Short Code";default:return r}};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(tm,{className:"h-5 w-5"}),"Phone Number"]}),c.jsx(We,{children:"Your SMS sending number"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium font-mono text-lg",children:t(e.number)}),c.jsx("p",{className:"text-muted-foreground text-sm",children:n(e.type)})]}),c.jsx(F4,{status:e.status})]}),e.registrationStatus&&c.jsxs(c.Fragment,{children:[c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Registration Status"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.type==="toll-free"?"Toll-free verification":"Campaign registration"})]}),c.jsx(F4,{status:e.registrationStatus})]})]}),e.capabilities.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(qt,{}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"font-medium text-sm",children:"Capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:e.capabilities.map(r=>c.jsx(qe,{variant:"secondary",children:r},r))})]})]}),e.monthlyLeasingPrice&&c.jsxs(c.Fragment,{children:[c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Monthly Cost"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Phone number lease"})]}),c.jsxs("span",{className:"font-mono text-sm",children:["$",e.monthlyLeasingPrice,"/mo"]})]})]}),e.type==="simulator"&&c.jsxs(Un,{children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Simulator Mode"}),c.jsx(Hn,{children:"This number is for testing only. Messages are simulated and not actually sent. Upgrade to a toll-free number for production use."})]}),e.type==="toll-free"&&e.registrationStatus!=="VERIFIED"&&c.jsxs(Un,{children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Registration Required"}),c.jsxs(Hn,{children:["Toll-free numbers require registration before they can send messages. Run ",c.jsx("code",{children:"wraps sms register"})," to complete registration."]})]})]})]})}function Yge({protectConfig:e}){return e!=null&&e.enabled?c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(nm,{className:"h-5 w-5"}),"Fraud Protection"]}),c.jsx(We,{children:"Country restrictions and AIT filtering"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Status"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Protect configuration active"})]}),c.jsxs(qe,{className:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400",variant:"outline",children:[c.jsx(ao,{className:"mr-1 h-3 w-3"}),"Enabled"]})]}),c.jsx(qt,{}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Vu,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("p",{className:"font-medium text-sm",children:"Allowed Countries"})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:e.allowedCountries.map(t=>c.jsx(qe,{variant:"secondary",children:t},t))}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Messages can only be sent to these countries. All others are blocked."})]}),c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"AIT Filtering"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.aitFiltering?"Enabled - adds per-message cost":"Disabled - no extra cost"})]}),c.jsx(qe,{variant:e.aitFiltering?"default":"secondary",children:e.aitFiltering?"Enabled":"Disabled"})]})]})]}):c.jsx(Te,{children:c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(nm,{className:"h-5 w-5"}),"Fraud Protection"]}),c.jsx(We,{children:"Not configured"})]})})}function Wge({configSet:e,onRefresh:t}){const[n,r]=w.useState(!1),[i,o]=w.useState(!1);if(!e)return c.jsx(Te,{children:c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(Zi,{className:"h-5 w-5"}),"Configuration Set"]}),c.jsx(We,{children:"No configuration set found"})]})});const l=async()=>{o(!0);try{const u=sessionStorage.getItem("wraps-auth-token"),d=!e.sendingEnabled,h=await fetch(`/api/sms/settings/sending?token=${u}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:d})});if(!h.ok)throw new Error(`Failed to update: ${h.statusText}`);r(!1),Ot.success(d?"SMS sending enabled":"SMS sending disabled"),t&&await t()}catch(u){console.error("Failed to toggle sending:",u),Ot.error("Failed to update setting",{description:u instanceof Error?u.message:"Unknown error"})}finally{o(!1)}};return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsxs(Le,{className:"flex items-center gap-2",children:[c.jsx(Zi,{className:"h-5 w-5"}),"Configuration Set"]}),c.jsx(We,{children:"SMS sending configuration"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium",children:e.name}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Configuration Set Name"})]}),c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1 space-y-0.5",children:[c.jsx("p",{className:"font-medium text-sm",children:"SMS Sending"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.sendingEnabled?"Messages can be sent":"Message sending is disabled"})]}),c.jsx(Ce,{onClick:()=>r(!0),size:"sm",variant:e.sendingEnabled?"destructive":"default",children:e.sendingEnabled?"Disable":"Enable"})]}),c.jsx(Sm,{onOpenChange:r,open:n,children:c.jsxs(jm,{children:[c.jsxs(Om,{children:[c.jsx(_m,{children:e.sendingEnabled?"Disable SMS sending?":"Enable SMS sending?"}),c.jsx(Nm,{children:e.sendingEnabled?"All outgoing SMS messages will be blocked until you re-enable sending.":"This will allow SMS messages to be sent through this configuration set."})]}),c.jsxs(Em,{children:[c.jsx(Cm,{disabled:i,children:"Cancel"}),c.jsx(Am,{disabled:i,onClick:l,children:i?"Updating...":e.sendingEnabled?"Disable sending":"Enable sending"})]})]})})]})]})}function Kge({eventTracking:e}){return c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Le,{children:"Event Tracking"}),c.jsx(We,{children:"Message history and event storage"})]}),c.jsxs($e,{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Event Tracking"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e!=null&&e.enabled?"Tracking delivery events":"Event tracking disabled"})]}),c.jsx(qe,{variant:e!=null&&e.enabled?"default":"secondary",children:e!=null&&e.enabled?"Enabled":"Disabled"})]}),(e==null?void 0:e.enabled)&&c.jsxs(c.Fragment,{children:[c.jsx(qt,{}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Message History"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:e.dynamoDBHistory?"Stored in DynamoDB":"Not stored"})]}),c.jsx(qe,{variant:e.dynamoDBHistory?"default":"secondary",children:e.dynamoDBHistory?"Enabled":"Disabled"})]}),e.archiveRetention&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:"Retention Period"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"How long message history is kept"})]}),c.jsx(qe,{variant:"outline",children:e.archiveRetention})]})]})]})]})}function Xge(){const[e,t]=w.useState(null),[n,r]=w.useState(!0),[i,o]=w.useState(null),l=w.useCallback(async()=>{try{r(!0);const u=sessionStorage.getItem("wraps-auth-token");if(!u)throw new Error("Authentication token not found");const d=await fetch(`/api/sms/settings?token=${u}`);if(!d.ok)throw new Error(`Failed to fetch settings: ${d.statusText}`);const h=await d.json();t(h),o(null)}catch(u){console.error("Failed to fetch SMS settings:",u),o(u instanceof Error?u.message:"Failed to load settings")}finally{r(!1)}},[]);return w.useEffect(()=>{l()},[l]),n?c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your SMS settings and preferences"})]}),c.jsxs("div",{className:"mt-6 grid gap-6 md:grid-cols-2",children:[c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-48"}),c.jsx(Re,{className:"mt-2 h-4 w-64"})]}),c.jsx($e,{children:c.jsx(Re,{className:"h-20 w-full"})})]}),c.jsxs(Te,{children:[c.jsxs(Me,{children:[c.jsx(Re,{className:"h-6 w-48"}),c.jsx(Re,{className:"mt-2 h-4 w-64"})]}),c.jsx($e,{children:c.jsx(Re,{className:"h-20 w-full"})})]})]})]}):i?c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your SMS settings and preferences"})]}),c.jsxs(Un,{className:"mt-6",variant:"destructive",children:[c.jsx(cr,{className:"h-4 w-4"}),c.jsx(to,{children:"Error Loading Settings"}),c.jsx(Hn,{children:i})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-3xl tracking-tight",children:"SMS Settings"}),c.jsx("p",{className:"mt-2 text-muted-foreground",children:"Configure your SMS settings and preferences"})]}),c.jsxs("div",{className:"mt-6 grid gap-6 md:grid-cols-2",children:[c.jsx(Vge,{phoneNumber:e==null?void 0:e.phoneNumber}),c.jsx(Wge,{configSet:e==null?void 0:e.configurationSet,onRefresh:l}),c.jsx(Yge,{protectConfig:e==null?void 0:e.protectConfiguration}),c.jsx(Kge,{eventTracking:e==null?void 0:e.eventTracking})]})]})}function Qge({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[i,o]=w.useState(()=>localStorage.getItem(n)||t);w.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),i==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(d),u.style.colorScheme=d;return}u.classList.add(i),u.style.colorScheme=i},[i]);const l={theme:i,setTheme:u=>{localStorage.setItem(n,u),o(u)}};return c.jsx(WI.Provider,{...r,value:l,children:e})}function Zge({...e}){return c.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Jge({className:e,...t}){return c.jsx("ol",{className:me("flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",e),"data-slot":"breadcrumb-list",...t})}function eye({className:e,...t}){return c.jsx("li",{className:me("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...t})}function tye({className:e,...t}){return c.jsx("span",{"aria-current":"page","aria-disabled":"true",className:me("font-normal text-foreground",e),"data-slot":"breadcrumb-page",role:"link",...t})}var nye=(e,t,n,r,i,o,l,u)=>{let d=document.documentElement,h=["light","dark"];function v(b){(Array.isArray(e)?e:[e]).forEach(O=>{let S=O==="class",x=S&&o?i.map(E=>o[E]||E):i;S?(d.classList.remove(...x),d.classList.add(o&&o[b]?o[b]:b)):d.setAttribute(O,b)}),m(b)}function m(b){u&&h.includes(b)&&(d.style.colorScheme=b)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)v(r);else try{let b=localStorage.getItem(t)||n,O=l&&b==="system"?g():b;v(O)}catch{}},rye=w.createContext(void 0),aye={setTheme:e=>{},themes:[]},iye=()=>{var e;return(e=w.useContext(rye))!=null?e:aye};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:l,themes:u,nonce:d,scriptProps:h})=>{let v=JSON.stringify([n,t,o,e,u,l,r,i]).slice(1,-1);return w.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${nye.toString()})(${v})`}})});const oye=({...e})=>{const{theme:t="system"}=iye();return c.jsx(HK,{className:"toaster group",icons:{success:c.jsx(ao,{className:"size-4"}),info:c.jsx(TF,{className:"size-4"}),warning:c.jsx(LF,{className:"size-4"}),error:c.jsx(DF,{className:"size-4"}),loading:c.jsx(Va,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},theme:t,...e})};function sye(){const e=Zr(),[t,n]=w.useState(!1);w.useEffect(()=>{let i=sessionStorage.getItem("wraps-auth-token");i||(i=new URLSearchParams(window.location.search).get("token"),i&&sessionStorage.setItem("wraps-auth-token",i)),n(!0)},[]),w.useEffect(()=>{document.cookie="sidebar_state=; path=/; max-age=0"},[]);const r=()=>{if(e.pathname.startsWith("/email/inbound/"))return"Inbound Email Details";if(e.pathname.startsWith("/email/")&&e.pathname!=="/email/metrics"&&e.pathname!=="/email/settings")return"Email Details";if(e.pathname.startsWith("/sms/")&&e.pathname!=="/sms/metrics"&&e.pathname!=="/sms/settings")return"SMS Details";if(e.pathname.startsWith("/cdn/")&&e.pathname!=="/cdn/metrics"&&e.pathname!=="/cdn/settings")return"File Details";switch(e.pathname){case"/":case"/email":return"Emails";case"/email/metrics":return"Email Metrics";case"/email/settings":return"Email Settings";case"/sms":return"SMS Messages";case"/sms/metrics":return"SMS Metrics";case"/sms/settings":return"SMS Settings";case"/cdn":return"CDN";case"/cdn/metrics":return"CDN Metrics";case"/cdn/settings":return"CDN Settings";default:return"Emails"}};return c.jsxs(HI,{defaultOpen:!1,children:[c.jsx(vK,{}),c.jsxs(GI,{children:[c.jsxs("header",{className:"sticky top-0 flex shrink-0 items-center gap-2 border-b bg-background p-4",children:[c.jsx(FI,{className:"-ml-1"}),c.jsx(qt,{className:"mr-2 data-[orientation=vertical]:h-4",orientation:"vertical"}),c.jsx(Zge,{children:c.jsx(Jge,{children:c.jsx(eye,{children:c.jsx(tye,{children:r()})})})})]}),c.jsx("div",{className:"flex flex-1 flex-col gap-6 p-6",children:t?c.jsxs(PH,{children:[c.jsx(Bn,{element:c.jsx(RH,{replace:!0,to:"/email"}),path:"/"}),c.jsx(Bn,{element:c.jsx(Ege,{}),path:"/email"}),c.jsx(Bn,{element:c.jsx(zge,{}),path:"/email/inbound/:emailId"}),c.jsx(Bn,{element:c.jsx(Sge,{}),path:"/email/:id"}),c.jsx(Bn,{element:c.jsx(Cge,{}),path:"/email/metrics"}),c.jsx(Bn,{element:c.jsx(Ige,{}),path:"/email/settings"}),c.jsx(Bn,{element:c.jsx(Fge,{}),path:"/sms"}),c.jsx(Bn,{element:c.jsx(Hge,{}),path:"/sms/:id"}),c.jsx(Bn,{element:c.jsx(Gge,{}),path:"/sms/metrics"}),c.jsx(Bn,{element:c.jsx(Xge,{}),path:"/sms/settings"}),c.jsx(Bn,{element:c.jsx(nee,{}),path:"/cdn"}),c.jsx(Bn,{element:c.jsx(age,{}),path:"/cdn/metrics"}),c.jsx(Bn,{element:c.jsx(uge,{}),path:"/cdn/settings"})]}):c.jsx("div",{className:"flex items-center justify-center p-8",children:c.jsx("div",{className:"text-muted-foreground",children:"Loading..."})})})]})]})}function lye(){return c.jsx(Qge,{defaultTheme:"system",storageKey:"console-ui-theme",children:c.jsxs(iF,{children:[c.jsx(sye,{}),c.jsx(oye,{})]})})}$U.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(lye,{})}));
|