░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
lon105.truehost.cloud
LOCATION:
/home/ilrtztmy/.trash/assets
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: index-BrpJpVUN.js
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function ae(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function oe(e,t){re++,ne[re]=e.current,e.current=t}var se=ie(null),ce=ie(null),le=ie(null),ue=ie(null);function de(e,t){switch(oe(le,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(se),oe(se,e)}function fe(){ae(se),ae(ce),ae(le)}function pe(e){e.memoizedState!==null&&oe(ue,e);var t=se.current,n=Zd(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function me(e){ce.current===e&&(ae(se),ae(ce)),ue.current===e&&(ae(ue),sp._currentValue=te)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(` at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` `+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` `),l=s.split(` `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function ot(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[ct])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=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]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jt=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 Yt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Jt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Xt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Yt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Yt(e,o,t[o])}function Zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Qt=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`]]),$t=/^[\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 en(e){return $t.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function tn(){}var nn=null;function rn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var an=null,on=null;function sn(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(an!==null||on!==null)&&(ju(),an&&(t=an,e=on,on=an=null,sn(t),e)))for(t=0;t<e.length;t++)sn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return gn=i.slice(e,1<r?1-r:void 0)}function vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yn(){return!0}function bn(){return!1}function xn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?yn:bn,this.isPropagationStopped=bn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=m({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=m({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(m({},kn,{dataTransfer:0})),Mn=xn(m({},wn,{relatedTarget:0})),Nn=xn(m({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(m({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(m({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={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`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(m({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(m({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(m({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(m({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(m({},kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=xn(m({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={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 or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){an?on?on.push(r):on=[r]:an=r,t=Fd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Dd(e,0)}function dr(e){if(Lt(yt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(dn){var mr;if(dn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,rn(e)),ln(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Fd(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};dn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`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(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),wt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function L(e,t,n,r){return new li(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=L(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=L(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=L(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=L(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=L(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=L(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=L(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=L(6,e,null,t),e.lanes=n,e}function gi(e){var t=L(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=L(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-ze(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Gi(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Ui(e){if(e!==Pi)return!1;if(!Ii)return Hi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Qd(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=yf(e)}else t===27?(t=Fi,sf(e.type)?(e=vf,vf=null,Fi=e):Fi=t):Fi=Pi?_f(e.stateNode.nextSibling):null;return!0}function R(){Fi=Pi=null,Ii=!1}function Wi(){var e=Li;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Li=null),e}function Gi(e){Li===null?Li=[e]:Li.push(e)}var Ki=ie(null),qi=null,Ji=null;function Yi(e,t,n){oe(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,ae(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function $i(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ia(qi,e)}function ra(e,t){return qi===null&&ta(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(i(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},z=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new aa,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&z(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=yd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=F.S;F.S=function(e,t){du=De(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=ie(null);function ya(){var e=va.current;return e===null?Kl.pooledCache:e}function ba(e,t){t===null?oe(va,va.current):oe(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tn,tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(tn,tn);else{if(e=Kl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function La(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Fa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(ee(t)||M(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,ra(e,t),n);Ia(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Oa(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,ra(e,n),r);Ia(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Oa(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,ra(t,r),i);Ia(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ii&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ii&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ii&&ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ii&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ii&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ii&&ki(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Pa(o),c);if(o.$$typeof===C)return b(e,r,ra(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=L(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Gl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Jl&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ba=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=ie(null),$a=ie(0);function eo(e,t){e=eu,oe($a,e),oe(Qa,t),eu=e|t.baseLanes}function to(){oe($a,eu),oe(Qa,Qa.current)}function no(){eu=$a.current,ae(Qa),ae($a)}var ro=ie(null),io=null;function ao(e){var t=e.alternate;oe(uo,uo.current&1),oe(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){oe(uo,uo.current),oe(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(oe(uo,uo.current),oe(ro,e),io===null&&(io=e)):co(e)}function co(){oe(uo,uo.current),oe(ro,ro.current)}function lo(e){ae(ro),io===e&&(io=null),ae(uo)}var uo=ie(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){F.H=Hs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ea(e)&&(sc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return na(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),mo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(Jl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,mo.lanes|=p,nu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,mo.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(sc=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=mo,a=Po(),o=Ii;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Kl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Jo(e){var t=ai(e,2);t!==null&&Eu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Ii){var n=Kl.formState;if(n!==null){a:{var r=mo;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=_f(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(mo.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Gl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||po&1073741824&&!(Jl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),mo.lanes|=e,nu|=e,n)}function Ts(e,t,n,r){return wr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(Jl&261930)?(sc=!0,e.memoizedState=n):(e=Tu(),mo.lanes|=e,nu|=e,t):(e=ws(e,n,r),wr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Rs(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ga(c,r),wu(e)):Ls(e,t,r,wu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,te,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},wu())}function js(){return na(sp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(Eu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ii(e,t,n,r),n!==null&&(Eu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,wu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),Kl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Eu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Eu(t,e,2)}function zs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Hs={readContext:na,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:na,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Ii){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Kl===null)throw Error(i(349));Jl&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Kl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Gl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Eu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Eu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(Eu(t,e,n),Ga(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){Qr(e)}function Qs(e){console.error(e)}function $s(e){Qr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ua(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Lu():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),td(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),td(e,r,a)),!1}throw Error(i(435,n.tag))}return td(e,r,a),Lu(),!1}if(Ii)return t=ro.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Gi(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=nc(e.stateNode,r,a),Ka(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Gi(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ka(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ta(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ra(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(oo(t),(e=Fi)?(e=pf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||$i(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Kl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Eu(r,e,s),oc;Lu(),t=gc(e,t,n)}else e=o.treeContext,Fi=_f(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=hc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ta(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=na(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ba||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ha(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=na(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ba||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return R(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:xa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(a?ao(t):co(t),(e=Fi)?(e=pf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(ao(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||$i(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Kl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Eu(s,e,r),oc;mf(c)||Lu(),t=kc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=_f(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=L(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ra(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,oe(uo,o),cc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Yi(t,sa,e.memoizedState.cache),R();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(uo,uo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Yi(t,sa,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,sa,r),r!==o.cache&&Qi(t,[sa],n,!0),Ja(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Gi(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=_f(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(R(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Rf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=Yd(le.current).createElement(n),r[ct]=t,r[lt]=e,Wd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=Rf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&Ii&&(r=t.stateNode=xf(t.type,t.pendingProps,le.current),Pi=t,Ri=!0,a=Fi,sf(t.type)?(vf=a,Fi=_f(r.firstChild)):Fi=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((a=r=Fi)&&(r=df(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=_f(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),sp._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=ff(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return Ec(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ta(t),a=na(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ta(t),r=na(sa),e===null?(a=ya(),a===null&&(a=Kl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Yi(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Yi(t,sa,r),r!==a.cache&&Qi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Yi(t,sa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(Pu())e.flags|=8192;else throw ka=Ta,Ca}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,ou|=t)}function Vc(e,t){if(!Ii)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Uc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(sa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=se.current,Ui(t)?Vi(t,e):(e=xf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=se.current,Ui(t))Vi(t,o);else{var s=Yd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Bi(t,!0)}else e=Yd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Hc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else R(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else R(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return fe(),e===null&&jd(t.stateNode.containerInfo),Hc(t),null;case 10:return Xi(t.type),Hc(t),null;case 19:if(ae(uo),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return oe(uo,uo.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>fu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Hc(t),null}else 2*De()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=uo.current,oe(uo,a?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(sa),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(sa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));R()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));R()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(uo),null;case 4:return fe(),null;case 10:return Xi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&ae(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(sa),null;case 25:return null;default:return null}}function Gc(e,t){switch(Mi(t),t.tag){case 3:Xi(sa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:ae(uo);break;case 10:Xi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&ae(va);break;case 24:Xi(sa)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){ed(e,e.return,t)}}}function Yc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;W(r,e.type,n,t),r[lt]=t}catch(t){ed(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[ct]=e,t[lt]=n}catch(t){ed(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,qd=gp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ed(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&Kc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ed(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ed(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(El(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Za(e,t)}catch(e){ed(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:El(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=id.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Ol(e,n,(n.subtreeFlags&8772)!=0):El(e,n),al=i,ol=a}break;case 30:break;default:El(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pl=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;sf(n.type)&&(pl=n.stateNode,ml=!1),hl(e,t,n),Sf(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,hl(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){ed(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){ed(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):cf(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,hl(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),hl(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,hl(e,t,n),ol=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){ed(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){ed(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=H.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(i(160));gl(o,s,a),pl=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Sl;if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Xf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Zf(a,e.type,e.stateNode);else e.stateNode=Gf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(a,e.type,e.stateNode):Gf(a,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{qt(a,``)}catch(t){ed(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ed(e,e.return,t)}}break;case 3:if(Yf=null,a=Sl,Sl=Tf(t.containerInfo),xl(t,e),Sl=a,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){ed(e,e.return,t)}sl&&(sl=!1,Tl(e));break;case 4:r=Sl,Sl=Tf(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,xl(t,e),ol=d,al=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ed(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ed(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){ed(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(qt(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){ed(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),Dl(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),Dl(t);break;case 27:Sf(t.stateNode);case 26:case 5:Zc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Ol(i,a,n),Kc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ed(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Xa(c[i],s)}catch(e){ed(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Xc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ml(e,t,n,r),t=t.sibling}function Ml(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&Kc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){jl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ed(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Nl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?jl(e,t,n,r):Pl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Nl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Nl(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Nl(a,o,s,c,i)):u._visibility&2?Nl(a,o,s,c,i):Pl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Nl(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Nl(a,o,s,c,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Pl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Pl(n,r),i&2048&&Al(r.alternate,r);break;default:Pl(n,r)}t=t.sibling}}var Fl=8192;function Il(e,t,n){if(e.subtreeFlags&Fl)for(e=e.child;e!==null;)Ll(e,t,n),e=e.sibling}function Ll(e,t,n){switch(e.tag){case 26:Il(e,t,n),e.flags&Fl&&e.memoizedState!==null&&ep(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,n);break;case 3:case 4:var r=Sl;Sl=Tf(e.stateNode.containerInfo),Il(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Fl,Fl=16777216,Il(e,t,n),Fl=r):Il(e,t,n));break;default:Il(e,t,n)}}function Rl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bl(e),e=e.sibling}function Bl(e){switch(e.tag){case 0:case 11:case 15:zl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:zl(e);break;case 12:zl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):zl(e);break;default:zl(e)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Vl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Ul={getCacheForType:function(e){var t=na(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(sa).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,Gl=0,Kl=null,ql=null,Jl=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Gl&2&&Jl!==0?Jl&-Jl:F.T===null?at():yd()}function Tu(){if(au===0)if(!(Jl&536870912)||Ii){var e=We;We<<=1,!(We&3932160)&&(We=262144),au=e}else au=536870912;return e=ro.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===Kl&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,Jl,au,!1)),Qe(e,n),(!(Gl&2)||e!==Kl)&&(e===Kl&&(!(Gl&2)&&(ru|=n),tu===4&&Au(e,Jl,au,!1)),fd(e))}function Du(e,t,n){if(Gl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Je(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=Ru(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-De(),10<a)){if(Au(r,t,au,!Zl),qe(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=tf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);fd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Ll(t,a,d);var m=(a&62914560)===a?uu-De():(a&4194048)===a?du-De():0;if(m=np(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ku.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ku(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function ju(){return Gl&6?!0:(pd(0,!1),!1)}function Mu(){if(ql!==null){if(Yl===0)var e=ql.return;else e=ql,Ji=qi=null,Mo(e),Ma=null,Na=0,e=ql;for(;e!==null;)Gc(e.alternate,e),e=e.return;ql=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),Kl=e,ql=n=di(e.current,null),Jl=t,Yl=0,Xl=null,Zl=!1,Ql=Je(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,ni(),n}function B(e,t){mo=null,F.H=Hs,t===Sa||t===wa?(t=Aa(),Yl=3):t===Ca?(t=Aa(),Yl=4):Yl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,ql===null&&(tu=1,ec(e,yi(t,e.current)))}function Pu(){var e=ro.current;return e===null?!0:(Jl&4194048)===Jl?io===null:(Jl&62914560)===Jl||Jl&536870912?e===io:!1}function Fu(){var e=F.H;return F.H=Hs,e===null?Hs:e}function Iu(){var e=F.A;return F.A=Ul,e}function Lu(){tu=4,Zl||(Jl&4194048)!==Jl&&ro.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||Kl===null||Au(Kl,Jl,au,!1)}function Ru(e,t,n){var r=Gl;Gl|=2;var i=Fu(),a=Iu();(Kl!==e||Jl!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&ql!==null){var s=ql,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Uu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Uu(e,s,c,l)}}zu(),o=tu;break}catch(t){B(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,Gl=r,F.H=i,F.A=a,ql===null&&(Kl=null,Jl=0,ni()),o}function zu(){for(;ql!==null;)Vu(ql)}function Bu(e,t){var n=Gl;Gl|=2;var r=Fu(),a=Iu();Kl!==e||Jl!==t?(pu=null,fu=De()+500,Nu(e,t)):Ql=Je(e,t);a:do try{if(Yl!==0&&ql!==null){t=ql;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Uu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Yl=0,Xl=null,Hu(t);break}t=function(){Yl!==2&&Yl!==9||Kl!==e||(Yl=7),fd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ea(o)?(Yl=0,Xl=null,Hu(t)):(Yl=0,Xl=null,Uu(e,t,o,7));break;case 5:var s=null;switch(ql.tag){case 26:s=ql.memoizedState;case 5:case 27:var c=ql;if(s?$f(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)ql=l;else{var u=c.return;u===null?ql=null:(ql=u,Wu(u))}break b}}Yl=0,Xl=null,Uu(e,t,o,5);break;case 6:Yl=0,Xl=null,Uu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}V();break}catch(t){B(e,t)}while(1);return Ji=qi=null,F.H=r,F.A=a,Gl=n,ql===null?(Kl=null,Jl=0,ni(),tu):0}function V(){for(;ql!==null&&!Te();)Vu(ql)}function Vu(e){var t=Ic(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Wu(e):ql=t}function Hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,Jl);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,Jl);break;case 5:Mo(t);default:Gc(n,t),t=ql=fi(t,eu),t=Ic(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Wu(e):ql=t}function Uu(e,t,n,r){Ji=qi=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(ac(e,i,t,n,Jl)){tu=1,ec(e,yi(n,e.current)),ql=null;return}}catch(t){if(i!==null)throw ql=i,t;tu=1,ec(e,yi(n,e.current)),ql=null;return}t.flags&32768?(Ii||r===1?e=!0:Ql||Jl&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gu(t,e)):Wu(t)}function Wu(e){var t=e;do{if(t.flags&32768){Gu(t,Zl);return}e=t.return;var n=Uc(t.alternate,t,eu);if(n!==null){ql=n;return}if(t=t.sibling,t!==null){ql=t;return}ql=t=e}while(t!==null);tu===0&&(tu=5)}function Gu(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,ql=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ql=e;return}ql=e=n}while(e!==null);tu=6,ql=null}function Ku(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Zu();while(hu!==0);if(Gl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,$e(e,n,o,s,c,l),e===Kl&&(ql=Kl=null,Jl=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(je,function(){return Qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Gl,Gl|=4;try{ul(e,t,n)}finally{Gl=s,I.p=a,F.T=r}}hu=1,qu(),Ju(),Yu()}}function qu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Gl;Gl|=4;try{Cl(t,e);var a=Jd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!qd,Jd=qd=null}finally{Gl=i,I.p=r,F.T=n}}e.current=t,hu=2}}function Ju(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Gl;Gl|=4;try{dl(e,t.alternate,t)}finally{Gl=i,I.p=r,F.T=n}}hu=3}}function Yu(){if(hu===4||hu===3){hu=0,Ee();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Xu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}vu&3&&Zu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,pd(0,!1)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Zu(){return qu(),Ju(),Yu(),Qu()}function Qu(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=it(vu),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Gl&6)throw Error(i(331));var c=Gl;if(Gl|=4,Bl(o.current),Ml(o,o.current,s,n),Gl=c,pd(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{I.p=a,F.T=r,Xu(e,t)}}function $u(e,t,n){t=yi(n,t),t=nc(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(Qe(e,2),fd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=yi(n,e),n=rc(2),r=Wa(t,n,2),r!==null&&(ic(n,r,t,e),Qe(r,2),fd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Kl===e&&(Jl&n)===n&&(tu===4||tu===3&&(Jl&62914560)===Jl&&300>De()-uu?!(Gl&2)&&Nu(e,0):iu|=n,ou===Jl&&(ou=0)),fd(e)}function rd(e,t){t===0&&(t=Xe()),e=ai(e,t),e!==null&&(Qe(e,t),fd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function H(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function ad(e,t){return Ce(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,vd())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Jl,a=qe(r,r===Kl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,_d(r,a));r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&ef()&&(e=dd);for(var t=De(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}hu!==0&&hu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Kl,n=Jl,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=U.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function U(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zu()&&e.callbackNode!==n)return null;var r=Jl;return r=qe(e,e===Kl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),gd(e,De()),e.callbackNode!=null&&e.callbackNode===n?U.bind(null,e):null)}function _d(e,t){if(Zu())return null;Du(e,t,!0)}function vd(){af(function(){Gl&6?Ce(ke,md):hd()})}function yd(){if(dd===0){var e=fa;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),dd=e}return dd}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:en(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?xd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Xr.length;Cd++){var wd=Xr[Cd];Zr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,St.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}ln(function(){var r=a,i=rn(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=un(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==nn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(s,c,l,d,!1),u!==null&&f!==null&&Ld(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c))if(pr)v=Sr;else{v=br;var y=yr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Zt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,nr=!0)),y=Fd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Sd(s,e,r,n,i)}Dd(s,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=un(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=un(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=un(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=un(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,` `).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&qt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Xt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=en(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Qt.get(n)||n,At(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Xt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&qt(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Hd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Od(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Hd(e,t,s,c,n,null)}Kt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,u,r,n,null)}return;default:if(Zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function W(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Hd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Hd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Hd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if(Zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Hd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Gd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Zd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e===$d?!1:($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body);n=i}while(n);Hp(t)}function lf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function uf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:uf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function _f(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function xf(e,t,n){switch(t=Yd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ef=I.d;I.d={f:Df,r:Of,D:jf,C:Mf,L:Nf,m:Pf,X:If,S:Ff,M:Lf};function Df(){var e=Ef.f(),t=ju();return e||t}function Of(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Ef.r(e)}var kf=typeof document>`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=bt(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);xt(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=bt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),xt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=bt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),xt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=le.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Bt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),xt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Bt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Wd(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,xt(a),a):(r=n,(a=Cf.get(o))&&(r=m({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=L(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function up(e){return e?(e=ci,e):ci}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(Eu(n,e,t),Ga(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Eu(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=wu();t=rt(t);var n=ai(e,t);n!==null&&Eu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,yp(e,t,n,r)}finally{I.p=a,F.T=i}}function vp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,yp(e,t,n,r)}finally{I.p=a,F.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Nd(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Gl&6)&&(fu=De()+500,pd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Eu(s,a,2),ju(),pp(a,2)}if(a=bp(r),a===null&&Nd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function bp(e){return e=rn(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){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(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`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 Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){hp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nn=r,n.target.dispatchEvent(r),nn=null}else return t=vt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,wu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),ju(),t[ut]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.7`)throw Error(i(527,Kp,`19.2.7`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Ie=Jp.inject(qp),Le=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[ut]=t.current,jd(e),new Wp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=y(t,n),t=s(t),t in b)return;b[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:v,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},S=l(d(),1),C=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,w=/^[\\/]{2}/;function T(e,t){return t+e.replace(/\\/g,`/`)}var E=`popstate`;function D(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function O(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return N(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:P(t)}return F(t,n,null,e)}function k(e,t){if(e===!1||e==null)throw Error(t)}function A(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function j(){return Math.random().toString(36).substring(2,10)}function M(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function N(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ee(t):t,state:n,key:t&&t.key||r||j(),mask:i}}function P({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 ee(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 F(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=D(e)?e:N(h.location,e,t);n&&n(r,e),l=u()+1;let d=M(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=D(e)?e:N(h.location,e,t);n&&n(r,e),l=u();let i=M(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return I(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(E,d),c=e,()=>{i.removeEventListener(E,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function I(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),k(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:P(t);return i=i.replace(/ $/,`%20`),!n&&w.test(i)&&(i=r+i),new URL(i,r)}function te(e,t,n=`/`){return ne(e,t,n,!1)}function ne(e,t,n,r,i){let a=Se((typeof t==`string`?ee(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ie(e),s=null,c=xe(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function re(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ie(e){let t=ae(e);return se(t),t}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;k(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ae([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(k(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=be(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ye(u,l,s.matcher,s.compiledParams):ve(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Ae([a,d.pathname]),pathnameBase:Me(Ae([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Ae([a,d.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=be(e.path,e.caseSensitive,e.end);return ye(e,t,n,r)}function ye(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function be(e,t=!1,n=!0){A(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,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return A(!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 Se(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ce(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ee(e):e,a;return n?(n=ke(n),a=n.startsWith(`/`)?we(n.substring(1),`/`):we(n,t)):a=t,{pathname:a,search:Ne(r),hash:Pe(i)}}function we(e,t){let n=je(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Te(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 Ee(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function De(e){let t=Ee(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Oe(e,t,n,r=!1){let i;typeof e==`string`?i=ee(e):(i={...e},k(!i.pathname||!i.pathname.includes(`?`),Te(`?`,`pathname`,`search`,i)),k(!i.pathname||!i.pathname.includes(`#`),Te(`#`,`pathname`,`hash`,i)),k(!i.search||!i.search.includes(`#`),Te(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ce(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ke=e=>e.replace(/[\\/]{2,}/g,`/`),Ae=e=>ke(e.join(`/`)),je=e=>e.replace(/\/+$/,``),Me=e=>je(e).replace(/^\/*/,`/`),Ne=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Fe=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 Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Le(e){return Ae(e.map(e=>e.route.path).filter(Boolean))||`/`}var Re=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ze(e,t){let n=e;if(typeof n!=`string`||!C.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Re)try{let e=new URL(window.location.href),r=w.test(n)?new URL(T(n,e.protocol)):new URL(n),a=Se(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{A(!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 Be=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Be);var Ve=[`GET`,...Be];new Set(Ve);var He=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ue(e){try{return He.includes(new URL(e).protocol)}catch{return!1}}var We=S.createContext(null);We.displayName=`DataRouter`;var Ge=S.createContext(null);Ge.displayName=`DataRouterState`;var Ke=S.createContext(!1);function qe(){return S.useContext(Ke)}var Je=S.createContext({isTransitioning:!1});Je.displayName=`ViewTransition`;var Ye=S.createContext(new Map);Ye.displayName=`Fetchers`;var Xe=S.createContext(null);Xe.displayName=`Await`;var Ze=S.createContext(null);Ze.displayName=`Navigation`;var Qe=S.createContext(null);Qe.displayName=`Location`;var $e=S.createContext({outlet:null,matches:[],isDataRoute:!1});$e.displayName=`Route`;var et=S.createContext(null);et.displayName=`RouteError`;var tt=`REACT_ROUTER_ERROR`,nt=`REDIRECT`,rt=`ROUTE_ERROR_RESPONSE`;function it(e){if(e.startsWith(`${tt}:${nt}:{`))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 at(e){if(e.startsWith(`${tt}:${rt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Fe(t.status,t.statusText,t.data)}catch{}}function ot(e,{relative:t}={}){k(st(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=S.useContext(Ze),{hash:i,pathname:a,search:o}=gt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ae([n,a])),r.createHref({pathname:s,search:o,hash:i})}function st(){return S.useContext(Qe)!=null}function ct(){return k(st(),`useLocation() may be used only in the context of a <Router> component.`),S.useContext(Qe).location}var lt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ut(e){S.useContext(Ze).static||S.useLayoutEffect(e)}function dt(){let{isDataRoute:e}=S.useContext($e);return e?Ft():ft()}function ft(){k(st(),`useNavigate() may be used only in the context of a <Router> component.`);let e=S.useContext(We),{basename:t,navigator:n}=S.useContext(Ze),{matches:r}=S.useContext($e),{pathname:i}=ct(),a=JSON.stringify(De(r)),o=S.useRef(!1);return ut(()=>{o.current=!0}),S.useCallback((r,s={})=>{if(A(o.current,lt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Oe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ae([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var pt=S.createContext(null);function mt(e){let t=S.useContext($e).outlet;return S.useMemo(()=>t&&S.createElement(pt.Provider,{value:e},t),[t,e])}function ht(){let{matches:e}=S.useContext($e);return e[e.length-1]?.params??{}}function gt(e,{relative:t}={}){let{matches:n}=S.useContext($e),{pathname:r}=ct(),i=JSON.stringify(De(n));return S.useMemo(()=>Oe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function _t(e,t){return vt(e,t)}function vt(e,t,n){k(st(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=S.useContext(Ze),{matches:i}=S.useContext($e),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Lt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ct(),d;if(t){let e=typeof t==`string`?ee(t):t;k(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):te(e,{pathname:p});A(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),A(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 h=Tt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ae([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ae([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?S.createElement(Qe.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function yt(){let e=Pt(),t=Ie(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},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=S.createElement(S.Fragment,null,S.createElement(`p`,null,`💿 Hey developer 👋`),S.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,S.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,S.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),S.createElement(S.Fragment,null,S.createElement(`h2`,null,`Unexpected Application Error!`),S.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?S.createElement(`pre`,{style:i},n):null,o)}var bt=S.createElement(yt,null),xt=class extends S.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?t.error:e.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`){let t=at(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:S.createElement($e.Provider,{value:this.props.routeContext},S.createElement(et.Provider,{value:e,children:this.props.component}));return this.context?S.createElement(Ct,{error:e},t):t}};xt.contextType=Ke;var St=new WeakMap;function Ct({children:e,error:t}){let{basename:n}=S.useContext(Ze);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=it(t.digest);if(e){let r=St.get(t);if(r)throw r;let i=ze(e.location,n),a=i.absoluteURL||i.to;if(Ue(a))throw Error(`Invalid redirect location`);if(Re&&!St.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw St.set(t,n),n}return S.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function wt({routeContext:e,match:t,children:n}){let r=S.useContext(We);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement($e.Provider,{value:e},n)}function Tt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);k(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Le(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||bt,o&&(s<0&&c===0?(Lt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?S.createElement(n.route.Component,null):n.route.element?n.route.element:e,S.createElement(wt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?S.createElement(xt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Et(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dt(e){let t=S.useContext(We);return k(t,Et(e)),t}function Ot(e){let t=S.useContext(Ge);return k(t,Et(e)),t}function kt(e){let t=S.useContext($e);return k(t,Et(e)),t}function At(e){let t=kt(e),n=t.matches[t.matches.length-1];return k(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function jt(){return At(`useRouteId`)}function Mt(){let e=Ot(`useNavigation`);return S.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Nt(){let{matches:e,loaderData:t}=Ot(`useMatches`);return S.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function Pt(){let e=S.useContext(et),t=Ot(`useRouteError`),n=At(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ft(){let{router:e}=Dt(`useNavigate`),t=At(`useNavigate`),n=S.useRef(!1);return ut(()=>{n.current=!0}),S.useCallback(async(r,i={})=>{A(n.current,lt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var It={};function Lt(e,t,n){!t&&!It[e]&&(It[e]=!0,A(!1,n))}S.memo(Rt);function Rt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return vt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function zt({to:e,replace:t,state:n,relative:r}){k(st(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=S.useContext(Ze);A(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=S.useContext($e),{pathname:o}=ct(),s=dt(),c=Oe(e,De(a),o,r===`path`),l=JSON.stringify(c);return S.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Bt(e){return mt(e.context)}function Vt(e){k(!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 Ht({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){k(!st(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=S.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ee(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=S.useMemo(()=>{let e=Se(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return A(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:S.createElement(Ze.Provider,{value:c},S.createElement(Qe.Provider,{children:t,value:h}))}function Ut({children:e,location:t}){return _t(Wt(e),t)}S.Component;function Wt(e,t=[]){let n=[];return S.Children.forEach(e,(e,r)=>{if(!S.isValidElement(e))return;let i=[...t,r];if(e.type===S.Fragment){n.push.apply(n,Wt(e.props.children,i));return}k(e.type===Vt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),k(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Wt(e.props.children,i)),n.push(a)}),n}var Gt=`get`,Kt=`application/x-www-form-urlencoded`;function qt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Jt(e){return qt(e)&&e.tagName.toLowerCase()===`button`}function Yt(e){return qt(e)&&e.tagName.toLowerCase()===`form`}function Xt(e){return qt(e)&&e.tagName.toLowerCase()===`input`}function Zt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qt(e,t){return e.button===0&&(!t||t===`_self`)&&!Zt(e)}function $t(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(e=>[n,e]):[[n,r]])},[]))}function en(e,t){let n=$t(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var tn=null;function nn(){if(tn===null)try{new FormData(document.createElement(`form`),0),tn=!1}catch{tn=!0}return tn}var rn=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function an(e){return e!=null&&!rn.has(e)?(A(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kt}"`),null):e}function on(e,t){let n,r,i,a,o;if(Yt(e)){let o=e.getAttribute(`action`);r=o?Se(o,t):null,n=e.getAttribute(`method`)||Gt,i=an(e.getAttribute(`enctype`))||Kt,a=new FormData(e)}else if(Jt(e)||Xt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Se(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Gt,i=an(e.getAttribute(`formenctype`))||an(o.getAttribute(`enctype`))||Kt,a=new FormData(o,e),!nn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(qt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Gt,r=null,i=Kt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var sn={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},cn=/[&><\u2028\u2029]/g;function ln(e){return e.replace(cn,e=>sn[e])}function un(e,t){if(e===!1||e==null)throw Error(t)}function dn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Se(i.pathname,t)===`/`?i.pathname=`${je(t)}/_root.${r}`:i.pathname=`${je(i.pathname)}.${r}`,i}async function fn(e,t){if(e.id in t)return t[e.id];try{let n=await x(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pn(e){return e!=null&&typeof e.page==`string`}function mn(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 hn(e,t,n){return bn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await fn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(mn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function gn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function _n(e,t,{includeHydrateFallback:n}={}){return vn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function vn(e){return[...new Set(e)]}function yn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function bn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!pn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(yn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function xn(){let e=S.useContext(We);return un(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Sn(){let e=S.useContext(Ge);return un(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Cn=S.createContext(void 0);Cn.displayName=`FrameworkContext`;function wn(){let e=S.useContext(Cn);return un(e,`You must render this element inside a <HydratedRouter> element`),e}function Tn(e,t){let n=S.useContext(Cn),[r,i]=S.useState(!1),[a,o]=S.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=S.useRef(null);S.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),S.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:En(s,p),onBlur:En(c,m),onMouseEnter:En(l,p),onMouseLeave:En(u,m),onTouchStart:En(d,p)}]:[a,f,{}]:[!1,f,{}]}function En(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Dn({page:e,...t}){let n=qe(),{nonce:r}=wn(),{router:i}=xn(),a=S.useMemo(()=>te(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?S.createElement(kn,{page:e,matches:a,...t}):S.createElement(An,{page:e,matches:a,...t})):null}function On(e){let{manifest:t,routeModules:n}=wn(),[r,i]=S.useState([]);return S.useEffect(()=>{let r=!1;return hn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function kn({page:e,matches:t,...n}){let r=ct(),{future:i}=wn(),{basename:a}=xn(),o=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=dn(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,o.map(e=>S.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function An({page:e,matches:t,...n}){let r=ct(),{future:i,manifest:a,routeModules:o}=wn(),{basename:s}=xn(),{loaderData:c,matches:l}=Sn(),u=S.useMemo(()=>gn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=S.useMemo(()=>gn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=dn(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=S.useMemo(()=>_n(d,a),[d,a]),m=On(d);return S.createElement(S.Fragment,null,f.map(e=>S.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>S.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>S.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function jn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}S.Component;var Mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Mn&&(window.__reactRouterVersion=`7.18.1`)}catch{}function Nn({basename:e,children:t,useTransitions:n,window:r}){let i=S.useRef();i.current??=O({window:r,v5Compat:!0});let a=i.current,[o,s]=S.useState({action:a.action,location:a.location}),c=S.useCallback(e=>{n===!1?s(e):S.startTransition(()=>s(e))},[n]);return S.useLayoutEffect(()=>a.listen(c),[a,c]),S.createElement(Ht,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Pn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=S.useState({action:n.action,location:n.location}),o=S.useCallback(e=>{r===!1?a(e):S.startTransition(()=>a(e))},[r]);return S.useLayoutEffect(()=>n.listen(o),[n,o]),S.createElement(Ht,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Pn.displayName=`unstable_HistoryRouter`;var Fn=S.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=S.useContext(Ze),v=typeof l==`string`&&C.test(l),y=ze(l,h);l=y.to;let b=ot(l,{relative:r}),x=ct(),w=null;if(o){let e=Oe(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ae([h,e.pathname])),w=g.createHref(e)}let[T,E,D]=Tn(n,p),O=Hn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(y.isExternal||i),j=S.createElement(`a`,{...p,...D,href:(A?w:void 0)||y.absoluteURL||b,onClick:A?k:e,ref:jn(m,E),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return T&&!v?S.createElement(S.Fragment,null,j,S.createElement(Dn,{page:b})):j});Fn.displayName=`Link`;var In=S.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=gt(a,{relative:c.relative}),d=ct(),f=S.useContext(Ge),{navigator:p,basename:m}=S.useContext(Ze),h=f!=null&&$n(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Se(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:b,isPending:x,isTransitioning:h},w=b?e:void 0,T;T=typeof n==`function`?n(C):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return S.createElement(Fn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});In.displayName=`NavLink`;var Ln=S.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Gt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=S.useContext(Ze),g=Kn(),_=qn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&C.test(s);return S.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?S.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Ln.displayName=`Form`;function Rn({getKey:e,storageKey:t,...n}){let r=S.useContext(Cn),{basename:i}=S.useContext(Ze),a=ct(),o=Nt();Zn({getKey:e,storageKey:t});let s=S.useMemo(()=>{if(!r||!e)return null;let t=Xn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),S.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ln(JSON.stringify(t||Jn))}, ${ln(JSON.stringify(s))})`}})}Rn.displayName=`ScrollRestoration`;function zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bn(e){let t=S.useContext(We);return k(t,zn(e)),t}function Vn(e){let t=S.useContext(Ge);return k(t,zn(e)),t}function Hn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=dt(),d=ct(),f=gt(e,{relative:o});return S.useCallback(p=>{if(Qt(p,t)){p.preventDefault();let t=n===void 0?P(d)===P(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?S.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Un(e){A(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=S.useRef($t(e)),n=S.useRef(!1),r=ct(),i=S.useMemo(()=>en(r.search,n.current?null:t.current),[r.search]),a=dt();return[i,S.useCallback((e,t)=>{let r=$t(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Wn=0,Gn=()=>`__${String(++Wn)}__`;function Kn(){let{router:e}=Bn(`useSubmit`),{basename:t}=S.useContext(Ze),n=jt(),r=e.fetch,i=e.navigate;return S.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=on(e,t);if(a.navigate===!1){let e=a.fetcherKey||Gn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function qn(e,{relative:t}={}){let{basename:n}=S.useContext(Ze),r=S.useContext($e);k(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...gt(e||`.`,{relative:t})},o=ct();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ae([n,a.pathname])),P(a)}var Jn=`react-router-scroll-positions`,Yn={};function Xn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Se(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Zn({getKey:e,storageKey:t}={}){let{router:n}=Bn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Vn(`useScrollRestoration`),{basename:a}=S.useContext(Ze),o=ct(),s=Nt(),c=Mt();S.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Qn(S.useCallback(()=>{if(c.state===`idle`){let t=Xn(o,s,a,e);Yn[t]=window.scrollY}try{sessionStorage.setItem(t||Jn,JSON.stringify(Yn))}catch(e){A(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(S.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Jn);e&&(Yn=JSON.parse(e))}catch{}},[t]),S.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Yn,()=>window.scrollY,e?(t,n)=>Xn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),S.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{A(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Qn(e,t){let{capture:n}=t||{};S.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function $n(e,{relative:t}={}){let n=S.useContext(Je);k(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Bn(`useViewTransitionState`),i=gt(e,{relative:t});if(!n.isTransitioning)return!1;let a=Se(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Se(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}var er=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tr=new class extends er{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},nr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rr=new class{#e=nr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ir(e){setTimeout(e,0)}var ar=typeof window>`u`||`Deno`in globalThis;function or(){}function sr(e,t){return typeof e==`function`?e(t):e}function cr(e){return typeof e==`number`&&e>=0&&e!==1/0}function lr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ur(e,t){return typeof e==`function`?e(t):e}function dr(e,t){return typeof e==`function`?e(t):e}function fr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==mr(o,t.options))return!1}else if(!gr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function pr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(hr(t.options.mutationKey)!==hr(a))return!1}else if(!gr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function mr(e,t){return(t?.queryKeyHashFn||hr)(e)}function hr(e){return JSON.stringify(e,(e,t)=>xr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function gr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>gr(e[n],t[n])):!1}var _r=Object.prototype.hasOwnProperty;function vr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=br(e)&&br(t);if(!r&&!(xr(e)&&xr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:_r.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=vr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function yr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function br(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xr(e){if(!Sr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Sr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Sr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Cr(e){return new Promise(t=>{rr.setTimeout(t,e)})}function wr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:vr(e,t)}function Tr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Er(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dr=Symbol();function Or(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Dr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kr(e,t){return typeof e==`function`?e(...t):!!e}function Ar(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var jr=(()=>{let e=()=>ar;return{isServer(){return e()},setIsServer(t){e=t}}})();function Mr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Nr=ir;function Pr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Nr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Fr=Pr(),Ir=new class extends er{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Lr(e){return Math.min(1e3*2**e,3e4)}function Rr(e){return(e??`online`)!==`online`||Ir.isOnline()}var zr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Br(e){let t=!1,n=0,r,i=Mr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new zr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>tr.isFocused()&&(e.networkMode===`always`||Ir.isOnline())&&e.canRun(),u=()=>Rr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(jr.isServer()?0:3),o=e.retryDelay??Lr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Cr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Vr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cr(this.gcTime)&&(this.#e=rr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(jr.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(rr.clearTimeout(this.#e),this.#e=void 0)}};function Hr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ar(e,()=>t.signal,()=>n=!0)},u=Or(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Er:Tr;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Wr:Ur,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ur(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ur(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Wr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Gr=class extends Vr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Jr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Jr(this.options);e.data!==void 0&&(this.setState(qr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=wr(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(or).catch(or):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>ur(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!lr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Or(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Hr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Br({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof zr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof zr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Kr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...qr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Fr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Kr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Rr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function qr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Jr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Yr=class extends er{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Mr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Zr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof dr(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!yr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&$r(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||dr(this.options.enabled,this.#t)!==dr(t.enabled,this.#t)||ur(this.options.staleTime,this.#t)!==ur(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||dr(this.options.enabled,this.#t)!==dr(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ti(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(or)),t}#g(){this.#b();let e=ur(this.options.staleTime,this.#t);if(jr.isServer()||this.#r.isStale||!cr(e))return;let t=lr(this.#r.dataUpdatedAt,e)+1;this.#d=rr.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(jr.isServer()||dr(this.options.enabled,this.#t)===!1||!cr(this.#p)||this.#p===0)&&(this.#f=rr.setInterval(()=>{(this.options.refetchIntervalInBackground||tr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(rr.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(rr.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Zr(e,t),o=i&&$r(e,n,t,r);(a||o)&&(l={...l,...Kr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=wr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=wr(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ei(e,t),refetch:this.refetch,promise:this.#o,isEnabled:dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Mr();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!yr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Fr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Xr(e,t){return dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&dr(t.retryOnMount,e)===!1)}function Zr(e,t){return Xr(e,t)||e.state.data!==void 0&&Qr(e,t,t.refetchOnMount)}function Qr(e,t,n){if(dr(t.enabled,e)!==!1&&ur(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ei(e,t)}return!1}function $r(e,t,n,r){return(e!==t||dr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ei(e,n)}function ei(e,t){return dr(t.enabled,e)!==!1&&e.isStaleByTime(ur(t.staleTime,e))}function ti(e,t){return!yr(e.getCurrentResult(),t)}var ni=class extends Vr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ri(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Br({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Fr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ri(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var ii=class extends er{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new ni({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ai(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ai(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ai(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ai(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Fr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>pr(t,e))}findAll(e={}){return this.getAll().filter(t=>pr(e,t))}notify(e){Fr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Fr.batch(()=>Promise.all(e.map(e=>e.continue().catch(or))))}};function ai(e){return e.options.scope?.id}var oi=class extends er{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),yr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&hr(t.mutationKey)!==hr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??ri();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Fr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},si=class extends er{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??mr(r,t),a=this.get(i);return a||(a=new Gr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Fr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>fr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>fr(e,t)):t}notify(e){Fr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Fr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Fr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ci=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new si,this.#t=e.mutationCache||new ii,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=tr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ir.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ur(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=sr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Fr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Fr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Fr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Fr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(or).catch(or)}invalidateQueries(e,t={}){return Fr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Fr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(or)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(or)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(ur(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(or).catch(or)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(or).catch(or)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ir.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(hr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{gr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(hr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{gr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=mr(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Dr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},li=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=o(((e,t)=>{t.exports=li()}))(),ui=S.createContext(void 0),di=e=>{let t=S.useContext(ui);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},fi=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,L.jsx)(ui.Provider,{value:e,children:t})),pi=S.createContext(!1),mi=()=>S.useContext(pi);pi.Provider;function hi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gi=S.createContext(hi()),_i=()=>S.useContext(gi),vi=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?kr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},yi=e=>{S.useEffect(()=>{e.clearReset()},[e])},bi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||kr(n,[e.error,r])),xi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Si=(e,t)=>e.isLoading&&e.isFetching&&!t,Ci=(e,t)=>e?.suspense&&t.isPending,wi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ti(e,t,n){let r=mi(),i=_i(),a=di(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,xi(o),vi(o,i,s),yi(i);let l=!a.getQueryCache().get(o.queryHash),[u]=S.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(S.useSyncExternalStore(S.useCallback(e=>{let t=f?u.subscribe(Fr.batchCalls(e)):or;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),S.useEffect(()=>{u.setOptions(o)},[o,u]),Ci(o,d))throw wi(o,u,i);if(bi({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!jr.isServer()&&Si(d,r)&&(l?wi(o,u,i):s?.promise)?.catch(or).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Ei(e,t){return Ti(e,Yr,t)}function Di(e,t){let n=di(t),[r]=S.useState(()=>new oi(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);let i=S.useSyncExternalStore(S.useCallback(e=>r.subscribe(Fr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=S.useCallback((e,t)=>{r.mutate(e,t).catch(or)},[r]);if(i.error&&kr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Oi=l(_(),1),ki=l(h(),1);function Ai(e){if(!e||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))}var ji=e=>{switch(e){case`success`:return Pi;case`info`:return Ii;case`warning`:return Fi;case`error`:return Li;default:return null}},Mi=Array(12).fill(0),Ni=({visible:e,className:t})=>S.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},S.createElement(`div`,{className:`sonner-spinner`},Mi.map((e,t)=>S.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Pi=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.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`})),Fi=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},S.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`})),Ii=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.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`})),Li=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.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`})),Ri=S.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`},S.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),S.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),zi=()=>{let[e,t]=S.useState(document.hidden);return S.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Bi=1,Vi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Bi++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],S.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Ui(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||Bi++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Hi=(e,t)=>{let n=t?.id||Bi++;return Vi.addToast({title:e,...t,id:n}),n},Ui=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,R=Object.assign(Hi,{success:Vi.success,info:Vi.info,warning:Vi.warning,error:Vi.error,custom:Vi.custom,message:Vi.message,promise:Vi.promise,dismiss:Vi.dismiss,loading:Vi.loading},{getHistory:()=>Vi.toasts,getToasts:()=>Vi.getActiveToasts()});Ai(`[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 Wi(e){return e.label!==void 0}var Gi=3,Ki=`24px`,qi=`16px`,Ji=4e3,Yi=356,Xi=14,Zi=45,Qi=200;function $i(...e){return e.filter(Boolean).join(` `)}function ea(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ta=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=S.useState(null),[k,A]=S.useState(null),[j,M]=S.useState(!1),[N,P]=S.useState(!1),[ee,F]=S.useState(!1),[I,te]=S.useState(!1),[ne,re]=S.useState(!1),[ie,ae]=S.useState(0),[oe,se]=S.useState(0),ce=S.useRef(n.duration||y||Ji),le=S.useRef(null),ue=S.useRef(null),de=c===0,fe=c+1<=o,pe=n.type,me=n.dismissible!==!1,he=n.className||``,ge=n.descriptionClassName||``,_e=S.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ve=S.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ye=S.useMemo(()=>n.duration||y||Ji,[n.duration,y]),be=S.useRef(0),xe=S.useRef(0),Se=S.useRef(0),Ce=S.useRef(null),[we,Te]=b.split(`-`),Ee=S.useMemo(()=>s.reduce((e,t,n)=>n>=_e?e:e+t.height,0),[s,_e]),De=zi(),Oe=n.invert||t,ke=pe===`loading`;xe.current=S.useMemo(()=>_e*x+Ee,[_e,Ee]),S.useEffect(()=>{ce.current=ye},[ye]),S.useEffect(()=>{M(!0)},[]),S.useEffect(()=>{let e=ue.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),S.useLayoutEffect(()=>{if(!j)return;let e=ue.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ae=S.useCallback(()=>{P(!0),ae(xe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Qi)},[n,d,a,xe]);S.useEffect(()=>{if(n.promise&&pe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||De?(()=>{if(Se.current<be.current){let e=new Date().getTime()-be.current;ce.current-=e}Se.current=new Date().getTime()})():ce.current!==1/0&&(be.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ae()},ce.current)),()=>clearTimeout(e)},[u,i,n,pe,De,Ae]),S.useEffect(()=>{n.delete&&(Ae(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ae,n.delete]);function je(){return T?.loading?S.createElement(`div`,{className:$i(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":pe===`loading`},T.loading):S.createElement(Ni,{className:$i(w?.loader,n?.classNames?.loader),visible:pe===`loading`})}let Me=n.icon||T?.[pe]||ji(pe);return S.createElement(`li`,{tabIndex:0,ref:ue,className:$i(_,he,w?.toast,n?.classNames?.toast,w?.default,w?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":N,"data-visible":fe,"data-y-position":we,"data-x-position":Te,"data-index":c,"data-front":de,"data-swiping":ee,"data-dismissible":me,"data-type":pe,"data-invert":Oe,"data-swipe-out":I,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?ie:xe.current}px`,"--initial-height":C?`auto`:`${oe}px`,...m,...n.style},onDragEnd:()=>{F(!1),O(null),Ce.current=null},onPointerDown:e=>{e.button!==2&&(ke||!me||(le.current=new Date,ae(xe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),Ce.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!me)return;Ce.current=null;let e=Number(ue.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(ue.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-le.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Zi||a>.11){ae(xe.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ae(),te(!0);return}else{var o,s;(o=ue.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=ue.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}re(!1),F(!1),O(null)},onPointerMove:t=>{var n,r;if(!Ce.current||!me||window.getSelection()?.toString().length>0)return;let i=t.clientY-Ce.current.y,a=t.clientX-Ce.current.x,o=e.swipeDirections??ea(b);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&re(!0),(n=ue.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=ue.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ve&&!n.jsx&&pe!==`loading`?S.createElement(`button`,{"aria-label":E,"data-disabled":ke,"data-close-button":!0,onClick:ke||!me?()=>{}:()=>{Ae(),n.onDismiss==null||n.onDismiss.call(n,n)},className:$i(w?.closeButton,n?.classNames?.closeButton)},T?.close??Ri):null,(pe||n.icon||n.promise)&&n.icon!==null&&(T?.[pe]!==null||n.icon)?S.createElement(`div`,{"data-icon":``,className:$i(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||je():null,n.type===`loading`?null:Me):null,S.createElement(`div`,{"data-content":``,className:$i(w?.content,n?.classNames?.content)},S.createElement(`div`,{"data-title":``,className:$i(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?S.createElement(`div`,{"data-description":``,className:$i(v,ge,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),S.isValidElement(n.cancel)?n.cancel:n.cancel&&Wi(n.cancel)?S.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Wi(n.cancel)&&me&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ae())},className:$i(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,S.isValidElement(n.action)?n.action:n.action&&Wi(n.action)?S.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Wi(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Ae())},className:$i(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function na(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ra(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?qi:Ki;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ia=S.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Gi,toastOptions:g,dir:_=na(),gap:v=Xi,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,C]=S.useState([]),w=S.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),T=S.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=S.useState([]),[O,k]=S.useState(!1),[A,j]=S.useState(!1),[M,N]=S.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=S.useRef(null),ee=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=S.useRef(null),I=S.useRef(!1),te=S.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||Vi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return S.useEffect(()=>Vi.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ki.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),S.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),S.useEffect(()=>{x.length<=1&&k(!1)},[x]),S.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),S.useEffect(()=>{if(P.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,I.current=!1)}},[P.current]),S.createElement(`section`,{ref:t,"aria-label":`${b} ${ee}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?S.createElement(`ol`,{key:t,dir:_===`auto`?na():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${Yi}px`,"--gap":`${v}px`,...m,...ra(l,u)},onBlur:e=>{I.current&&!e.currentTarget.contains(e.relatedTarget)&&(I.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||I.current||(I.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>S.createElement(ta,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:te,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),aa=({...e})=>(0,L.jsx)(ia,{className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-muted-foreground`,actionButton:`group-[.toast]:bg-primary group-[.toast]:text-primary-foreground`,cancelButton:`group-[.toast]:bg-muted group-[.toast]:text-muted-foreground`}},...e});typeof window<`u`&&window.document&&window.document.createElement;function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function oa(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sa(...e){return t=>{let n=!1,r=e.map(e=>{let r=oa(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():oa(e[t],null)}}}}function ca(...e){return S.useCallback(sa(...e),e)}function la(e,t=[]){let n=[];function r(t,r){let i=S.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=S.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=S.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>S.createContext(e));return function(n){let r=n?.[e]||t;return S.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ua(i,...t)]}function ua(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function da(e){let t=S.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ba(r)&&typeof wa==`function`&&(r=wa(r._payload)),S.Children.forEach(r,e=>{if(va(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ba(n)&&typeof wa==`function`&&(n=wa(n._payload)),a=ha(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=S.cloneElement(a,void 0,s):!o&&S.Children.count(r)===1&&S.isValidElement(r)&&(a=r);let c=a?_a(a):void 0,l=ca(n,c);if(!a){if(r||r===0)throw Error(o?Ca(e):Sa(e));return r}let u=ga(i,a.props??{});return a.type!==S.Fragment&&(u.ref=n?l:c),S.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var fa=da(`Slot`),pa=Symbol.for(`radix.slottable`);function ma(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=pa,t}var ha=(e,t)=>{if(`child`in e.props){let t=e.props.child;return S.isValidElement(t)?S.cloneElement(t,void 0,e.props.children(t.props.children)):null}return S.isValidElement(t)?t:null};function ga(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function _a(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function va(e){return S.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pa}var ya=Symbol.for(`react.lazy`);function ba(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ya&&`_payload`in e&&xa(e._payload)}function xa(e){return typeof e==`object`&&!!e&&`then`in e}var Sa=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Ca=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wa=S.use,Ta=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=da(`Primitive.${t}`),r=S.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ea(e,t){e&&ki.flushSync(()=>e.dispatchEvent(t))}function Da(e){let t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Oa=`DismissableLayer`,ka=`dismissableLayer.update`,Aa=`dismissableLayer.pointerDownOutside`,ja=`dismissableLayer.focusOutside`,Ma,Na=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Pa=S.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=S.useContext(Na),[d,f]=S.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=S.useState({}),h=ca(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,C=S.useRef(!1),w=za(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=Ba(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=Da(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return S.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),S.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ma=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Va(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ma))}},[d,p,n,u]),S.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Va())},[d,u]),S.useEffect(()=>{let e=()=>m({});return document.addEventListener(ka,e),()=>document.removeEventListener(ka,e)},[]),(0,L.jsx)(Ta.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:z(e.onFocusCapture,T.onFocusCapture),onBlurCapture:z(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,w.onPointerDownCapture)})});Pa.displayName=Oa;var Fa=`DismissableLayerBranch`,Ia=S.forwardRef((e,t)=>{let n=S.useContext(Na),r=S.useRef(null),i=ca(t,r);return S.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,L.jsx)(Ta.div,{...e,ref:i})});Ia.displayName=Fa;function La(){let e=S.useContext(Na),[t,n]=S.useState(null);return S.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var Ra=()=>!0;function za(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ra}=t,s=Da(e),c=S.useRef(!1),l=S.useRef(!1),u=S.useRef(new Map),d=S.useRef(()=>{});return S.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}function p(e){l.current&&u.current.set(e.type,!1)}let m=a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Ha(Aa,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>c.current=!0}}function Ba(e,t=globalThis?.document){let n=Da(e),r=S.useRef(!1);return S.useEffect(()=>{let e=e=>{e.target&&!r.current&&Ha(ja,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Va(){let e=new CustomEvent(ka);document.dispatchEvent(e)}function Ha(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ea(i,a):i.dispatchEvent(a)}var Ua=globalThis?.document?S.useLayoutEffect:()=>{},Wa=S.useId||(()=>void 0),Ga=0;function Ka(e){let[t,n]=S.useState(Wa());return Ua(()=>{e||n(e=>e??String(Ga++))},[e]),e||(t?`radix-${t}`:``)}var qa=[`top`,`right`,`bottom`,`left`],Ja=Math.min,Ya=Math.max,Xa=Math.round,Za=Math.floor,Qa=e=>({x:e,y:e}),$a={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function eo(e,t,n){return Ya(e,Ja(t,n))}function to(e,t){return typeof e==`function`?e(t):e}function no(e){return e.split(`-`)[0]}function ro(e){return e.split(`-`)[1]}function io(e){return e===`x`?`y`:`x`}function ao(e){return e===`y`?`height`:`width`}function oo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function so(e){return io(oo(e))}function co(e,t,n){n===void 0&&(n=!1);let r=ro(e),i=so(e),a=ao(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=vo(o)),[o,vo(o)]}function lo(e){let t=vo(e);return[uo(e),t,uo(t)]}function uo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var fo=[`left`,`right`],po=[`right`,`left`],mo=[`top`,`bottom`],ho=[`bottom`,`top`];function go(e,t,n){switch(e){case`top`:case`bottom`:return n?t?po:fo:t?fo:po;case`left`:case`right`:return t?mo:ho;default:return[]}}function _o(e,t,n,r){let i=ro(e),a=go(no(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(uo)))),a}function vo(e){let t=no(e);return $a[t]+e.slice(t.length)}function yo(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function bo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:yo(e)}function xo(e){let{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 So(e,t,n){let{reference:r,floating:i}=e,a=oo(t),o=so(t),s=ao(o),c=no(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ro(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Co(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=to(t,e),p=bo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=xo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=xo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var wo=50,To=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Co},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=So(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<wo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=So(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Eo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=to(e,t)||{};if(l==null)return{};let d=bo(u),f={x:n,y:r},p=so(i),m=ao(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ja(d[_],T),D=Ja(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=eo(E,k,O),j=!c.arrow&&ro(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Do=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=to(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=no(r),_=oo(o),v=no(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[vo(o)]:lo(o)),x=p!==`none`;!d&&x&&b.push(..._o(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=co(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==oo(t))||T.every(e=>oo(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=oo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Oo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ko(e){return qa.some(t=>e[t]>=0)}var Ao=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=to(e,t);switch(i){case`referenceHidden`:{let e=Oo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ko(e)}}}case`escaped`:{let e=Oo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ko(e)}}}default:return{}}}}},jo=new Set([`left`,`top`]);async function Mo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=no(n),s=ro(n),c=oo(n)===`y`,l=jo.has(o)?-1:1,u=a&&c?-1:1,d=to(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var No=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Mo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Po=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=to(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=oo(i),p=io(f),m=u[p],h=u[f],g=(e,t)=>eo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Fo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=to(e,t),u={x:n,y:r},d=oo(i),f=io(d),p=u[f],m=u[d],h=to(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=jo.has(no(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Io=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=to(e,t),c=await i.detectOverflow(t,s),l=no(n),u=ro(n),d=oo(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ja(p-c[m],g),y=Ja(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ya(c.left,c.right):S=p-2*Ya(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Lo(){return typeof window<`u`}function Ro(e){return Vo(e)?(e.nodeName||``).toLowerCase():`#document`}function zo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bo(e){return((Vo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Vo(e){return Lo()?e instanceof Node||e instanceof zo(e).Node:!1}function Ho(e){return Lo()?e instanceof Element||e instanceof zo(e).Element:!1}function Uo(e){return Lo()?e instanceof HTMLElement||e instanceof zo(e).HTMLElement:!1}function Wo(e){return!Lo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof zo(e).ShadowRoot}function Go(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ns(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ko(e){return/^(table|td|th)$/.test(Ro(e))}function qo(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Jo=/transform|translate|scale|rotate|perspective|filter/,Yo=/paint|layout|strict|content/,Xo=e=>!!e&&e!==`none`,Zo;function Qo(e){let t=Ho(e)?ns(e):e;return Xo(t.transform)||Xo(t.translate)||Xo(t.scale)||Xo(t.rotate)||Xo(t.perspective)||!es()&&(Xo(t.backdropFilter)||Xo(t.filter))||Jo.test(t.willChange||``)||Yo.test(t.contain||``)}function $o(e){let t=is(e);for(;Uo(t)&&!ts(t);){if(Qo(t))return t;if(qo(t))return null;t=is(t)}return null}function es(){return Zo??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Zo}function ts(e){return/^(html|body|#document)$/.test(Ro(e))}function ns(e){return zo(e).getComputedStyle(e)}function rs(e){return Ho(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function is(e){if(Ro(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Wo(e)&&e.host||Bo(e);return Wo(t)?t.host:t}function as(e){let t=is(e);return ts(t)?(e.ownerDocument||e).body:Uo(t)&&Go(t)?t:as(t)}function os(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=as(e),i=r===e.ownerDocument?.body,a=zo(r);if(i){let e=ss(a);return t.concat(a,a.visualViewport||[],Go(r)?r:[],e&&n?os(e):[])}else return t.concat(r,os(r,[],n))}function ss(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){let t=ns(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Uo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Xa(n)!==a||Xa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ls(e){return Ho(e)?e:e.contextElement}function us(e){let t=ls(e);if(!Uo(t))return Qa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cs(t),o=(a?Xa(n.width):n.width)/r,s=(a?Xa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ds=Qa(0);function fs(e){let t=zo(e);return!es()||!t.visualViewport?ds:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ps(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===zo(e)}function ms(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ls(e),o=Qa(1);t&&(r?Ho(r)&&(o=us(r)):o=us(e));let s=ps(a,n,r)?fs(a):Qa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=zo(a),t=Ho(r)?zo(r):r,n=e,i=ss(n);for(;i&&t!==n;){let e=us(i),t=i.getBoundingClientRect(),r=ns(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=zo(i),i=ss(n)}}return xo({width:u,height:d,x:c,y:l})}function hs(e,t){let n=rs(e).scrollLeft;return t?t.left+n:ms(Bo(e)).left+n}function gs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hs(e,n),y:n.top+t.scrollTop}}function _s(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Bo(r),s=t?qo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Qa(1),u=Qa(0),d=Uo(r);if((d||!a)&&((Ro(r)!==`body`||Go(o))&&(c=rs(r)),d)){let e=ms(r);l=us(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?gs(o,c):Qa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function vs(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ys(e){let t=rs(e),n=e.ownerDocument.body,r=Ya(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ya(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+hs(e),o=-t.scrollTop;return ns(n).direction===`rtl`&&(a+=Ya(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var bs=25;function xs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=zo(e),a=Bo(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!es()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(hs(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=bs&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ss(e,t){let n=ms(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=us(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Cs(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=xs(e,n,t);else if(t===`document`)r=ys(Bo(e));else if(Ho(t))r=Ss(t,n);else{let n=fs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return xo(r)}function ws(e,t){let n=t.get(e);if(n)return n;let r=os(e,[],!1).filter(e=>Ho(e)&&Ro(e)!==`body`),i=null,a=ns(e).position===`fixed`,o=a?is(e):e;for(;Ho(o)&&!ts(o);){let e=ns(o),t=Qo(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=is(o)}return t.set(e,r),r}function Ts(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?qo(t)?[]:ws(t,this._c):[].concat(n),r],o=Cs(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Cs(t,a[e],i);s=Ya(n.top,s),c=Ja(n.right,c),l=Ja(n.bottom,l),u=Ya(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Es(e){let{width:t,height:n}=cs(e);return{width:t,height:n}}function Ds(e,t,n){let r=Uo(t),i=Bo(t),a=n===`fixed`,o=ms(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Qa(0);if((r||!a)&&((Ro(t)!==`body`||Go(i))&&(s=rs(t)),r)){let e=ms(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=hs(i));let l=i&&!r&&!a?gs(i,s):Qa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Os(e){return ns(e).position===`static`}function ks(e,t){if(!Uo(e)||ns(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Bo(e)===n&&(n=n.ownerDocument.body),n}function As(e,t){let n=zo(e);if(qo(e))return n;if(!Uo(e)){let t=is(e);for(;t&&!ts(t);){if(Ho(t)&&!Os(t))return t;t=is(t)}return n}let r=ks(e,t);for(;r&&Ko(r)&&Os(r);)r=ks(r,t);return r&&ts(r)&&Os(r)&&!Qo(r)?n:r||$o(e)||n}var js=async function(e){let t=this.getOffsetParent||As,n=this.getDimensions,r=await n(e.floating);return{reference:Ds(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ms(e){return ns(e).direction===`rtl`}var Ns={convertOffsetParentRelativeRectToViewportRelativeRect:_s,getDocumentElement:Bo,getClippingRect:Ts,getOffsetParent:As,getElementRects:js,getClientRects:vs,getDimensions:Es,getScale:us,isElement:Ho,isRTL:Ms};function Ps(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fs(e,t,n){let r=null,i,a=Bo(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Za(d),h=Za(a.clientWidth-(u+f)),g=Za(a.clientHeight-(d+p)),_=Za(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ya(0,Ja(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ps(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=zo(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Is(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ls(e),u=i||a?[...l?os(l):[],...t?os(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fs(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ms(e):null;c&&g();function g(){let t=ms(e);h&&!Ps(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ls=No,Rs=Po,zs=Do,Bs=Io,Vs=Ao,Hs=Eo,Us=Fo,Ws=(e,t,n)=>{let r=new Map,i=n??{},a={...Ns,...i.platform,_c:r};return To(e,t,{...i,platform:a})},Gs=typeof document<`u`?S.useLayoutEffect:function(){};function Ks(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(!Ks(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ks(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Js(e,t){let n=qs(e);return Math.round(t*n)/n}function Ys(e){let t=S.useRef(e);return Gs(()=>{t.current=e}),t}function Xs(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=S.useState(r);Ks(f,r)||p(r);let[m,h]=S.useState(null),[g,_]=S.useState(null),v=S.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=S.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,C=S.useRef(null),w=S.useRef(null),T=S.useRef(u),E=c!=null,D=Ys(c),O=Ys(i),k=Ys(l),A=S.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Ws(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Ks(T.current,t)&&(T.current=t,ki.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Gs(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=S.useRef(!1);Gs(()=>(j.current=!0,()=>{j.current=!1}),[]),Gs(()=>{if(b&&(C.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=S.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=S.useMemo(()=>({reference:b,floating:x}),[b,x]),P=S.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Js(N.floating,u.x),r=Js(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qs(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Zs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Hs({element:r.current,padding:i}).fn(n):r?Hs({element:r,padding:i}).fn(n):{}}}},Qs=(e,t)=>{let n=Ls(e);return{name:n.name,fn:n.fn,options:[e,t]}},$s=(e,t)=>{let n=Rs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ec=(e,t)=>({fn:Us(e).fn,options:[e,t]}),tc=(e,t)=>{let n=zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},nc=(e,t)=>{let n=Bs(e);return{name:n.name,fn:n.fn,options:[e,t]}},rc=(e,t)=>{let n=Vs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ic=(e,t)=>{let n=Zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ac=`Arrow`,oc=S.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,L.jsx)(Ta.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,L.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});oc.displayName=ac;var sc=oc;function cc(e){let[t,n]=S.useState(void 0);return Ua(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var lc=`Popper`,[uc,dc]=la(lc),[fc,pc]=uc(lc),mc=e=>{let{__scopePopper:t,children:n}=e,[r,i]=S.useState(null),[a,o]=S.useState(void 0);return(0,L.jsx)(fc,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};mc.displayName=lc;var hc=`PopperAnchor`,gc=S.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=pc(hc,n),o=S.useRef(null),s=a.onAnchorChange,c=ca(t,S.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=S.useRef(null);S.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Ec(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,L.jsx)(Ta.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});gc.displayName=hc;var _c=`PopperContent`,[vc,yc]=uc(_c),bc=S.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=pc(_c,n),[_,v]=S.useState(null),y=ca(t,v),[b,x]=S.useState(null),C=cc(b),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(wc),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:ee}=Xs({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Is(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Qs({mainAxis:i+T,alignmentAxis:o}),c&&$s({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?ec():void 0,...A}),c&&tc({...A}),nc({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&ic({element:b,padding:s}),Tc({arrowWidth:w,arrowHeight:T}),f&&rc({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),F=g.setPlacementState;Ua(()=>(F(N),()=>{F(void 0)}),[N,F]);let[I,te]=Ec(N),ne=Da(m);Ua(()=>{P&&ne?.()},[P,ne]);let re=ee.arrow?.x,ie=ee.arrow?.y,ae=ee.arrow?.centerOffset!==0,[oe,se]=S.useState();return Ua(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,L.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(` `),...ee.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,L.jsx)(vc,{scope:n,placedSide:I,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,L.jsx)(Ta.div,{"data-side":I,"data-align":te,...h,ref:y,style:{...h.style,animation:P?void 0:`none`}})})})});bc.displayName=_c;var xc=`PopperArrow`,Sc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Cc=S.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=yc(xc,n),a=Sc[i.placedSide];return(0,L.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,L.jsx)(sc,{...r,ref:t,style:{...r.style,display:`block`}})})});Cc.displayName=xc;function wc(e){return e!==null}var Tc=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Ec(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Ec(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Dc=mc,Oc=gc,kc=bc,Ac=Cc,jc=`Portal`,Mc=S.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=S.useState(!1);Ua(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ki.createPortal((0,L.jsx)(Ta.div,{...r,ref:t}),o):null});Mc.displayName=jc;function Nc(e,t){return S.useReducer((e,n)=>t[e][n]??e,e)}var Pc=e=>{let{present:t,children:n}=e,r=Fc(t),i=typeof n==`function`?n({present:r.isPresent}):S.Children.only(n),a=Lc(r.ref,zc(i));return typeof n==`function`||r.isPresent?S.cloneElement(i,{ref:a}):null};Pc.displayName=`Presence`;function Fc(e){let[t,n]=S.useState(),r=S.useRef(null),i=S.useRef(e),a=S.useRef(`none`),o=S.useRef(void 0),[s,c]=Nc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return S.useEffect(()=>{s===`mounted`?(a.current=o.current??Rc(r.current),o.current=void 0):a.current=`none`},[s]),Ua(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Rc(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Ua(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Rc(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Rc(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:S.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Rc(t)}else r.current=null;n(e)},[])}}function Ic(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Lc(...e){let t=S.useRef(e);return t.current=e,S.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ic(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ic(n[e],null)}}},[])}function Rc(e){return e?.animationName||`none`}function zc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bc=S.useInsertionEffect||Ua;function Vc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Hc({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=S.useRef(e!==void 0);S.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,S.useCallback(t=>{if(s){let n=Uc(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Hc({defaultProp:e,onChange:t}){let[n,r]=S.useState(e),i=S.useRef(n),a=S.useRef(t);return Bc(()=>{a.current=t},[t]),S.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Uc(e){return typeof e==`function`}var Wc=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`}),Gc=`VisuallyHidden`,Kc=S.forwardRef((e,t)=>(0,L.jsx)(Ta.span,{...e,ref:t,style:{...Wc,...e.style}}));Kc.displayName=Gc;var qc=Kc,[Jc,Yc]=la(`Tooltip`,[dc]),Xc=dc(),Zc=`TooltipProvider`,Qc=700,$c=`tooltip.open`,[el,tl]=Jc(Zc),nl=e=>{let{__scopeTooltip:t,delayDuration:n=Qc,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,L.jsx)(el,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:S.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};nl.displayName=Zc;var rl=`Tooltip`,[il,al]=Jc(rl),ol=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=tl(rl,e.__scopeTooltip),l=Xc(t),[u,d]=S.useState(null),f=Ka(),p=S.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=S.useRef(!1),[_,v]=Vc({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent($c))):c.onClose(),a?.(e)},caller:rl}),y=S.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=S.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=S.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),C=S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return S.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,L.jsx)(Dc,{...l,children:(0,L.jsx)(il,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?C():b()},[c.isOpenDelayedRef,C,b]),onTriggerLeave:S.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};ol.displayName=rl;var sl=`TooltipTrigger`,cl=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=al(sl,n),a=tl(sl,n),o=Xc(n),s=ca(t,S.useRef(null),i.onTriggerChange),c=S.useRef(!1),l=S.useRef(!1),u=S.useCallback(()=>c.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,L.jsx)(Oc,{asChild:!0,...o,children:(0,L.jsx)(Ta.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:z(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:z(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:z(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:z(e.onBlur,i.onClose),onClick:z(e.onClick,i.onClose)})})});cl.displayName=sl;var ll=`TooltipPortal`,[ul,dl]=Jc(ll,{forceMount:void 0}),fl=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=al(ll,t);return(0,L.jsx)(ul,{scope:t,forceMount:n,children:(0,L.jsx)(Pc,{present:n||a.open,children:(0,L.jsx)(Mc,{asChild:!0,container:i,children:r})})})};fl.displayName=ll;var pl=`TooltipContent`,ml=S.forwardRef((e,t)=>{let n=dl(pl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=al(pl,e.__scopeTooltip);return(0,L.jsx)(Pc,{present:r||o.open,children:o.disableHoverableContent?(0,L.jsx)(yl,{side:i,...a,ref:t}):(0,L.jsx)(hl,{side:i,...a,ref:t})})}),hl=S.forwardRef((e,t)=>{let n=al(pl,e.__scopeTooltip),r=tl(pl,e.__scopeTooltip),i=S.useRef(null),a=ca(t,i),[o,s]=S.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=S.useCallback(()=>{s(null),d(!1)},[d]),p=S.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Cl(r,Sl(r,n.getBoundingClientRect())),a=wl(t.getBoundingClientRect()),o=El([...i,...a]);s(o),d(!0)},[d]);return S.useEffect(()=>()=>f(),[f]),S.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),S.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Tl(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,L.jsx)(yl,{...e,ref:a})}),[gl,_l]=Jc(rl,{isInside:!1}),vl=ma(`TooltipContent`),yl=S.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=al(pl,n),l=Xc(n),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener($c,u),()=>document.removeEventListener($c,u)),[u]),S.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,L.jsx)(Pa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,L.jsxs)(kc,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,L.jsx)(vl,{children:r}),(0,L.jsx)(gl,{scope:n,isInside:!0,children:(0,L.jsx)(qc,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});ml.displayName=pl;var bl=`TooltipArrow`,xl=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Xc(n);return _l(bl,n).isInside?null:(0,L.jsx)(Ac,{...i,...r,ref:t})});xl.displayName=bl;function Sl(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Cl(e,t,n=5){let 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 wl(e){let{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 Tl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function El(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Dl(t)}function Dl(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}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 Ol=nl,kl=fl,Al=ml;function jl(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=jl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ml(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jl(e))&&(r&&(r+=` `),r+=t);return r}var Nl=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Pl=(e,t)=>({classGroupId:e,validator:t}),Fl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Il=`-`,Ll=[],Rl=`arbitrary..`,zl=e=>{let t=Hl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Vl(e);let n=e.split(Il);return Bl(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Nl(i,t):t:i||Ll}return n[e]||Ll}}},Bl=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Bl(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Il):e.slice(t).join(Il),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Vl=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Rl+r:void 0})(),Hl=e=>{let{theme:t,classGroups:n}=e;return Ul(n,t)},Ul=(e,t)=>{let n=Fl();for(let r in e){let i=e[r];Wl(i,n,r,t)}return n},Wl=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Gl(i,t,n,r)}},Gl=(e,t,n,r)=>{if(typeof e==`string`){Kl(e,t,n);return}if(typeof e==`function`){ql(e,t,n,r);return}Jl(e,t,n,r)},Kl=(e,t,n)=>{let r=e===``?t:Yl(t,e);r.classGroupId=n},ql=(e,t,n,r)=>{if(Xl(e)){Wl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Pl(n,e))},Jl=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Wl(o,Yl(t,a),n,r)}},Yl=(e,t)=>{let n=e,r=t.split(Il),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Fl(),n.nextPart.set(t,i)),n=i}return n},Xl=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Zl=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ql=`!`,$l=`:`,eu=[],tu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),nu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===$l){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ql)?(c=s.slice(0,-1),l=!0):s.startsWith(Ql)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return tu(t,l,c,u)};if(t){let e=t+$l,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):tu(eu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ru=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},iu=e=>({cache:Zl(e.cacheSize),parseClassName:nu(e),sortModifiers:ru(e),postfixLookupClassGroupIds:au(e),...zl(e)}),au=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ou=/\s+/,su=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ou),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ql:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},cu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=lu(n))&&(i&&(i+=` `),i+=r);return i},lu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=lu(e[r]))&&(n&&(n+=` `),n+=t);return n},uu=(e,...t)=>{let n,r,i,a,o=o=>(n=iu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=su(e,n);return i(e,a),a};return a=o,(...e)=>a(cu(...e))},du=[],fu=e=>{let t=t=>t[e]||du;return t.isThemeGetter=!0,t},pu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_u=/\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$/,vu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xu=e=>hu.test(e),Su=e=>!!e&&!Number.isNaN(Number(e)),Cu=e=>!!e&&Number.isInteger(Number(e)),wu=e=>e.endsWith(`%`)&&Su(e.slice(0,-1)),Tu=e=>gu.test(e),Eu=()=>!0,Du=e=>_u.test(e)&&!vu.test(e),Ou=()=>!1,ku=e=>yu.test(e),Au=e=>bu.test(e),ju=e=>!B(e)&&!V(e),Mu=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Nu=e=>Ju(e,Qu,Ou),B=e=>pu.test(e),Pu=e=>Ju(e,$u,Du),Fu=e=>Ju(e,ed,Su),Iu=e=>Ju(e,nd,Eu),Lu=e=>Ju(e,td,Ou),Ru=e=>Ju(e,Xu,Ou),zu=e=>Ju(e,Zu,Au),Bu=e=>Ju(e,rd,ku),V=e=>mu.test(e),Vu=e=>Yu(e,$u),Hu=e=>Yu(e,td),Uu=e=>Yu(e,Xu),Wu=e=>Yu(e,Qu),Gu=e=>Yu(e,Zu),Ku=e=>Yu(e,rd,!0),qu=e=>Yu(e,nd,!0),Ju=(e,t,n)=>{let r=pu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yu=(e,t,n=!1)=>{let r=mu.exec(e);return r?r[1]?t(r[1]):n:!1},Xu=e=>e===`position`||e===`percentage`,Zu=e=>e===`image`||e===`url`,Qu=e=>e===`length`||e===`size`||e===`bg-size`,$u=e=>e===`length`,ed=e=>e===`number`,td=e=>e===`family-name`,nd=e=>e===`number`||e===`weight`,rd=e=>e===`shadow`,id=uu(()=>{let e=fu(`color`),t=fu(`font`),n=fu(`text`),r=fu(`font-weight`),i=fu(`tracking`),a=fu(`leading`),o=fu(`breakpoint`),s=fu(`container`),c=fu(`spacing`),l=fu(`radius`),u=fu(`shadow`),d=fu(`inset-shadow`),f=fu(`text-shadow`),p=fu(`drop-shadow`),m=fu(`blur`),h=fu(`perspective`),g=fu(`aspect`),_=fu(`ease`),v=fu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),V,B],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[V,B,c],T=()=>[xu,`full`,`auto`,...w()],E=()=>[Cu,`none`,`subgrid`,V,B],D=()=>[`auto`,{span:[`full`,Cu,V,B]},Cu,V,B],O=()=>[Cu,`auto`,V,B],k=()=>[`auto`,`min`,`max`,`fr`,V,B],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[xu,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[xu,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[xu,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,V,B],I=()=>[...b(),Uu,Ru,{position:[V,B]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Wu,Nu,{size:[V,B]}],re=()=>[wu,Vu,Pu],ie=()=>[``,`none`,`full`,l,V,B],ae=()=>[``,Su,Vu,Pu],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[Su,wu,Uu,Ru],le=()=>[``,`none`,m,V,B],ue=()=>[`none`,Su,V,B],de=()=>[`none`,Su,V,B],fe=()=>[Su,V,B],pe=()=>[xu,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Tu],breakpoint:[Tu],color:[Eu],container:[Tu],"drop-shadow":[Tu],ease:[`in`,`out`,`in-out`],font:[ju],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Tu],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Tu],shadow:[Tu],spacing:[`px`,Su],text:[Tu],"text-shadow":[Tu],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,xu,B,V,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,V,B]}],"container-named":[Mu],columns:[{columns:[Su,B,V,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Cu,`auto`,V,B]}],basis:[{basis:[xu,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Su,xu,`auto`,`initial`,`none`,B]}],grow:[{grow:[``,Su,V,B]}],shrink:[{shrink:[``,Su,V,B]}],order:[{order:[Cu,`first`,`last`,`none`,V,B]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Vu,Pu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,qu,Iu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,wu,B]}],"font-family":[{font:[Hu,Lu,t]}],"font-features":[{"font-features":[B]}],"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,V,B]}],"line-clamp":[{"line-clamp":[Su,`none`,V,Fu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,V,B]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,V,B]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Su,`from-font`,`auto`,V,Pu]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Su,`auto`,V,B]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Cu,V,B]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,V,B]}],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`,V,B]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Cu,V,B],radial:[``,V,B],conic:[Cu,V,B]},Gu,zu]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Su,V,B]}],"outline-w":[{outline:[``,Su,Vu,Pu]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Ku,Bu]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ku,Bu]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Su,Pu]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Ku,Bu]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Su,V,B]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":[Su]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[V,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[Su]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,V,B]}],filter:[{filter:[``,`none`,V,B]}],blur:[{blur:le()}],brightness:[{brightness:[Su,V,B]}],contrast:[{contrast:[Su,V,B]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ku,Bu]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Su,V,B]}],"hue-rotate":[{"hue-rotate":[Su,V,B]}],invert:[{invert:[``,Su,V,B]}],saturate:[{saturate:[Su,V,B]}],sepia:[{sepia:[``,Su,V,B]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,V,B]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Su,V,B]}],"backdrop-contrast":[{"backdrop-contrast":[Su,V,B]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Su,V,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Su,V,B]}],"backdrop-invert":[{"backdrop-invert":[``,Su,V,B]}],"backdrop-opacity":[{"backdrop-opacity":[Su,V,B]}],"backdrop-saturate":[{"backdrop-saturate":[Su,V,B]}],"backdrop-sepia":[{"backdrop-sepia":[``,Su,V,B]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,V,B]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Su,`initial`,V,B]}],ease:[{ease:[`linear`,`initial`,_,V,B]}],delay:[{delay:[Su,V,B]}],animate:[{animate:[`none`,v,V,B]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,V,B]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[V,B,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Cu,V,B]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,V,B]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,V,B]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Su,Vu,Pu,Fu]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function H(...e){return id(Ml(e))}var ad=Ol,od=S.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,L.jsx)(kl,{children:(0,L.jsx)(Al,{ref:r,sideOffset:t,className:H(`z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out 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 origin-(--radix-tooltip-content-transform-origin)`,e),...n})}));od.displayName=Al.displayName;var sd=(0,S.createContext)(void 0);function cd({children:e,defaultTheme:t=`light`,switchable:n=!1}){let[r,i]=(0,S.useState)(()=>n&&localStorage.getItem(`theme`)||t);return(0,S.useEffect)(()=>{let e=document.documentElement;r===`dark`?e.classList.add(`dark`):e.classList.remove(`dark`),n&&localStorage.setItem(`theme`,r)},[r,n]),(0,L.jsx)(sd.Provider,{value:{theme:r,toggleTheme:()=>{n&&i(e=>e===`light`?`dark`:`light`)}},children:e})}var ld=`/api`;ld.replace(/\/api\/?$/,``);var ud=`fc.token.v1`;function dd(){return localStorage.getItem(ud)}function fd(e){e?localStorage.setItem(ud,e):localStorage.removeItem(ud)}function pd(e){return e?/^https?:\/\//i.test(e)?e:`${ld.replace(/\/+$/,``)}/${e.replace(/^\/+/,``)}`:null}var md=class extends Error{status;errors;constructor(e,t,n){super(e),this.name=`ApiError`,this.status=t,this.errors=n}};function hd(e){if(!e)return``;let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r==null||r===``||t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}async function gd(e,t={}){let n=dd(),r=typeof FormData<`u`&&t.body instanceof FormData,i={Accept:`application/json`,...t.headers};!r&&t.body&&(i[`Content-Type`]=`application/json`),n&&(i.Authorization=`Bearer ${n}`);let a=await fetch(`${ld}${e}`,{...t,headers:i});if(a.status===204)return;let o=null,s=await a.text();if(s)try{o=JSON.parse(s)}catch{o=null}if(!a.ok)throw new md(o?.error||o?.message||`Request failed (${a.status})`,a.status,o?.errors);return o}var U={get:(e,t)=>gd(`${e}${hd(t)}`),post:(e,t)=>gd(e,{method:`POST`,body:t instanceof FormData?t:JSON.stringify(t??{})}),put:(e,t)=>gd(e,{method:`PUT`,body:JSON.stringify(t??{})}),del:e=>gd(e,{method:`DELETE`})},_d={list:e=>U.get(`/products`,e),detail:e=>U.get(`/products/${encodeURIComponent(e)}`)},vd={list:()=>U.get(`/delivery-zones`)},yd={get:()=>U.get(`/settings`)},bd={create:e=>U.post(`/orders`,e),uploadProof:(e,t)=>{let n=new FormData;return n.append(`proof`,t),U.post(`/orders/${e}/payment-proof`,n)},lookup:(e,t)=>U.get(`/orders/${e}`,t)},xd={submit:e=>U.post(`/contact`,e)},Sd={register:e=>U.post(`/auth/register`,e),login:e=>U.post(`/auth/login`,e),logout:()=>U.post(`/auth/logout`),forgotPassword:e=>U.post(`/auth/forgot-password`,{email:e}),resetPassword:e=>U.post(`/auth/reset-password`,e),me:()=>U.get(`/auth/me`)},Cd={orders:e=>U.get(`/account/orders`,e),orderDetail:e=>U.get(`/account/orders/${e}`),addresses:()=>U.get(`/account/addresses`),addAddress:e=>U.post(`/account/addresses`,e),updateAddress:(e,t)=>U.put(`/account/addresses/${e}`,t),removeAddress:e=>U.del(`/account/addresses/${e}`),wishlist:()=>U.get(`/account/wishlist`),addToWishlist:e=>U.post(`/account/wishlist/${e}`),removeFromWishlist:e=>U.del(`/account/wishlist/${e}`),updateProfile:e=>U.put(`/account/profile`,e)},wd=(0,S.createContext)(null);function Td(e){return{id:e.id,name:e.name,email:e.email,phone:e.phone,role:e.role}}function Ed({children:e}){let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!0),a=di(),o=async()=>{if(!dd()){n(null),i(!1);return}try{let e=await Sd.me();n(Td(e))}catch{fd(null),n(null)}finally{i(!1)}};(0,S.useEffect)(()=>{o()},[]);let s=(0,S.useMemo)(()=>({user:t,loading:r,register:async({name:e,email:t,password:r,phone:i})=>{try{let a=await Sd.register({name:e,email:t,phone:i,password:r});return fd(a.token),n(Td(a.user)),{ok:!0}}catch(e){return e instanceof md?{ok:!1,error:(e.errors?Object.values(e.errors)[0]:void 0)??e.message}:{ok:!1,error:`Something went wrong. Please try again.`}}},login:async(e,t)=>{try{let r=await Sd.login({email:e,password:t});return fd(r.token),n(Td(r.user)),{ok:!0}}catch(e){return e instanceof md?{ok:!1,error:e.message}:{ok:!1,error:`Something went wrong. Please try again.`}}},logout:()=>{Sd.logout().catch(()=>{}),fd(null),n(null),a.removeQueries({queryKey:[`account`]})},updateProfile:async e=>{try{let t=await Cd.updateProfile(e);return n(Td(t.user)),{ok:!0}}catch(e){return e instanceof md?{ok:!1,error:(e.errors?Object.values(e.errors)[0]:void 0)??e.message}:{ok:!1,error:`Something went wrong. Please try again.`}}},changePassword:async e=>{try{let t=await Cd.updateProfile({password:e});return n(Td(t.user)),{ok:!0}}catch(e){return e instanceof md?{ok:!1,error:e.message}:{ok:!1,error:`Something went wrong. Please try again.`}}},refresh:o}),[t,r,a]);return(0,L.jsx)(wd.Provider,{value:s,children:e})}function Dd(){let e=(0,S.useContext)(wd);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}var Od=(0,S.createContext)(null),kd=`fc.cart.v1`;function Ad({children:e}){let[t,n]=(0,S.useState)(()=>{try{let e=localStorage.getItem(kd);return e?JSON.parse(e):[]}catch{return[]}});(0,S.useEffect)(()=>{localStorage.setItem(kd,JSON.stringify(t))},[t]);let r=(0,S.useMemo)(()=>{let e=t.reduce((e,t)=>e+t.quantity,0),r=e=>{let t=(e.addOns??[]).reduce((e,t)=>e+t.price,0);return(e.unitPrice+t)*e.quantity},i=t.reduce((e,t)=>e+r(t),0);return{items:t,count:e,subtotal:i,add:e=>n(t=>[...t,e]),update:(e,t)=>n(n=>n.map(n=>n.id===e?{...n,...t}:n)),remove:e=>n(t=>t.filter(t=>t.id!==e)),clear:()=>n([])}},[t]);return(0,L.jsx)(Od.Provider,{value:r,children:e})}function jd(){let e=(0,S.useContext)(Od);if(!e)throw Error(`useCart must be used within CartProvider`);return e}var Md=(0,S.createContext)(null),Nd=`fc.wishlist.v1`;function Pd(){try{let e=localStorage.getItem(Nd);return e?JSON.parse(e):[]}catch{return[]}}function Fd({children:e}){let{user:t}=Dd(),[n,r]=(0,S.useState)(()=>Pd()),[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{t||localStorage.setItem(Nd,JSON.stringify(n))},[n,t]),(0,S.useEffect)(()=>{if(!t)return;let e=!1;return a(!0),Cd.wishlist().then(t=>{e||r(t.map(e=>e.id))}).catch(()=>{}).finally(()=>{e||a(!1)}),()=>{e=!0}},[t]);let o=(0,S.useMemo)(()=>({ids:n,loading:i,has:e=>n.includes(e),toggle:e=>{let i=n.includes(e);if(r(t=>i?t.filter(t=>t!==e):[...t,e]),!t)return;let a=()=>r(t=>i?[...t,e]:t.filter(t=>t!==e));(i?Cd.removeFromWishlist(e):Cd.addToWishlist(e)).catch(e=>{a(),e instanceof md||console.error(e)})}}),[n,i,t]);return(0,L.jsx)(Md.Provider,{value:o,children:e})}function Id(){let e=(0,S.useContext)(Md);if(!e)throw Error(`useWishlist must be used within WishlistProvider`);return e}var Ld=class extends S.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Error caught by boundary:`,e,t)}render(){return this.state.hasError?(0,L.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`h1`,{className:`text-4xl font-bold text-foreground mb-4`,children:`Oops! Something went wrong`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mb-8`,children:this.state.error?.message||`An unexpected error occurred`}),(0,L.jsx)(`button`,{onClick:()=>window.location.reload(),className:`px-6 py-2 bg-primary text-primary-foreground rounded-lg hover:opacity-90`,children:`Reload Page`})]})}):this.props.children}},Rd=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),zd=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Bd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Vd=e=>{let t=Bd(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hd={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`},Ud=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Wd=(0,S.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,S.createElement)(`svg`,{ref:c,...Hd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Rd(`lucide`,i),...!a&&!Ud(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,S.createElement)(e,t)),...Array.isArray(a)?a:[a]])),W=(e,t)=>{let n=(0,S.forwardRef)(({className:n,...r},i)=>(0,S.createElement)(Wd,{ref:i,iconNode:t,className:Rd(`lucide-${zd(Vd(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Vd(e),n},Gd=W(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Kd=W(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),qd=W(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),Jd=W(`candy`,[[`path`,{d:`M10 7v10.9`,key:`1gynux`}],[`path`,{d:`M14 6.1V17`,key:`116kdf`}],[`path`,{d:`M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4`,key:`gpb6xx`}],[`path`,{d:`M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07`,key:`1tsln4`}],[`path`,{d:`M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4`,key:`qexcha`}]]),Yd=W(`chart-column`,[[`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`}]]),Xd=W(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Zd=W(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Qd=W(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),$d=W(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ef=W(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),tf=W(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),nf=W(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),rf=W(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),af=W(`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`}]]),of=W(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),sf=W(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),cf=W(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),lf=W(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),uf=W(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),df=W(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),ff=W(`flower`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5`,key:`14wa3c`}],[`path`,{d:`M12 7.5V9`,key:`1oy5b0`}],[`path`,{d:`M7.5 12H9`,key:`eltsq1`}],[`path`,{d:`M16.5 12H15`,key:`vk5kw4`}],[`path`,{d:`M12 16.5V15`,key:`k7eayi`}],[`path`,{d:`m8 8 1.88 1.88`,key:`nxy4qf`}],[`path`,{d:`M14.12 9.88 16 8`,key:`1lst6k`}],[`path`,{d:`m8 16 1.88-1.88`,key:`h2eex1`}],[`path`,{d:`M14.12 14.12 16 16`,key:`uqkrx3`}]]),pf=W(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),mf=W(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),hf=W(`instagram`,[[`rect`,{width:`20`,height:`20`,x:`2`,y:`2`,rx:`5`,ry:`5`,key:`2e1cvw`}],[`path`,{d:`M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z`,key:`9exkf1`}],[`line`,{x1:`17.5`,x2:`17.51`,y1:`6.5`,y2:`6.5`,key:`r4j83e`}]]),gf=W(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),_f=W(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),vf=W(`leaf`,[[`path`,{d:`M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z`,key:`nnexq3`}],[`path`,{d:`M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12`,key:`mt58a7`}]]),yf=W(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),bf=W(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),xf=W(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Sf=W(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Cf=W(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),wf=W(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Tf=W(`message-square-heart`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7.5 9.5c0 .687.265 1.383.697 1.844l3.009 3.264a1.14 1.14 0 0 0 .407.314 1 1 0 0 0 .783-.004 1.14 1.14 0 0 0 .398-.31l3.008-3.264A2.77 2.77 0 0 0 16.5 9.5 2.5 2.5 0 0 0 12 8a2.5 2.5 0 0 0-4.5 1.5`,key:`1faxuh`}]]),Ef=W(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Df=W(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Of=W(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),kf=W(`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`}]]),Af=W(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),jf=W(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Mf=W(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Nf=W(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Pf=W(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ff=W(`shopping-bag`,[[`path`,{d:`M16 10a4 4 0 0 1-8 0`,key:`1ltviw`}],[`path`,{d:`M3.103 6.034h17.794`,key:`awc11p`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`,key:`o988cm`}]]),If=W(`shopping-cart`,[[`circle`,{cx:`8`,cy:`21`,r:`1`,key:`jimo8o`}],[`circle`,{cx:`19`,cy:`21`,r:`1`,key:`13723u`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`,key:`9zh506`}]]),Lf=W(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Rf=W(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),zf=W(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Bf=W(`store`,[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`,key:`slp6dd`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`,key:`o0xfot`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`,key:`wn3emo`}]]),Vf=W(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Hf=W(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Uf=W(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Wf=W(`truck`,[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`,key:`wrbu53`}],[`path`,{d:`M15 18H9`,key:`1lyqi6`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`,key:`lysw3i`}],[`circle`,{cx:`17`,cy:`18`,r:`2`,key:`332jqn`}],[`circle`,{cx:`7`,cy:`18`,r:`2`,key:`19iecd`}]]),Gf=W(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Kf=W(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),qf=W(`users-round`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),Jf=W(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Yf=W(`wine`,[[`path`,{d:`M8 22h8`,key:`rmew8v`}],[`path`,{d:`M7 10h10`,key:`1101jm`}],[`path`,{d:`M12 15v7`,key:`t2xh3l`}],[`path`,{d:`M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z`,key:`10ffi3`}]]),Xf=W(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Zf=`/assets/logo-BPrl4oKL.png`,Qf=[{to:`/shop`,label:`Shop`},{to:`/about`,label:`About`},{to:`/contact`,label:`Contact`},{to:`/faq`,label:`FAQ`}];function $f(){let{count:e}=jd(),{ids:t}=Id(),{user:n}=Dd(),[r,i]=(0,S.useState)(!1);return(0,L.jsxs)(`header`,{className:`sticky top-0 z-40 border-b border-taupe/10 bg-cream/80 backdrop-blur-md`,children:[(0,L.jsxs)(`div`,{className:`mx-auto flex max-w-7xl items-center justify-between gap-2 px-4 py-2 md:px-6 md:py-2.5`,children:[(0,L.jsx)(Fn,{to:`/shop`,className:`flex items-center gap-2`,children:(0,L.jsx)(`img`,{src:Zf,alt:`Flora and Creations`,className:`h-28 w-auto object-contain md:h-28`})}),(0,L.jsx)(`nav`,{className:`hidden items-center gap-7 lg:flex`,children:Qf.map(e=>(0,L.jsx)(In,{to:e.to,end:e.to===`/shop`,className:({isActive:e})=>`text-sm transition-colors ${e?`text-sage`:`text-foreground/80 hover:text-sage`}`,children:e.label},e.to))}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1 md:gap-3`,children:[(0,L.jsxs)(Fn,{to:`/account/wishlist`,className:`relative p-2 text-foreground/80 hover:text-sage`,"aria-label":`Wishlist`,children:[(0,L.jsx)(mf,{className:`h-5 w-5`}),t.length>0&&(0,L.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 grid h-4 min-w-4 place-items-center rounded-full bg-rose px-1 text-[10px] font-medium text-white`,children:t.length})]}),(0,L.jsxs)(Fn,{to:`/cart`,className:`relative p-2 text-foreground/80 hover:text-sage`,"aria-label":`Cart`,children:[(0,L.jsx)(Ff,{className:`h-5 w-5`}),e>0&&(0,L.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 grid h-4 min-w-4 place-items-center rounded-full bg-sage px-1 text-[10px] font-medium text-white`,children:e})]}),(0,L.jsxs)(Fn,{to:n?`/account`:`/login`,className:`flex items-center gap-1.5 rounded-full p-2 ${n?`bg-sage-mist/60 text-sage`:`text-foreground/80 hover:text-sage`}`,"aria-label":`Account`,children:[(0,L.jsx)(Kf,{className:`h-5 w-5`}),n&&(0,L.jsx)(`span`,{className:`hidden md:inline text-sm font-medium`,children:n.name?.split(` `)[0]})]}),(0,L.jsx)(`button`,{onClick:()=>i(e=>!e),className:`p-2 lg:hidden`,"aria-label":`Menu`,children:r?(0,L.jsx)(Xf,{className:`h-5 w-5`}):(0,L.jsx)(Cf,{className:`h-5 w-5`})})]})]}),r&&(0,L.jsx)(`div`,{className:`border-t border-taupe/70 bg-cream lg:hidden`,children:(0,L.jsx)(`nav`,{className:`mx-auto flex max-w-7xl flex-col gap-1 px-4 py-3`,children:Qf.map(e=>(0,L.jsx)(In,{to:e.to,end:e.to===`/shop`,onClick:()=>i(!1),className:({isActive:e})=>`rounded-lg px-3 py-2 text-sm ${e?`bg-sage-mist text-forest`:`text-foreground/80`}`,children:e.label},e.to))})})]})}var ep=new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,minimumFractionDigits:0,maximumFractionDigits:0}),tp=e=>ep.format(e),np=[{fee:2e3,areas:[`Lagos Island`,`Ikoyi`,`Victoria Island`]},{fee:2500,areas:[`Mainland Lagos`,`Lekki`]},{fee:3e3,areas:[`Ajah`,`Epe`]}],rp={name:`Flora and Creations`,address:`Suite B1 Jahi Plaza, Ben Ndi Obi street.`,email:`hello@floraandcreations.com`,phones:[`0703 167 7165`,`0803 703 3240`],whatsapp:`2347031677165`,instagram:`https://instagram.com/floraandcreations`,bank:{name:`Access Bank`,accountName:`Flora and Creations`,accountNumber:`0030258382`}},ip=[`linear-gradient(135deg, #FBF5F0 0%, #EEDDD8 100%)`,`linear-gradient(135deg, #EEF3EC 0%, #D8E4D0 100%)`,`linear-gradient(135deg, #FBF5F0 0%, #E4DCD3 100%)`,`linear-gradient(135deg, #F4EFE7 0%, #D9CFC0 100%)`,`linear-gradient(135deg, #EEF3EC 0%, #C9DAC1 100%)`,`linear-gradient(135deg, #FBF5F0 0%, #E9D9B8 100%)`];function ap(e){return ip[e%ip.length]}function op(e){return e==null?0:typeof e==`number`?e:parseFloat(e)||0}function sp(e){return Array.isArray(e)?e:[]}function cp(e){return{id:e.id,slug:e.slug,name:e.name,description:e.description,basePrice:op(e.base_price),status:e.status,featured:!!e.featured,productType:sp(e.product_type).map(e=>({name:e.name,slug:e.slug})),occasions:sp(e.occasions).map(e=>({name:e.name,slug:e.slug})),thumbnail:pd(e.thumbnail)??``}}function lp(e){return{id:e.id,slug:e.slug,name:e.name,description:e.description,basePrice:op(e.base_price),status:e.status,featured:!!e.featured,productType:sp(e.product_type).map(e=>({name:e.name,slug:e.slug})),occasions:sp(e.occasions).map(e=>({name:e.name,slug:e.slug})),thumbnail:pd(e.images&&e.images[0]?.image_url||null)??``,images:sp(e.images).slice().sort((e,t)=>e.sort_order-t.sort_order).map(e=>({id:e.id,url:pd(e.image_url)||``})),variants:sp(e.variants).map(e=>({id:e.id,size:e.size,color:e.color,price:op(e.price),stockStatus:e.stock_status,sku:e.sku})),addOns:sp(e.add_ons).map(e=>({id:e.id,name:e.name,price:op(e.price),type:e.type}))}}function up(e){return Ei({queryKey:[`products`,e],queryFn:async()=>{let t=await _d.list(e);return{...t,data:t.data.map(cp)}},placeholderData:e=>e})}function dp(e){return Ei({queryKey:[`product`,e],queryFn:async()=>lp(await _d.detail(e)),enabled:!!e})}function fp(){return Ei({queryKey:[`delivery-zones`],queryFn:async()=>(await vd.list()).map(e=>({id:e.id,area:e.area_name,fee:op(e.fee)})),staleTime:600*1e3})}function pp(){return Ei({queryKey:[`settings`],queryFn:()=>yd.get(),staleTime:600*1e3})}function mp(){let{user:e}=Dd();return Ei({queryKey:[`account`,`orders`],queryFn:()=>Cd.orders({per_page:50}),enabled:!!e})}function hp(e){let{user:t}=Dd();return Ei({queryKey:[`account`,`order`,e],queryFn:()=>Cd.orderDetail(e),enabled:!!t&&!!e})}function gp(e,t){return Ei({queryKey:[`order-lookup`,e,t],queryFn:()=>bd.lookup(e,t),enabled:!!e&&(!!t.email||!!t.phone)})}function _p(){let{user:e}=Dd();return Ei({queryKey:[`account`,`addresses`],queryFn:()=>Cd.addresses(),enabled:!!e})}function vp(){let{user:e}=Dd();return Ei({queryKey:[`account`,`wishlist`],queryFn:()=>Cd.wishlist(),enabled:!!e})}function yp(){let{data:e}=pp(),t=[e?.contact?.phone_whatsapp_1,e?.contact?.phone_whatsapp_2].filter(Boolean),n=e?.contact?.business_address??rp.address,r=e?.social?.instagram_url??rp.instagram;return(0,L.jsxs)(`footer`,{className:`mt-16 border-t border-taupe/70 bg-sage-mist/60`,children:[(0,L.jsxs)(`div`,{className:`mx-auto grid max-w-7xl gap-10 px-4 py-12 md:grid-cols-2 md:px-6 lg:grid-cols-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`font-display text-2xl text-forest`,children:[`Flora `,(0,L.jsx)(`span`,{className:`italic text-sage`,children:`&`}),` Creations`]}),(0,L.jsx)(`p`,{className:`mt-3 max-w-xs text-sm leading-relaxed text-foreground/80`,children:`Handcrafted bouquets and gifts, made with heart in Abuja. Delivered with care to your loved ones.`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h4`,{className:`font-display text-lg`,children:`Quick Links`}),(0,L.jsxs)(`ul`,{className:`mt-3 space-y-2 text-sm text-foreground/80`,children:[(0,L.jsx)(`li`,{children:(0,L.jsx)(Fn,{to:`/shop`,className:`hover:text-sage`,children:`Shop`})}),(0,L.jsx)(`li`,{children:(0,L.jsx)(Fn,{to:`/about`,className:`hover:text-sage`,children:`About`})}),(0,L.jsx)(`li`,{children:(0,L.jsx)(Fn,{to:`/contact`,className:`hover:text-sage`,children:`Contact`})}),(0,L.jsx)(`li`,{children:(0,L.jsx)(Fn,{to:`/faq`,className:`hover:text-sage`,children:`FAQ / Delivery`})})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h4`,{className:`font-display text-lg`,children:`Contact Us`}),(0,L.jsxs)(`ul`,{className:`mt-3 space-y-2 text-sm text-foreground/80`,children:[(0,L.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(Af,{className:`mt-0.5 h-4 w-4 text-sage`}),(0,L.jsx)(`span`,{children:(t.length?t:rp.phones).join(` / `)})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(xf,{className:`mt-0.5 h-4 w-4 text-sage`}),(0,L.jsx)(`a`,{href:`mailto:${rp.email}`,className:`hover:text-sage`,children:rp.email})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(Sf,{className:`mt-0.5 h-4 w-4 text-sage`}),(0,L.jsx)(`span`,{children:n})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(hf,{className:`mt-0.5 h-4 w-4 text-sage`}),(0,L.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:`hover:text-sage`,children:`@floraandcreations`})]})]})]})]}),(0,L.jsx)(`div`,{className:`border-t border-taupe/70 bg-cream/60`,children:(0,L.jsxs)(`div`,{className:`mx-auto max-w-7xl px-4 py-4 text-center text-xs text-foreground/60 md:px-6`,children:[`© `,new Date().getFullYear(),` Flora and Creations. All rights reserved.`]})})]})}function bp({children:e}){return(0,L.jsxs)(`div`,{className:`flex flex-col min-h-screen`,children:[(0,L.jsx)($f,{}),(0,L.jsx)(`main`,{className:`flex-1`,children:e}),(0,L.jsx)(yp,{})]})}function xp({items:e}){return(0,L.jsx)(`nav`,{className:`fixed inset-x-0 bottom-0 z-40 border-t border-taupe/70 bg-card/95 backdrop-blur md:hidden`,style:{paddingBottom:`env(safe-area-inset-bottom)`},children:(0,L.jsx)(`div`,{className:`mx-auto flex max-w-lg items-stretch justify-between px-1`,children:e.map(({to:e,label:t,icon:n,end:r})=>(0,L.jsx)(In,{to:e,end:r,className:({isActive:e})=>`flex flex-1 flex-col items-center gap-0.5 py-2.5 text-[11px] transition-colors ${e?`text-sage`:`text-muted-foreground`}`,children:({isActive:e})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(n,{className:`h-5 w-5 ${e?`text-sage`:`text-muted-foreground`}`,strokeWidth:e?2.4:2}),(0,L.jsx)(`span`,{className:e?`font-medium text-forest`:``,children:t})]})},e))})})}var Sp=[{to:`/account`,label:`Dashboard`,icon:_f,end:!0},{to:`/account/orders`,label:`Orders`,icon:Df},{to:`/account/addresses`,label:`Addresses`,icon:Sf},{to:`/account/wishlist`,label:`Wishlist`,icon:mf},{to:`/account/settings`,label:`Settings`,icon:Pf}];function Cp({children:e}){let[t,n]=(0,S.useState)(!1),{user:r,logout:i}=Dd(),a=dt(),o=()=>{i(),a(`/login`)};return(0,L.jsxs)(`div`,{className:`flex h-screen bg-cream`,children:[(0,L.jsx)(`div`,{className:`hidden lg:block`,children:(0,L.jsx)(wp,{user:r,onLogout:o})}),(0,L.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,L.jsx)(`header`,{className:`bg-white border-b border-taupe px-4 md:px-6 py-4`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsx)(`button`,{onClick:()=>n(!t),className:`p-2 hover:bg-sage-mist rounded-lg transition-colors lg:hidden`,children:(0,L.jsx)(Cf,{className:`w-5 h-5 text-muted-foreground`})}),(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`My Account`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 md:gap-4`,children:[(0,L.jsxs)(Fn,{to:`/shop`,className:`hidden sm:inline-flex items-center gap-2 rounded-lg bg-sage px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-forest transition-colors`,children:[(0,L.jsx)(Bf,{className:`w-4 h-4`}),` Go to Shop`]}),r&&(0,L.jsxs)(`div`,{className:`hidden sm:flex items-center gap-3 px-3 py-2 rounded-lg bg-cream`,children:[(0,L.jsx)(Kf,{className:`w-4 h-4 text-muted-foreground`}),(0,L.jsx)(`div`,{className:`text-sm`,children:(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:r.name||r.email})})]}),(0,L.jsx)(`button`,{onClick:o,className:`p-2 hover:bg-sage-mist rounded-lg transition-colors`,title:`Sign out`,children:(0,L.jsx)(bf,{className:`w-5 h-5 text-muted-foreground`})})]})]})}),(0,L.jsx)(`main`,{className:`flex-1 overflow-auto pb-24 lg:pb-0`,children:(0,L.jsx)(`div`,{className:`p-4 md:p-6`,children:e})})]}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:()=>n(!1)}),(0,L.jsx)(`div`,{className:`fixed left-0 top-0 z-50 h-screen w-64 overflow-y-auto lg:hidden`,children:(0,L.jsx)(wp,{user:r,onLogout:o,onNavigate:()=>n(!1)})})]}),(0,L.jsx)(xp,{items:Sp})]})}function wp({user:e,onLogout:t,onNavigate:n}){return(0,L.jsxs)(`aside`,{className:`w-64 h-full bg-white border-r border-taupe overflow-y-auto flex flex-col`,children:[(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsx)(`h1`,{className:`text-2xl font-display text-forest`,children:`My Account`}),e&&(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground truncate`,children:e.email})]}),(0,L.jsxs)(Fn,{to:`/shop`,onClick:n,className:`mx-4 mb-2 inline-flex items-center justify-center gap-2 rounded-lg bg-sage px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-forest transition-colors`,children:[(0,L.jsx)(Bf,{className:`w-4 h-4`}),` Go to Shop`]}),(0,L.jsx)(`nav`,{className:`px-4 py-4 space-y-1 flex-1`,children:Sp.map(e=>{let t=e.icon;return(0,L.jsxs)(In,{to:e.to,end:e.end,onClick:n,className:({isActive:e})=>`flex items-center gap-3 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${e?`bg-sage-mist text-forest`:`text-foreground hover:bg-sage-mist/40`}`,children:[(0,L.jsx)(t,{className:`w-5 h-5`}),e.label]},e.to)})}),(0,L.jsx)(`div`,{className:`p-4`,children:(0,L.jsxs)(`button`,{onClick:t,className:`w-full inline-flex items-center justify-center gap-2 rounded-lg border border-taupe bg-white px-4 py-2 text-sm font-medium text-foreground hover:bg-sage-mist transition-colors`,children:[(0,L.jsx)(bf,{className:`h-4 w-4`}),` Sign out`]})})]})}function Tp(e){if(e instanceof md){let t=e.errors?Object.entries(e.errors)[0]:void 0,n=[e.message];return t&&n.push(`(${t[0]}: ${t[1]})`),n.push(`[HTTP ${e.status}]`),n.join(` `)}return e instanceof TypeError&&/fetch|network/i.test(e.message)?`Network error — couldn't reach the server. Check your connection or the API URL.`:e instanceof Error&&e.message||`An unexpected error occurred.`}function Ep(e,t=`Something went wrong. Please try again.`){return e instanceof md?e.status===0?`We couldn't reach the server. Please check your internet connection and try again.`:e.status===429?`You're trying that a bit too fast. Please wait a moment and try again.`:e.status===422||e.status===400?(e.errors?Object.values(e.errors)[0]:void 0)||`Please check the details you entered and try again.`:e.status>=500?`Our system had a hiccup on our end. Your order was not placed — please try again in a moment.`:t:e instanceof TypeError&&/fetch|network/i.test(e.message)?`We couldn't reach the server. Please check your internet connection and try again.`:t}function Dp(e,t){t instanceof md?console.error(`[${e}]`,{status:t.status,message:t.message,fieldErrors:t.errors}):console.error(`[${e}]`,t)}function Op({children:e}){let[t,n]=(0,S.useState)(`checking`),r=ct();return(0,S.useEffect)(()=>{if(!dd()){n(`denied`);return}Sd.me().then(e=>{if(e.role===`admin`||e.role===`staff`){n(`wrong-role`);return}n(`authorized`)}).catch(e=>{Dp(`customer-guard`,e),n(`denied`)})},[]),t===`checking`?(0,L.jsx)(`div`,{className:`grid min-h-screen place-items-center text-sm text-muted-foreground`,children:`Checking access…`}):t===`wrong-role`?(0,L.jsx)(zt,{to:`/admin`,replace:!0}):t===`denied`?(0,L.jsx)(zt,{to:`/login?redirect=${encodeURIComponent(r.pathname+r.search)}`,replace:!0}):(0,L.jsx)(L.Fragment,{children:e})}function kp({product:e}){let{has:t,toggle:n}=Id(),{add:r}=jd(),i=t(e.id),a=e.thumbnail?`url(${e.thumbnail})`:ap(e.id);return(0,L.jsxs)(Fn,{to:`/products/${e.slug}`,className:`group flex flex-col overflow-hidden rounded-2xl border border-taupe/70 bg-card transition-shadow hover:shadow-md`,children:[(0,L.jsxs)(`div`,{className:`relative aspect-square w-full overflow-hidden`,style:{backgroundImage:a,backgroundSize:`cover`,backgroundPosition:`center`},children:[e.featured&&(0,L.jsx)(`span`,{className:`absolute right-3 top-3 rounded-full bg-white/85 px-3 py-1 text-xs font-medium text-forest shadow-sm backdrop-blur`,children:`Featured`}),(0,L.jsx)(`button`,{type:`button`,onClick:t=>{t.preventDefault(),n(e.id)},"aria-label":`Toggle wishlist`,className:`absolute left-3 top-3 grid h-9 w-9 place-items-center rounded-full backdrop-blur transition-colors ${i?`bg-rose text-white`:`bg-white/85 text-forest hover:bg-white`}`,children:(0,L.jsx)(mf,{className:`h-4 w-4 ${i?`fill-current`:``}`})}),!e.thumbnail&&(0,L.jsx)(`div`,{className:`absolute inset-0 grid place-items-center opacity-30 transition-opacity group-hover:opacity-50`,children:(0,L.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`h-40 w-40 text-forest/40`,fill:`currentColor`,"aria-hidden":!0,children:[(0,L.jsx)(`circle`,{cx:`50`,cy:`35`,r:`9`}),(0,L.jsx)(`circle`,{cx:`35`,cy:`50`,r:`9`}),(0,L.jsx)(`circle`,{cx:`65`,cy:`50`,r:`9`}),(0,L.jsx)(`circle`,{cx:`50`,cy:`65`,r:`9`}),(0,L.jsx)(`circle`,{cx:`50`,cy:`50`,r:`7`,opacity:`0.5`}),(0,L.jsx)(`path`,{d:`M50 74 Q45 90 30 92 M50 74 Q55 90 70 92 M50 74 L50 96`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,opacity:`0.6`})]})})]}),(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2 p-3`,children:[(0,L.jsx)(`h3`,{className:`line-clamp-1 font-display text-lg text-forest`,children:e.name}),(0,L.jsx)(`p`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:e.description}),(0,L.jsxs)(`div`,{className:`mt-auto flex items-center justify-between gap-2 pt-2`,children:[(0,L.jsx)(`span`,{className:`text-sm font-semibold text-forest`,children:tp(e.basePrice)}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsxs)(`button`,{onClick:t=>{t.preventDefault(),t.stopPropagation(),r({id:`${e.id}-${Date.now()}`,productId:e.id,productSlug:e.slug,name:e.name,image:e.thumbnail,addOns:[],quantity:1,unitPrice:e.basePrice}),R.success(`Added to cart`)},className:`rounded-full bg-forest px-3 py-1.5 text-xs font-medium text-white hover:bg-forest/90 transition-colors flex items-center gap-1`,title:`Add to cart`,children:[(0,L.jsx)(Ff,{className:`h-3 w-3`}),`Add`]}),(0,L.jsx)(`span`,{className:`rounded-full bg-sage px-3 py-1.5 text-xs font-medium text-primary-foreground transition-colors group-hover:bg-forest`,children:`View`})]})]})]})]})}var Ap=[{id:1,name:`Bouquets`,slug:`bouquets`,label:`Bouquets`},{id:2,name:`Arrangements`,slug:`arrangements`,label:`Arrangements`},{id:3,name:`Wreaths`,slug:`wreaths`,label:`Wreaths`},{id:4,name:`Plants`,slug:`plants`,label:`Plants`}],jp=`/assets/hero-bouquet-DoRrHviF.jpg`;function Mp(e,t){let n=`${e} ${t??``}`.toLowerCase();return n.includes(`card`)||n.includes(`note`)?Tf:n.includes(`wine`)||n.includes(`champagne`)?Yf:n.includes(`chocolate`)||n.includes(`candy`)||n.includes(`sweet`)?Jd:n.includes(`balloon`)?Of:n.includes(`box`)||n.includes(`vase`)?qd:pf}var Np=9,Pp=`https://wa.me/2347031677165?text=Hi!%20I'd%20like%20to%20place%20a%20same-day%20order.`,Fp=[`Celebrate Life's Special Moment with Fresh Flowers`,`Handcrafted Bouquets for Every Occasion`,`Make Every Gift Unforgettable with Our Arrangements`,`From Our Garden to Your Doorstep`,`Brighten Someone's Day with a Thoughtful Gesture`,`Experience the Art of Floral Design`,`Your One-Stop Shop for Flowers, Chocolates, and More`];function Ip(){let[e,t]=(0,S.useState)(0);return(0,S.useEffect)(()=>{let e=setInterval(()=>{t(e=>(e+1)%Fp.length)},1e4);return()=>clearInterval(e)},[]),(0,L.jsxs)(`div`,{className:`max-w-2xl text-center md:text-left`,children:[(0,L.jsxs)(`div`,{className:`mb-3 inline-flex items-center gap-2 rounded-full border border-white/30 bg-white/10 px-3 py-1 text-xs text-white backdrop-blur`,children:[(0,L.jsx)(Lf,{className:`h-3.5 w-3.5`}),`Handcrafted in Abuja`]}),(0,L.jsx)(`h1`,{className:`font-display text-4xl leading-tight md:text-5xl min-h-[2.4em] md:min-h-[2.2em] drop-shadow-[0_2px_10px_rgba(0,0,0,0.55)]`,style:{color:`#d9f0dc`},children:Fp[e]}),(0,L.jsx)(`p`,{className:`mt-3 max-w-md text-sm text-white md:text-base mx-auto md:mx-0 drop-shadow-[0_1px_6px_rgba(0,0,0,0.5)]`,children:`Bouquets, gift boxes, chocolates, wines and more beautifully arranged and delivered across Abuja the same day.`}),(0,L.jsx)(`div`,{className:`mt-5 flex items-center justify-center gap-2 md:justify-start`,children:Fp.map((n,r)=>(0,L.jsx)(`button`,{onClick:()=>t(r),"aria-label":`Go to slide ${r+1}`,className:`h-1.5 rounded-full transition-all ${r===e?`w-6 bg-white`:`w-1.5 bg-white/40 hover:bg-white/60`}`},r))})]})}function Lp(){let[e,t]=Un(),n=e.get(`category`),r=(e.get(`q`)??``).trim(),i=e.get(`sort`)??`newest`,a=Math.max(1,parseInt(e.get(`page`)??`1`,10)||1),{data:o,isLoading:s,isError:c,error:l}=up({category:n??void 0,search:r||void 0,sort:i===`price-asc`||i===`price-desc`?`base_price`:`created_at`,order:i===`price-asc`?`asc`:`desc`,page:a,per_page:Np}),u=o?.data??[],d=o?.pagination.last_page??1,f=o?.pagination.total??0,p=o?.pagination.current_page??a,{data:m}=dp(u[0]?.slug),h=m?.addOns??[],g=(n,r)=>{let i=new URLSearchParams(e);r===null||r===``?i.delete(n):i.set(n,r),i.delete(`page`),t(i)},_=n=>{let r=new URLSearchParams(e);r.set(`page`,String(n)),t(r),window.scrollTo({top:400,behavior:`smooth`})};return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`section`,{className:`border-b border-taupe/70 bg-background`,children:(0,L.jsxs)(`div`,{className:`mx-auto max-w-7xl px-4 py-8 md:px-6 md:py-10 mb-10`,children:[(0,L.jsxs)(`div`,{className:`mb-5 flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-taupe/70 bg-card px-3 py-1.5 text-xs text-forest`,children:[(0,L.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-sage`}),`Open Now`]}),(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-taupe/70 bg-card px-3 py-1.5 text-xs text-forest`,children:[(0,L.jsx)(Wf,{className:`h-3.5 w-3.5 text-sage`}),`Abuja Delivery`]}),(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-taupe/70 bg-card px-3 py-1.5 text-xs text-forest`,children:[(0,L.jsx)(rf,{className:`h-3.5 w-3.5 text-sage`}),`Mon–Sat · 9:00 – 18:00`]})]}),(0,L.jsxs)(`div`,{className:`relative min-h-[300px] overflow-hidden rounded-2xl bg-cover bg-center md:min-h-[380px]`,style:{backgroundImage:`url(${jp})`},children:[(0,L.jsx)(`div`,{className:`absolute inset-0`,style:{background:`linear-gradient(115deg, rgba(23,58,37,0.92) 0%, rgba(23,58,37,0.75) 45%, rgba(122,164,120,0.55) 100%)`},"aria-hidden":!0}),(0,L.jsx)(`div`,{className:`relative z-10 flex min-h-[300px] items-center px-6 py-10 md:min-h-[380px] md:px-10 md:py-12`,children:(0,L.jsx)(Ip,{})})]})]})}),(0,L.jsx)(`div`,{className:`mx-auto max-w-7xl px-4 py-8 md:px-6 md:py-12`,children:(0,L.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-[240px_1fr]`,children:[(0,L.jsx)(`aside`,{className:`lg:sticky lg:top-24 lg:self-start`,children:(0,L.jsxs)(`div`,{className:`rounded-2xl border border-taupe/70 bg-white/60 p-5`,children:[(0,L.jsx)(`h3`,{className:`font-display text-lg text-forest`,children:`Shop by Type`}),(0,L.jsxs)(`ul`,{className:`mt-3 space-y-1`,children:[(0,L.jsx)(`li`,{children:(0,L.jsx)(`button`,{onClick:()=>g(`category`,null),className:`w-full rounded-full px-3 py-1.5 text-left text-sm transition-colors ${n?`text-foreground/80 hover:bg-sage-mist`:`bg-sage text-primary-foreground`}`,children:`All`})}),Ap.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`button`,{onClick:()=>g(`category`,e.slug),className:`w-full rounded-full px-3 py-1.5 text-left text-sm transition-colors ${n===e.slug?`bg-sage text-primary-foreground`:`text-foreground/80 hover:bg-sage-mist`}`,children:e.label})},e.id))]})]})}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-center justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[`Showing `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:u.length}),` of`,` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:f}),` products`]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`label`,{className:`text-sm text-muted-foreground`,children:`Sort`}),(0,L.jsxs)(`select`,{value:i,onChange:e=>g(`sort`,e.target.value),className:`rounded-full border border-taupe bg-card px-3 py-1.5 text-sm outline-none focus:border-sage`,children:[(0,L.jsx)(`option`,{value:`newest`,children:`Newest`}),(0,L.jsx)(`option`,{value:`popularity`,children:`Popularity`}),(0,L.jsx)(`option`,{value:`price-asc`,children:`Price — low to high`}),(0,L.jsx)(`option`,{value:`price-desc`,children:`Price — high to low`})]})]})]}),s?(0,L.jsx)(`div`,{className:`grid place-items-center rounded-2xl border border-taupe/70 bg-white/60 p-16`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-sage`})}):c?(0,L.jsxs)(`div`,{className:`rounded-2xl border border-taupe/70 bg-white/60 p-12 text-center`,children:[(0,L.jsx)(`p`,{className:`font-display text-2xl text-forest`,children:`Couldn't load products.`}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:Tp(l)})]}):u.length===0?(0,L.jsxs)(`div`,{className:`rounded-2xl border border-taupe/70 bg-white/60 p-12 text-center`,children:[(0,L.jsx)(`p`,{className:`font-display text-2xl text-forest`,children:`Nothing quite matches yet.`}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Try clearing filters or browse all products.`}),(0,L.jsx)(`button`,{onClick:()=>t(new URLSearchParams),className:`mt-4 rounded-full bg-sage px-5 py-2 text-sm text-primary-foreground`,children:`Clear filters`})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3`,children:u.map(e=>(0,L.jsx)(kp,{product:e},e.id))}),p===1&&h.length>0&&(0,L.jsxs)(`div`,{className:`mt-10 rounded-2xl border border-taupe/70 bg-sage-mist/50 p-5 md:p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(pf,{className:`h-5 w-5 text-sage`}),(0,L.jsx)(`h3`,{className:`font-display text-xl text-forest`,children:`Complete the gift`})]}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`A little something extra makes it unforgettable.`}),(0,L.jsx)(`div`,{className:`mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5`,children:h.map(e=>(0,L.jsxs)(`div`,{className:`flex flex-col items-center rounded-xl border border-taupe/70 bg-card p-4 text-center transition-shadow hover:shadow-sm`,children:[(0,L.jsx)(`div`,{className:`mb-2 grid h-11 w-11 place-items-center rounded-full bg-sage-mist text-sage`,children:(0,L.jsx)(Mp(e.name,e.type),{className:`h-5 w-5`})}),(0,L.jsx)(`div`,{className:`line-clamp-1 font-display text-sm text-forest`,children:e.name}),(0,L.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:tp(e.price)})]},e.id))})]}),d>1&&(0,L.jsxs)(`div`,{className:`mt-10 flex flex-wrap items-center justify-center gap-2`,children:[(0,L.jsx)(`button`,{disabled:p===1,onClick:()=>_(p-1),className:`rounded-full border border-taupe bg-card px-4 py-2 text-sm text-forest disabled:opacity-40`,children:`Prev`}),Array.from({length:d},(e,t)=>t+1).map(e=>(0,L.jsx)(`button`,{onClick:()=>_(e),className:`h-9 min-w-9 rounded-full px-3 text-sm ${e===p?`bg-sage text-primary-foreground`:`border border-taupe bg-card text-forest hover:bg-sage-mist`}`,children:e},e)),(0,L.jsx)(`button`,{disabled:p===d,onClick:()=>_(p+1),className:`rounded-full border border-taupe bg-card px-4 py-2 text-sm text-forest disabled:opacity-40`,children:`Next`})]}),(0,L.jsxs)(`div`,{className:`mt-12 grid gap-4 rounded-2xl border border-taupe/70 bg-white/60 p-6 md:grid-cols-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Lf,{className:`h-6 w-6 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Freshness guaranteed`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Arranged the same day`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Wf,{className:`h-6 w-6 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Same-day delivery`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Across Abuja`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Bf,{className:`h-6 w-6 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Store pickup`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Jahi Plaza, Abuja`})]})]})]}),(0,L.jsx)(`div`,{className:`mt-10 overflow-hidden rounded-2xl border border-sage/30 bg-gradient-to-br from-sage-mist/70 to-white/60 p-6 md:p-8`,children:(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-5 text-center md:flex-row md:justify-between md:text-left`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full bg-white/70 px-3 py-1 text-xs text-sage`,children:[(0,L.jsx)(wf,{className:`h-3.5 w-3.5`}),`Same-day orders`]}),(0,L.jsx)(`h3`,{className:`mt-2 font-display text-2xl text-forest`,children:`Need it today? Order on WhatsApp.`}),(0,L.jsx)(`p`,{className:`mt-1 max-w-md text-sm text-foreground/70`,children:`Chat with us directly for custom arrangements, urgent deliveries, or help picking the perfect bouquet.`})]}),(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-3 md:items-end`,children:[(0,L.jsxs)(`a`,{href:Pp,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-2 rounded-full bg-sage px-6 py-3 text-sm font-medium text-primary-foreground transition-colors hover:bg-sage/90`,children:[(0,L.jsx)(wf,{className:`h-4 w-4`}),`Chat with us`]}),(0,L.jsxs)(`a`,{href:`https://www.instagram.com/floraandcreations`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-foreground/60 hover:text-sage`,children:[(0,L.jsx)(hf,{className:`h-3.5 w-3.5`}),`@floraandcreations`]})]})]})})]})]})]})})]})}function Rp(){let{slug:e}=ht(),t=dt(),{data:n,isLoading:r,isError:i,error:a}=dp(e),{add:o}=jd(),{has:s,toggle:c}=Id(),l=(0,S.useMemo)(()=>Array.from(new Set((n?.variants??[]).map(e=>e.size).filter(Boolean))),[n]),u=(0,S.useMemo)(()=>Array.from(new Set((n?.variants??[]).map(e=>e.color).filter(Boolean))),[n]),[d,f]=(0,S.useState)(void 0),[p,m]=(0,S.useState)(void 0),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(1),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(0);(0,S.useEffect)(()=>{f(l[0]),m(u[0]),g([]),v(1),b(``),C(0)},[n?.id]);let w=(0,S.useMemo)(()=>{if(!(!n||n.variants.length===0))return n.variants.find(e=>(l.length===0||e.size===d)&&(u.length===0||e.color===p))},[n,l,u,d,p]),T=(0,S.useMemo)(()=>n?(w&&w.price>0?w.price:n.basePrice)+h.reduce((e,t)=>e+t.price,0):0,[n,w,h]),{data:E}=up({category:n?.productType[0]?.slug,per_page:5}),D=(E?.data??[]).filter(e=>e.id!==n?.id).slice(0,4);if(r)return(0,L.jsx)(`div`,{className:`grid min-h-[50vh] place-items-center`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-sage`})});if(i)return(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-24 text-center`,children:[(0,L.jsx)(`h1`,{className:`font-display text-3xl`,children:`Couldn't load this product`}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:Tp(a)}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-4 inline-block text-sage hover:underline`,children:`← Back to shop`})]});if(!n)return(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-24 text-center`,children:[(0,L.jsx)(`h1`,{className:`font-display text-3xl`,children:`Product not found`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-4 inline-block text-sage hover:underline`,children:`← Back to shop`})]});let O=w?.stockStatus===`out_of_stock`,k=n.images&&n.images.length>0?n.images:[{url:n.thumbnail}],A=k[x]?.url||n.thumbnail;return(0,L.jsxs)(`div`,{className:`min-h-screen bg-white`,children:[(0,L.jsx)(`div`,{className:`border-b border-taupe bg-sage-mist`,children:(0,L.jsx)(`div`,{className:`mx-auto max-w-7xl px-4 py-4 sm:px-6 lg:px-8`,children:(0,L.jsxs)(`button`,{onClick:()=>t(-1),className:`flex items-center gap-2 text-sm font-medium text-foreground hover:text-forest`,children:[(0,L.jsx)(Qd,{className:`h-4 w-4`}),`Back`]})})}),(0,L.jsxs)(`div`,{className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,L.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-2`,children:[(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(`div`,{className:`relative aspect-square overflow-hidden rounded-lg bg-sage-mist`,children:(0,L.jsx)(`img`,{src:A??``,alt:n.name,className:`h-full w-full object-cover`})}),k.length>1&&(0,L.jsx)(`div`,{className:`grid grid-cols-4 gap-2`,children:k.map((e,t)=>(0,L.jsx)(`button`,{onClick:()=>C(t),className:`relative aspect-square overflow-hidden rounded-lg border-2 ${t===x?`border-sage`:`border-taupe`}`,children:(0,L.jsx)(`img`,{src:e.url??``,alt:`${n.name} ${t+1}`,className:`h-full w-full object-cover`})},t))})]}),(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-bold text-forest`,children:n.name}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:n.slug})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`div`,{className:`text-3xl font-bold text-sage`,children:tp(T)}),w?.price&&w.price>0&&(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Base price: `,tp(n.basePrice)]})]}),n.description&&(0,L.jsx)(`div`,{className:`prose prose-sm max-w-none`,children:(0,L.jsx)(`p`,{className:`text-foreground`,children:n.description})}),l.length>0&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Size`}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.map(e=>(0,L.jsx)(`button`,{onClick:()=>f(e),className:`rounded-lg border-2 px-4 py-2 text-sm font-medium transition-colors ${d===e?`border-sage bg-sage/10 text-sage`:`border-taupe text-foreground hover:border-taupe`}`,children:e},e))})]}),u.length>0&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Color`}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:u.map(e=>(0,L.jsx)(`button`,{onClick:()=>m(e),className:`rounded-lg border-2 px-4 py-2 text-sm font-medium transition-colors ${p===e?`border-sage bg-sage/10 text-sage`:`border-taupe text-foreground hover:border-taupe`}`,children:e},e))})]}),n.addOns&&n.addOns.length>0&&(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-gradient-to-br from-sage/5 to-transparent p-4`,children:[(0,L.jsx)(`h3`,{className:`font-semibold text-forest mb-3`,children:`✨ Special Add-ons`}),(0,L.jsx)(`div`,{className:`space-y-2`,children:n.addOns.map(e=>(0,L.jsxs)(`label`,{className:`flex items-center gap-3 cursor-pointer`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:h.some(t=>t.id===e.id),onChange:t=>{t.target.checked?g([...h,e]):g(h.filter(t=>t.id!==e.id))},className:`h-4 w-4 rounded border-taupe text-sage`}),(0,L.jsx)(`div`,{className:`flex-1`,children:(0,L.jsx)(`div`,{className:`text-sm font-medium text-forest`,children:e.name})}),(0,L.jsx)(`div`,{className:`text-sm font-semibold text-sage`,children:tp(e.price)})]},e.id))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Quantity`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`button`,{onClick:()=>v(Math.max(1,_-1)),className:`rounded-lg border border-taupe p-2 hover:bg-sage-mist`,children:(0,L.jsx)(Ef,{className:`h-4 w-4`})}),(0,L.jsx)(`input`,{type:`number`,value:_,onChange:e=>v(Math.max(1,parseInt(e.target.value)||1)),className:`w-16 rounded-lg border border-taupe px-3 py-2 text-center text-sm`}),(0,L.jsx)(`button`,{onClick:()=>v(_+1),className:`rounded-lg border border-taupe p-2 hover:bg-sage-mist`,children:(0,L.jsx)(jf,{className:`h-4 w-4`})})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Special Instructions`}),(0,L.jsx)(`textarea`,{value:y,onChange:e=>b(e.target.value),placeholder:`Add any special requests or notes...`,className:`w-full rounded-lg border border-taupe px-3 py-2 text-sm`,rows:3})]}),(0,L.jsxs)(`div`,{className:`flex gap-3`,children:[(0,L.jsx)(`button`,{onClick:()=>{if(l.length>0&&!d){R.error(`Please select a size`);return}if(u.length>0&&!p){R.error(`Please select a color`);return}let e=w&&w.price>0?w.price:n.basePrice;o({id:`${n.id}-${w?.id??`base`}-${Date.now()}`,productId:n.id,productSlug:n.slug,name:n.name,image:A,unitPrice:e,quantity:_,variantId:w?.id,size:d,color:p,addOns:h,giftNote:y||void 0}),R.success(`${n.name} added to cart`)},disabled:O,className:`flex-1 rounded-lg bg-sage px-6 py-3 font-semibold text-white hover:bg-sage/90 disabled:bg-taupe transition-colors`,children:O?`Out of Stock`:`Add to Cart`}),(0,L.jsx)(`button`,{onClick:()=>c(n.id),className:`rounded-lg border-2 px-6 py-3 font-semibold transition-colors ${s(n.id)?`border-sage bg-sage/10 text-sage`:`border-taupe text-foreground hover:border-taupe`}`,children:(0,L.jsx)(mf,{className:`h-5 w-5 ${s(n.id)?`fill-current`:``}`})})]})]})]}),D.length>0&&(0,L.jsxs)(`div`,{className:`mt-16 border-t border-taupe pt-12`,children:[(0,L.jsx)(`h2`,{className:`text-2xl font-bold text-forest mb-6`,children:`Related Products`}),(0,L.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:D.map(e=>(0,L.jsx)(kp,{product:e},e.id))})]})]})]})}function zp(){let{items:e,update:t,remove:n,subtotal:r}=jd();return e.length===0?(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-24 text-center`,children:[(0,L.jsx)(`div`,{className:`mx-auto mb-6 grid h-24 w-24 place-items-center rounded-full bg-sage-mist`,children:(0,L.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`h-14 w-14 text-sage`,fill:`currentColor`,children:[(0,L.jsx)(`circle`,{cx:`50`,cy:`35`,r:`10`}),(0,L.jsx)(`circle`,{cx:`34`,cy:`52`,r:`10`}),(0,L.jsx)(`circle`,{cx:`66`,cy:`52`,r:`10`}),(0,L.jsx)(`circle`,{cx:`50`,cy:`68`,r:`10`})]})}),(0,L.jsx)(`h1`,{className:`font-display text-3xl text-forest`,children:`Your cart is empty`}),(0,L.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`Start with a bouquet — the rest will follow.`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-6 inline-block rounded-full bg-sage px-6 py-3 text-sm text-primary-foreground`,children:`Continue shopping`})]}):(0,L.jsxs)(`div`,{className:`mx-auto max-w-6xl px-4 py-10 md:px-6`,children:[(0,L.jsx)(`h1`,{className:`font-display text-4xl text-forest`,children:`Your Cart`}),(0,L.jsxs)(`div`,{className:`mt-8 grid gap-8 lg:grid-cols-[1fr_360px]`,children:[(0,L.jsx)(`div`,{className:`space-y-4`,children:e.map(e=>(0,L.jsxs)(`div`,{className:`flex gap-4 rounded-2xl border border-taupe/70 bg-card p-4`,children:[(0,L.jsx)(`div`,{className:`h-24 w-24 shrink-0 rounded-xl`,style:{backgroundImage:e.image?`url(${e.image})`:ap(e.productId),backgroundSize:`cover`,backgroundPosition:`center`}}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsx)(`h3`,{className:`font-display text-lg text-forest`,children:e.name}),(0,L.jsx)(`button`,{onClick:()=>n(e.id),className:`text-muted-foreground hover:text-destructive`,"aria-label":`Remove`,children:(0,L.jsx)(Xf,{className:`h-4 w-4`})})]}),(0,L.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.size&&(0,L.jsxs)(`span`,{children:[`Size: `,e.size]}),e.size&&e.color&&(0,L.jsx)(`span`,{children:` · `}),e.color&&(0,L.jsxs)(`span`,{children:[`Color: `,e.color]})]}),e.addOns.length>0&&(0,L.jsx)(`div`,{className:`mt-1 space-y-0.5 text-xs text-muted-foreground`,children:e.addOns.map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[(0,L.jsxs)(`span`,{children:[`+ `,e.name]}),(0,L.jsx)(`span`,{children:tp(e.price)})]},e.id))}),e.giftNote&&(0,L.jsxs)(`div`,{className:`mt-1 text-xs italic text-muted-foreground`,children:[`"`,e.giftNote,`"`]}),(0,L.jsxs)(`div`,{className:`mt-3 flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1 rounded-full border border-taupe bg-cream p-1`,children:[(0,L.jsx)(`button`,{onClick:()=>t(e.id,{quantity:Math.max(1,e.quantity-1)}),className:`grid h-7 w-7 place-items-center rounded-full hover:bg-sage-mist`,children:(0,L.jsx)(Ef,{className:`h-3.5 w-3.5`})}),(0,L.jsx)(`span`,{className:`min-w-5 text-center text-sm`,children:e.quantity}),(0,L.jsx)(`button`,{onClick:()=>t(e.id,{quantity:e.quantity+1}),className:`grid h-7 w-7 place-items-center rounded-full hover:bg-sage-mist`,children:(0,L.jsx)(jf,{className:`h-3.5 w-3.5`})})]}),(0,L.jsx)(`div`,{className:`font-semibold text-forest`,children:tp((e.unitPrice+e.addOns.reduce((e,t)=>e+t.price,0))*e.quantity)})]})]})]},e.id))}),(0,L.jsxs)(`aside`,{className:`h-fit rounded-2xl border border-taupe/70 bg-white/70 p-6 lg:sticky lg:top-24`,children:[(0,L.jsx)(`h3`,{className:`font-display text-xl text-forest`,children:`Order summary`}),(0,L.jsxs)(`div`,{className:`mt-4 space-y-2 text-sm`,children:[(0,L.jsxs)(`div`,{className:`flex justify-between text-foreground/80`,children:[(0,L.jsx)(`span`,{children:`Subtotal`}),(0,L.jsx)(`span`,{children:tp(r)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-muted-foreground`,children:[(0,L.jsx)(`span`,{children:`Delivery`}),(0,L.jsx)(`span`,{children:`Calculated at checkout`})]})]}),(0,L.jsx)(`div`,{className:`my-4 h-px bg-taupe/60`}),(0,L.jsxs)(`div`,{className:`flex justify-between text-lg font-semibold text-forest`,children:[(0,L.jsx)(`span`,{children:`Total`}),(0,L.jsx)(`span`,{children:tp(r)})]}),(0,L.jsx)(Fn,{to:`/checkout`,className:`mt-6 block w-full rounded-full bg-sage py-3 text-center text-sm font-medium text-primary-foreground hover:bg-forest`,children:`Proceed to checkout`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-3 block text-center text-sm text-sage hover:underline`,children:`Continue shopping`})]})]})]})}var Bp=[`Morning (9am – 12pm)`,`Afternoon (12pm – 3pm)`,`Evening (3pm – 6pm)`];function Vp(){let{items:e,subtotal:t,clear:n}=jd(),{user:r}=Dd(),i=dt(),{data:a}=fp(),{data:o}=pp(),s={name:o?.bank_details?.bank_name??rp.bank.name,accountName:o?.bank_details?.bank_account_name??rp.bank.accountName,accountNumber:o?.bank_details?.bank_account_number??rp.bank.accountNumber},c=o?.contact?.whatsapp_number??rp.whatsapp,l=o?.contact?.business_address??rp.address,[u,d]=(0,S.useState)(`delivery`),[f,p]=(0,S.useState)(r?.name??``),[m,h]=(0,S.useState)(r?.email??``),[g,_]=(0,S.useState)(r?.phone??``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(Bp[0]),[N,P]=(0,S.useState)(``),[ee,F]=(0,S.useState)(null),[I,te]=(0,S.useState)(!1),[ne,re]=(0,S.useState)(!1),ie=(0,S.useMemo)(()=>{let e=new Map;for(let t of a??[])e.has(t.fee)||e.set(t.fee,{fee:t.fee,areas:[]}),e.get(t.fee).areas.push(t.area);return Array.from(e.values()).sort((e,t)=>e.fee-t.fee)},[a]),ae=a?.find(e=>e.area===C),oe=u===`delivery`?ae?.fee??0:0,se=t+oe,ce=async()=>{await navigator.clipboard.writeText(s.accountNumber),te(!0),setTimeout(()=>te(!1),1600)},le=e.length>0&&f&&m&&g&&k&&(u===`pickup`||C&&T&&v&&b);return e.length===0?(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-24 text-center`,children:[(0,L.jsx)(`h1`,{className:`font-display text-3xl text-forest`,children:`Nothing to checkout yet`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-4 inline-block text-sage hover:underline`,children:`Go to shop`})]}):(0,L.jsxs)(`div`,{className:`mx-auto max-w-6xl px-4 py-10 md:px-6`,children:[(0,L.jsx)(`h1`,{className:`font-display text-4xl text-forest`,children:`Checkout`}),!r&&(0,L.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-sage/30 bg-sage-mist/50 px-4 py-3 text-sm`,children:[(0,L.jsxs)(`div`,{className:`text-forest`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`Have an account?`}),` `,(0,L.jsx)(`span`,{className:`text-foreground/80`,children:`Sign in to track this order automatically from your account — or just continue below as a guest.`})]}),(0,L.jsx)(Fn,{to:`/login`,className:`whitespace-nowrap rounded-full bg-sage px-4 py-1.5 text-xs font-medium text-primary-foreground hover:bg-forest`,children:`Sign in`})]}),(0,L.jsxs)(`div`,{className:`mt-8 grid gap-8 lg:grid-cols-[1fr_380px]`,children:[(0,L.jsxs)(`div`,{className:`space-y-8`,children:[(0,L.jsxs)(`section`,{className:`rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-xl text-forest`,children:`Fulfillment`}),(0,L.jsx)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2`,children:[`delivery`,`pickup`].map(e=>(0,L.jsxs)(`button`,{onClick:()=>d(e),className:`rounded-xl border p-4 text-left transition-colors ${u===e?`border-sage bg-sage-mist`:`border-taupe/70 hover:border-sage/50`}`,children:[(0,L.jsx)(`div`,{className:`font-display text-lg capitalize text-forest`,children:e}),(0,L.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e===`delivery`?`We bring it to your recipient.`:`Collect at our Jahi store.`})]},e))}),u===`pickup`&&(0,L.jsxs)(`div`,{className:`mt-4 rounded-xl bg-sage-mist/60 p-4 text-sm`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Pickup location`}),(0,L.jsx)(`div`,{className:`mt-1 text-foreground/80`,children:l})]}),u===`delivery`&&(0,L.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Delivery area`}),(0,L.jsxs)(`select`,{value:C,onChange:e=>w(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-card p-3 text-sm outline-none focus:border-sage`,children:[(0,L.jsx)(`option`,{value:``,children:`Select an area…`}),ie.map(e=>(0,L.jsx)(`optgroup`,{label:`${tp(e.fee)} zone`,children:e.areas.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))},e.fee))]}),C&&ae&&(0,L.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Delivery fee: `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:tp(ae.fee)})]}),(0,L.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`Area not listed?`,` `,(0,L.jsx)(`a`,{href:`https://wa.me/${c}`,target:`_blank`,rel:`noreferrer`,className:`text-sage hover:underline`,children:`Contact us on WhatsApp for pricing`}),`.`]})]}),(0,L.jsx)(Hp,{label:`Recipient name`,value:v,onChange:y}),(0,L.jsx)(Hp,{label:`Recipient phone`,value:b,onChange:x}),(0,L.jsx)(`div`,{className:`sm:col-span-2`,children:(0,L.jsx)(Hp,{label:`Street address`,value:T,onChange:E})}),(0,L.jsx)(`div`,{className:`sm:col-span-2`,children:(0,L.jsx)(Hp,{label:`Landmark (optional)`,value:D,onChange:O})})]}),(0,L.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:u===`delivery`?`Delivery date`:`Pickup date`}),(0,L.jsx)(`input`,{type:`date`,value:k,onChange:e=>A(e.target.value),min:new Date().toISOString().split(`T`)[0],className:`mt-1 w-full rounded-xl border border-taupe bg-card p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Time slot`}),(0,L.jsx)(`select`,{value:j,onChange:e=>M(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-card p-3 text-sm outline-none focus:border-sage`,children:Bp.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,L.jsxs)(`div`,{className:`mt-4`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Gift note (optional)`}),(0,L.jsx)(`textarea`,{value:N,onChange:e=>P(e.target.value),rows:2,placeholder:`A note for the recipient...`,className:`mt-1 w-full rounded-xl border border-taupe bg-card p-3 text-sm outline-none focus:border-sage`})]})]}),(0,L.jsxs)(`section`,{className:`rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-xl text-forest`,children:`Your details`}),(0,L.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,L.jsx)(Hp,{label:`Full name`,value:f,onChange:p}),(0,L.jsx)(Hp,{label:`Phone`,value:g,onChange:_}),(0,L.jsx)(`div`,{className:`sm:col-span-2`,children:(0,L.jsx)(Hp,{label:`Email`,value:m,onChange:h,type:`email`})})]}),!r&&(0,L.jsxs)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:[`Have an account?`,` `,(0,L.jsx)(Fn,{to:`/login`,className:`text-sage hover:underline`,children:`Sign in`}),` to save this order to your history.`]})]}),(0,L.jsxs)(`section`,{className:`rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-xl text-forest`,children:`Payment`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Bank transfer only at launch.`}),(0,L.jsx)(`div`,{className:`mt-4 rounded-xl border border-taupe/70 bg-sage-mist/50 p-4`,children:(0,L.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Bank:`}),` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:s.name})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Account name:`}),` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:s.accountName})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Account number:`}),(0,L.jsx)(`span`,{className:`font-mono font-medium text-forest`,children:s.accountNumber}),(0,L.jsx)(`button`,{onClick:ce,className:`ml-auto inline-flex items-center gap-1 rounded-full bg-sage px-3 py-1 text-xs text-primary-foreground`,children:I?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Xd,{className:`h-3.5 w-3.5`}),` Copied`]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(af,{className:`h-3.5 w-3.5`}),` Copy`]})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Amount:`}),` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:tp(se)})]})]})}),(0,L.jsxs)(`div`,{className:`mt-4`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Upload proof of payment (optional)`}),(0,L.jsxs)(`label`,{className:`mt-2 flex cursor-pointer items-center justify-center gap-2 rounded-xl border-2 border-dashed border-taupe bg-cream/50 p-6 text-sm text-muted-foreground hover:border-sage`,children:[(0,L.jsx)(Gf,{className:`h-4 w-4`}),ee?ee.name:`Choose a screenshot or receipt`,(0,L.jsx)(`input`,{type:`file`,accept:`image/*,application/pdf`,className:`hidden`,onChange:e=>F(e.target.files?.[0]??null)})]}),(0,L.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`Or after placing the order,`,` `,(0,L.jsx)(`a`,{href:`https://wa.me/${c}?text=Hi%2C%20I%20have%20made%20a%20bank%20transfer%20for%20my%20order.`,target:`_blank`,rel:`noreferrer`,className:`text-sage hover:underline`,children:`send proof to us on WhatsApp`}),`.`]})]})]})]}),(0,L.jsxs)(`aside`,{className:`h-fit rounded-2xl border border-taupe/70 bg-white/70 p-6 lg:sticky lg:top-24`,children:[(0,L.jsx)(`h3`,{className:`font-display text-xl text-forest`,children:`Order summary`}),(0,L.jsx)(`div`,{className:`mt-4 space-y-3 border-b border-taupe/60 pb-4 text-sm`,children:e.map(e=>(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[(0,L.jsxs)(`span`,{className:`text-foreground/80`,children:[e.name,` `,(0,L.jsxs)(`span`,{className:`text-muted-foreground`,children:[`× `,e.quantity]})]}),(0,L.jsx)(`span`,{className:`whitespace-nowrap font-medium text-forest`,children:tp((e.unitPrice+e.addOns.reduce((e,t)=>e+t.price,0))*e.quantity)})]}),e.addOns.length>0&&(0,L.jsx)(`div`,{className:`mt-0.5 pl-2 text-xs text-muted-foreground`,children:e.addOns.map(e=>`+ ${e.name}`).join(`, `)})]},e.id))}),(0,L.jsxs)(`div`,{className:`mt-4 space-y-2 text-sm`,children:[(0,L.jsxs)(`div`,{className:`flex justify-between text-foreground/80`,children:[(0,L.jsx)(`span`,{children:`Subtotal`}),(0,L.jsx)(`span`,{children:tp(t)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-foreground/80`,children:[(0,L.jsx)(`span`,{children:`Delivery`}),(0,L.jsx)(`span`,{children:u===`pickup`?`Free (pickup)`:oe?tp(oe):`—`})]})]}),(0,L.jsx)(`div`,{className:`my-4 h-px bg-taupe/60`}),(0,L.jsxs)(`div`,{className:`flex justify-between text-lg font-semibold text-forest`,children:[(0,L.jsx)(`span`,{children:`Total`}),(0,L.jsx)(`span`,{children:tp(se)})]}),(0,L.jsxs)(`button`,{onClick:async()=>{if(!le){R.error(`Please fill all required fields`);return}if(u===`delivery`&&!ae){R.error(`Please choose a valid delivery area`);return}re(!0);try{let t=e.map(e=>{let t=e.addOns.map(e=>e.id),n={};for(let t of e.addOns)t.customMessage&&(n[t.id]=t.customMessage);return{product_id:e.productId,variant_id:e.variantId,quantity:e.quantity,add_on_ids:t.length?t:void 0,add_on_messages:Object.keys(n).length?n:void 0}}),a=(await bd.create({items:t,fulfillment_type:u,delivery_zone_id:u===`delivery`?ae.id:void 0,address:u===`delivery`?{label:`Delivery`,recipient_name:v,recipient_phone:b,area:C,street_address:T,landmark:D||void 0}:void 0,scheduled_date:k,scheduled_time_slot:j,gift_note:N||void 0,customer_name:f,customer_email:m,customer_phone:g})).order.id;if(ee)try{await bd.uploadProof(a,ee)}catch{R.error(`Order placed, but the payment proof upload failed. You can retry from your order page.`)}r||sessionStorage.setItem(`fc.guest-contact.${a}`,JSON.stringify({email:m,phone:g})),n(),i(`/order/${a}`)}catch(e){Dp(`checkout-place-order`,e),R.error(Ep(e,`We couldn't place your order. Please try again.`))}finally{re(!1)}},disabled:!le||ne,className:`mt-6 flex w-full items-center justify-center gap-2 rounded-full bg-sage py-3 text-center text-sm font-medium text-primary-foreground hover:bg-forest disabled:cursor-not-allowed disabled:opacity-50`,children:[ne&&(0,L.jsx)(yf,{className:`h-4 w-4 animate-spin`}),ne?`Placing order…`:`Place order`]}),(0,L.jsx)(`p`,{className:`mt-2 text-center text-xs text-muted-foreground`,children:`Order is created as "Pending Payment Confirmation" until our team verifies your transfer.`})]})]})]})}function Hp({label:e,value:t,onChange:n,type:r=`text`}){return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:e}),(0,L.jsx)(`input`,{type:r,value:t,onChange:e=>n(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-card p-3 text-sm outline-none focus:border-sage`})]})}var Up={pending_payment:`Payment Pending`,processing:`Being Prepared`,ready_for_pickup:`Ready for Pickup`,out_for_delivery:`Out for Delivery`,completed:`Delivered / Completed`,cancelled:`Cancelled`};function Wp(){let{reference:e}=ht(),t=e?parseInt(e,10):void 0,{user:n}=Dd(),{data:r}=pp(),i=(0,S.useMemo)(()=>{if(!t)return{};try{let e=sessionStorage.getItem(`fc.guest-contact.${t}`);return e?JSON.parse(e):{}}catch{return{}}},[t]),a=hp(n?t:void 0),o=gp(n?void 0:t,i),{data:s,isLoading:c,isError:l,error:u}=n?a:o,[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),_={name:r?.bank_details?.bank_name??rp.bank.name,accountName:r?.bank_details?.bank_account_name??rp.bank.accountName,accountNumber:r?.bank_details?.bank_account_number??rp.bank.accountNumber},v=r?.contact?.whatsapp_number??rp.whatsapp,y=r?.contact?.business_address??rp.address,b=async()=>{await navigator.clipboard.writeText(_.accountNumber),g(!0),setTimeout(()=>g(!1),1600)},x=async()=>{if(!(!d||!s)){m(!0);try{await bd.uploadProof(s.id,d),R.success(`Proof of payment uploaded — we'll verify it shortly.`),f(null)}catch(e){R.error(Tp(e))}finally{m(!1)}}};if(c)return(0,L.jsx)(`div`,{className:`grid min-h-[50vh] place-items-center`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-sage`})});if(l)return(0,L.jsxs)(`div`,{className:`mx-auto max-w-2xl px-4 py-24 text-center`,children:[(0,L.jsx)(`h1`,{className:`font-display text-3xl text-forest`,children:`Couldn't load your order`}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:Tp(u)}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-4 inline-block text-sage hover:underline`,children:`Back to shop`})]});if(!s)return(0,L.jsxs)(`div`,{className:`mx-auto max-w-2xl px-4 py-24 text-center`,children:[(0,L.jsx)(`h1`,{className:`font-display text-3xl text-forest`,children:`Order not found`}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:n?`We couldn't find this order on your account.`:`We couldn't verify this order. Try checking your order status page.`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-4 inline-block text-sage hover:underline`,children:`Back to shop`})]});let C=op(s.total),w=op(s.subtotal),T=op(s.delivery_fee),E=encodeURIComponent(`Hi, I've completed payment for order ${s.order_number} (${tp(C)}). Please confirm.`);return(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-12 md:px-6`,children:[(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`div`,{className:`mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full bg-sage-mist`,children:(0,L.jsx)(tf,{className:`h-9 w-9 text-sage`})}),(0,L.jsx)(`h1`,{className:`font-display text-4xl text-forest`,children:`Thank you!`}),(0,L.jsxs)(`p`,{className:`mt-2 text-foreground/80`,children:[`Your order `,(0,L.jsx)(`span`,{className:`font-mono font-medium text-forest`,children:s.order_number}),` has been received.`]})]}),(0,L.jsxs)(`div`,{className:`mt-8 rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-xl text-forest`,children:`Order summary`}),(0,L.jsx)(`div`,{className:`mt-4 space-y-2 border-b border-taupe/60 pb-4 text-sm`,children:(s.items??[]).map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between`,children:[(0,L.jsxs)(`span`,{className:`text-foreground/80`,children:[e.product_name??`Item`,` × `,e.quantity]}),(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:tp(op(e.line_total))})]},e.id))}),(0,L.jsxs)(`div`,{className:`mt-4 space-y-1 text-sm`,children:[(0,L.jsx)(Gp,{label:`Subtotal`,value:tp(w)}),(0,L.jsx)(Gp,{label:`Delivery`,value:s.fulfillment_type===`pickup`?`Free (pickup)`:tp(T)}),(0,L.jsx)(`div`,{className:`my-2 h-px bg-taupe/60`}),(0,L.jsx)(Gp,{label:`Total`,value:tp(C),bold:!0})]}),(0,L.jsxs)(`div`,{className:`mt-6 grid gap-4 sm:grid-cols-2`,children:[(0,L.jsx)(Kp,{label:`Fulfillment`,value:s.fulfillment_type,className:`capitalize`}),(0,L.jsx)(Kp,{label:`Date`,value:`${s.scheduled_date} · ${s.scheduled_time_slot}`}),s.fulfillment_type===`pickup`&&(0,L.jsx)(Kp,{label:`Pickup at`,value:y}),(0,L.jsx)(Kp,{label:`Status`,value:Up[s.order_status]??s.order_status})]})]}),s.payment_status!==`confirmed`&&(0,L.jsxs)(`div`,{className:`mt-6 rounded-2xl border border-taupe/70 bg-sage-mist/40 p-6`,children:[(0,L.jsx)(`h3`,{className:`font-display text-lg text-forest`,children:`Complete your payment`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-foreground/80`,children:`Transfer to the account below, then send us proof.`}),(0,L.jsxs)(`div`,{className:`mt-3 grid gap-1 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Bank:`}),` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:_.name})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Account name:`}),` `,(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:_.accountName})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Account number:`}),(0,L.jsx)(`span`,{className:`font-mono font-medium text-forest`,children:_.accountNumber}),(0,L.jsxs)(`button`,{onClick:b,className:`ml-auto inline-flex items-center gap-1 rounded-full bg-sage px-3 py-1 text-xs text-primary-foreground`,children:[h?(0,L.jsx)(qp,{}):(0,L.jsx)(af,{className:`h-3.5 w-3.5`}),` `,h?`Copied`:`Copy`]})]})]}),(0,L.jsxs)(`div`,{className:`mt-4`,children:[(0,L.jsxs)(`label`,{className:`mt-2 flex cursor-pointer items-center justify-center gap-2 rounded-xl border-2 border-dashed border-taupe bg-cream/50 p-4 text-sm text-muted-foreground hover:border-sage`,children:[(0,L.jsx)(Gf,{className:`h-4 w-4`}),d?d.name:`Upload proof of payment`,(0,L.jsx)(`input`,{type:`file`,accept:`image/*,application/pdf`,className:`hidden`,onChange:e=>f(e.target.files?.[0]??null)})]}),d&&(0,L.jsxs)(`button`,{onClick:x,disabled:p,className:`mt-2 inline-flex items-center gap-2 rounded-full bg-sage px-4 py-2 text-sm text-primary-foreground disabled:opacity-60`,children:[p&&(0,L.jsx)(yf,{className:`h-3.5 w-3.5 animate-spin`}),p?`Uploading…`:`Submit proof`]})]}),(0,L.jsx)(`a`,{href:`https://wa.me/${v}?text=${E}`,target:`_blank`,rel:`noreferrer`,className:`mt-4 inline-block rounded-full bg-[#25D366] px-5 py-2.5 text-sm font-medium text-white`,children:`I've sent payment — notify on WhatsApp`})]}),(0,L.jsxs)(`div`,{className:`mt-8 flex flex-wrap gap-3`,children:[(0,L.jsx)(Fn,{to:`/shop`,className:`rounded-full bg-sage px-5 py-2.5 text-sm text-primary-foreground`,children:`Go to Shop`}),n?(0,L.jsx)(Fn,{to:`/account/orders`,className:`rounded-full border border-sage px-5 py-2.5 text-sm text-sage hover:bg-sage-mist`,children:`Go to Dashboard`}):(0,L.jsx)(Fn,{to:`/login`,className:`rounded-full border border-sage px-5 py-2.5 text-sm text-sage hover:bg-sage-mist`,children:`Sign in to track this order`})]})]})}function Gp({label:e,value:t,bold:n}){return(0,L.jsxs)(`div`,{className:`flex justify-between ${n?`text-base font-semibold text-forest`:`text-foreground/80`}`,children:[(0,L.jsx)(`span`,{children:e}),(0,L.jsx)(`span`,{children:t})]})}function Kp({label:e,value:t,className:n=``}){return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:e}),(0,L.jsx)(`div`,{className:`mt-0.5 text-sm text-forest ${n}`,children:t})]})}function qp(){return(0,L.jsx)(tf,{className:`h-3.5 w-3.5`})}function Jp(){let{login:e}=Dd(),t=dt(),[n]=Un(),r=n.get(`redirect`)||`/account`,[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1);return(0,L.jsxs)(`div`,{className:`mx-auto max-w-md px-4 py-16 md:px-6`,children:[(0,L.jsx)(`h1`,{className:`font-display text-4xl text-forest`,children:`Sign in`}),(0,L.jsx)(`p`,{className:`mt-2 text-foreground/80`,children:`To view your orders, addresses and wishlist.`}),(0,L.jsxs)(`form`,{onSubmit:async n=>{n.preventDefault(),l(null),d(!0);let a=await e(i,o);if(d(!1),!a.ok)return l(a.error??`Login failed`);R.success(`Welcome back!`),t(r)},className:`mt-6 space-y-4 rounded-2xl border border-taupe/70 bg-card p-6`,children:[c&&(0,L.jsx)(`div`,{className:`rounded-lg bg-destructive/10 p-3 text-sm text-destructive`,children:c}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Email`}),(0,L.jsx)(`input`,{type:`email`,required:!0,value:i,onChange:e=>a(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Password`}),(0,L.jsx)(`input`,{type:`password`,required:!0,value:o,onChange:e=>s(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsx)(`button`,{disabled:u,className:`w-full rounded-full bg-sage py-3 text-sm font-medium text-primary-foreground hover:bg-forest disabled:opacity-60`,children:u?`Signing in…`:`Sign in`}),(0,L.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`New here?`,` `,(0,L.jsx)(Fn,{to:`/register`,className:`text-sage hover:underline`,children:`Create an account`})]})]})]})}function Yp(){let{register:e}=Dd(),t=dt(),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1);return(0,L.jsxs)(`div`,{className:`mx-auto max-w-md px-4 py-16 md:px-6`,children:[(0,L.jsx)(`h1`,{className:`font-display text-4xl text-forest`,children:`Create account`}),(0,L.jsx)(`p`,{className:`mt-2 text-foreground/80`,children:`Track your orders and save recipient addresses.`}),(0,L.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),d(null),p(!0);let a=await e({name:n,email:i,password:c,phone:o});if(p(!1),!a.ok)return d(a.error??`Registration failed`);R.success(`Welcome to Flora and Creations!`),t(`/account`)},className:`mt-6 space-y-4 rounded-2xl border border-taupe/70 bg-card p-6`,children:[u&&(0,L.jsx)(`div`,{className:`rounded-lg bg-destructive/10 p-3 text-sm text-destructive`,children:u}),(0,L.jsx)(Xp,{label:`Full name`,value:n,onChange:r}),(0,L.jsx)(Xp,{label:`Email`,type:`email`,value:i,onChange:a}),(0,L.jsx)(Xp,{label:`Phone`,value:o,onChange:s}),(0,L.jsx)(Xp,{label:`Password`,type:`password`,value:c,onChange:l}),(0,L.jsx)(`button`,{disabled:f,className:`w-full rounded-full bg-sage py-3 text-sm font-medium text-primary-foreground hover:bg-forest disabled:opacity-60`,children:f?`Creating account…`:`Create account`}),(0,L.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Have an account?`,` `,(0,L.jsx)(Fn,{to:`/login`,className:`text-sage hover:underline`,children:`Sign in`})]})]})]})}function Xp({label:e,value:t,onChange:n,type:r=`text`}){return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:e}),(0,L.jsx)(`input`,{type:r,required:!0,minLength:r===`password`?8:void 0,value:t,onChange:e=>n(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]})}function Zp(){let{user:e,loading:t}=Dd();return t?(0,L.jsx)(`div`,{className:`grid min-h-[60vh] place-items-center`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-sage`})}):e?(0,L.jsxs)(Ut,{children:[(0,L.jsx)(Vt,{index:!0,element:(0,L.jsx)(em,{})}),(0,L.jsx)(Vt,{path:`orders`,element:(0,L.jsx)(tm,{})}),(0,L.jsx)(Vt,{path:`addresses`,element:(0,L.jsx)(rm,{})}),(0,L.jsx)(Vt,{path:`wishlist`,element:(0,L.jsx)(im,{})}),(0,L.jsx)(Vt,{path:`settings`,element:(0,L.jsx)(am,{})})]}):(0,L.jsx)(zt,{to:`/login`,replace:!0})}var Qp={pending_payment:`Payment Pending`,processing:`Being Prepared`,ready_for_pickup:`Ready for Pickup`,out_for_delivery:`Out for Delivery`,completed:`Delivered / Completed`,cancelled:`Cancelled`};function $p(e){switch(e){case`pending_payment`:return`bg-yellow-100 text-yellow-800`;case`processing`:return`bg-blue-100 text-blue-800`;case`out_for_delivery`:case`ready_for_pickup`:return`bg-orange-100 text-orange-800`;case`completed`:return`bg-green-100 text-green-700`;case`cancelled`:return`bg-red-100 text-red-700`;default:return`bg-gray-100 text-gray-700`}}function em(){let{user:e}=Dd(),{data:t,isLoading:n}=mp(),r=t?.data?.slice(0,3)??[];return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Welcome back,`}),(0,L.jsx)(`h1`,{className:`text-2xl font-bold text-forest`,children:e?.name||e?.email})]}),(0,L.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:[(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-6`,children:[(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Total Orders`}),(0,L.jsx)(`div`,{className:`mt-2 text-3xl font-bold text-forest`,children:t?.data?.length??0})]}),(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-6`,children:[(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Pending Payment`}),(0,L.jsx)(`div`,{className:`mt-2 text-3xl font-bold text-forest`,children:t?.data?.filter(e=>e.payment_status===`pending`).length??0})]}),(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-6`,children:[(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Completed`}),(0,L.jsx)(`div`,{className:`mt-2 text-3xl font-bold text-forest`,children:t?.data?.filter(e=>e.order_status===`completed`).length??0})]})]}),(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Recent Orders`}),(0,L.jsxs)(Fn,{to:`/shop`,className:`inline-flex items-center gap-1.5 text-sm text-sage hover:text-forest`,children:[(0,L.jsx)(Bf,{className:`h-4 w-4`}),` Go to Shop`]})]}),n?(0,L.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):r.length===0?(0,L.jsxs)(`div`,{className:`text-center py-8`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No orders yet`}),(0,L.jsxs)(Fn,{to:`/shop`,className:`mt-3 inline-flex items-center gap-2 rounded-lg bg-sage px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-forest transition-colors`,children:[(0,L.jsx)(Bf,{className:`h-4 w-4`}),` Start Shopping`]})]}):(0,L.jsx)(`div`,{className:`space-y-3`,children:r.map(e=>(0,L.jsx)(`div`,{className:`rounded-lg border border-taupe p-4 hover:bg-sage-mist`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:e.order_number}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:tp(op(e.total))})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`rounded-full px-3 py-1 text-xs font-medium ${$p(e.order_status)}`,children:Qp[e.order_status]||e.order_status}),(0,L.jsx)(In,{to:`/account/orders`,className:`text-sm text-forest hover:underline`,children:`View`})]})]})},e.id))})]})]})}function tm(){let{data:e,isLoading:t}=mp(),[n,r]=(0,S.useState)(null);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Your Orders`}),t?(0,L.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):!e?.data||e.data.length===0?(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-8 text-center`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No orders found`}),(0,L.jsxs)(Fn,{to:`/shop`,className:`mt-3 inline-flex items-center gap-2 rounded-lg bg-sage px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-forest transition-colors`,children:[(0,L.jsx)(Bf,{className:`h-4 w-4`}),` Go to Shop`]})]}):(0,L.jsx)(`div`,{className:`space-y-3`,children:e.data.map(e=>{let t=n===e.id;return(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white overflow-hidden`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>r(t?null:e.id),className:`w-full text-left p-4 hover:bg-sage-mist transition-colors`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:e.order_number}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:new Date(e.created_at).toLocaleDateString()})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(`div`,{className:`text-right`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:tp(op(e.total))}),(0,L.jsx)(`span`,{className:`inline-block rounded-full px-2 py-1 text-xs font-medium ${$p(e.order_status)}`,children:Qp[e.order_status]||e.order_status})]}),t?(0,L.jsx)(ef,{className:`h-5 w-5 text-muted-foreground shrink-0`}):(0,L.jsx)(Zd,{className:`h-5 w-5 text-muted-foreground shrink-0`})]})]})}),t&&(0,L.jsx)(nm,{orderId:e.id})]},e.id)})})]})}function nm({orderId:e}){let{data:t,isLoading:n}=hp(e);return n?(0,L.jsx)(`div`,{className:`border-t border-taupe p-4 flex justify-center`,children:(0,L.jsx)(yf,{className:`h-5 w-5 animate-spin text-muted-foreground`})}):t?(0,L.jsxs)(`div`,{className:`border-t border-taupe p-4 space-y-4 bg-sage-mist/30`,children:[(0,L.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:`Fulfillment`}),(0,L.jsx)(`div`,{className:`text-sm text-forest capitalize`,children:t.fulfillment_type}),(0,L.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[t.scheduled_date,` · `,t.scheduled_time_slot]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:`Payment`}),(0,L.jsx)(`div`,{className:`text-sm text-forest capitalize`,children:t.payment_status.replace(`_`,` `)}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground capitalize`,children:t.payment_method})]})]}),t.gift_note&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:`Gift Note`}),(0,L.jsx)(`div`,{className:`text-sm text-forest`,children:t.gift_note})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs font-medium uppercase text-muted-foreground mb-2`,children:`Items`}),(0,L.jsx)(`div`,{className:`space-y-2`,children:(t.items??[]).map(e=>(0,L.jsx)(`div`,{className:`rounded-lg bg-white border border-taupe p-3`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`text-sm font-medium text-forest`,children:[e.product_name??`Product #${e.product_id}`,` × `,e.quantity]}),e.variant&&(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:[e.variant.size,e.variant.color].filter(Boolean).join(` / `)}),e.add_ons&&e.add_ons.length>0&&(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:[`Add-ons: `,e.add_ons.map(e=>e.add_on_name??`#${e.add_on_id}`).join(`, `)]})]}),(0,L.jsx)(`div`,{className:`text-sm font-medium text-forest`,children:tp(op(e.line_total))})]})},e.id))})]}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between border-t border-taupe pt-3 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Subtotal`}),(0,L.jsx)(`span`,{className:`text-forest`,children:tp(op(t.subtotal))})]}),op(t.delivery_fee)>0&&(0,L.jsxs)(`div`,{className:`flex items-center justify-between text-sm -mt-2`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Delivery Fee`}),(0,L.jsx)(`span`,{className:`text-forest`,children:tp(op(t.delivery_fee))})]}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between text-sm font-semibold -mt-2`,children:[(0,L.jsx)(`span`,{className:`text-forest`,children:`Total`}),(0,L.jsx)(`span`,{className:`text-forest`,children:tp(op(t.total))})]})]}):(0,L.jsx)(`div`,{className:`border-t border-taupe p-4 text-sm text-muted-foreground`,children:`Couldn't load order details right now.`})}function rm(){let{data:e,isLoading:t}=_p(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)({}),o=di(),s=async e=>{try{await Cd.removeAddress(e),o.invalidateQueries({queryKey:[`account`,`addresses`]}),R.success(`Address deleted`)}catch(e){R.error(e instanceof md?e.message:`Failed to delete address`)}};return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Delivery Addresses`}),t?(0,L.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):!e||e.length===0?(0,L.jsx)(`div`,{className:`rounded-lg border border-taupe bg-white p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No addresses saved`})}):(0,L.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>(0,L.jsx)(`div`,{className:`rounded-lg border border-taupe bg-white p-4 hover:bg-sage-mist`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:e.label}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.recipient_name}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.street_address})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{onClick:()=>{r(e.id),a(e)},className:`text-sm text-forest hover:underline`,children:`Edit`}),(0,L.jsx)(`button`,{onClick:()=>s(e.id),className:`text-sm text-red-600 hover:underline`,children:`Delete`})]})]})},e.id))})]})}function im(){let{data:e,isLoading:t}=vp();return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Your Wishlist`}),t?(0,L.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):!e||e.length===0?(0,L.jsx)(`div`,{className:`rounded-lg border border-taupe bg-white p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Your wishlist is empty`})}):(0,L.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:e.map(e=>(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-4 hover:bg-sage-mist`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:e.name}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:tp(op(e.base_price)||0)})]},e.id))})]})}function am(){let{user:e,updateProfile:t}=Dd(),[n,r]=(0,S.useState)(e?.name??``),[i,a]=(0,S.useState)(e?.email??``),[o,s]=(0,S.useState)(e?.phone??``),[c,l]=(0,S.useState)(!1);return(0,L.jsxs)(`div`,{className:`space-y-6 max-w-md`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Account Settings`}),(0,L.jsxs)(`div`,{className:`rounded-lg border border-taupe bg-white p-6 space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Name`}),(0,L.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Email`}),(0,L.jsx)(`input`,{type:`email`,value:i,onChange:e=>a(e.target.value),className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Phone`}),(0,L.jsx)(`input`,{type:`tel`,value:o,onChange:e=>s(e.target.value),className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`})]}),(0,L.jsx)(`button`,{onClick:async()=>{l(!0);try{await t({name:n,email:i,phone:o}),R.success(`Profile updated`)}catch(e){R.error(e instanceof md?e.message:`Failed to update profile`)}finally{l(!1)}},disabled:c,className:`w-full rounded-lg bg-sage px-4 py-2 text-sm font-medium text-white hover:bg-forest disabled:opacity-50`,children:c?`Saving...`:`Save Changes`})]})]})}function om(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),c=async o=>{o.preventDefault(),s(!0);try{await xd.submit({name:e,contact:n,message:i,occasion:null}),R.success(`Thanks! We'll get back to you shortly.`),t(``),r(``),a(``)}catch(e){Dp(`contact-form`,e),R.error(Tp(e))}finally{s(!1)}},l=(e,t)=>(0,L.jsxs)(`a`,{href:`https://wa.me/${t}?text=Hi%20Flora%20and%20Creations%2C%20I'd%20like%20to%20enquire...`,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-2 rounded-full bg-[#25D366] px-4 py-2 text-sm text-white`,children:[(0,L.jsx)(wf,{className:`h-4 w-4`}),` `,e]},e);return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`section`,{className:`relative overflow-hidden border-b border-taupe/70`,children:[(0,L.jsx)(`div`,{className:`floral-bg absolute inset-0 opacity-90`,"aria-hidden":!0}),(0,L.jsxs)(`div`,{className:`relative mx-auto max-w-4xl px-4 py-14 text-center md:px-6`,children:[(0,L.jsx)(`p`,{className:`text-sm uppercase tracking-widest text-sage`,children:`Get in touch`}),(0,L.jsx)(`h1`,{className:`mt-3 font-display text-5xl text-forest`,children:`We'd love to hear from you`}),(0,L.jsx)(`p`,{className:`mx-auto mt-3 max-w-xl text-foreground/80`,children:`For quick orders and questions, WhatsApp is our fastest channel.`}),(0,L.jsxs)(`div`,{className:`mt-5 flex flex-wrap justify-center gap-2`,children:[l(`WhatsApp 0703 167 7165`,`2347031677165`),l(`WhatsApp 0803 703 3240`,`2348037033240`)]})]})]}),(0,L.jsxs)(`section`,{className:`mx-auto grid max-w-6xl gap-10 px-4 py-14 md:px-6 lg:grid-cols-[1fr_1fr]`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-2xl text-forest`,children:`Send us a message`}),(0,L.jsxs)(`form`,{onSubmit:c,className:`mt-4 space-y-4 rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Your name`}),(0,L.jsx)(`input`,{required:!0,value:e,onChange:e=>t(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Email or phone`}),(0,L.jsx)(`input`,{required:!0,value:n,onChange:e=>r(e.target.value),className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Message`}),(0,L.jsx)(`textarea`,{required:!0,value:i,onChange:e=>a(e.target.value),rows:5,className:`mt-1 w-full rounded-xl border border-taupe bg-cream p-3 text-sm outline-none focus:border-sage`})]}),(0,L.jsx)(`button`,{disabled:o,className:`w-full rounded-full bg-sage py-3 text-sm font-medium text-primary-foreground hover:bg-forest disabled:opacity-60`,children:`Send message`})]})]}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(`h2`,{className:`font-display text-2xl text-forest`,children:`Contact details`}),(0,L.jsxs)(`div`,{className:`rounded-2xl border border-taupe/70 bg-card p-6`,children:[(0,L.jsxs)(`ul`,{className:`space-y-4 text-sm text-foreground/80`,children:[(0,L.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(Af,{className:`mt-0.5 h-5 w-5 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Phone`}),rp.phones.map(e=>(0,L.jsx)(`div`,{children:e},e))]})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(xf,{className:`mt-0.5 h-5 w-5 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Email`}),(0,L.jsx)(`a`,{href:`mailto:${rp.email}`,className:`hover:text-sage`,children:rp.email})]})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(Sf,{className:`mt-0.5 h-5 w-5 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Studio`}),(0,L.jsx)(`div`,{children:rp.address})]})]}),(0,L.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(hf,{className:`mt-0.5 h-5 w-5 text-sage`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:`Instagram`}),(0,L.jsx)(`a`,{href:rp.instagram,target:`_blank`,rel:`noreferrer`,className:`hover:text-sage`,children:`@floraandcreations`})]})]})]}),(0,L.jsxs)(`div`,{className:`mt-6 border-t border-taupe/60 pt-4`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Store hours`}),(0,L.jsx)(`div`,{className:`mt-1 text-sm text-foreground/80`,children:`Mon–Sat · 9:00 – 18:00`}),(0,L.jsx)(`div`,{className:`text-sm text-foreground/80`,children:`Sun · By appointment`})]})]}),(0,L.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-taupe/70`,children:(0,L.jsx)(`iframe`,{title:`Map`,src:`https://www.google.com/maps?q=${encodeURIComponent(rp.address)}&output=embed`,className:`h-64 w-full`,loading:`lazy`})})]})]})]})}var sm={Bouquets:df,Arrangements:ff,Wreaths:vf,Plants:Rf};function cm(){return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`section`,{className:`relative overflow-hidden border-b border-taupe/70`,children:[(0,L.jsx)(`div`,{className:`floral-bg absolute inset-0 opacity-90`,"aria-hidden":!0}),(0,L.jsxs)(`div`,{className:`relative mx-auto max-w-4xl px-4 py-16 text-center md:px-6`,children:[(0,L.jsx)(`p`,{className:`text-sm uppercase tracking-widest text-sage`,children:`About us`}),(0,L.jsxs)(`h1`,{className:`mt-3 font-display text-5xl leading-tight text-forest md:text-6xl`,children:[`Blooms with heart,`,(0,L.jsx)(`br`,{}),(0,L.jsx)(`span`,{className:`italic`,children:`made in Abuja.`})]})]})]}),(0,L.jsxs)(`section`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-14 text-foreground/80 leading-relaxed md:px-6`,children:[(0,L.jsx)(`p`,{children:`Flora and Creations began with a simple belief: a gift, thoughtfully arranged, can say what words can't. From that idea grew a small Abuja studio dedicated to bouquets and gifts crafted one at a time — never mass produced, never rushed.`}),(0,L.jsx)(`p`,{children:`Every stem we work with is selected the morning it will be used. Every ribbon is tied by hand, every card written to your instructions, every add-on chosen to complement the flowers it travels with. When something leaves our doors, it carries the same care we'd give to a gift for someone we love.`}),(0,L.jsx)(`p`,{children:`We're proud to serve Abuja — through same-day delivery and warm pickup from our Jahi Plaza studio.`})]}),(0,L.jsxs)(`section`,{className:`mx-auto max-w-6xl px-4 pb-14 md:px-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-3xl text-forest text-center`,children:`What we make`}),(0,L.jsx)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-4`,children:Ap.map(e=>{let t=sm[e.label]??df;return(0,L.jsxs)(Fn,{to:`/shop?category=${e.id}`,className:`flex w-32 flex-col items-center rounded-2xl border border-taupe/70 bg-card p-5 text-center transition-shadow hover:shadow-md sm:w-36`,children:[(0,L.jsx)(`div`,{className:`grid h-14 w-14 place-items-center rounded-full bg-sage-mist`,children:(0,L.jsx)(t,{className:`h-6 w-6 text-sage`})}),(0,L.jsx)(`div`,{className:`mt-3 font-display text-lg text-forest`,children:e.label})]},e.id)})})]}),(0,L.jsx)(`section`,{className:`bg-sage-mist/50 py-14`,children:(0,L.jsxs)(`div`,{className:`mx-auto grid max-w-5xl gap-8 px-4 md:grid-cols-2 md:px-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-3xl text-forest`,children:`Visit us`}),(0,L.jsx)(`p`,{className:`mt-3 text-foreground/80 leading-relaxed`,children:`Stop by our studio in Jahi to pick up a ready-made bouquet or plan a bespoke arrangement with our team.`}),(0,L.jsxs)(`div`,{className:`mt-4 flex items-start gap-2 text-forest`,children:[(0,L.jsx)(Sf,{className:`mt-0.5 h-5 w-5 text-sage`}),(0,L.jsx)(`span`,{children:rp.address})]}),(0,L.jsx)(`a`,{href:`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(rp.address)}`,target:`_blank`,rel:`noreferrer`,className:`mt-4 inline-block rounded-full bg-sage px-5 py-2.5 text-sm text-primary-foreground`,children:`Get directions`})]}),(0,L.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-taupe/70`,children:(0,L.jsx)(`iframe`,{title:`Flora and Creations map`,src:`https://www.google.com/maps?q=${encodeURIComponent(rp.address)}&output=embed`,className:`h-72 w-full`,loading:`lazy`})})]})}),(0,L.jsxs)(`section`,{className:`mx-auto max-w-3xl px-4 py-16 text-center md:px-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-3xl text-forest`,children:`Ready to send something beautiful?`}),(0,L.jsx)(Fn,{to:`/shop`,className:`mt-6 inline-block rounded-full bg-sage px-8 py-3 text-sm font-medium text-primary-foreground hover:bg-forest`,children:`Shop bouquets & gifts`})]})]})}var lm=[{title:`Ordering`,items:[{q:`How do I place an order?`,a:`Browse our shop, add items to your cart, and checkout — or WhatsApp us directly and we'll walk you through it.`},{q:`Can I add a personalized message to my gift?`,a:`Yes — every product page and the checkout let you add a free-text gift note.`},{q:`Do you take custom/bespoke bouquet requests?`,a:(0,L.jsxs)(L.Fragment,{children:[`Absolutely. Message us on `,(0,L.jsx)(`a`,{href:`https://wa.me/${rp.whatsapp}`,target:`_blank`,rel:`noreferrer`,className:`text-sage hover:underline`,children:`WhatsApp`}),` or use our contact form to describe what you have in mind.`]})}]},{title:`Delivery & Pickup`,items:[{q:`What areas do you deliver to?`,a:(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:(0,L.jsxs)(`table`,{className:`mt-2 w-full min-w-[400px] border-collapse text-sm`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{className:`text-left text-forest`,children:[(0,L.jsx)(`th`,{className:`border-b border-taupe/60 p-2`,children:`Fee`}),(0,L.jsx)(`th`,{className:`border-b border-taupe/60 p-2`,children:`Areas`})]})}),(0,L.jsx)(`tbody`,{children:np.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:`border-b border-taupe/40 p-2 font-medium text-forest`,children:tp(e.fee)}),(0,L.jsx)(`td`,{className:`border-b border-taupe/40 p-2 text-foreground/80`,children:e.areas.join(`, `)})]},e.fee))})]})})},{q:`Can I choose a delivery date and time?`,a:`Yes — pick your preferred date and time slot at checkout.`},{q:`Can I pick up my order instead?`,a:`Yes. Collect at ${rp.address}.`},{q:`What if my area isn't listed?`,a:(0,L.jsxs)(L.Fragment,{children:[`Message us on `,(0,L.jsx)(`a`,{href:`https://wa.me/${rp.whatsapp}`,target:`_blank`,rel:`noreferrer`,className:`text-sage hover:underline`,children:`WhatsApp`}),` for a custom delivery quote.`]})}]},{title:`Payment`,items:[{q:`What payment methods do you accept?`,a:`Bank transfer only at launch — ${rp.bank.accountName}, ${rp.bank.name}, ${rp.bank.accountNumber}.`},{q:`How do I confirm my payment was received?`,a:`Upload your proof of payment at checkout, or send us a screenshot on WhatsApp. Your order status will update once our team verifies the transfer.`}]},{title:`Products`,items:[{q:`Do bouquets come in different sizes?`,a:`Yes — Small, Medium, Large and Deluxe. Choose your preferred size on each bouquet page.`},{q:`Can I add extras like wine, chocolates, or a teddy bear to my bouquet?`,a:`Yes — every bouquet page has an Add-ons section with wine, chocolates, teddy bears, cakes, cookies, cards and vase upgrades.`}]}];function um(){return(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-12 md:px-6`,children:[(0,L.jsx)(`p`,{className:`text-sm uppercase tracking-widest text-sage`,children:`Help center`}),(0,L.jsx)(`h1`,{className:`mt-2 font-display text-5xl text-forest`,children:`Frequently asked questions`}),(0,L.jsx)(`p`,{className:`mt-3 text-foreground/80`,children:`Everything about ordering, delivery, pickup and payment.`}),(0,L.jsx)(`div`,{className:`mt-10 space-y-10`,children:lm.map(e=>(0,L.jsxs)(`section`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-2xl text-forest`,children:e.title}),(0,L.jsx)(`div`,{className:`mt-4 space-y-3`,children:e.items.map((e,t)=>(0,L.jsx)(dm,{qa:e},t))})]},e.title))}),(0,L.jsxs)(`div`,{className:`mt-14 rounded-2xl border border-taupe/70 bg-sage-mist/50 p-6 text-center`,children:[(0,L.jsx)(`div`,{className:`font-display text-xl text-forest`,children:`Still have a question?`}),(0,L.jsx)(`a`,{href:`https://wa.me/${rp.whatsapp}`,target:`_blank`,rel:`noreferrer`,className:`mt-3 inline-block rounded-full bg-[#25D366] px-5 py-2.5 text-sm font-medium text-white`,children:`Chat with us on WhatsApp`})]})]})}function dm({qa:e}){let[t,n]=(0,S.useState)(!1);return(0,L.jsxs)(`div`,{className:`rounded-xl border border-taupe/70 bg-card`,children:[(0,L.jsxs)(`button`,{onClick:()=>n(e=>!e),className:`flex w-full items-center justify-between gap-4 p-4 text-left`,children:[(0,L.jsx)(`span`,{className:`font-medium text-forest`,children:e.q}),(0,L.jsx)(Zd,{className:`h-4 w-4 shrink-0 text-muted-foreground transition-transform ${t?`rotate-180`:``}`})]}),t&&(0,L.jsx)(`div`,{className:`border-t border-taupe/60 p-4 text-sm text-foreground/80`,children:e.a})]})}function fm(){return(0,L.jsxs)(`div`,{className:`mx-auto max-w-lg px-4 py-24 text-center`,children:[(0,L.jsx)(`p`,{className:`font-display text-8xl text-sage`,children:`404`}),(0,L.jsx)(`h1`,{className:`mt-3 font-display text-3xl text-forest`,children:`Page not found`}),(0,L.jsx)(`p`,{className:`mt-2 text-foreground/80`,children:`The page you're looking for doesn't exist or has moved.`}),(0,L.jsx)(Fn,{to:`/`,className:`mt-6 inline-block rounded-full bg-sage px-6 py-3 text-sm text-primary-foreground`,children:`Back to shop`})]})}var pm=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`rounded-xl border bg-card text-card-foreground shadow`,e),...t}));pm.displayName=`Card`;var mm=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`flex flex-col space-y-1.5 p-6`,e),...t}));mm.displayName=`CardHeader`;var hm=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`font-semibold leading-none tracking-tight`,e),...t}));hm.displayName=`CardTitle`;var gm=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));gm.displayName=`CardDescription`;var _m=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`p-6 pt-0`,e),...t}));_m.displayName=`CardContent`;var vm=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{ref:n,className:H(`flex items-center p-6 pt-0`,e),...t}));vm.displayName=`CardFooter`;var ym=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,bm=Ml,xm=(e,t)=>n=>{if(t?.variants==null)return bm(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ym(t)||ym(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return bm(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Sm=xm(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),Cm=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,L.jsx)(r?fa:`button`,{className:H(Sm({variant:t,size:n,className:e})),ref:a,...i}));Cm.displayName=`Button`;function wm(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),c=dt(),{refresh:l}=Dd();return(0,L.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-gradient-to-br from-cream to-sage-mist`,children:(0,L.jsxs)(pm,{className:`w-full max-w-md p-8 shadow-lg`,children:[(0,L.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Flora & Creations`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`Admin Dashboard`})]}),o&&(0,L.jsx)(`div`,{className:`mb-4 rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700`,children:o}),(0,L.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),a(!0),s(null);try{let t=await Sd.login({email:e,password:n});if(t.user.role!==`admin`&&t.user.role!==`staff`){s(`This account does not have admin access.`);return}fd(t.token),localStorage.setItem(`adminEmail`,t.user.email),await l(),c(`/admin`)}catch(e){Dp(`admin-login`,e),s(Tp(e))}finally{a(!1)}},className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Email Address`}),(0,L.jsx)(`input`,{type:`email`,value:e,onChange:e=>t(e.target.value),placeholder:`you@floraandcreations.com`,className:`w-full border border-taupe rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-sage`,required:!0})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Password`}),(0,L.jsx)(`input`,{type:`password`,value:n,onChange:e=>r(e.target.value),placeholder:`••••••••`,className:`w-full border border-taupe rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-sage`,required:!0})]}),(0,L.jsx)(Cm,{type:`submit`,disabled:i,className:`w-full mt-6`,children:i?`Signing in…`:`Sign In`})]})]})})}function Tm({children:e,requiredRole:t=`any`}){let[n,r]=(0,S.useState)(`checking`);return(0,S.useEffect)(()=>{if(!dd()){r(`no-token`);return}Sd.me().then(e=>{if(!(e.role===`admin`||e.role===`staff`)){r(`wrong-role`);return}if(t===`admin`&&e.role!==`admin`){r(`denied`);return}r(`authorized`)}).catch(e=>{Dp(`admin-guard`,e),r(`no-token`)})},[t]),n===`checking`?(0,L.jsx)(`div`,{className:`grid min-h-screen place-items-center text-sm text-muted-foreground`,children:`Checking access…`}):n===`no-token`?(0,L.jsx)(zt,{to:`/admin/login`,replace:!0}):n===`wrong-role`?(0,L.jsx)(zt,{to:`/account`,replace:!0}):n===`denied`?(0,L.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-cream`,children:(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`div`,{className:`mb-4`,children:(0,L.jsx)(`div`,{className:`mx-auto w-12 h-12 bg-red-100 rounded-full flex items-center justify-center`,children:(0,L.jsx)(`svg`,{className:`w-6 h-6 text-red-600`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 9v2m0 4v2m0 4v2M6.343 17.657l1.414-1.414m2.828 0l1.414 1.414M9.172 9.172L7.757 7.757m2.828 0l1.414 1.414`})})})}),(0,L.jsx)(`h1`,{className:`text-2xl font-bold text-forest mb-2`,children:`Access Denied`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mb-6`,children:t===`admin`?`Only admins can access this section.`:`You must be an admin or staff member to access the admin dashboard. Regular users cannot access this area.`}),(0,L.jsx)(`a`,{href:`/`,className:`inline-flex items-center justify-center px-4 py-2 rounded-lg bg-sage text-primary-foreground font-medium hover:bg-forest transition-colors`,children:`Go to Home`})]})}):(0,L.jsx)(L.Fragment,{children:e})}var Em=[{label:`Dashboard`,href:`/admin`,icon:gf,requiredRole:`all`},{label:`Orders`,href:`/admin/orders`,icon:If,requiredRole:`all`},{label:`Products`,href:`/admin/products`,icon:Df,requiredRole:`all`},{label:`Add-ons`,href:`/admin/addons`,icon:Vf,requiredRole:`admin`},{label:`Categories`,href:`/admin/categories`,icon:gf,requiredRole:`admin`},{label:`Delivery Zones`,href:`/admin/delivery-zones`,icon:Sf,requiredRole:`admin`},{label:`Customers`,href:`/admin/customers`,icon:Jf,requiredRole:`admin`},{label:`Reports`,href:`/admin/reports`,icon:Yd,requiredRole:`admin`},{label:`Settings`,href:`/admin/settings`,icon:Pf,requiredRole:`admin`},{label:`Staff`,href:`/admin/staff`,icon:qf,requiredRole:`admin`}];function Dm(){let e=ct(),{user:t}=Dd(),n=t?.role||`staff`,r=Em.filter(e=>e.requiredRole===`all`||e.requiredRole!==`admin`||n===`admin`);return(0,L.jsxs)(`aside`,{className:`w-64 bg-white border-r border-taupe overflow-y-auto`,children:[(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsx)(`h1`,{className:`text-2xl font-display text-forest`,children:`Flora`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Admin Panel`}),(0,L.jsx)(`div`,{className:`mt-2 px-3 py-1 rounded inline-block ${n===`admin`?`bg-sage-mist`:`bg-cream`}`,children:(0,L.jsx)(`p`,{className:`text-xs font-medium capitalize ${n===`admin`?`text-forest`:`text-sage`}`,children:n===`admin`?`👑 Admin`:`📋 Staff`})})]}),(0,L.jsx)(`nav`,{className:`px-4 py-6 space-y-2`,children:r.map(t=>{let n=t.icon,r=e.pathname===t.href||e.pathname.startsWith(t.href+`/`);return(0,L.jsxs)(Fn,{to:t.href,className:`flex items-center gap-3 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${r?`bg-sage-mist text-forest`:`text-foreground hover:bg-sage-mist/40`}`,children:[(0,L.jsx)(n,{className:`w-5 h-5`}),t.label]},t.href)})}),n===`admin`&&(0,L.jsx)(`div`,{className:`mx-4 mb-4 p-3 bg-green-50 border border-green-200 rounded-lg`,children:(0,L.jsxs)(`p`,{className:`text-xs text-green-900`,children:[(0,L.jsx)(`strong`,{children:`👑 Admin Access:`}),` Full access to all features.`]})}),n===`staff`&&(0,L.jsx)(`div`,{className:`mx-4 mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg`,children:(0,L.jsxs)(`p`,{className:`text-xs text-amber-900`,children:[(0,L.jsx)(`strong`,{children:`📋 Staff Access:`}),` You can manage Orders and Products only.`]})})]})}function Om({onMenuClick:e}){let t=dt(),{user:n,logout:r}=Dd(),i=()=>{r(),t(`/admin/login`)};return(0,L.jsx)(`header`,{className:`bg-white border-b border-taupe px-4 md:px-6 py-4`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsx)(`button`,{onClick:e,className:`p-2 hover:bg-sage-mist rounded-lg transition-colors lg:hidden`,children:(0,L.jsx)(Cf,{className:`w-5 h-5 text-muted-foreground`})}),(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Admin Panel`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 md:gap-4`,children:[(0,L.jsx)(`button`,{className:`p-2 hover:bg-sage-mist rounded-lg transition-colors`,children:(0,L.jsx)(Kd,{className:`w-5 h-5 text-muted-foreground`})}),n&&(0,L.jsxs)(`div`,{className:`hidden sm:flex items-center gap-3 px-3 py-2 rounded-lg bg-cream`,children:[(0,L.jsx)(Kf,{className:`w-4 h-4 text-muted-foreground`}),(0,L.jsxs)(`div`,{className:`text-sm`,children:[(0,L.jsx)(`div`,{className:`font-medium text-forest`,children:n.name}),(0,L.jsx)(`div`,{className:`text-xs font-semibold ${n.role===`admin`?`text-sage`:`text-forest`}`,children:n.role===`admin`?`👑 Admin`:`📋 Staff`})]})]}),(0,L.jsxs)(Cm,{onClick:i,variant:`ghost`,size:`sm`,className:`gap-2 hidden sm:flex`,children:[(0,L.jsx)(bf,{className:`w-4 h-4`}),`Logout`]}),(0,L.jsx)(`button`,{onClick:i,className:`p-2 hover:bg-sage-mist rounded-lg transition-colors sm:hidden`,children:(0,L.jsx)(bf,{className:`w-5 h-5 text-muted-foreground`})})]})]})})}var km=[{to:`/admin`,label:`Dashboard`,icon:gf,end:!0},{to:`/admin/orders`,label:`Orders`,icon:If},{to:`/admin/products`,label:`Products`,icon:Df},{to:`/admin/staff`,label:`Staff`,icon:Jf},{to:`/admin/settings`,label:`Settings`,icon:Pf}];function Am(){return(0,L.jsx)(`nav`,{className:`fixed bottom-0 left-0 right-0 z-40 border-t border-taupe bg-white lg:hidden`,children:(0,L.jsx)(`div`,{className:`flex h-16 items-center justify-around`,children:km.map(e=>{let t=e.icon;return(0,L.jsxs)(In,{to:e.to,end:e.end,className:({isActive:e})=>`flex flex-col items-center justify-center gap-1 px-3 py-2 text-xs transition-colors ${e?`text-sage`:`text-muted-foreground hover:text-forest`}`,children:[(0,L.jsx)(t,{className:`h-5 w-5`}),(0,L.jsx)(`span`,{className:`truncate`,children:e.label})]},e.to)})})})}function jm({children:e}){let[t,n]=(0,S.useState)(!1);return(0,L.jsxs)(`div`,{className:`flex h-screen bg-cream`,children:[(0,L.jsx)(`div`,{className:`hidden lg:block`,children:(0,L.jsx)(Dm,{})}),(0,L.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,L.jsx)(Om,{onMenuClick:()=>n(!t)}),(0,L.jsx)(`main`,{className:`flex-1 overflow-auto pb-20 lg:pb-0`,children:(0,L.jsx)(`div`,{className:`p-4 md:p-6`,children:e})})]}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:()=>n(!1)}),(0,L.jsx)(`div`,{className:`fixed left-0 top-0 z-50 h-screen w-64 overflow-y-auto lg:hidden`,children:(0,L.jsx)(Dm,{})})]}),(0,L.jsx)(Am,{})]})}var Mm=o(((e,t)=>{t.exports=Array.isArray})),Nm=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),Pm=o(((e,t)=>{var n=Nm(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Fm=o(((e,t)=>{t.exports=Pm().Symbol})),Im=o(((e,t)=>{var n=Fm(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),Lm=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Rm=o(((e,t)=>{var n=Fm(),r=Im(),i=Lm(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),zm=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Bm=o(((e,t)=>{var n=Rm(),r=zm(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),Vm=o(((e,t)=>{var n=Mm(),r=Bm(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Hm=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Um=o(((e,t)=>{var n=Rm(),r=Hm(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Wm=o(((e,t)=>{t.exports=Pm()[`__core-js_shared__`]})),Gm=o(((e,t)=>{var n=Wm(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Km=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),qm=o(((e,t)=>{var n=Um(),r=Gm(),i=Hm(),a=Km(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Jm=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ym=o(((e,t)=>{var n=qm(),r=Jm();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Xm=o(((e,t)=>{t.exports=Ym()(Object,`create`)})),Zm=o(((e,t)=>{var n=Xm();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Qm=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),$m=o(((e,t)=>{var n=Xm(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),eh=o(((e,t)=>{var n=Xm(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),th=o(((e,t)=>{var n=Xm(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),nh=o(((e,t)=>{var n=Zm(),r=Qm(),i=$m(),a=eh(),o=th();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),rh=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),ih=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),ah=o(((e,t)=>{var n=ih();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),oh=o(((e,t)=>{var n=ah(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),sh=o(((e,t)=>{var n=ah();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),ch=o(((e,t)=>{var n=ah();function r(e){return n(this.__data__,e)>-1}t.exports=r})),lh=o(((e,t)=>{var n=ah();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),uh=o(((e,t)=>{var n=rh(),r=oh(),i=sh(),a=ch(),o=lh();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),dh=o(((e,t)=>{t.exports=Ym()(Pm(),`Map`)})),fh=o(((e,t)=>{var n=nh(),r=uh(),i=dh();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),ph=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),mh=o(((e,t)=>{var n=ph();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),hh=o(((e,t)=>{var n=mh();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),gh=o(((e,t)=>{var n=mh();function r(e){return n(this,e).get(e)}t.exports=r})),_h=o(((e,t)=>{var n=mh();function r(e){return n(this,e).has(e)}t.exports=r})),vh=o(((e,t)=>{var n=mh();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),yh=o(((e,t)=>{var n=fh(),r=hh(),i=gh(),a=_h(),o=vh();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),bh=o(((e,t)=>{var n=yh(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),xh=o(((e,t)=>{var n=bh(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),Sh=o(((e,t)=>{var n=xh(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),Ch=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),wh=o(((e,t)=>{var n=Fm(),r=Ch(),i=Mm(),a=Bm(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),Th=o(((e,t)=>{var n=wh();function r(e){return e==null?``:n(e)}t.exports=r})),Eh=o(((e,t)=>{var n=Mm(),r=Vm(),i=Sh(),a=Th();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),Dh=o(((e,t)=>{var n=Bm(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),Oh=o(((e,t)=>{var n=Eh(),r=Dh();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),kh=o(((e,t)=>{var n=Oh();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),Ah=o(((e,t)=>{function n(e){return e==null}t.exports=n})),jh=o(((e,t)=>{var n=Rm(),r=Mm(),i=zm(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),Mh=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isFragment=function(e){return m(e)===r}})),Nh=o(((e,t)=>{t.exports=Mh()})),Ph=o(((e,t)=>{var n=Rm(),r=zm(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),Fh=o(((e,t)=>{var n=Ph();function r(e){return n(e)&&e!=+e}t.exports=r})),Ih=l(jh()),Lh=l(Fh()),Rh=l(kh()),zh=l(Ph()),Bh=l(Ah()),Vh=function(e){return e===0?0:e>0?1:-1},Hh=function(e){return(0,Ih.default)(e)&&e.indexOf(`%`)===e.length-1},G=function(e){return(0,zh.default)(e)&&!(0,Lh.default)(e)},Uh=function(e){return(0,Bh.default)(e)},Wh=function(e){return G(e)||(0,Ih.default)(e)},Gh=0,Kh=function(e){var t=++Gh;return`${e||``}${t}`},qh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!G(e)&&!(0,Ih.default)(e))return n;var i;if(Hh(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,Lh.default)(i)&&(i=n),r&&i>t&&(i=t),i},Jh=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Yh=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},Xh=function(e,t){return G(e)&&G(t)?function(n){return e+n*(t-e)}:function(){return t}};function Zh(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,Rh.default)(e,t))===n})}var Qh=function(e,t){return G(e)&&G(t)?e-t:(0,Ih.default)(e)&&(0,Ih.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function $h(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}var eg=l(Hm());function tg(e){"@babel/helpers - typeof";return tg=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tg(e)}var ng=[`viewBox`,`children`],rg=`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`.split(`.`),ig=[`points`,`pathLength`],ag={svg:ng,polygon:ig,polyline:ig},og=`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`.split(`.`),sg=function(e,t){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,S.isValidElement)(e)&&(n=e.props),!(0,eg.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){og.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},cg=function(e,t,n){return function(r){return e(t,n,r),null}},lg=function(e,t,n){if(!(0,eg.default)(e)||tg(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];og.includes(i)&&typeof a==`function`&&(r||={},r[i]=cg(a,t,n))}),r},ug=l(Um()),dg=Nh(),fg=[`children`],pg=[`children`];function mg(e,t){if(e==null)return{};var n=hg(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hg(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 gg={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`},_g=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},vg=null,yg=null,bg=function e(t){if(t===vg&&Array.isArray(yg))return yg;var n=[];return S.Children.forEach(t,function(t){(0,Bh.default)(t)||((0,dg.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),yg=n,vg=t,n};function xg(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return _g(e)}):[_g(t)],bg(e).forEach(function(e){var t=(0,Rh.default)(e,`type.displayName`)||(0,Rh.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function Sg(e,t){var n=xg(e,t);return n&&n[0]}var Cg=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!G(n)||n<=0||!G(r)||r<=0)},wg=`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`.split(`.`),Tg=function(e){return e&&e.type&&(0,Ih.default)(e.type)&&wg.indexOf(e.type)>=0},Eg=function(e,t,n,r){var i=ag?.[r]??[];return t.startsWith(`data-`)||!(0,ug.default)(e)&&(r&&i.includes(t)||rg.includes(t))||n&&og.includes(t)},Dg=function(e,t,n){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,S.isValidElement)(e)&&(r=e.props),!(0,eg.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){Eg(r?.[e],e,t,n)&&(i[e]=r[e])}),i},Og=function e(t,n){if(t===n)return!0;var r=S.Children.count(t);if(r!==S.Children.count(n))return!1;if(r===0)return!0;if(r===1)return kg(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!kg(a,o))return!1}return!0},kg=function(e,t){if((0,Bh.default)(e)&&(0,Bh.default)(t))return!0;if(!(0,Bh.default)(e)&&!(0,Bh.default)(t)){var n=e.props||{},r=n.children,i=mg(n,fg),a=t.props||{},o=a.children,s=mg(a,pg);return r&&o?$h(i,s)&&Og(r,o):!r&&!o&&$h(i,s)}return!1},Ag=function(e,t){var n=[],r={};return bg(e).forEach(function(e,i){if(Tg(e))n.push(e);else if(e){var a=_g(e.type),o=t[a]||{},s=o.handler,c=o.once;if(s&&(!c||!r[a])){var l=s(e,a,i);n.push(l),r[a]=!0}}}),n},jg=function(e){var t=e&&e.type;return t&&gg[t]?gg[t]:null},Mg=function(e,t){return bg(t).indexOf(e)},Ng=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Pg(){return Pg=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},Pg.apply(this,arguments)}function Fg(e,t){if(e==null)return{};var n=Ig(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ig(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 Lg(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,l=Fg(e,Ng),u=i||{width:n,height:r,x:0,y:0},d=Ml(`recharts-surface`,a);return S.createElement(`svg`,Pg({},Dg(l,!0,`svg`),{className:d,width:n,height:r,style:o,viewBox:`${u.x} ${u.y} ${u.width} ${u.height}`}),S.createElement(`title`,null,s),S.createElement(`desc`,null,c),t)}var Rg=[`children`,`className`];function zg(){return zg=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},zg.apply(this,arguments)}function Bg(e,t){if(e==null)return{};var n=Vg(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vg(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 Hg=S.forwardRef(function(e,t){var n=e.children,r=e.className,i=Bg(e,Rg),a=Ml(`recharts-layer`,r);return S.createElement(`g`,zg({className:a},Dg(i,!0),{ref:t}),n)}),Ug=o(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),Wg=o(((e,t)=>{var n=Ug();function r(e,t,r){var i=e.length;return r=r===void 0?i:r,!t&&r>=i?e:n(e,t,r)}t.exports=r})),Gg=o(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),Kg=o(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),qg=o(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){return e.match(v)||[]}t.exports=y})),Jg=o(((e,t)=>{var n=Kg(),r=Gg(),i=qg();function a(e){return r(e)?i(e):n(e)}t.exports=a})),Yg=o(((e,t)=>{var n=Wg(),r=Gg(),i=Jg(),a=Th();function o(e){return function(t){t=a(t);var o=r(t)?i(t):void 0,s=o?o[0]:t.charAt(0),c=o?n(o,1).join(``):t.slice(1);return s[e]()+c}}t.exports=o})),Xg=o(((e,t)=>{t.exports=Yg()(`toUpperCase`)}));function Zg(e){return function(){return e}}var Qg=Math.cos,$g=Math.sin,e_=Math.sqrt,t_=Math.PI;t_/2;var n_=2*t_,r_=Math.PI,i_=2*r_,a_=1e-6,o_=i_-a_;function s_(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function c_(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return s_;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var l_=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?s_:c_(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>a_)if(!(Math.abs(u*s-c*l)>a_)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((r_-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>a_&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>a_||Math.abs(this._y1-l)>a_)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%i_+i_),d>o_?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>a_&&this._append`A${n},${n},0,${+(d>=r_)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function u_(){return new l_}u_.prototype=l_.prototype;function d_(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new l_(t)}Array.prototype.slice;function f_(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function p_(e){this._context=e}p_.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 m_(e){return new p_(e)}function h_(e){return e[0]}function g_(e){return e[1]}function __(e,t){var n=Zg(!0),r=null,i=m_,a=null,o=d_(s);e=typeof e==`function`?e:e===void 0?h_:Zg(e),t=typeof t==`function`?t:t===void 0?g_:Zg(t);function s(s){var c,l=(s=f_(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Zg(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Zg(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Zg(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function v_(e,t,n){var r=null,i=Zg(!0),a=null,o=m_,s=null,c=d_(l);e=typeof e==`function`?e:e===void 0?h_:Zg(+e),t=typeof t==`function`?t:Zg(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?g_:Zg(+n);function l(l){var u,d,f,p=(l=f_(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return __().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Zg(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Zg(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Zg(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Zg(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Zg(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Zg(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Zg(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var y_=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function b_(e){return new y_(e,!0)}function x_(e){return new y_(e,!1)}var S_={draw(e,t){let n=e_(t/t_);e.moveTo(n,0),e.arc(0,0,n,0,n_)}},C_={draw(e,t){let n=e_(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()}},w_=e_(1/3),T_=w_*2,E_={draw(e,t){let n=e_(t/T_),r=n*w_;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},D_={draw(e,t){let n=e_(t),r=-n/2;e.rect(r,r,n,n)}},O_=.8908130915292852,k_=$g(t_/10)/$g(7*t_/10),A_=$g(n_/10)*k_,j_=-Qg(n_/10)*k_,M_={draw(e,t){let n=e_(t*O_),r=A_*n,i=j_*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=n_*t/5,o=Qg(a),s=$g(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},N_=e_(3),P_={draw(e,t){let n=-e_(t/(N_*3));e.moveTo(0,n*2),e.lineTo(-N_*n,-n),e.lineTo(N_*n,-n),e.closePath()}},F_=-.5,I_=e_(3)/2,L_=1/e_(12),R_=(L_/2+1)*3,z_={draw(e,t){let n=e_(t/R_),r=n/2,i=n*L_,a=r,o=n*L_+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(F_*r-I_*i,I_*r+F_*i),e.lineTo(F_*a-I_*o,I_*a+F_*o),e.lineTo(F_*s-I_*c,I_*s+F_*c),e.lineTo(F_*r+I_*i,F_*i-I_*r),e.lineTo(F_*a+I_*o,F_*o-I_*a),e.lineTo(F_*s+I_*c,F_*c-I_*s),e.closePath()}};function B_(e,t){let n=null,r=d_(i);e=typeof e==`function`?e:Zg(e||S_),t=typeof t==`function`?t:Zg(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Zg(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Zg(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function V_(){}function H_(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 U_(e){this._context=e}U_.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:H_(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:H_(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function W_(e){return new U_(e)}function G_(e){this._context=e}G_.prototype={areaStart:V_,areaEnd:V_,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:H_(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K_(e){return new G_(e)}function q_(e){this._context=e}q_.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:H_(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J_(e){return new q_(e)}function Y_(e){this._context=e}Y_.prototype={areaStart:V_,areaEnd:V_,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 X_(e){return new Y_(e)}function Z_(e){return e<0?-1:1}function Q_(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Z_(a)+Z_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function $_(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ev(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function tv(e){this._context=e}tv.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:ev(this,this._t0,$_(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,ev(this,$_(this,n=Q_(this,e,t)),n);break;default:ev(this,this._t0,n=Q_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function nv(e){this._context=new rv(e)}(nv.prototype=Object.create(tv.prototype)).point=function(e,t){tv.prototype.point.call(this,t,e)};function rv(e){this._context=e}rv.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,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function iv(e){return new tv(e)}function av(e){return new nv(e)}function ov(e){this._context=e}ov.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=sv(e),i=sv(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(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 sv(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function cv(e){return new ov(e)}function lv(e,t){this._context=e,this._t=t}lv.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 uv(e){return new lv(e,.5)}function dv(e){return new lv(e,0)}function fv(e){return new lv(e,1)}function pv(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function mv(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function hv(e,t){return e[t]}function gv(e){let t=[];return t.key=e,t}function _v(){var e=Zg([]),t=mv,n=pv,r=hv;function i(i){var a=Array.from(e.apply(this,arguments),gv),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=f_(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Zg(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Zg(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?mv:typeof e==`function`?e:Zg(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??pv,i):n},i}function vv(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}pv(e,t)}}function yv(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}pv(e,t)}}function bv(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,pv(e,t)}}var xv=l(Xg());function Sv(e){"@babel/helpers - typeof";return Sv=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Sv(e)}var Cv=[`type`,`size`,`sizeType`];function wv(){return wv=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},wv.apply(this,arguments)}function Tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ev(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Tv(Object(n),!0).forEach(function(t){Dv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dv(e,t,n){return t=Ov(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ov(e){var t=kv(e,`string`);return Sv(t)==`symbol`?t:t+``}function kv(e,t){if(Sv(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Sv(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Av(e,t){if(e==null)return{};var n=jv(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jv(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 Mv={symbolCircle:S_,symbolCross:C_,symbolDiamond:E_,symbolSquare:D_,symbolStar:M_,symbolTriangle:P_,symbolWye:z_},Nv=Math.PI/180,Pv=function(e){return Mv[`symbol${(0,xv.default)(e)}`]||S_},Fv=function(e,t,n){if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Nv;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Iv=function(e,t){Mv[`symbol${(0,xv.default)(e)}`]=t},Lv=function(e){var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=Ev(Ev({},Av(e,Cv)),{},{type:n,size:i,sizeType:o}),c=function(){var e=Pv(n);return B_().type(e).size(Fv(i,o,n))()},l=s.className,u=s.cx,d=s.cy,f=Dg(s,!0);return u===+u&&d===+d&&i===+i?S.createElement(`path`,wv({},f,{className:Ml(`recharts-symbols`,l),transform:`translate(${u}, ${d})`,d:c()})):null};Lv.registerSymbol=Iv;function Rv(e){"@babel/helpers - typeof";return Rv=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Rv(e)}function zv(){return zv=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},zv.apply(this,arguments)}function Bv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Bv(Object(n),!0).forEach(function(t){Qv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hv(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Uv(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,$v(r.key),r)}}function Wv(e,t,n){return t&&Uv(e.prototype,t),n&&Uv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gv(e,t,n){return t=Yv(t),Kv(e,Jv()?Reflect.construct(t,n||[],Yv(e).constructor):t.apply(e,n))}function Kv(e,t){if(t&&(Rv(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return qv(e)}function qv(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Jv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jv=function(){return!!e})()}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yv(e)}function Xv(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Zv(e,t)}function Zv(e,t){return Zv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zv(e,t)}function Qv(e,t,n){return t=$v(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $v(e){var t=ey(e,`string`);return Rv(t)==`symbol`?t:t+``}function ey(e,t){if(Rv(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Rv(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ty=32,ny=function(e){function t(){return Hv(this,t),Gv(this,t,arguments)}return Xv(t,e),Wv(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=ty/2,r=ty/6,i=ty/3,a=e.inactive?t:e.color;if(e.type===`plainline`)return S.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:ty,y2:n,className:`recharts-legend-icon`});if(e.type===`line`)return S.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:a,d:`M0,${n}h${i} A${r},${r},0,1,1,${2*i},${n} H${ty}M${2*i},${n} A${r},${r},0,1,1,${i},${n}`,className:`recharts-legend-icon`});if(e.type===`rect`)return S.createElement(`path`,{stroke:`none`,fill:a,d:`M0,${ty/8}h${ty}v${ty*3/4}h${-ty}z`,className:`recharts-legend-icon`});if(S.isValidElement(e.legendIcon)){var o=Vv({},e);return delete o.legendIcon,S.cloneElement(e.legendIcon,o)}return S.createElement(Lv,{fill:a,cx:n,cy:n,size:ty,sizeType:`diameter`,type:e.type})}},{key:`renderItems`,value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,a=t.formatter,o=t.inactiveColor,s={x:0,y:0,width:ty,height:ty},c={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},l={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map(function(t,n){var i=t.formatter||a,u=Ml(Qv(Qv({"recharts-legend-item":!0},`legend-item-${n}`,!0),`inactive`,t.inactive));if(t.type===`none`)return null;var d=(0,ug.default)(t.value)?null:t.value;(0,ug.default)(t.value);var f=t.inactive?o:t.color;return S.createElement(`li`,zv({className:u,style:c,key:`legend-item-${n}`},lg(e.props,t,n)),S.createElement(Lg,{width:r,height:r,viewBox:s,style:l},e.renderIcon(t)),S.createElement(`span`,{className:`recharts-legend-item-text`,style:{color:f}},i?i(d,t,n):d))})}},{key:`render`,value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n===`horizontal`?r:`left`};return S.createElement(`ul`,{className:`recharts-default-legend`,style:i},this.renderItems())}}])}(S.PureComponent);Qv(ny,`displayName`,`Legend`),Qv(ny,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var ry=o(((e,t)=>{var n=uh();function r(){this.__data__=new n,this.size=0}t.exports=r})),iy=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),ay=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),oy=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),sy=o(((e,t)=>{var n=uh(),r=dh(),i=yh(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),cy=o(((e,t)=>{var n=uh(),r=ry(),i=iy(),a=ay(),o=oy(),s=sy();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),ly=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),uy=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),dy=o(((e,t)=>{var n=yh(),r=ly(),i=uy();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),fy=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),py=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),my=o(((e,t)=>{var n=dy(),r=fy(),i=py(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),hy=o(((e,t)=>{t.exports=Pm().Uint8Array})),gy=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),_y=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),vy=o(((e,t)=>{var n=Fm(),r=hy(),i=ih(),a=my(),o=gy(),s=_y(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),yy=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),by=o(((e,t)=>{var n=yy(),r=Mm();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),xy=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Sy=o(((e,t)=>{function n(){return[]}t.exports=n})),Cy=o(((e,t)=>{var n=xy(),r=Sy(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),wy=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Ty=o(((e,t)=>{var n=Rm(),r=zm(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),Ey=o(((e,t)=>{var n=Ty(),r=zm(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Dy=o(((e,t)=>{function n(){return!1}t.exports=n})),Oy=o(((e,t)=>{var n=Pm(),r=Dy(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),ky=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Ay=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),jy=o(((e,t)=>{var n=Rm(),r=Ay(),i=zm(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),My=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Ny=o(((e,t)=>{var n=Nm(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Py=o(((e,t)=>{var n=jy(),r=My(),i=Ny(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Fy=o(((e,t)=>{var n=wy(),r=Ey(),i=Mm(),a=Oy(),o=ky(),s=Py(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Iy=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Ly=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Ry=o(((e,t)=>{t.exports=Ly()(Object.keys,Object)})),zy=o(((e,t)=>{var n=Iy(),r=Ry(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),By=o(((e,t)=>{var n=Um(),r=Ay();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Vy=o(((e,t)=>{var n=Fy(),r=zy(),i=By();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Hy=o(((e,t)=>{var n=by(),r=Cy(),i=Vy();function a(e){return n(e,i,r)}t.exports=a})),Uy=o(((e,t)=>{var n=Hy(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),Wy=o(((e,t)=>{t.exports=Ym()(Pm(),`DataView`)})),Gy=o(((e,t)=>{t.exports=Ym()(Pm(),`Promise`)})),Ky=o(((e,t)=>{t.exports=Ym()(Pm(),`Set`)})),qy=o(((e,t)=>{t.exports=Ym()(Pm(),`WeakMap`)})),Jy=o(((e,t)=>{var n=Wy(),r=dh(),i=Gy(),a=Ky(),o=qy(),s=Rm(),c=Km(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),Yy=o(((e,t)=>{var n=cy(),r=my(),i=vy(),a=Uy(),o=Jy(),s=Mm(),c=Oy(),l=Py(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),Xy=o(((e,t)=>{var n=Yy(),r=zm();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),Zy=o(((e,t)=>{var n=cy(),r=Xy(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),Qy=o(((e,t)=>{var n=Hm();function r(e){return e===e&&!n(e)}t.exports=r})),$y=o(((e,t)=>{var n=Qy(),r=Vy();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),eb=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),tb=o(((e,t)=>{var n=Zy(),r=$y(),i=eb();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),nb=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),rb=o(((e,t)=>{var n=Eh(),r=Ey(),i=Mm(),a=ky(),o=Ay(),s=Dh();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),ib=o(((e,t)=>{var n=nb(),r=rb();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),ab=o(((e,t)=>{var n=Xy(),r=kh(),i=ib(),a=Vm(),o=Qy(),s=eb(),c=Dh(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),ob=o(((e,t)=>{function n(e){return e}t.exports=n})),sb=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),cb=o(((e,t)=>{var n=Oh();function r(e){return function(t){return n(t,e)}}t.exports=r})),lb=o(((e,t)=>{var n=sb(),r=cb(),i=Vm(),a=Dh();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),ub=o(((e,t)=>{var n=tb(),r=ab(),i=ob(),a=Mm(),o=lb();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),db=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),fb=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),pb=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),mb=o(((e,t)=>{var n=db(),r=fb(),i=pb();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),hb=o(((e,t)=>{var n=mb();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),gb=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),_b=o(((e,t)=>{function n(){}t.exports=n})),vb=o(((e,t)=>{var n=Ky(),r=_b(),i=_y();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),yb=o(((e,t)=>{var n=dy(),r=hb(),i=gb(),a=py(),o=vb(),s=_y(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),bb=l(o(((e,t)=>{var n=ub(),r=yb();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function xb(e,t,n){return t===!0?(0,bb.default)(e,n):(0,ug.default)(t)?(0,bb.default)(e,t):e}function Sb(e){"@babel/helpers - typeof";return Sb=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Sb(e)}var Cb=[`ref`];function wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wb(Object(n),!0).forEach(function(t){Ib(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Eb(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Db(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,Lb(r.key),r)}}function Ob(e,t,n){return t&&Db(e.prototype,t),n&&Db(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kb(e,t,n){return t=Nb(t),Ab(e,Mb()?Reflect.construct(t,n||[],Nb(e).constructor):t.apply(e,n))}function Ab(e,t){if(t&&(Sb(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return jb(e)}function jb(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Mb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mb=function(){return!!e})()}function Nb(e){return Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nb(e)}function Pb(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Fb(e,t)}function Fb(e,t){return Fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fb(e,t)}function Ib(e,t,n){return t=Lb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lb(e){var t=Rb(e,`string`);return Sb(t)==`symbol`?t:t+``}function Rb(e,t){if(Sb(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Sb(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zb(e,t){if(e==null)return{};var n=Bb(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bb(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 Vb(e){return e.value}function Hb(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e==`function`)return S.createElement(e,t);t.ref;var n=zb(t,Cb);return S.createElement(ny,n)}var Ub=1,Wb=function(e){function t(){var e;Eb(this,t);var n=[...arguments];return e=kb(this,t,[].concat(n)),Ib(e,`lastBoundingBox`,{width:-1,height:-1}),e}return Pb(t,e),Ob(t,[{key:`componentDidMount`,value:function(){this.updateBBox()}},{key:`componentDidUpdate`,value:function(){this.updateBBox()}},{key:`getBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:`updateBBox`,value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>Ub||Math.abs(t.height-this.lastBoundingBox.height)>Ub)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:`getBBoxSnapshot`,value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Tb({},this.lastBoundingBox):{width:0,height:0}}},{key:`getDefaultPosition`,value:function(e){var t=this.props,n=t.layout,r=t.align,i=t.verticalAlign,a=t.margin,o=t.chartWidth,s=t.chartHeight,c,l;if(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))if(r===`center`&&n===`vertical`){var u=this.getBBoxSnapshot();c={left:((o||0)-u.width)/2}}else c=r===`right`?{right:a&&a.right||0}:{left:a&&a.left||0};if(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))if(i===`middle`){var d=this.getBBoxSnapshot();l={top:((s||0)-d.height)/2}}else l=i===`bottom`?{bottom:a&&a.bottom||0}:{top:a&&a.top||0};return Tb(Tb({},c),l)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,a=t.wrapperStyle,o=t.payloadUniqBy,s=t.payload,c=Tb(Tb({position:`absolute`,width:r||`auto`,height:i||`auto`},this.getDefaultPosition(a)),a);return S.createElement(`div`,{className:`recharts-legend-wrapper`,style:c,ref:function(t){e.wrapperNode=t}},Hb(n,Tb(Tb({},this.props),{},{payload:xb(s,o,Vb)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=Tb(Tb({},this.defaultProps),e.props).layout;return n===`vertical`&&G(e.props.height)?{height:e.props.height}:n===`horizontal`?{width:e.props.width||t}:null}}])}(S.PureComponent);Ib(Wb,`displayName`,`Legend`),Ib(Wb,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var Gb=o(((e,t)=>{var n=Fm(),r=Ey(),i=Mm(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Kb=o(((e,t)=>{var n=yy(),r=Gb();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),qb=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),Jb=o(((e,t)=>{t.exports=qb()()})),Yb=o(((e,t)=>{var n=Jb(),r=Vy();function i(e,t){return e&&n(e,t,r)}t.exports=i})),Xb=o(((e,t)=>{var n=By();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),Zb=o(((e,t)=>{var n=Yb();t.exports=Xb()(n)})),Qb=o(((e,t)=>{var n=Zb(),r=By();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),$b=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),ex=o(((e,t)=>{var n=Bm();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),tx=o(((e,t)=>{var n=ex();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),nx=o(((e,t)=>{var n=Ch(),r=Oh(),i=ub(),a=Qb(),o=$b(),s=My(),c=tx(),l=ob(),u=Mm();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),rx=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),ix=o(((e,t)=>{var n=rx(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),ax=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),ox=o(((e,t)=>{var n=Ym();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),sx=o(((e,t)=>{var n=ax(),r=ox(),i=ob();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),cx=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),lx=o(((e,t)=>{var n=sx();t.exports=cx()(n)})),ux=o(((e,t)=>{var n=ob(),r=ix(),i=lx();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),dx=o(((e,t)=>{var n=ih(),r=By(),i=ky(),a=Hm();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),fx=l(o(((e,t)=>{var n=Kb(),r=nx(),i=ux(),a=dx();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})}))());function px(e){"@babel/helpers - typeof";return px=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},px(e)}function mx(){return mx=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},mx.apply(this,arguments)}function hx(e,t){return bx(e)||yx(e,t)||_x(e,t)||gx()}function gx(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _x(e,t){if(e){if(typeof e==`string`)return vx(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 vx(e,t)}}function vx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yx(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function bx(e){if(Array.isArray(e))return e}function xx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xx(Object(n),!0).forEach(function(t){Cx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cx(e,t,n){return t=wx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wx(e){var t=Tx(e,`string`);return px(t)==`symbol`?t:t+``}function Tx(e,t){if(px(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(px(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ex(e){return Array.isArray(e)&&Wh(e[0])&&Wh(e[1])?e.join(` ~ `):e}var Dx=function(e){var t=e.separator,n=t===void 0?` : `:t,r=e.contentStyle,i=r===void 0?{}:r,a=e.itemStyle,o=a===void 0?{}:a,s=e.labelStyle,c=s===void 0?{}:s,l=e.payload,u=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,g=e.accessibilityLayer,_=g!==void 0&&g,v=function(){if(l&&l.length){var e={padding:0,margin:0},t=(d?(0,fx.default)(l,d):l).map(function(e,t){if(e.type===`none`)return null;var r=Sx({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||u||Ex,a=e.value,s=e.name,c=a,d=s;if(i&&c!=null&&d!=null){var f=i(a,s,e,t,l);if(Array.isArray(f)){var p=hx(f,2);c=p[0],d=p[1]}else c=f}return S.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:r},Wh(d)?S.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,Wh(d)?S.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,S.createElement(`span`,{className:`recharts-tooltip-item-value`},c),S.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return S.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},y=Sx({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),b=Sx({margin:0},c),x=!(0,Bh.default)(m),C=x?m:``,w=Ml(`recharts-default-tooltip`,f),T=Ml(`recharts-tooltip-label`,p);x&&h&&l!=null&&(C=h(m,l));var E=_?{role:`status`,"aria-live":`assertive`}:{};return S.createElement(`div`,mx({className:w,style:y},E),S.createElement(`p`,{className:T,style:b},S.isValidElement(C)?C:`${C}`),v())};function Ox(e){"@babel/helpers - typeof";return Ox=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ox(e)}function kx(e,t,n){return t=Ax(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ax(e){var t=jx(e,`string`);return Ox(t)==`symbol`?t:t+``}function jx(e,t){if(Ox(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ox(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Mx=`recharts-tooltip-wrapper`,Nx={visibility:`hidden`};function Px(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ml(Mx,kx(kx(kx(kx({},`${Mx}-right`,G(n)&&t&&G(t.x)&&n>=t.x),`${Mx}-left`,G(n)&&t&&G(t.x)&&n<t.x),`${Mx}-bottom`,G(r)&&t&&G(t.y)&&r>=t.y),`${Mx}-top`,G(r)&&t&&G(t.y)&&r<t.y))}function Fx(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&G(a[r]))return a[r];var u=n[r]-s-i,d=n[r]+i;return t[r]?o[r]?u:d:o[r]?u<c[r]?Math.max(d,c[r]):Math.max(u,c[r]):d+s>c[r]+l?Math.max(u,c[r]):Math.max(d,c[r])}function Ix(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Lx(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,l,u,d;return o.height>0&&o.width>0&&n?(u=Fx({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=Fx({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=Ix({translateX:u,translateY:d,useTranslate3d:s})):l=Nx,{cssProperties:l,cssClasses:Px({translateX:u,translateY:d,coordinate:n})}}function Rx(e){"@babel/helpers - typeof";return Rx=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Rx(e)}function zx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zx(Object(n),!0).forEach(function(t){Zx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vx(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Hx(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,Qx(r.key),r)}}function Ux(e,t,n){return t&&Hx(e.prototype,t),n&&Hx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wx(e,t,n){return t=Jx(t),Gx(e,qx()?Reflect.construct(t,n||[],Jx(e).constructor):t.apply(e,n))}function Gx(e,t){if(t&&(Rx(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Kx(e)}function Kx(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function qx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qx=function(){return!!e})()}function Jx(e){return Jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jx(e)}function Yx(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Xx(e,t)}function Xx(e,t){return Xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xx(e,t)}function Zx(e,t,n){return t=Qx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qx(e){var t=$x(e,`string`);return Rx(t)==`symbol`?t:t+``}function $x(e,t){if(Rx(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Rx(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var eS=1,tS=function(e){function t(){var e;Vx(this,t);var n=[...arguments];return e=Wx(this,t,[].concat(n)),Zx(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Zx(e,`handleKeyDown`,function(t){t.key===`Escape`&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:e.props.coordinate?.x??0,y:e.props.coordinate?.y??0}})}),e}return Yx(t,e),Ux(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>eS||Math.abs(e.height-this.state.lastBoundingBox.height)>eS)&&this.setState({lastBoundingBox:{width:e.width,height:e.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(){this.props.active&&this.updateBBox(),this.state.dismissed&&(this.props.coordinate?.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate?.y!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.children,s=t.coordinate,c=t.hasPayload,l=t.isAnimationActive,u=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,g=Lx({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),_=g.cssClasses,v=g.cssProperties,y=Bx(Bx({transition:l&&n?`transform ${i}ms ${a}`:void 0},v),{},{pointerEvents:`none`,visibility:!this.state.dismissed&&n&&c?`visible`:`hidden`,position:`absolute`,top:0,left:0},h);return S.createElement(`div`,{tabIndex:-1,className:_,style:y,ref:function(t){e.wrapperNode=t}},o)}}])}(S.PureComponent),nS={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return nS[e]},set:function(e,t){if(typeof e==`string`)nS[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){nS[t]=e[t]})}}};function rS(e){"@babel/helpers - typeof";return rS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rS(e)}function iS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iS(Object(n),!0).forEach(function(t){gS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oS(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function sS(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,_S(r.key),r)}}function cS(e,t,n){return t&&sS(e.prototype,t),n&&sS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lS(e,t,n){return t=pS(t),uS(e,fS()?Reflect.construct(t,n||[],pS(e).constructor):t.apply(e,n))}function uS(e,t){if(t&&(rS(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return dS(e)}function dS(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function fS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fS=function(){return!!e})()}function pS(e){return pS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pS(e)}function mS(e,t){if(typeof t!=`function`&&t!==null)throw 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&&hS(e,t)}function hS(e,t){return hS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hS(e,t)}function gS(e,t,n){return t=_S(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _S(e){var t=vS(e,`string`);return rS(t)==`symbol`?t:t+``}function vS(e,t){if(rS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yS(e){return e.dataKey}function bS(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e==`function`?S.createElement(e,t):S.createElement(Dx,t)}var xS=function(e){function t(){return oS(this,t),lS(this,t,arguments)}return mS(t,e),cS(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.coordinate,c=t.filterNull,l=t.isAnimationActive,u=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,g=t.viewBox,_=t.wrapperStyle,v=d??[];c&&v.length&&(v=xb(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),f,yS));var y=v.length>0;return S.createElement(tS,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:n,coordinate:s,hasPayload:y,offset:u,position:p,reverseDirection:m,useTranslate3d:h,viewBox:g,wrapperStyle:_},bS(o,aS(aS({},this.props),{},{payload:v})))}}])}(S.PureComponent);gS(xS,`displayName`,`Tooltip`),gS(xS,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nS.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 SS=o(((e,t)=>{var n=Pm();t.exports=function(){return n.Date.now()}})),CS=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),wS=o(((e,t)=>{var n=CS(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),TS=o(((e,t)=>{var n=wS(),r=Hm(),i=Bm(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),ES=o(((e,t)=>{var n=Hm(),r=SS(),i=TS(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),DS=l(o(((e,t)=>{var n=ES(),r=Hm(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}))());function OS(e){"@babel/helpers - typeof";return OS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},OS(e)}function kS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kS(Object(n),!0).forEach(function(t){jS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jS(e,t,n){return t=MS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MS(e){var t=NS(e,`string`);return OS(t)==`symbol`?t:t+``}function NS(e,t){if(OS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(OS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function PS(e,t){return zS(e)||RS(e,t)||IS(e,t)||FS()}function FS(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IS(e,t){if(e){if(typeof e==`string`)return LS(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 LS(e,t)}}function LS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RS(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zS(e){if(Array.isArray(e))return e}var BS=(0,S.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?`100%`:a,s=e.height,c=s===void 0?`100%`:s,l=e.minWidth,u=l===void 0?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=m===void 0?0:m,g=e.id,_=e.className,v=e.onResize,y=e.style,b=y===void 0?{}:y,x=(0,S.useRef)(null),C=(0,S.useRef)();C.current=v,(0,S.useImperativeHandle)(t,function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn(`The usage of ref.current.current is deprecated and will no longer be supported.`),x.current},configurable:!0})});var w=PS((0,S.useState)({containerWidth:i.width,containerHeight:i.height}),2),T=w[0],E=w[1],D=(0,S.useCallback)(function(e,t){E(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,S.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;D(r,i),(t=C.current)==null||t.call(C,r,i)};h>0&&(e=(0,DS.default)(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,i=n.height;return D(r,i),t.observe(x.current),function(){t.disconnect()}},[D,h]);var O=(0,S.useMemo)(function(){var e=T.containerWidth,t=T.containerHeight;if(e<0||t<0)return null;Hh(o)||Hh(c);var r=Hh(o)?e:o,i=Hh(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),f&&i>f&&(i=f));var a=!Array.isArray(p)&&_g(p.type).endsWith(`Chart`);return S.Children.map(p,function(e){return S.isValidElement(e)?(0,S.cloneElement)(e,AS({width:r,height:i},a?{style:AS({height:`100%`,width:`100%`,maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,p,c,f,d,u,T,o]);return S.createElement(`div`,{id:g?`${g}`:void 0,className:Ml(`recharts-responsive-container`,_),style:AS(AS({},b),{},{width:o,height:c,minWidth:u,minHeight:d,maxHeight:f}),ref:x},O)}),VS=function(e){return null};VS.displayName=`Cell`;function HS(e){"@babel/helpers - typeof";return HS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},HS(e)}function US(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?US(Object(n),!0).forEach(function(t){GS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):US(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GS(e,t,n){return t=KS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KS(e){var t=qS(e,`string`);return HS(t)==`symbol`?t:t+``}function qS(e,t){if(HS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(HS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JS={widthCache:{},cacheCount:0},YS=2e3,XS={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},ZS=`recharts_measurement_span`;function QS(e){var t=WS({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var $S=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||nS.isSsr)return{width:0,height:0};var n=QS(t),r=JSON.stringify({text:e,copyStyle:n});if(JS.widthCache[r])return JS.widthCache[r];try{var i=document.getElementById(ZS);i||(i=document.createElement(`span`),i.setAttribute(`id`,ZS),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=WS(WS({},XS),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return JS.widthCache[r]=s,++JS.cacheCount>YS&&(JS.cacheCount=0,JS.widthCache={}),s}catch{return{width:0,height:0}}},eC=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function tC(e){"@babel/helpers - typeof";return tC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tC(e)}function nC(e,t){return sC(e)||oC(e,t)||iC(e,t)||rC()}function rC(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iC(e,t){if(e){if(typeof e==`string`)return aC(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 aC(e,t)}}function aC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sC(e){if(Array.isArray(e))return e}function cC(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function lC(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,dC(r.key),r)}}function uC(e,t,n){return t&&lC(e.prototype,t),n&&lC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dC(e){var t=fC(e,`string`);return tC(t)==`symbol`?t:t+``}function fC(e,t){if(tC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var pC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,mC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,hC=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,gC=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,_C={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},vC=Object.keys(_C),yC=`NaN`;function bC(e,t){return e*_C[t]}var xC=function(){function e(t,n){cC(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!hC.test(n)&&(this.num=NaN,this.unit=``),vC.includes(n)&&(this.num=bC(t,n),this.unit=`px`)}return uC(e,[{key:`add`,value:function(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}},{key:`subtract`,value:function(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}},{key:`multiply`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}},{key:`divide`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}},{key:`toString`,value:function(){return`${this.num}${this.unit}`}},{key:`isNaN`,value:function(){return Number.isNaN(this.num)}}],[{key:`parse`,value:function(t){var n=nC(gC.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function SC(e){if(e.includes(yC))return yC;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=nC(pC.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=xC.parse(r??``),s=xC.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return yC;t=t.replace(pC,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=nC(mC.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=xC.parse(u??``),m=xC.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return yC;t=t.replace(mC,h.toString())}return t}var CC=/\(([^()]*)\)/;function wC(e){for(var t=e;t.includes(`(`);){var n=nC(CC.exec(t),2)[1];t=t.replace(CC,SC(n))}return t}function TC(e){var t=e.replace(/\s+/g,``);return t=wC(t),t=SC(t),t}function EC(e){try{return TC(e)}catch{return yC}}function DC(e){var t=EC(e.slice(5,-1));return t===yC?``:t}var OC=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],kC=[`dx`,`dy`,`angle`,`className`,`breakAll`];function AC(){return AC=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},AC.apply(this,arguments)}function jC(e,t){if(e==null)return{};var n=MC(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MC(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 NC(e,t){return RC(e)||LC(e,t)||FC(e,t)||PC()}function PC(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FC(e,t){if(e){if(typeof e==`string`)return IC(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 IC(e,t)}}function IC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function RC(e){if(Array.isArray(e))return e}var zC=/[ \f\n\r\t\v\u2028\u2029]+/,BC=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return(0,Bh.default)(t)||(i=n?t.toString().split(``):t.toString().split(zC)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:$S(e,r).width}}),spaceWidth:n?0:$S(`\xA0`,r).width}}catch{return null}},VC=function(e,t,n,r,i){var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=G(a),u=o,d=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t){var a=t.word,o=t.width,s=e[e.length-1];if(s&&(r==null||i||s.width+o+n<Number(r)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[])},f=d(t),p=function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})};if(!l)return f;for(var m=`…`,h=function(e){var t=BC({breakAll:c,style:s,children:u.slice(0,e)+m}).wordsWithComputedWidth,n=d(t);return[n.length>a||p(n).width>Number(r),n]},g=0,_=u.length-1,v=0,y;g<=_&&v<=u.length-1;){var b=Math.floor((g+_)/2),x=NC(h(b-1),2),S=x[0],C=x[1],w=NC(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},HC=function(e){return[{words:(0,Bh.default)(e)?[]:e.toString().split(zC)}]},UC=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!nS.isSsr){var s,c,l=BC({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return HC(r);return VC({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return HC(r)},WC=`#808080`,GC=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.lineHeight,o=a===void 0?`1em`:a,s=e.capHeight,c=s===void 0?`0.71em`:s,l=e.scaleToFit,u=l!==void 0&&l,d=e.textAnchor,f=d===void 0?`start`:d,p=e.verticalAnchor,m=p===void 0?`end`:p,h=e.fill,g=h===void 0?WC:h,_=jC(e,OC),v=(0,S.useMemo)(function(){return UC({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:u,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,u,_.style,_.width]),y=_.dx,b=_.dy,x=_.angle,C=_.className,w=_.breakAll,T=jC(_,kC);if(!Wh(n)||!Wh(i))return null;var E=n+(G(y)?y:0),D=i+(G(b)?b:0),O;switch(m){case`start`:O=DC(`calc(${c})`);break;case`middle`:O=DC(`calc(${(v.length-1)/2} * -${o} + (${c} / 2))`);break;default:O=DC(`calc(${v.length-1} * -${o})`);break}var k=[];if(u){var A=v[0].width,j=_.width;k.push(`scale(${(G(j)?j/A:1)/A})`)}return x&&k.push(`rotate(${x}, ${E}, ${D})`),k.length&&(T.transform=k.join(` `)),S.createElement(`text`,AC({},Dg(T,!0),{x:E,y:D,className:Ml(`recharts-text`,C),textAnchor:f,fill:g.includes(`url`)?WC:g}),v.map(function(e,t){var n=e.words.join(w?``:` `);return S.createElement(`tspan`,{x:E,dy:t===0?O:o,key:`${n}-${t}`},n)}))};function KC(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qC(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function JC(e){let t,n,r;e.length===2?(t=e===KC||e===qC?e:YC,n=e,r=e):(t=KC,n=(t,n)=>KC(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function YC(){return 0}function XC(e){return e===null?NaN:+e}function*ZC(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var QC=JC(KC),$C=QC.right;QC.left,JC(XC).center;var ew=class extends Map{constructor(e,t=iw){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(tw(this,e))}has(e){return super.has(tw(this,e))}set(e,t){return super.set(nw(this,e),t)}delete(e){return super.delete(rw(this,e))}};function tw({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function nw({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function rw({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function iw(e){return typeof e==`object`&&e?e.valueOf():e}function aw(e=KC){if(e===KC)return ow;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function ow(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var sw=Math.sqrt(50),cw=Math.sqrt(10),lw=Math.sqrt(2);function uw(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=sw?10:a>=cw?5:a>=lw?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?uw(e,t,n*2):[s,c,l]}function dw(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?uw(t,e,n):uw(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function fw(e,t,n){return t=+t,e=+e,n=+n,uw(e,t,n)[2]}function pw(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?fw(t,e,n):fw(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function mw(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function hw(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function gw(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?ow:aw(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));gw(e,t,u,d,i)}let a=e[t],o=n,s=r;for(_w(e,n,t),i(e[r],a)>0&&_w(e,n,r);o<s;){for(_w(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?_w(e,n,s):(++s,_w(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function _w(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function vw(e,t,n){if(e=Float64Array.from(ZC(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return hw(e);if(t>=1)return mw(e);var r,i=(r-1)*t,a=Math.floor(i),o=mw(gw(e,a).subarray(0,a+1));return o+(hw(e.subarray(a+1))-o)*(i-a)}}function yw(e,t,n=XC){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,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function bw(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,a=Array(i);++r<i;)a[r]=e+r*n;return a}function xw(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Sw(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}var Cw=Symbol(`implicit`);function ww(){var e=new ew,t=[],n=[],r=Cw;function i(i){let a=e.get(i);if(a===void 0){if(r!==Cw)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new ew;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return ww(t,n).unknown(r)},xw.apply(i,arguments),i}function Tw(){var e=ww().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=bw(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return Tw(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},xw.apply(d(),arguments)}function Ew(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ew(t())},e}function Dw(){return Ew(Tw.apply(null,arguments).paddingInner(1))}function Ow(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kw(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Aw(){}var jw=.7,Mw=1/jw,Nw=`\\s*([+-]?\\d+)\\s*`,Pw=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Fw=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Iw=/^#([0-9a-f]{3,8})$/,Lw=RegExp(`^rgb\\(${Nw},${Nw},${Nw}\\)$`),Rw=RegExp(`^rgb\\(${Fw},${Fw},${Fw}\\)$`),zw=RegExp(`^rgba\\(${Nw},${Nw},${Nw},${Pw}\\)$`),Bw=RegExp(`^rgba\\(${Fw},${Fw},${Fw},${Pw}\\)$`),Vw=RegExp(`^hsl\\(${Pw},${Fw},${Fw}\\)$`),Hw=RegExp(`^hsla\\(${Pw},${Fw},${Fw},${Pw}\\)$`),Uw={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};Ow(Aw,Jw,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ww,formatHex:Ww,formatHex8:Gw,formatHsl:Kw,formatRgb:qw,toString:qw});function Ww(){return this.rgb().formatHex()}function Gw(){return this.rgb().formatHex8()}function Kw(){return sT(this).formatHsl()}function qw(){return this.rgb().formatRgb()}function Jw(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Iw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Yw(t):n===3?new $w(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xw(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xw(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=Lw.exec(e))?new $w(t[1],t[2],t[3],1):(t=Rw.exec(e))?new $w(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zw.exec(e))?Xw(t[1],t[2],t[3],t[4]):(t=Bw.exec(e))?Xw(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vw.exec(e))?oT(t[1],t[2]/100,t[3]/100,1):(t=Hw.exec(e))?oT(t[1],t[2]/100,t[3]/100,t[4]):Uw.hasOwnProperty(e)?Yw(Uw[e]):e===`transparent`?new $w(NaN,NaN,NaN,0):null}function Yw(e){return new $w(e>>16&255,e>>8&255,e&255,1)}function Xw(e,t,n,r){return r<=0&&(e=t=n=NaN),new $w(e,t,n,r)}function Zw(e){return e instanceof Aw||(e=Jw(e)),e?(e=e.rgb(),new $w(e.r,e.g,e.b,e.opacity)):new $w}function Qw(e,t,n,r){return arguments.length===1?Zw(e):new $w(e,t,n,r??1)}function $w(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ow($w,Qw,kw(Aw,{brighter(e){return e=e==null?Mw:Mw**+e,new $w(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?jw:jw**+e,new $w(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $w(iT(this.r),iT(this.g),iT(this.b),rT(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:eT,formatHex:eT,formatHex8:tT,formatRgb:nT,toString:nT}));function eT(){return`#${aT(this.r)}${aT(this.g)}${aT(this.b)}`}function tT(){return`#${aT(this.r)}${aT(this.g)}${aT(this.b)}${aT((isNaN(this.opacity)?1:this.opacity)*255)}`}function nT(){let e=rT(this.opacity);return`${e===1?`rgb(`:`rgba(`}${iT(this.r)}, ${iT(this.g)}, ${iT(this.b)}${e===1?`)`:`, ${e})`}`}function rT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function iT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function aT(e){return e=iT(e),(e<16?`0`:``)+e.toString(16)}function oT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lT(e,t,n,r)}function sT(e){if(e instanceof lT)return new lT(e.h,e.s,e.l,e.opacity);if(e instanceof Aw||(e=Jw(e)),!e)return new lT;if(e instanceof lT)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new lT(o,s,c,e.opacity)}function cT(e,t,n,r){return arguments.length===1?sT(e):new lT(e,t,n,r??1)}function lT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ow(lT,cT,kw(Aw,{brighter(e){return e=e==null?Mw:Mw**+e,new lT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?jw:jw**+e,new lT(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 $w(fT(e>=240?e-240:e+120,i,r),fT(e,i,r),fT(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new lT(uT(this.h),dT(this.s),dT(this.l),rT(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(){let e=rT(this.opacity);return`${e===1?`hsl(`:`hsla(`}${uT(this.h)}, ${dT(this.s)*100}%, ${dT(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function uT(e){return e=(e||0)%360,e<0?e+360:e}function dT(e){return Math.max(0,Math.min(1,e||0))}function fT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var pT=e=>()=>e;function mT(e,t){return function(n){return e+n*t}}function hT(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function gT(e){return(e=+e)==1?_T:function(t,n){return n-t?hT(t,n,e):pT(isNaN(t)?n:t)}}function _T(e,t){var n=t-e;return n?mT(e,n):pT(isNaN(e)?t:e)}var vT=(function e(t){var n=gT(t);function r(e,t){var r=n((e=Qw(e)).r,(t=Qw(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=_T(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function yT(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function bT(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function xT(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=AT(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function ST(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function CT(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wT(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=AT(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var TT=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ET=new RegExp(TT.source,`g`);function DT(e){return function(){return e}}function OT(e){return function(t){return e(t)+``}}function kT(e,t){var n=TT.lastIndex=ET.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=TT.exec(e))&&(i=ET.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:CT(r,i)})),n=ET.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?OT(c[0].x):DT(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function AT(e,t){var n=typeof t,r;return t==null||n===`boolean`?pT(t):(n===`number`?CT:n===`string`?(r=Jw(t))?(t=r,vT):kT:t instanceof Jw?vT:t instanceof Date?ST:bT(t)?yT:Array.isArray(t)?xT:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?wT:CT)(e,t)}function jT(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function MT(e,t){t===void 0&&(t=e,e=AT);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function NT(e){return function(){return e}}function PT(e){return+e}var FT=[0,1];function IT(e){return e}function LT(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:NT(isNaN(t)?NaN:.5)}function RT(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function zT(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=LT(i,r),a=n(o,a)):(r=LT(r,i),a=n(a,o)),function(e){return a(r(e))}}function BT(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=LT(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=$C(e,t,1,r)-1;return a[n](i[n](t))}}function VT(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function HT(){var e=FT,t=FT,n=AT,r,i,a,o=IT,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==IT&&(o=RT(e[0],e[n-1])),s=n>2?BT:zT,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),CT))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,PT),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=jT,u()},d.clamp=function(e){return arguments.length?(o=e?!0:IT,u()):o!==IT},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function UT(){return HT()(IT,IT)}function WT(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function GT(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function KT(e){return e=GT(Math.abs(e)),e?e[1]:NaN}function qT(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function JT(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var YT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function XT(e){if(!(t=YT.exec(e)))throw Error(`invalid format: `+e);var t;return new ZT({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]})}XT.prototype=ZT.prototype;function ZT(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+``}ZT.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 QT(e){out: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 out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var $T;function eE(e,t){var n=GT(e,t);if(!n)return $T=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-($T=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+GT(e,Math.max(0,t+a-1))[0]}function tE(e,t){var n=GT(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var nE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:WT,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)=>tE(e*100,t),r:tE,s:eE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function rE(e){return e}var iE=Array.prototype.map,aE=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function oE(e){var t=e.grouping===void 0||e.thousands===void 0?rE:qT(iE.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+``,a=e.numerals===void 0?rE:JT(iE.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=XT(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):nE[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=nE[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=QT(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&$T!==void 0?aE[8+$T/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(KT(t)/3)))*3,r=10**-n,i=l((e=XT(e),e.type=`f`,e),{suffix:aE[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var sE,cE,lE;uE({thousands:`,`,grouping:[3],currency:[`$`,``]});function uE(e){return sE=oE(e),cE=sE.format,lE=sE.formatPrefix,sE}function dE(e){return Math.max(0,-KT(Math.abs(e)))}function fE(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(KT(t)/3)))*3-KT(Math.abs(e)))}function pE(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,KT(t)-KT(e))+1}function mE(e,t,n,r){var i=pw(e,t,n),a;switch(r=XT(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=fE(i,o))&&(r.precision=a),lE(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=pE(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=dE(i))&&(r.precision=a-(r.type===`%`)*2);break}return cE(r)}function hE(e){var t=e.domain;return e.ticks=function(e){var n=t();return dw(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return mE(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=fw(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function gE(){var e=UT();return e.copy=function(){return VT(e,gE())},xw.apply(e,arguments),hE(e)}function _E(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,PT),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return _E(e).unknown(t)},e=arguments.length?Array.from(e,PT):[0,1],hE(n)}function vE(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function yE(e){return Math.log(e)}function bE(e){return Math.exp(e)}function xE(e){return-Math.log(-e)}function SE(e){return-Math.exp(-e)}function CE(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function wE(e){return e===10?CE:e===Math.E?Math.exp:t=>e**+t}function TE(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 EE(e){return(t,n)=>-e(-t,n)}function DE(e){let t=e(yE,bE),n=t.domain,r=10,i,a;function o(){return i=TE(r),a=wE(r),n()[0]<0?(i=EE(i),a=EE(a),e(xE,SE)):e(yE,bE),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=dw(o,s,p))}else m=dw(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=XT(n)).precision==null&&(n.trim=!0),n=cE(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(vE(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function OE(){let e=DE(HT()).domain([1,10]);return e.copy=()=>VT(e,OE()).base(e.base()),xw.apply(e,arguments),e}function kE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function AE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jE(e){var t=1,n=e(kE(t),AE(t));return n.constant=function(n){return arguments.length?e(kE(t=+n),AE(t)):t},hE(n)}function ME(){var e=jE(HT());return e.copy=function(){return VT(e,ME()).constant(e.constant())},xw.apply(e,arguments)}function NE(e){return function(t){return t<0?-((-t)**+e):t**+e}}function PE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function FE(e){return e<0?-e*e:e*e}function IE(e){var t=e(IT,IT),n=1;function r(){return n===1?e(IT,IT):n===.5?e(PE,FE):e(NE(n),NE(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},hE(t)}function LE(){var e=IE(HT());return e.copy=function(){return VT(e,LE()).exponent(e.exponent())},xw.apply(e,arguments),e}function RE(){return LE.apply(null,arguments).exponent(.5)}function zE(e){return Math.sign(e)*e*e}function BE(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function VE(){var e=UT(),t=[0,1],n=!1,r;function i(t){var i=BE(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(zE(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,PT)).map(zE)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return VE(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},xw.apply(i,arguments),hE(i)}function HE(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=yw(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[$C(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(KC),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return HE().domain(e).range(t).unknown(r)},xw.apply(a,arguments)}function UE(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[$C(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return UE().domain([e,t]).range(i).unknown(a)},xw.apply(hE(o),arguments)}function WE(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[$C(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return WE().domain(e).range(t).unknown(n)},xw.apply(i,arguments)}var GE=new Date,KE=new Date;function qE(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>qE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(GE.setTime(+t),KE.setTime(+r),e(GE),e(KE),Math.floor(n(GE,KE))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var JE=qE(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);JE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qE(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):JE),JE.range;var YE=1e3,XE=YE*60,ZE=XE*60,QE=ZE*24,$E=QE*7,eD=QE*30,tD=QE*365,nD=qE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*YE)},(e,t)=>(t-e)/YE,e=>e.getUTCSeconds());nD.range;var rD=qE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*YE)},(e,t)=>{e.setTime(+e+t*XE)},(e,t)=>(t-e)/XE,e=>e.getMinutes());rD.range;var iD=qE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*XE)},(e,t)=>(t-e)/XE,e=>e.getUTCMinutes());iD.range;var aD=qE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*YE-e.getMinutes()*XE)},(e,t)=>{e.setTime(+e+t*ZE)},(e,t)=>(t-e)/ZE,e=>e.getHours());aD.range;var oD=qE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ZE)},(e,t)=>(t-e)/ZE,e=>e.getUTCHours());oD.range;var sD=qE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*XE)/QE,e=>e.getDate()-1);sD.range;var cD=qE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/QE,e=>e.getUTCDate()-1);cD.range;var lD=qE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/QE,e=>Math.floor(e/QE));lD.range;function uD(e){return qE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*XE)/$E)}var dD=uD(0),fD=uD(1),pD=uD(2),mD=uD(3),hD=uD(4),gD=uD(5),_D=uD(6);dD.range,fD.range,pD.range,mD.range,hD.range,gD.range,_D.range;function vD(e){return qE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/$E)}var yD=vD(0),bD=vD(1),xD=vD(2),SD=vD(3),CD=vD(4),wD=vD(5),TD=vD(6);yD.range,bD.range,xD.range,SD.range,CD.range,wD.range,TD.range;var ED=qE(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());ED.range;var DD=qE(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());DD.range;var OD=qE(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());OD.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qE(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)}),OD.range;var kD=qE(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());kD.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qE(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)}),kD.range;function AD(e,t,n,r,i,a){let o=[[nD,1,YE],[nD,5,5*YE],[nD,15,15*YE],[nD,30,30*YE],[a,1,XE],[a,5,5*XE],[a,15,15*XE],[a,30,30*XE],[i,1,ZE],[i,3,3*ZE],[i,6,6*ZE],[i,12,12*ZE],[r,1,QE],[r,2,2*QE],[n,1,$E],[t,1,eD],[t,3,3*eD],[e,1,tD]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=JC(([,,e])=>e).right(o,i);if(a===o.length)return e.every(pw(t/tD,n/tD,r));if(a===0)return JE.every(Math.max(pw(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[jD,MD]=AD(kD,DD,yD,lD,oD,iD),[ND,PD]=AD(OD,ED,dD,sD,aD,rD);function FD(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 ID(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 LD(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function RD(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=GD(i),u=KD(i),d=GD(a),f=KD(a),p=GD(o),m=KD(o),h=GD(s),g=KD(s),_=GD(c),v=KD(c),y={a:N,A:P,b:ee,B:F,c:null,d:pO,e:pO,f:vO,g:kO,G:jO,H:mO,I:hO,j:gO,L:_O,m:yO,M:bO,p:I,q:te,Q:ek,s:tk,S:xO,u:SO,U:CO,V:TO,w:EO,W:DO,x:null,X:null,y:OO,Y:AO,Z:MO,"%":$O},b={a:ne,A:re,b:ie,B:ae,c:null,d:NO,e:NO,f:RO,g:YO,G:ZO,H:PO,I:FO,j:IO,L:LO,m:zO,M:BO,p:oe,q:se,Q:ek,s:tk,S:VO,u:HO,U:UO,V:GO,w:KO,W:qO,x:null,X:null,y:JO,Y:XO,Z:QO,"%":$O},x={a:E,A:D,b:O,B:k,c:A,d:rO,e:rO,f:lO,g:$D,G:QD,H:aO,I:aO,j:iO,L:cO,m:nO,M:oO,p:T,q:tO,Q:dO,s:fO,S:sO,u:JD,U:YD,V:XD,w:qD,W:ZD,x:j,X:M,y:$D,Y:QD,Z:eO,"%":uO};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=zD[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=LD(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=ID(LD(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?bD.ceil(a):bD(a),a=cD.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=FD(LD(r.y,0,1)),o=a.getDay(),a=o>4||o===0?fD.ceil(a):fD(a),a=sD.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?ID(LD(r.y,0,1)).getUTCDay():FD(LD(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,ID(r)):FD(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in zD?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function ee(e){return c[e.getMonth()]}function F(e){return s[e.getMonth()]}function I(e){return i[+(e.getHours()>=12)]}function te(e){return 1+~~(e.getMonth()/3)}function ne(e){return o[e.getUTCDay()]}function re(e){return a[e.getUTCDay()]}function ie(e){return c[e.getUTCMonth()]}function ae(e){return s[e.getUTCMonth()]}function oe(e){return i[+(e.getUTCHours()>=12)]}function se(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var zD={"-":``,_:` `,0:`0`},BD=/^\s*\d+/,VD=/^%/,HD=/[\\^$*+?|[\]().{}]/g;function UD(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function WD(e){return e.replace(HD,`\\$&`)}function GD(e){return RegExp(`^(?:`+e.map(WD).join(`|`)+`)`,`i`)}function KD(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function qD(e,t,n){var r=BD.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function JD(e,t,n){var r=BD.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function YD(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function XD(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ZD(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function QD(e,t,n){var r=BD.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $D(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eO(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 tO(e,t,n){var r=BD.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nO(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rO(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iO(e,t,n){var r=BD.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function aO(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oO(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sO(e,t,n){var r=BD.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cO(e,t,n){var r=BD.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lO(e,t,n){var r=BD.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uO(e,t,n){var r=VD.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dO(e,t,n){var r=BD.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fO(e,t,n){var r=BD.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pO(e,t){return UD(e.getDate(),t,2)}function mO(e,t){return UD(e.getHours(),t,2)}function hO(e,t){return UD(e.getHours()%12||12,t,2)}function gO(e,t){return UD(1+sD.count(OD(e),e),t,3)}function _O(e,t){return UD(e.getMilliseconds(),t,3)}function vO(e,t){return _O(e,t)+`000`}function yO(e,t){return UD(e.getMonth()+1,t,2)}function bO(e,t){return UD(e.getMinutes(),t,2)}function xO(e,t){return UD(e.getSeconds(),t,2)}function SO(e){var t=e.getDay();return t===0?7:t}function CO(e,t){return UD(dD.count(OD(e)-1,e),t,2)}function wO(e){var t=e.getDay();return t>=4||t===0?hD(e):hD.ceil(e)}function TO(e,t){return e=wO(e),UD(hD.count(OD(e),e)+(OD(e).getDay()===4),t,2)}function EO(e){return e.getDay()}function DO(e,t){return UD(fD.count(OD(e)-1,e),t,2)}function OO(e,t){return UD(e.getFullYear()%100,t,2)}function kO(e,t){return e=wO(e),UD(e.getFullYear()%100,t,2)}function AO(e,t){return UD(e.getFullYear()%1e4,t,4)}function jO(e,t){var n=e.getDay();return e=n>=4||n===0?hD(e):hD.ceil(e),UD(e.getFullYear()%1e4,t,4)}function MO(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+UD(t/60|0,`0`,2)+UD(t%60,`0`,2)}function NO(e,t){return UD(e.getUTCDate(),t,2)}function PO(e,t){return UD(e.getUTCHours(),t,2)}function FO(e,t){return UD(e.getUTCHours()%12||12,t,2)}function IO(e,t){return UD(1+cD.count(kD(e),e),t,3)}function LO(e,t){return UD(e.getUTCMilliseconds(),t,3)}function RO(e,t){return LO(e,t)+`000`}function zO(e,t){return UD(e.getUTCMonth()+1,t,2)}function BO(e,t){return UD(e.getUTCMinutes(),t,2)}function VO(e,t){return UD(e.getUTCSeconds(),t,2)}function HO(e){var t=e.getUTCDay();return t===0?7:t}function UO(e,t){return UD(yD.count(kD(e)-1,e),t,2)}function WO(e){var t=e.getUTCDay();return t>=4||t===0?CD(e):CD.ceil(e)}function GO(e,t){return e=WO(e),UD(CD.count(kD(e),e)+(kD(e).getUTCDay()===4),t,2)}function KO(e){return e.getUTCDay()}function qO(e,t){return UD(bD.count(kD(e)-1,e),t,2)}function JO(e,t){return UD(e.getUTCFullYear()%100,t,2)}function YO(e,t){return e=WO(e),UD(e.getUTCFullYear()%100,t,2)}function XO(e,t){return UD(e.getUTCFullYear()%1e4,t,4)}function ZO(e,t){var n=e.getUTCDay();return e=n>=4||n===0?CD(e):CD.ceil(e),UD(e.getUTCFullYear()%1e4,t,4)}function QO(){return`+0000`}function $O(){return`%`}function ek(e){return+e}function tk(e){return Math.floor(e/1e3)}var nk,rk,ik;ak({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 ak(e){return nk=RD(e),rk=nk.format,nk.parse,ik=nk.utcFormat,nk.utcParse,nk}function ok(e){return new Date(e)}function sk(e){return e instanceof Date?+e:+new Date(+e)}function ck(e,t,n,r,i,a,o,s,c,l){var u=UT(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,sk)):f().map(ok)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(vE(n,e)):u},u.copy=function(){return VT(u,ck(e,t,n,r,i,a,o,s,c,l))},u}function lk(){return xw.apply(ck(ND,PD,OD,ED,dD,sD,aD,rD,nD,rk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uk(){return xw.apply(ck(jD,MD,kD,DD,yD,cD,oD,iD,nD,ik).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function dk(){var e=0,t=1,n,r,i,a,o=IT,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(AT),l.rangeRound=u(jT),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function fk(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function pk(){var e=hE(dk()(IT));return e.copy=function(){return fk(e,pk())},Sw.apply(e,arguments)}function mk(){var e=DE(dk()).domain([1,10]);return e.copy=function(){return fk(e,mk()).base(e.base())},Sw.apply(e,arguments)}function hk(){var e=jE(dk());return e.copy=function(){return fk(e,hk()).constant(e.constant())},Sw.apply(e,arguments)}function gk(){var e=IE(dk());return e.copy=function(){return fk(e,gk()).exponent(e.exponent())},Sw.apply(e,arguments)}function _k(){return gk.apply(null,arguments).exponent(.5)}function vk(){var e=[],t=IT;function n(n){if(n!=null&&!isNaN(n=+n))return t(($C(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(KC),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>vw(e,r/t))},n.copy=function(){return vk(t).domain(e)},Sw.apply(n,arguments)}function yk(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=IT,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=MT(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(AT),p.rangeRound=m(jT),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function bk(){var e=hE(yk()(IT));return e.copy=function(){return fk(e,bk())},Sw.apply(e,arguments)}function xk(){var e=DE(yk()).domain([.1,1,10]);return e.copy=function(){return fk(e,xk()).base(e.base())},Sw.apply(e,arguments)}function Sk(){var e=jE(yk());return e.copy=function(){return fk(e,Sk()).constant(e.constant())},Sw.apply(e,arguments)}function Ck(){var e=IE(yk());return e.copy=function(){return fk(e,Ck()).exponent(e.exponent())},Sw.apply(e,arguments)}function wk(){return Ck.apply(null,arguments).exponent(.5)}var Tk=s({scaleBand:()=>Tw,scaleDiverging:()=>bk,scaleDivergingLog:()=>xk,scaleDivergingPow:()=>Ck,scaleDivergingSqrt:()=>wk,scaleDivergingSymlog:()=>Sk,scaleIdentity:()=>_E,scaleImplicit:()=>Cw,scaleLinear:()=>gE,scaleLog:()=>OE,scaleOrdinal:()=>ww,scalePoint:()=>Dw,scalePow:()=>LE,scaleQuantile:()=>HE,scaleQuantize:()=>UE,scaleRadial:()=>VE,scaleSequential:()=>pk,scaleSequentialLog:()=>mk,scaleSequentialPow:()=>gk,scaleSequentialQuantile:()=>vk,scaleSequentialSqrt:()=>_k,scaleSequentialSymlog:()=>hk,scaleSqrt:()=>RE,scaleSymlog:()=>ME,scaleThreshold:()=>WE,scaleTime:()=>lk,scaleUtc:()=>uk,tickFormat:()=>mE}),Ek=o(((e,t)=>{var n=Bm();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),Dk=o(((e,t)=>{function n(e,t){return e>t}t.exports=n})),Ok=o(((e,t)=>{var n=Ek(),r=Dk(),i=ob();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),kk=o(((e,t)=>{function n(e,t){return e<t}t.exports=n})),Ak=o(((e,t)=>{var n=Ek(),r=kk(),i=ob();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),jk=o(((e,t)=>{var n=Ch(),r=ub(),i=Qb(),a=Mm();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),Mk=o(((e,t)=>{var n=Kb(),r=jk();function i(e,t){return n(r(e,t),1)}t.exports=i})),Nk=o(((e,t)=>{var n=Xy();function r(e,t){return n(e,t)}t.exports=r})),Pk=o(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+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},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,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=j,i.config=i.set=M,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 M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}));function Fk(e){return zk(e)||Rk(e)||Lk(e)||Ik()}function Ik(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lk(e,t){if(e){if(typeof e==`string`)return Bk(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 Bk(e,t)}}function Rk(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function zk(e){if(Array.isArray(e))return Bk(e)}function Bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Vk=function(e){return e},Hk={"@@functional/placeholder":!0},Uk=function(e){return e===Hk},Wk=function(e){return function t(){return arguments.length===0||arguments.length===1&&Uk(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},Gk=function e(t,n){return t===1?n:Wk(function(){var r=[...arguments],i=r.filter(function(e){return e!==Hk}).length;return i>=t?n.apply(void 0,r):e(t-i,Wk(function(){var e=[...arguments],t=r.map(function(t){return Uk(t)?e.shift():t});return n.apply(void 0,Fk(t).concat(e))}))})},Kk=function(e){return Gk(e.length,e)},qk=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Jk=Kk(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),Yk=function(){var e=[...arguments];if(!e.length)return Vk;var t=e.reverse(),n=t[0],r=t.slice(1);return function(){return r.reduce(function(e,t){return t(e)},n.apply(void 0,arguments))}},Xk=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},Zk=function(e){var t=null,n=null;return function(){var r=[...arguments];return t&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}},Qk=l(Pk());function $k(e){return e===0?1:Math.floor(new Qk.default(e).abs().log(10).toNumber())+1}function eA(e,t,n){for(var r=new Qk.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var tA={rangeStep:eA,getDigitCount:$k,interpolateNumber:Kk(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:Kk(function(e,t,n){var r=t-+e;return r||=1/0,(n-e)/r}),uninterpolateTruncation:Kk(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function nA(e){return aA(e)||iA(e)||cA(e)||rA()}function rA(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iA(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function aA(e){if(Array.isArray(e))return lA(e)}function oA(e,t){return dA(e)||uA(e,t)||cA(e,t)||sA()}function sA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cA(e,t){if(e){if(typeof e==`string`)return lA(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 lA(e,t)}}function lA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uA(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function dA(e){if(Array.isArray(e))return e}function fA(e){var t=oA(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function pA(e,t,n){if(e.lte(0))return new Qk.default(0);var r=tA.getDigitCount(e.toNumber()),i=new Qk.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new Qk.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new Qk.default(Math.ceil(s))}function mA(e,t,n){var r=1,i=new Qk.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Qk.default(10).pow(tA.getDigitCount(e)-1),i=new Qk.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Qk.default(Math.floor(e)))}else e===0?i=new Qk.default(Math.floor((t-1)/2)):n||(i=new Qk.default(Math.floor(e)));var o=Math.floor((t-1)/2);return Yk(Jk(function(e){return i.add(new Qk.default(e-o).mul(r)).toNumber()}),qk)(0,t)}function hA(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 Qk.default(0),tickMin:new Qk.default(0),tickMax:new Qk.default(0)};var a=pA(new Qk.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Qk.default(0):(o=new Qk.default(e).add(t).div(2),o=o.sub(new Qk.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Qk.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?hA(e,t,n,r,i+1):(l<n&&(c=t>0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:a,tickMin:o.sub(new Qk.default(s).mul(a)),tickMax:o.add(new Qk.default(c).mul(a))})}function gA(e){var t=oA(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=oA(fA([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(nA(qk(0,i-1).map(function(){return 1/0}))):[].concat(nA(qk(0,i-1).map(function(){return-1/0})),[l]);return n>r?Xk(u):u}if(c===l)return mA(c,i,a);var d=hA(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=tA.rangeStep(p,m.add(new Qk.default(.1).mul(f)),f);return n>r?Xk(h):h}function _A(e,t){var n=oA(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=oA(fA([r,i]),2),s=o[0],c=o[1];if(s===-1/0||c===1/0)return[r,i];if(s===c)return[s];var l=Math.max(t,2),u=pA(new Qk.default(c).sub(s).div(l-1),a,0),d=[].concat(nA(tA.rangeStep(new Qk.default(s),new Qk.default(c).sub(new Qk.default(.99).mul(u)),u)),[c]);return r>i?Xk(d):d}var vA=Zk(gA),yA=Zk(_A),bA=`Invariant failed`;function xA(e,t){if(!e)throw Error(bA)}var SA=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function CA(e){"@babel/helpers - typeof";return CA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},CA(e)}function wA(){return wA=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},wA.apply(this,arguments)}function TA(e,t){return AA(e)||kA(e,t)||DA(e,t)||EA()}function EA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DA(e,t){if(e){if(typeof e==`string`)return OA(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 OA(e,t)}}function OA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function AA(e){if(Array.isArray(e))return e}function jA(e,t){if(e==null)return{};var n=MA(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MA(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 NA(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function PA(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,WA(r.key),r)}}function FA(e,t,n){return t&&PA(e.prototype,t),n&&PA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IA(e,t,n){return t=BA(t),LA(e,zA()?Reflect.construct(t,n||[],BA(e).constructor):t.apply(e,n))}function LA(e,t){if(t&&(CA(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return RA(e)}function RA(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function zA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zA=function(){return!!e})()}function BA(e){return BA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BA(e)}function VA(e,t){if(typeof t!=`function`&&t!==null)throw 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&&HA(e,t)}function HA(e,t){return HA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HA(e,t)}function UA(e,t,n){return t=WA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WA(e){var t=GA(e,`string`);return CA(t)==`symbol`?t:t+``}function GA(e,t){if(CA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(CA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var KA=function(e){function t(){return NA(this,t),IA(this,t,arguments)}return VA(t,e),FA(t,[{key:`render`,value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,c=e.yAxis,l=Dg(jA(e,SA),!1);this.props.direction===`x`&&s.type!==`number`&&xA(!1);var u=a.map(function(e){var a=o(e,i),u=a.x,d=a.y,f=a.value,p=a.errorVal;if(!p)return null;var m=[],h,g;if(Array.isArray(p)){var _=TA(p,2);h=_[0],g=_[1]}else h=g=p;if(n===`vertical`){var v=s.scale,y=d+t,b=y+r,x=y-r,C=v(f-h),w=v(f+g);m.push({x1:w,y1:b,x2:w,y2:x}),m.push({x1:C,y1:y,x2:w,y2:y}),m.push({x1:C,y1:b,x2:C,y2:x})}else if(n===`horizontal`){var T=c.scale,E=u+t,D=E-r,O=E+r,k=T(f-h),A=T(f+g);m.push({x1:D,y1:A,x2:O,y2:A}),m.push({x1:E,y1:k,x2:E,y2:A}),m.push({x1:D,y1:k,x2:O,y2:k})}return S.createElement(Hg,wA({className:`recharts-errorBar`,key:`bar-${m.map(function(e){return`${e.x1}-${e.x2}-${e.y1}-${e.y2}`})}`},l),m.map(function(e){return S.createElement(`line`,wA({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return S.createElement(Hg,{className:`recharts-errorBars`},u)}}])}(S.Component);UA(KA,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),UA(KA,`displayName`,`ErrorBar`);function qA(e){"@babel/helpers - typeof";return qA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qA(e)}function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JA(Object(n),!0).forEach(function(t){XA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XA(e,t,n){return t=ZA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZA(e){var t=QA(e,`string`);return qA(t)==`symbol`?t:t+``}function QA(e,t){if(qA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $A=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=Sg(t,Wb);if(!a)return null;var o=Wb.defaultProps,s=o===void 0?{}:YA(YA({},o),a.props),c=a.props&&a.props.payload?a.props&&a.props.payload:i===`children`?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=n===void 0?{}:YA(YA({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:yj(t),value:a||i,payload:r}});return YA(YA(YA({},s),Wb.getWithHeight(a,r)),{},{payload:c,item:a})},ej=l(Ok()),tj=l(Ak()),nj=l(Mk()),rj=l(Nk());function ij(e){"@babel/helpers - typeof";return ij=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ij(e)}function aj(e){return lj(e)||cj(e)||sj(e)||oj()}function oj(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sj(e,t){if(e){if(typeof e==`string`)return uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uj(e,t)}}function cj(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function lj(e){if(Array.isArray(e))return uj(e)}function uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dj(Object(n),!0).forEach(function(t){pj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pj(e,t,n){return t=mj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mj(e){var t=hj(e,`string`);return ij(t)==`symbol`?t:t+``}function hj(e,t){if(ij(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ij(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gj(e,t,n){return(0,Bh.default)(e)||(0,Bh.default)(t)?n:Wh(t)?(0,Rh.default)(e,t,n):(0,ug.default)(t)?t(e):n}function _j(e,t,n,r){var i=(0,nj.default)(e,function(e){return gj(e,t)});if(n===`number`){var a=i.filter(function(e){return G(e)||parseFloat(e)});return a.length?[(0,tj.default)(a),(0,ej.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,Bh.default)(e)}):i).map(function(e){return Wh(e)||e instanceof Date?e:``})}var vj=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=-1,a=t?.length??0;if(a<=1)return 0;if(r&&r.axisType===`angleAxis`&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s<a;s++){var c=s>0?n[s-1].coordinate:n[a-1].coordinate,l=n[s].coordinate,u=s>=a-1?n[0].coordinate:n[s+1].coordinate,d=void 0;if(Vh(l-c)!==Vh(u-l)){var f=[];if(Vh(u-l)===Vh(o[1]-o[0])){d=u;var p=l+o[1]-o[0];f[0]=Math.min(p,(p+c)/2),f[1]=Math.max(p,(p+c)/2)}else{d=c;var m=u+o[1]-o[0];f[0]=Math.min(l,(m+l)/2),f[1]=Math.max(l,(m+l)/2)}var h=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){i=n[s].index;break}}else{var g=Math.min(c,u),_=Math.max(c,u);if(e>(g+l)/2&&e<=(_+l)/2){i=n[s].index;break}}}else for(var v=0;v<a;v++)if(v===0&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){i=t[v].index;break}return i},yj=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?fj(fj({},e.type.defaultProps),e.props):e.props,i=r.stroke,a=r.fill,o;switch(n){case`Line`:o=i;break;case`Area`:case`Radar`:o=i&&i!==`none`?i:a;break;default:o=a;break}return o},bj=function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,c=o.length;s<c;s++)for(var l=i[o[s]].stackGroups,u=Object.keys(l),d=0,f=u.length;d<f;d++){var p=l[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return _g(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:fj(fj({},_),g[0].props),y=v.barSize,b=v[h];a[b]||(a[b]=[]);var x=(0,Bh.default)(y)?t:y;a[b].push({item:g[0],stackList:g.slice(1),barSize:(0,Bh.default)(x)?void 0:qh(x,n,0)})}}return a},xj=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,a=i===void 0?[]:i,o=e.maxBarSize,s=a.length;if(s<1)return null;var c=qh(t,r,0,!0),l,u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);p+=(s-1)*c,p>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,f*=.9,p=s*f);var m={offset:((r-p)/2>>0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(aj(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=qh(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var _=o===+o?Math.min(g,o):g;l=a.reduce(function(e,t,n){var r=[].concat(aj(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-_)/2,size:_}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l},Sj=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=$A({children:i,legendWidth:a-(o.left||0)-(o.right||0)});if(s){var c=r||{},l=c.width,u=c.height,d=s.align,f=s.verticalAlign,p=s.layout;if((p===`vertical`||p===`horizontal`&&f===`middle`)&&d!==`center`&&G(e[d]))return fj(fj({},e),{},pj({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&G(e[f]))return fj(fj({},e),{},pj({},f,e[f]+(u||0)))}return e},Cj=function(e,t,n){return(0,Bh.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n!==`y`||t===`yAxis`},wj=function(e,t,n,r,i){var a=t.props.children,o=xg(a,KA).filter(function(e){return Cj(r,i,e.props.direction)});if(o&&o.length){var s=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=gj(t,n);if((0,Bh.default)(r))return e;var i=Array.isArray(r)?[(0,tj.default)(r),(0,ej.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=gj(t,n,0),a=i[0]-Math.abs(Array.isArray(r)?r[0]:r),o=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(o,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},Tj=function(e,t,n,r,i){var a=t.map(function(t){return wj(e,t,n,i,r)}).filter(function(e){return!(0,Bh.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},Ej=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&wj(e,t,a,r)||_j(e,a,n,i)});if(n===`number`)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var o={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e},[])},Dj=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},Oj=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,a,o=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate});return i||o.push(t),a||o.push(n),o},kj=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,a=e.type,o=e.range,s=e.realScaleType===`scaleBand`?r.bandwidth()/2:2,c=(t||n)&&a===`category`&&r.bandwidth?r.bandwidth()/s:0;return c=e.axisType===`angleAxis`&&o?.length>=2?Vh(o[0]-o[1])*2*c:c,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(i?i.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!(0,Lh.default)(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:i?i[e]:e,index:t,offset:c}})},Aj=new WeakMap,jj=function(e,t){if(typeof t!=`function`)return e;Aj.has(e)||Aj.set(e,new WeakMap);var n=Aj.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},Mj=function(e,t,n){var r=e.scale,i=e.type,a=e.layout,o=e.axisType;if(r===`auto`)return a===`radial`&&o===`radiusAxis`?{scale:Tw(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:gE(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:Dw(),realScaleType:`point`}:i===`category`?{scale:Tw(),realScaleType:`band`}:{scale:gE(),realScaleType:`linear`};if((0,Ih.default)(r)){var s=`scale${(0,xv.default)(r)}`;return{scale:(Tk[s]||Dw)(),realScaleType:Tk[s]?s:`point`}}return(0,ug.default)(r)?{scale:r}:{scale:Dw(),realScaleType:`point`}},Nj=1e-4,Pj=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-Nj,a=Math.max(r[0],r[1])+Nj,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},Fj=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},Ij=function(e,t){if(!t||t.length!==2||!G(t[0])||!G(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!G(e[0])||e[0]<n)&&(i[0]=n),(!G(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Lj={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,o=0;o<t;++o){var s=(0,Lh.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1])}},expand:vv,none:pv,silhouette:yv,wiggle:bv,positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var o=(0,Lh.default)(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},Rj=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=Lj[n];return _v().keys(r).value(function(e,t){return+gj(e,t,0)}).order(mv).offset(i)(e)},zj=function(e,t,n,r,i,a){if(!e)return null;var o=(a?t.reverse():t).reduce(function(e,t){var i,a=(i=t.type)!=null&&i.defaultProps?fj(fj({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(a.hide)return e;var s=a[n],c=e[s]||{hasStack:!1,stackGroups:{}};if(Wh(o)){var l=c.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[Kh(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return fj(fj({},e),{},pj({},s,c))},{});return Object.keys(o).reduce(function(t,a){var s=o[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var o=s.stackGroups[a];return fj(fj({},t),{},pj({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:Rj(e,o.items,i)}))},{})),fj(fj({},t),{},pj({},a,s))},{})},Bj=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,a=t.originalDomain,o=t.allowDecimals,s=n||t.scale;if(s!==`auto`&&s!==`linear`)return null;if(i&&r===`number`&&a&&(a[0]===`auto`||a[1]===`auto`)){var c=e.domain();if(!c.length)return null;var l=vA(c,i,o);return e.domain([(0,tj.default)(l),(0,ej.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:yA(e.domain(),i,o)}:null},Vj=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=gj(a,t.dataKey,t.domain[o]);return(0,Bh.default)(s)?null:t.scale(s)-i/2+r},Hj=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Uj=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?fj(fj({},e.type.defaultProps),e.props):e.props).stackId;if(Wh(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},Wj=function(e){return e.reduce(function(e,t){return[(0,tj.default)(t.concat([e[0]]).filter(G)),(0,ej.default)(t.concat([e[1]]).filter(G))]},[1/0,-1/0])},Gj=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=Wj(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},Kj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Jj=function(e,t,n){if((0,ug.default)(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(G(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(Kj.test(e[0])){var i=+Kj.exec(e[0])[1];r[0]=t[0]-i}else(0,ug.default)(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(G(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(qj.test(e[1])){var a=+qj.exec(e[1])[1];r[1]=t[1]+a}else(0,ug.default)(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},Yj=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,fx.default)(t,function(e){return e.coordinate}),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},Xj=function(e,t,n){return!e||!e.length||(0,rj.default)(e,(0,Rh.default)(n,`type.defaultProps.domain`))?t:e},Zj=function(e,t){var n=e.type.defaultProps?fj(fj({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,a=n.unit,o=n.formatter,s=n.tooltipType,c=n.chartType,l=n.hide;return fj(fj({},Dg(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:yj(e),value:gj(t,r),type:s,payload:t,chartType:c,hide:l})};function Qj(e){"@babel/helpers - typeof";return Qj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qj(e)}function $j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$j(Object(n),!0).forEach(function(t){tM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tM(e,t,n){return t=nM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nM(e){var t=rM(e,`string`);return Qj(t)==`symbol`?t:t+``}function rM(e,t){if(Qj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Qj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var iM=Math.PI/180,aM=function(e){return e*180/Math.PI},oM=function(e,t,n,r){return{x:e+Math.cos(-iM*r)*n,y:t+Math.sin(-iM*r)*n}},sM=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},cM=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=sM({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:aM(c),angleInRadian:c}},lM=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},uM=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},dM=function(e,t){var n=e.x,r=e.y,i=cM({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c)return!1;if(a===0)return!0;var l=lM(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?eM(eM({},t),{},{radius:a,angle:uM(f,t)}):null};function fM(e){"@babel/helpers - typeof";return fM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fM(e)}var pM=[`offset`];function mM(e){return vM(e)||_M(e)||gM(e)||hM()}function hM(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gM(e,t){if(e){if(typeof e==`string`)return yM(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 yM(e,t)}}function _M(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vM(e){if(Array.isArray(e))return yM(e)}function yM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bM(e,t){if(e==null)return{};var n=xM(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xM(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 SM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).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?SM(Object(n),!0).forEach(function(t){wM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wM(e,t,n){return t=TM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TM(e){var t=EM(e,`string`);return fM(t)==`symbol`?t:t+``}function EM(e,t){if(fM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function DM(){return DM=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},DM.apply(this,arguments)}var OM=function(e){var t=e.value,n=e.formatter,r=(0,Bh.default)(e.children)?t:e.children;return(0,ug.default)(n)?n(r):r},kM=function(e,t){return Vh(t-e)*Math.min(Math.abs(t-e),360)},AM=function(e,t,n){var r=e.position,i=e.viewBox,a=e.offset,o=e.className,s=i,c=s.cx,l=s.cy,u=s.innerRadius,d=s.outerRadius,f=s.startAngle,p=s.endAngle,m=s.clockWise,h=(u+d)/2,g=kM(f,p),_=g>=0?1:-1,v,y;r===`insideStart`?(v=f+_*a,y=m):r===`insideEnd`?(v=p-_*a,y=!m):r===`end`&&(v=p+_*a,y=m),y=g<=0?y:!y;var b=oM(c,l,h,v),x=oM(c,l,h,v+(y?1:-1)*359),C=`M${b.x},${b.y} A${h},${h},0,1,${+!y}, ${x.x},${x.y}`,w=(0,Bh.default)(e.id)?Kh(`recharts-radial-line-`):e.id;return S.createElement(`text`,DM({},n,{dominantBaseline:`central`,className:Ml(`recharts-radial-bar-label`,o)}),S.createElement(`defs`,null,S.createElement(`path`,{id:w,d:C})),S.createElement(`textPath`,{xlinkHref:`#${w}`},t))},jM=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,a=i.cx,o=i.cy,s=i.innerRadius,c=i.outerRadius,l=(i.startAngle+i.endAngle)/2;if(r===`outside`){var u=oM(a,o,c+n,l),d=u.x;return{x:d,y:u.y,textAnchor:d>=a?`start`:`end`,verticalAnchor:`middle`}}if(r===`center`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`middle`};if(r===`centerTop`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`start`};if(r===`centerBottom`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`end`};var f=oM(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},MM=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,a=t,o=a.x,s=a.y,c=a.width,l=a.height,u=l>=0?1:-1,d=u*r,f=u>0?`end`:`start`,p=u>0?`start`:`end`,m=c>=0?1:-1,h=m*r,g=m>0?`end`:`start`,_=m>0?`start`:`end`;if(i===`top`)return CM(CM({},{x:o+c/2,y:s-u*r,textAnchor:`middle`,verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:c}:{});if(i===`bottom`)return CM(CM({},{x:o+c/2,y:s+l+d,textAnchor:`middle`,verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+l),0),width:c}:{});if(i===`left`){var v={x:o-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`};return CM(CM({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i===`right`){var y={x:o+c+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`};return CM(CM({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?CM({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?CM({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?CM({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?CM({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?CM({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?CM({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?CM({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?CM({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,eg.default)(i)&&(G(i.x)||Hh(i.x))&&(G(i.y)||Hh(i.y))?CM({x:o+qh(i.x,c),y:s+qh(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):CM({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},NM=function(e){return`cx`in e&&G(e.cx)};function PM(e){var t=e.offset,n=t===void 0?5:t,r=bM(e,pM),i=CM({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,l=i.content,u=i.className,d=u===void 0?``:u,f=i.textBreakAll;if(!a||(0,Bh.default)(s)&&(0,Bh.default)(c)&&!(0,S.isValidElement)(l)&&!(0,ug.default)(l))return null;if((0,S.isValidElement)(l))return(0,S.cloneElement)(l,i);var p;if((0,ug.default)(l)){if(p=(0,S.createElement)(l,i),(0,S.isValidElement)(p))return p}else p=OM(i);var m=NM(a),h=Dg(i,!0);if(m&&(o===`insideStart`||o===`insideEnd`||o===`end`))return AM(i,p,h);var g=m?jM(i):MM(i);return S.createElement(GC,DM({className:Ml(`recharts-label`,d)},h,g,{breakAll:f}),p)}PM.displayName=`Label`;var FM=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,a=e.endAngle,o=e.r,s=e.radius,c=e.innerRadius,l=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,_=e.labelViewBox;if(_)return _;if(G(m)&&G(h)){if(G(u)&&G(d))return{x:u,y:d,width:m,height:h};if(G(f)&&G(p))return{x:f,y:p,width:m,height:h}}return G(u)&&G(d)?{x:u,y:d,width:0,height:0}:G(t)&&G(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:c||0,outerRadius:l||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},IM=function(e,t){return e?e===!0?S.createElement(PM,{key:`label-implicit`,viewBox:t}):Wh(e)?S.createElement(PM,{key:`label-implicit`,viewBox:t,value:e}):(0,S.isValidElement)(e)?e.type===PM?(0,S.cloneElement)(e,{key:`label-implicit`,viewBox:t}):S.createElement(PM,{key:`label-implicit`,content:e,viewBox:t}):(0,ug.default)(e)?S.createElement(PM,{key:`label-implicit`,content:e,viewBox:t}):(0,eg.default)(e)?S.createElement(PM,DM({viewBox:t},e,{key:`label-implicit`})):null:null};PM.parseViewBox=FM,PM.renderCallByParent=function(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=FM(e),a=xg(r,PM).map(function(e,n){return(0,S.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[IM(e.label,t||i)].concat(mM(a)):a};var LM=l(o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}))());function RM(e){"@babel/helpers - typeof";return RM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},RM(e)}var zM=[`valueAccessor`],BM=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function VM(e){return GM(e)||WM(e)||UM(e)||HM()}function HM(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UM(e,t){if(e){if(typeof e==`string`)return KM(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 KM(e,t)}}function WM(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function GM(e){if(Array.isArray(e))return KM(e)}function KM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qM(){return qM=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},qM.apply(this,arguments)}function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JM(Object(n),!0).forEach(function(t){XM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XM(e,t,n){return t=ZM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZM(e){var t=QM(e,`string`);return RM(t)==`symbol`?t:t+``}function QM(e,t){if(RM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(RM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $M(e,t){if(e==null)return{};var n=eN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eN(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 tN=function(e){return Array.isArray(e.value)?(0,LM.default)(e.value):e.value};function nN(e){var t=e.valueAccessor,n=t===void 0?tN:t,r=$M(e,zM),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=$M(r,BM);return!i||!i.length?null:S.createElement(Hg,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,Bh.default)(a)?n(e,t):gj(e&&e.payload,a),i=(0,Bh.default)(s)?{}:{id:`${s}-${t}`};return S.createElement(PM,qM({},Dg(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:PM.parseViewBox((0,Bh.default)(o)?e:YM(YM({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}nN.displayName=`LabelList`;function rN(e,t){return e?e===!0?S.createElement(nN,{key:`labelList-implicit`,data:t}):S.isValidElement(e)||(0,ug.default)(e)?S.createElement(nN,{key:`labelList-implicit`,data:t,content:e}):(0,eg.default)(e)?S.createElement(nN,qM({data:t},e,{key:`labelList-implicit`})):null:null}function iN(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=xg(r,nN).map(function(e,n){return(0,S.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[rN(e.label,t)].concat(VM(i)):i}nN.renderCallByParent=iN;function aN(e){"@babel/helpers - typeof";return aN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},aN(e)}function oN(){return oN=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},oN.apply(this,arguments)}function sN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sN(Object(n),!0).forEach(function(t){lN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lN(e,t,n){return t=uN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=dN(e,`string`);return aN(t)==`symbol`?t:t+``}function dN(e,t){if(aN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(aN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fN=function(e,t){return Vh(t-e)*Math.min(Math.abs(t-e),359.999)},pN=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/iM,d=c?i:i+a*u,f=oM(t,n,l,d),p=oM(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:oM(t,n,l*Math.cos(u*iM),m),theta:u}},mN=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=fN(a,o),c=a+s,l=oM(t,n,i,a),u=oM(t,n,i,c),d=`M ${l.x},${l.y} A ${i},${i},0, ${+(Math.abs(s)>180)},${+(a>c)}, ${u.x},${u.y} `;if(r>0){var f=oM(t,n,r,a),p=oM(t,n,r,c);d+=`L ${p.x},${p.y} A ${r},${r},0, ${+(Math.abs(s)>180)},${+(a<=c)}, ${f.x},${f.y} Z`}else d+=`L ${t},${n} Z`;return d},hN=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=Vh(l-c),d=pN({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=pN({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?`M ${p.x},${p.y} a${a},${a},0,0,1,${a*2},0 a${a},${a},0,0,1,${-a*2},0 `:mN({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=`M ${p.x},${p.y} A${a},${a},0,0,${+(u<0)},${f.x},${f.y} A${i},${i},0,${+(y>180)},${+(u<0)},${g.x},${g.y} A${a},${a},0,0,${+(u<0)},${_.x},${_.y} `;if(r>0){var x=pN({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=pN({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=`L${D.x},${D.y} A${a},${a},0,0,${+(u<0)},${E.x},${E.y} A${r},${r},0,${+(k>180)},${+(u>0)},${S.x},${S.y} A${a},${a},0,0,${+(u<0)},${C.x},${C.y}Z`}else b+=`L${t},${n}Z`;return b},gN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_N=function(e){var t=cN(cN({},gN),e),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=Ml(`recharts-sector`,d),p=a-i,m=qh(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?hN({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):mN({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return S.createElement(`path`,oN({},Dg(t,!0),{className:f,d:h,role:`img`}))};function vN(e){"@babel/helpers - typeof";return vN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vN(e)}function yN(){return yN=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},yN.apply(this,arguments)}function bN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).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?bN(Object(n),!0).forEach(function(t){SN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SN(e,t,n){return t=CN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CN(e){var t=wN(e,`string`);return vN(t)==`symbol`?t:t+``}function wN(e,t){if(vN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var TN={curveBasisClosed:K_,curveBasisOpen:J_,curveBasis:W_,curveBumpX:b_,curveBumpY:x_,curveLinearClosed:X_,curveLinear:m_,curveMonotoneX:iv,curveMonotoneY:av,curveNatural:cv,curveStep:uv,curveStepAfter:fv,curveStepBefore:dv},EN=function(e){return e.x===+e.x&&e.y===+e.y},DN=function(e){return e.x},ON=function(e){return e.y},kN=function(e,t){if((0,ug.default)(e))return e;var n=`curve${(0,xv.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?TN[`${n}${t===`vertical`?`Y`:`X`}`]:TN[n]||m_},AN=function(e){var t=e.type,n=t===void 0?`linear`:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s!==void 0&&s,l=kN(n,o),u=c?i.filter(function(e){return EN(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return EN(e)}):a,p=u.map(function(e,t){return xN(xN({},e),{},{base:f[t]})});return d=o===`vertical`?v_().y(ON).x1(DN).x0(function(e){return e.base.x}):v_().x(DN).y1(ON).y0(function(e){return e.base.y}),d.defined(EN).curve(l),d(p)}return d=o===`vertical`&&G(a)?v_().y(ON).x1(DN).x0(a):G(a)?v_().x(DN).y1(ON).y0(a):__().x(DN).y(ON),d.defined(EN).curve(l),d(u)},jN=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?AN(e):r;return S.createElement(`path`,yN({},Dg(e,!1),sg(e),{className:Ml(`recharts-curve`,t),d:a,ref:i}))},MN=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),NN=o(((e,t)=>{var n=MN();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),PN=o(((e,t)=>{t.exports=NN()()})),{getOwnPropertyNames:FN,getOwnPropertySymbols:IN}=Object,{hasOwnProperty:LN}=Object.prototype;function RN(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function zN(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function BN(e){return e?.[Symbol.toStringTag]}function VN(e){return FN(e).concat(IN(e))}var HN=Object.hasOwn||((e,t)=>LN.call(e,t));function UN(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var WN=`__v`,GN=`__o`,KN=`_owner`,{getOwnPropertyDescriptor:qN,keys:JN}=Object;function YN(e,t){return e.byteLength===t.byteLength&&cP(new Uint8Array(e),new Uint8Array(t))}function XN(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 ZN(e,t){return e.byteLength===t.byteLength&&cP(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function QN(e,t){return UN(e.getTime(),t.getTime())}function $N(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function eP(e,t){return e===t}function tP(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var nP=UN;function rP(e,t,n){let r=JN(e),i=r.length;if(JN(t).length!==i)return!1;for(;i-->0;)if(!uP(e,t,n,r[i]))return!1;return!0}function iP(e,t,n){let r=VN(e),i=r.length;if(VN(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!uP(e,t,n,a)||(o=qN(e,a),s=qN(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function aP(e,t){return UN(e.valueOf(),t.valueOf())}function oP(e,t){return e.source===t.source&&e.flags===t.flags}function sP(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function cP(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 lP(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 uP(e,t,n,r){return(r===KN||r===GN||r===WN)&&(e.$$typeof||t.$$typeof)?!0:HN(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var dP=`[object ArrayBuffer]`,fP=`[object Arguments]`,pP=`[object Boolean]`,mP=`[object DataView]`,hP=`[object Date]`,gP=`[object Error]`,_P=`[object Map]`,vP=`[object Number]`,yP=`[object Object]`,bP=`[object RegExp]`,xP=`[object Set]`,SP=`[object String]`,CP={"[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},wP=`[object URL]`,TP=Object.prototype.toString;function EP({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=TP.call(h);if(b===hP)return r(h,g,_);if(b===bP)return u(h,g,_);if(b===_P)return o(h,g,_);if(b===xP)return d(h,g,_);if(b===yP)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===wP)return p(h,g,_);if(b===gP)return i(h,g,_);if(b===fP)return c(h,g,_);if(CP[b])return f(h,g,_);if(b===dP)return e(h,g,_);if(b===mP)return n(h,g,_);if(b===pP||b===vP||b===SP)return l(h,g,_);if(m){let e=m[b];if(!e){let t=BN(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function DP({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:YN,areArraysEqual:n?iP:XN,areDataViewsEqual:ZN,areDatesEqual:QN,areErrorsEqual:$N,areFunctionsEqual:eP,areMapsEqual:n?RN(tP,iP):tP,areNumbersEqual:nP,areObjectsEqual:n?iP:rP,arePrimitiveWrappersEqual:aP,areRegExpsEqual:oP,areSetsEqual:n?RN(sP,iP):sP,areTypedArraysEqual:n?RN(cP,iP):cP,areUrlsEqual:lP,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=zN(r.areArraysEqual),t=zN(r.areMapsEqual),n=zN(r.areObjectsEqual),i=zN(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function OP(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function kP({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var AP=jP();jP({strict:!0}),jP({circular:!0}),jP({circular:!0,strict:!0}),jP({createInternalComparator:()=>UN}),jP({strict:!0,createInternalComparator:()=>UN}),jP({circular:!0,createInternalComparator:()=>UN}),jP({circular:!0,createInternalComparator:()=>UN,strict:!0});function jP(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=EP(DP(e));return kP({circular:t,comparator:a,createState:r,equals:n?n(a):OP(a),strict:i})}function MP(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function NP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):MP(r)})}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e){return BP(e)||zP(e)||LP(e)||IP()}function IP(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LP(e,t){if(e){if(typeof e==`string`)return RP(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 RP(e,t)}}function RP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zP(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function BP(e){if(Array.isArray(e))return e}function VP(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=FP(i),o=a[0],s=a.slice(1);if(typeof o==`number`){NP(r.bind(null,s),o);return}r(o),NP(r.bind(null,s));return}PP(i)===`object`&&(e=i,t(e)),typeof i==`function`&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function HP(e){"@babel/helpers - typeof";return HP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},HP(e)}function UP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UP(Object(n),!0).forEach(function(t){GP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GP(e,t,n){return t=KP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KP(e){var t=qP(e,`string`);return HP(t)===`symbol`?t:String(t)}function qP(e,t){if(HP(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(HP(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JP=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},YP=function(e){return e},XP=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},ZP=function(e,t){return Object.keys(t).reduce(function(n,r){return WP(WP({},n),{},GP({},r,e(r,t[r])))},{})},QP=function(e,t,n){return e.map(function(e){return`${XP(e)} ${t}ms ${n}`}).join(`,`)};function $P(e,t){return nF(e)||tF(e,t)||aF(e,t)||eF()}function eF(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function nF(e){if(Array.isArray(e))return e}function rF(e){return sF(e)||oF(e)||aF(e)||iF()}function iF(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aF(e,t){if(e){if(typeof e==`string`)return cF(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 cF(e,t)}}function oF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function sF(e){if(Array.isArray(e))return cF(e)}function cF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lF=1e-4,uF=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},dF=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},fF=function(e,t){return function(n){return dF(uF(e,t),n)}},pF=function(e,t){return function(n){var r=uF(e,t);return dF([].concat(rF(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},mF=function(){var e=[...arguments],t=e[0],n=e[1],r=e[2],i=e[3];if(e.length===1)switch(e[0]){case`linear`:t=0,n=0,r=1,i=1;break;case`ease`:t=.25,n=.1,r=.25,i=1;break;case`ease-in`:t=.42,n=0,r=1,i=1;break;case`ease-out`:t=.42,n=0,r=.58,i=1;break;case`ease-in-out`:t=0,n=0,r=.58,i=1;break;default:var a=e[0].split(`(`);if(a[0]===`cubic-bezier`&&a[1].split(`)`)[0].split(`,`).length===4){var o=$P(a[1].split(`)`)[0].split(`,`).map(function(e){return parseFloat(e)}),4);t=o[0],n=o[1],r=o[2],i=o[3]}}[t,r,n,i].every(function(e){return typeof e==`number`&&e>=0&&e<=1});var s=fF(t,r),c=fF(n,i),l=pF(t,r),u=function(e){return e>1?1:e<0?0:e},d=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=s(n)-t,a=l(n);if(Math.abs(i-t)<lF||a<lF)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},hF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*i)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<lF&&Math.abs(a)<lF?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},gF=function(){var e=[...arguments][0];if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return mF(e);case`spring`:return hF();default:if(e.split(`(`)[0]===`cubic-bezier`)return mF(e)}return typeof e==`function`?e:null};function _F(e){"@babel/helpers - typeof";return _F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_F(e)}function vF(e){return xF(e)||bF(e)||kF(e)||yF()}function yF(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function xF(e){if(Array.isArray(e))return AF(e)}function SF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SF(Object(n),!0).forEach(function(t){wF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wF(e,t,n){return t=TF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TF(e){var t=EF(e,`string`);return _F(t)===`symbol`?t:String(t)}function EF(e,t){if(_F(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_F(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function DF(e,t){return MF(e)||jF(e,t)||kF(e,t)||OF()}function OF(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kF(e,t){if(e){if(typeof e==`string`)return AF(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 AF(e,t)}}function AF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function MF(e){if(Array.isArray(e))return e}var NF=function(e,t,n){return e+(t-e)*n},PF=function(e){return e.from!==e.to},FF=function e(t,n,r){var i=ZP(function(e,n){if(PF(n)){var r=DF(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return CF(CF({},n),{},{from:i,velocity:a})}return n},n);return r<1?ZP(function(e,t){return PF(t)?CF(CF({},t),{},{velocity:NF(t.velocity,i[e].velocity,r),from:NF(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},IF=(function(e,t,n,r,i){var a=JP(e,t),o=a.reduce(function(n,r){return CF(CF({},n),{},wF({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return CF(CF({},n),{},wF({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return ZP(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(PF).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=FF(n,s,a),i(CF(CF(CF({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=ZP(function(e,t){return NF.apply(void 0,vF(t).concat([n(s)]))},o);if(i(CF(CF(CF({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=ZP(function(e,t){return NF.apply(void 0,vF(t).concat([n(1)]))},o);i(CF(CF(CF({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}}),LF=l(PN());function RF(e){"@babel/helpers - typeof";return RF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},RF(e)}var zF=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function BF(e,t){if(e==null)return{};var n=VF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HF(e){return KF(e)||GF(e)||WF(e)||UF()}function UF(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WF(e,t){if(e){if(typeof e==`string`)return qF(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 qF(e,t)}}function GF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function KF(e){if(Array.isArray(e))return qF(e)}function qF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JF(Object(n),!0).forEach(function(t){XF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XF(e,t,n){return t=eI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function QF(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,eI(r.key),r)}}function $F(e,t,n){return t&&QF(e.prototype,t),n&&QF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function eI(e){var t=tI(e,`string`);return RF(t)===`symbol`?t:String(t)}function tI(e,t){if(RF(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(RF(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nI(e,t){if(typeof t!=`function`&&t!==null)throw 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&&rI(e,t)}function rI(e,t){return rI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rI(e,t)}function iI(e){var t=sI();return function(){var n=cI(e),r;if(t){var i=cI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aI(this,r)}}function aI(e,t){if(t&&(RF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return oI(e)}function oI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sI(){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 cI(e){return cI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cI(e)}var lI=function(e){nI(n,e);var t=iI(n);function n(e,r){var i;ZF(this,n),i=t.call(this,e,r);var a=i.props,o=a.isActive,s=a.attributeName,c=a.from,l=a.to,u=a.steps,d=a.children,f=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(oI(i)),i.changeStyle=i.changeStyle.bind(oI(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),aI(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},aI(i);i.state={style:s?XF({},s,c):c}}else i.state={style:{}};return i}return $F(n,[{key:`componentDidMount`,value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,!(!t||!n)&&this.runAnimation(this.props)}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,a=t.shouldReAnimate,o=t.to,s=t.from,c=this.state.style;if(r){if(!n){var l={style:i?XF({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l);return}if(!(AP(e.to,o)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||a?s:e.to;if(this.state&&c){var f={style:i?XF({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(YF(YF({},this.props),{},{from:d,begin:0}))}}}},{key:`componentWillUnmount`,value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&=(this.manager.stop(),null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:`handleStyleChange`,value:function(e){this.changeStyle(e)}},{key:`changeStyle`,value:function(e){this.mounted&&this.setState({style:e})}},{key:`runJSAnimation`,value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,a=e.easing,o=e.begin,s=e.onAnimationEnd,c=e.onAnimationStart,l=IF(n,r,gF(a),i,this.changeStyle);this.manager.start([c,o,function(){t.stopJSAnimation=l()},i,s])}},{key:`runStepAnimation`,value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,a=n[0],o=a.style,s=a.duration,c=s===void 0?0:s;return this.manager.start([i].concat(HF(n.reduce(function(e,r,i){if(i===0)return e;var a=r.duration,o=r.easing,s=o===void 0?`ease`:o,c=r.style,l=r.properties,u=r.onAnimationEnd,d=i>0?n[i-1]:r,f=l||Object.keys(c);if(typeof s==`function`||s===`spring`)return[].concat(HF(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=QP(f,a,s),m=YF(YF(YF({},d.style),c),{},{transition:p});return[].concat(HF(e),[m,a,u]).filter(YP)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=VP();var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,a=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,c=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),typeof a==`function`||typeof l==`function`||a===`spring`){this.runJSAnimation(e);return}if(c.length>1){this.runStepAnimation(e);return}var d=r?XF({},r,i):i,f=QP(Object.keys(d),n,a);u.start([o,t,YF(YF({},d),{},{transition:f}),n,s])}},{key:`render`,value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=BF(e,zF),a=S.Children.count(t),o=this.state.style;if(typeof t==`function`)return t(o);if(!r||a===0||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=n===void 0?{}:n,a=t.className;return(0,S.cloneElement)(e,YF(YF({},i),{},{style:YF(YF({},r),o),className:a}))};return a===1?s(S.Children.only(t)):S.createElement(`div`,null,S.Children.map(t,function(e){return s(e)}))}}]),n}(S.PureComponent);lI.displayName=`Animate`,lI.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},lI.propTypes={from:LF.default.oneOfType([LF.default.object,LF.default.string]),to:LF.default.oneOfType([LF.default.object,LF.default.string]),attributeName:LF.default.string,duration:LF.default.number,begin:LF.default.number,easing:LF.default.oneOfType([LF.default.string,LF.default.func]),steps:LF.default.arrayOf(LF.default.shape({duration:LF.default.number.isRequired,style:LF.default.object.isRequired,easing:LF.default.oneOfType([LF.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),LF.default.func]),properties:LF.default.arrayOf(`string`),onAnimationEnd:LF.default.func})),children:LF.default.oneOfType([LF.default.node,LF.default.func]),isActive:LF.default.bool,canBegin:LF.default.bool,onAnimationEnd:LF.default.func,shouldReAnimate:LF.default.bool,onAnimationStart:LF.default.func,onAnimationReStart:LF.default.func};var uI=lI;function dI(e){"@babel/helpers - typeof";return dI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dI(e)}function fI(){return fI=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},fI.apply(this,arguments)}function pI(e,t){return vI(e)||_I(e,t)||hI(e,t)||mI()}function mI(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hI(e,t){if(e){if(typeof e==`string`)return gI(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 gI(e,t)}}function gI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _I(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function vI(e){if(Array.isArray(e))return e}function yI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yI(Object(n),!0).forEach(function(t){xI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xI(e,t,n){return t=SI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SI(e){var t=CI(e,`string`);return dI(t)==`symbol`?t:t+``}function CI(e,t){if(dI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var wI=function(e,t,n,r,i){var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,s=n>=0?1:-1,c=+(r>=0&&n>=0||r<0&&n<0),l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l=`M${e},${t+o*u[0]}`,u[0]>0&&(l+=`A ${u[0]},${u[0]},0,0,${c},${e+s*u[0]},${t}`),l+=`L ${e+n-s*u[1]},${t}`,u[1]>0&&(l+=`A ${u[1]},${u[1]},0,0,${c}, ${e+n},${t+o*u[1]}`),l+=`L ${e+n},${t+r-o*u[2]}`,u[2]>0&&(l+=`A ${u[2]},${u[2]},0,0,${c}, ${e+n-s*u[2]},${t+r}`),l+=`L ${e+s*u[3]},${t+r}`,u[3]>0&&(l+=`A ${u[3]},${u[3]},0,0,${c}, ${e},${t+r-o*u[3]}`),l+=`Z`}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);l=`M ${e},${t+o*p} A ${p},${p},0,0,${c},${e+s*p},${t} L ${e+n-s*p},${t} A ${p},${p},0,0,${c},${e+n},${t+o*p} L ${e+n},${t+r-o*p} A ${p},${p},0,0,${c},${e+n-s*p},${t+r} L ${e+s*p},${t+r} A ${p},${p},0,0,${c},${e},${t+r-o*p} Z`}else l=`M ${e},${t} h ${n} v ${r} h ${-n} Z`;return l},TI=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,a=t.y,o=t.width,s=t.height;if(Math.abs(o)>0&&Math.abs(s)>0){var c=Math.min(i,i+o),l=Math.max(i,i+o),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=c&&n<=l&&r>=u&&r<=d}return!1},EI={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},DI=function(e){var t=bI(bI({},EI),e),n=(0,S.useRef)(),r=pI((0,S.useState)(-1),2),i=r[0],a=r[1];(0,S.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var _=Ml(`recharts-rectangle`,d);return g?S.createElement(uI,{canBegin:i>0,from:{width:c,height:l,x:o,y:s},to:{width:c,height:l,x:o,y:s},duration:p,animationEasing:f,isActive:g},function(e){var r=e.width,a=e.height,o=e.x,s=e.y;return S.createElement(uI,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,isActive:h,easing:f},S.createElement(`path`,fI({},Dg(t,!0),{className:_,d:wI(o,s,r,a,u),ref:n})))}):S.createElement(`path`,fI({},Dg(t,!0),{className:_,d:wI(o,s,c,l,u)}))};function OI(){return OI=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},OI.apply(this,arguments)}var kI=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=Ml(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?S.createElement(`circle`,OI({},Dg(e,!1),sg(e),{className:a,cx:t,cy:n,r})):null};function AI(e){"@babel/helpers - typeof";return AI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AI(e)}var jI=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function MI(){return MI=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},MI.apply(this,arguments)}function NI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NI(Object(n),!0).forEach(function(t){FI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FI(e,t,n){return t=II(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function II(e){var t=LI(e,`string`);return AI(t)==`symbol`?t:t+``}function LI(e,t){if(AI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(AI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RI(e,t){if(e==null)return{};var n=zI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zI(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 BI=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},VI=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=RI(e,jI),h=PI({x:n,y:i,top:o,left:c,width:u,height:f},m);return!G(n)||!G(i)||!G(u)||!G(f)||!G(o)||!G(c)?null:S.createElement(`path`,MI({},Dg(h,!0),{className:Ml(`recharts-cross`,p),d:BI(n,i,u,f,o,c)}))},HI=o(((e,t)=>{t.exports=Ly()(Object.getPrototypeOf,Object)})),UI=o(((e,t)=>{var n=Rm(),r=HI(),i=zm(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),WI=o(((e,t)=>{var n=Rm(),r=zm(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a}));function GI(e){"@babel/helpers - typeof";return GI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GI(e)}function KI(){return KI=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},KI.apply(this,arguments)}function qI(e,t){return QI(e)||ZI(e,t)||YI(e,t)||JI()}function JI(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YI(e,t){if(e){if(typeof e==`string`)return XI(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 XI(e,t)}}function XI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZI(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function QI(e){if(Array.isArray(e))return e}function $I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$I(Object(n),!0).forEach(function(t){tL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tL(e,t,n){return t=nL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nL(e){var t=rL(e,`string`);return GI(t)==`symbol`?t:t+``}function rL(e,t){if(GI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var iL=function(e,t,n,r,i){var a=n-r,o=`M ${e},${t}`;return o+=`L ${e+n},${t}`,o+=`L ${e+n-a/2},${t+i}`,o+=`L ${e+n-a/2-r},${t+i}`,o+=`L ${e},${t} Z`,o},aL={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},oL=function(e){var t=eL(eL({},aL),e),n=(0,S.useRef)(),r=qI((0,S.useState)(-1),2),i=r[0],a=r[1];(0,S.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.upperWidth,l=t.lowerWidth,u=t.height,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||u!==+u||c===0&&l===0||u===0)return null;var g=Ml(`recharts-trapezoid`,d);return h?S.createElement(uI,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:u,x:o,y:s},to:{upperWidth:c,lowerWidth:l,height:u,x:o,y:s},duration:p,animationEasing:f,isActive:h},function(e){var r=e.upperWidth,a=e.lowerWidth,o=e.height,s=e.x,c=e.y;return S.createElement(uI,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,easing:f},S.createElement(`path`,KI({},Dg(t,!0),{className:g,d:iL(s,c,r,a,o),ref:n})))}):S.createElement(`g`,null,S.createElement(`path`,KI({},Dg(t,!0),{className:g,d:iL(o,s,c,l,u)})))},sL=l(UI()),cL=l(WI()),lL=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function uL(e){"@babel/helpers - typeof";return uL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uL(e)}function dL(e,t){if(e==null)return{};var n=fL(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fL(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 pL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pL(Object(n),!0).forEach(function(t){hL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hL(e,t,n){return t=gL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gL(e){var t=_L(e,`string`);return uL(t)==`symbol`?t:t+``}function _L(e,t){if(uL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vL(e,t){return mL(mL({},t),e)}function yL(e,t){return e===`symbols`}function bL(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return S.createElement(DI,n);case`trapezoid`:return S.createElement(oL,n);case`sector`:return S.createElement(_N,n);case`symbols`:if(yL(t,n))return S.createElement(Lv,n);break;default:return null}}function xL(e){return(0,S.isValidElement)(e)?e.props:e}function SL(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?vL:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=dL(e,lL),l;if((0,S.isValidElement)(t))l=(0,S.cloneElement)(t,mL(mL({},c),xL(t)));else if((0,ug.default)(t))l=t(c);else if((0,sL.default)(t)&&!(0,cL.default)(t)){var u=i(t,c);l=S.createElement(bL,{shapeType:n,elementProps:u})}else{var d=c;l=S.createElement(bL,{shapeType:n,elementProps:d})}return s?S.createElement(Hg,{className:o},l):l}function CL(e,t){return t!=null&&`trapezoids`in e.props}function wL(e,t){return t!=null&&`sectors`in e.props}function TL(e,t){return t!=null&&`points`in e.props}function EL(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)==null?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)==null?void 0:r.y)||e.y===t.y;return i&&a}function DL(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function OL(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function kL(e,t){var n;return CL(e,t)?n=EL:wL(e,t)?n=DL:TL(e,t)&&(n=OL),n}function AL(e,t){var n;return CL(e,t)?n=`trapezoids`:wL(e,t)?n=`sectors`:TL(e,t)&&(n=`points`),n}function jL(e,t){if(CL(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(wL(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return TL(e,t)?t.payload:{}}function ML(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=AL(n,t),a=jL(n,t),o=r.filter(function(e,r){var o=(0,rj.default)(a,e),s=n.props[i].filter(function(e){return kL(n,t)(e,t)}),c=r===n.props[i].indexOf(s[s.length-1]);return o&&c});return r.indexOf(o[o.length-1])}var NL=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),PL=o(((e,t)=>{var n=TS(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),FL=o(((e,t)=>{var n=NL(),r=dx(),i=PL();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),IL=o(((e,t)=>{t.exports=FL()()}));function LL(e){"@babel/helpers - typeof";return LL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},LL(e)}function RL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RL(Object(n),!0).forEach(function(t){BL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BL(e,t,n){return t=VL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VL(e){var t=HL(e,`string`);return LL(t)==`symbol`?t:t+``}function HL(e,t){if(LL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var UL=[`Webkit`,`Moz`,`O`,`ms`],WL=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=UL.reduce(function(e,r){return zL(zL({},e),{},BL({},r+n,t))},{});return r[e]=t,r},GL=l(IL());function KL(e){"@babel/helpers - typeof";return KL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},KL(e)}function qL(){return qL=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},qL.apply(this,arguments)}function JL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JL(Object(n),!0).forEach(function(t){oR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ZL(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,sR(r.key),r)}}function QL(e,t,n){return t&&ZL(e.prototype,t),n&&ZL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $L(e,t,n){return t=rR(t),eR(e,nR()?Reflect.construct(t,n||[],rR(e).constructor):t.apply(e,n))}function eR(e,t){if(t&&(KL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return tR(e)}function tR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function nR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nR=function(){return!!e})()}function rR(e){return rR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rR(e)}function iR(e,t){if(typeof t!=`function`&&t!==null)throw 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&&aR(e,t)}function aR(e,t){return aR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},aR(e,t)}function oR(e,t,n){return t=sR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sR(e){var t=cR(e,`string`);return KL(t)==`symbol`?t:t+``}function cR(e,t){if(KL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var lR=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,a=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,c=Dw().domain((0,GL.default)(0,s)).range([i,i+a-o]),l=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:l}},uR=function(e){return e.changedTouches&&!!e.changedTouches.length},dR=function(e){function t(e){var n;return XL(this,t),n=$L(this,t,[e]),oR(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),oR(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),oR(n,`handleDragEnd`,function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;r?.({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),oR(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),oR(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),oR(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),oR(n,`handleSlideDragStart`,function(e){var t=uR(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,`startX`),endX:n.handleTravellerDragStart.bind(n,`endX`)},n.state={},n}return iR(t,e),QL(t,[{key:`componentWillUnmount`,value:function(){this.leaveTimer&&=(clearTimeout(this.leaveTimer),null),this.detachDragEndListener()}},{key:`getIndex`,value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,a=this.props,o=a.gap,s=a.data.length-1,c=Math.min(n,r),l=Math.max(n,r),u=t.getIndexInRange(i,c),d=t.getIndexInRange(i,l);return{startIndex:u-u%o,endIndex:d===s?s:d-d%o}}},{key:`getTextOfTick`,value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,a=gj(n[e],i,e);return(0,ug.default)(r)?r(a,e):a}},{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(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,a=this.props,o=a.x,s=a.width,c=a.travellerWidth,l=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,o+s-c-i,o+s-c-r):f<0&&(f=Math.max(f,o-r,o-i));var p=this.getIndex({startX:r+f,endX:i+f});(p.startIndex!==l||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:`handleTravellerDragStart`,value:function(e,t){var n=uR(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:`handleTravellerMove`,value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,a=t.startX,o=this.state[r],s=this.props,c=s.x,l=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,c+l-u-o):h<0&&(h=Math.max(h,c-o)),m[r]=o+h;var g=this.getIndex(m),_=g.startIndex,v=g.endIndex,y=function(){var e=p.length-1;return r===`startX`&&(i>a?_%f===0:v%f===0)||i<a&&v===e||r===`endX`&&(i>a?v%f===0:_%f===0)||i>a&&v===e};this.setState(oR(oR({},r,o+h),`brushMoveStartX`,e.pageX),function(){d&&y()&&d(g)})}},{key:`handleTravellerMoveKeyboard`,value:function(e,t){var n=this,r=this.state,i=r.scaleValues,a=r.startX,o=r.endX,s=this.state[t],c=i.indexOf(s);if(c!==-1){var l=c+e;if(!(l===-1||l>=i.length)){var u=i[l];t===`startX`&&u>=o||t===`endX`&&u<=a||this.setState(oR({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:`renderBackground`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.fill,o=e.stroke;return S.createElement(`rect`,{stroke:o,fill:a,x:t,y:n,width:r,height:i})}},{key:`renderPanorama`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.children,s=e.padding,c=S.Children.only(o);return c?S.cloneElement(c,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}},{key:`renderTravellerLayer`,value:function(e,n){var r=this,i=this.props,a=i.y,o=i.travellerWidth,s=i.height,c=i.traveller,l=i.ariaLabel,u=i.data,d=i.startIndex,f=i.endIndex,p=Math.max(e,this.props.x),m=YL(YL({},Dg(this.props,!1)),{},{x:p,y:a,width:o,height:s}),h=l||`Min value: ${u[d]?.name}, Max value: ${u[f]?.name}`;return S.createElement(Hg,{tabIndex:0,role:`slider`,"aria-label":h,"aria-valuenow":e,className:`recharts-brush-traveller`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){[`ArrowLeft`,`ArrowRight`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard(e.key===`ArrowRight`?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:`col-resize`}},t.renderTraveller(c,m))}},{key:`renderSlide`,value:function(e,t){var n=this.props,r=n.y,i=n.height,a=n.stroke,o=n.travellerWidth,s=Math.min(e,t)+o,c=Math.max(Math.abs(t-e)-o,0);return S.createElement(`rect`,{className:`recharts-brush-slide`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:`move`},stroke:`none`,fill:a,fillOpacity:.2,x:s,y:r,width:c,height:i})}},{key:`renderText`,value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,a=e.travellerWidth,o=e.stroke,s=this.state,c=s.startX,l=s.endX,u=5,d={pointerEvents:`none`,fill:o};return S.createElement(Hg,{className:`recharts-brush-texts`},S.createElement(GC,qL({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),S.createElement(GC,qL({textAnchor:`start`,verticalAnchor:`middle`,x:Math.max(c,l)+a+u,y:r+i/2},d),this.getTextOfTick(n)))}},{key:`render`,value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,a=e.y,o=e.width,s=e.height,c=e.alwaysShowText,l=this.state,u=l.startX,d=l.endX,f=l.isTextActive,p=l.isSlideMoving,m=l.isTravellerMoving,h=l.isTravellerFocused;if(!t||!t.length||!G(i)||!G(a)||!G(o)||!G(s)||o<=0||s<=0)return null;var g=Ml(`recharts-brush`,n),_=S.Children.count(r)===1,v=WL(`userSelect`,`none`);return S.createElement(Hg,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:v},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,`startX`),this.renderTravellerLayer(d,`endX`),(f||p||m||h||c)&&this.renderText())}}],[{key:`renderDefaultTraveller`,value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.stroke,o=Math.floor(n+i/2)-1;return S.createElement(S.Fragment,null,S.createElement(`rect`,{x:t,y:n,width:r,height:i,fill:a,stroke:`none`}),S.createElement(`line`,{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:`none`,stroke:`#fff`}),S.createElement(`line`,{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:`none`,stroke:`#fff`}))}},{key:`renderTraveller`,value:function(e,n){return S.isValidElement(e)?S.cloneElement(e,n):(0,ug.default)(e)?e(n):t.renderDefaultTraveller(n)}},{key:`getDerivedStateFromProps`,value:function(e,t){var n=e.data,r=e.width,i=e.x,a=e.travellerWidth,o=e.updateId,s=e.startIndex,c=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return YL({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?lR({data:n,width:r,x:i,travellerWidth:a,startIndex:s,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([i,i+r-a]);var l=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:l}}return null}},{key:`getIndexInRange`,value:function(e,t){for(var n=e.length,r=0,i=n-1;i-r>1;){var a=Math.floor((r+i)/2);e[a]>t?i=a:r=a}return t>=e[i]?i:r}}])}(S.PureComponent);oR(dR,`displayName`,`Brush`),oR(dR,`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 fR=o(((e,t)=>{var n=Zb();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),pR=o(((e,t)=>{var n=fy(),r=ub(),i=fR(),a=Mm(),o=dx();function s(e,t,s){var c=a(e)?n:i;return s&&o(e,t,s)&&(t=void 0),c(e,r(t,3))}t.exports=s})),mR=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},hR=o(((e,t)=>{var n=ox();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),gR=o(((e,t)=>{var n=hR(),r=Yb(),i=ub();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),_R=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}t.exports=n})),vR=o(((e,t)=>{var n=Zb();function r(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i),r}),r}t.exports=r})),yR=o(((e,t)=>{var n=_R(),r=vR(),i=ub(),a=Mm(),o=dx();function s(e,t,s){var c=a(e)?n:r;return s&&o(e,t,s)&&(t=void 0),c(e,i(t,3))}t.exports=s})),bR=[`x`,`y`];function xR(e){"@babel/helpers - typeof";return xR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xR(e)}function SR(){return SR=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},SR.apply(this,arguments)}function CR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?CR(Object(n),!0).forEach(function(t){TR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TR(e,t,n){return t=ER(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ER(e){var t=DR(e,`string`);return xR(t)==`symbol`?t:t+``}function DR(e,t){if(xR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(xR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function OR(e,t){if(e==null)return{};var n=kR(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kR(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 AR(e,t){var n=e.x,r=e.y,i=OR(e,bR),a=`${n}`,o=parseInt(a,10),s=`${r}`,c=parseInt(s,10),l=`${t.height||i.height}`,u=parseInt(l,10),d=`${t.width||i.width}`,f=parseInt(d,10);return wR(wR(wR(wR(wR({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function jR(e){return S.createElement(SL,SR({shapeType:`rectangle`,propTransformer:AR,activeClassName:`recharts-active-bar`},e))}var MR=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e==`number`)return e;var i=G(n)||Uh(n);return i?e(n,r):(!i&&xA(!1),t)}},NR=[`value`,`background`],PR;function FR(e){"@babel/helpers - typeof";return FR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},FR(e)}function IR(e,t){if(e==null)return{};var n=LR(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LR(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 RR(){return RR=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},RR.apply(this,arguments)}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zR(Object(n),!0).forEach(function(t){ZR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VR(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function HR(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,QR(r.key),r)}}function UR(e,t,n){return t&&HR(e.prototype,t),n&&HR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function WR(e,t,n){return t=JR(t),GR(e,qR()?Reflect.construct(t,n||[],JR(e).constructor):t.apply(e,n))}function GR(e,t){if(t&&(FR(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return KR(e)}function KR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function qR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qR=function(){return!!e})()}function JR(e){return JR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},JR(e)}function YR(e,t){if(typeof t!=`function`&&t!==null)throw 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&&XR(e,t)}function XR(e,t){return XR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},XR(e,t)}function ZR(e,t,n){return t=QR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QR(e){var t=$R(e,`string`);return FR(t)==`symbol`?t:t+``}function $R(e,t){if(FR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(FR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ez=function(e){function t(){var e;VR(this,t);var n=[...arguments];return e=WR(this,t,[].concat(n)),ZR(e,`state`,{isAnimationFinished:!1}),ZR(e,`id`,Kh(`recharts-bar-`)),ZR(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),ZR(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return YR(t,e),UR(t,[{key:`renderRectanglesStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,a=n.activeIndex,o=n.activeBar,s=Dg(this.props,!1);return e&&e.map(function(e,n){var c=n===a,l=c?o:r,u=BR(BR(BR({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return S.createElement(Hg,RR({className:`recharts-bar-rectangle`},lg(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),S.createElement(jR,u))})}},{key:`renderRectanglesWithAnimation`,value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.animationId,l=this.state.prevData;return S.createElement(uI,{begin:a,duration:o,isActive:i,easing:s,from:{t:0},to:{t:1},key:`bar-${c}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=l&&l[t];if(n){var a=Xh(n.x,e.x),o=Xh(n.y,e.y),s=Xh(n.width,e.width),c=Xh(n.height,e.height);return BR(BR({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=Xh(0,e.height)(i);return BR(BR({},e),{},{y:e.y+e.height-u,height:u})}var d=Xh(0,e.width)(i);return BR(BR({},e),{},{width:d})});return S.createElement(Hg,null,e.renderRectanglesStatically(a))})}},{key:`renderRectangles`,value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!(0,rj.default)(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:`renderBackground`,value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,a=Dg(this.props.background,!1);return n.map(function(t,n){t.value;var o=t.background,s=IR(t,NR);if(!o)return null;var c=BR(BR(BR(BR(BR({},s),{},{fill:`#eee`},o),a),lg(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return S.createElement(jR,RR({key:`background-bar-${n}`,option:e.props.background,isActive:n===i},c))})}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=xg(s,KA);if(!c)return null;var l=o===`vertical`?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:gj(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return S.createElement(Hg,d,c.map(function(e){return S.cloneElement(e,{key:`error-bar-${t}-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,offset:l,dataPointFormatter:u})}))}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,a=e.yAxis,o=e.left,s=e.top,c=e.width,l=e.height,u=e.isAnimationActive,d=e.background,f=e.id;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=Ml(`recharts-bar`,r),h=i&&i.allowDataOverflow,g=a&&a.allowDataOverflow,_=h||g,v=(0,Bh.default)(f)?this.id:f;return S.createElement(Hg,{className:m},h||g?S.createElement(`defs`,null,S.createElement(`clipPath`,{id:`clipPath-${v}`},S.createElement(`rect`,{x:h?o:o-c/2,y:g?s:s-l/2,width:h?c:c*2,height:g?l:l*2}))):null,S.createElement(Hg,{className:`recharts-bar-rectangles`,clipPath:_?`url(#clipPath-${v})`:null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,v),(!u||p)&&nN.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.data===t.curData?null:{curData:e.data}:{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}}}])}(S.PureComponent);PR=ez,ZR(ez,`displayName`,`Bar`),ZR(ez,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!nS.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),ZR(ez,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=Fj(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:BR(BR({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=Hj({numericAxis:b}),C=xg(v,VS);return BR({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=Ij(l[u+t],x):(r=gj(e,_),Array.isArray(r)||(r=[S,r]));var b=MR(y,PR.defaultProps.minPointSize)(r[1],t);if(m===`horizontal`){var w=[o.scale(r[0]),o.scale(r[1])],T=w[0],E=w[1];d=Vj({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:e,index:t}),f=E??T??void 0,h=p.size;var D=T-E;if(g=Number.isNaN(D)?0:D,v={x:d,y:o.y,width:h,height:o.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=Vh(g||b)*(Math.abs(b)-Math.abs(g));f-=O,g+=O}}else{var k=[a.scale(r[0]),a.scale(r[1])],A=k[0],j=k[1];if(d=A,f=Vj({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:e,index:t}),h=j-A,g=p.size,v={x:a.x,y:f,width:a.width,height:g},Math.abs(b)>0&&Math.abs(h)<Math.abs(b)){var M=Vh(h||b)*(Math.abs(b)-Math.abs(h));h+=M}}return BR(BR(BR({},e),{},{x:d,y:f,width:h,height:g,value:l?r:r[1],payload:e,background:v},C&&C[t]&&C[t].props),{},{tooltipPayload:[Zj(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});var tz=l(gR()),nz=l(yR());function rz(e){"@babel/helpers - typeof";return rz=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rz(e)}function iz(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function az(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,uz(r.key),r)}}function oz(e,t,n){return t&&az(e.prototype,t),n&&az(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sz(Object(n),!0).forEach(function(t){lz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lz(e,t,n){return t=uz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uz(e){var t=dz(e,`string`);return rz(t)==`symbol`?t:t+``}function dz(e,t){if(rz(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rz(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fz=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.layout,c=e.children,l=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},d=!!Sg(c,ez);return l.reduce(function(a,o){var c=t[o],l=c.orientation,f=c.domain,p=c.padding,m=p===void 0?{}:p,h=c.mirror,g=c.reversed,_=`${l}${h?`Mirror`:``}`,v,y,b,x,S;if(c.type===`number`&&(c.padding===`gap`||c.padding===`no-gap`)){var C=f[1]-f[0],w=1/0,T=c.categoricalDomain.sort(Qh);if(T.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(T[t-1]||0),w))}),Number.isFinite(w)){var E=w/C,D=c.layout===`vertical`?n.height:n.width;if(c.padding===`gap`&&(v=E*D/2),c.padding===`no-gap`){var O=qh(e.barCategoryGap,E*D),k=E*D/2;v=k-O-(k-O)/D*O}}}y=r===`xAxis`?[n.left+(m.left||0)+(v||0),n.left+n.width-(m.right||0)-(v||0)]:r===`yAxis`?s===`horizontal`?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(v||0),n.top+n.height-(m.bottom||0)-(v||0)]:c.range,g&&(y=[y[1],y[0]]);var A=Mj(c,i,d),j=A.scale,M=A.realScaleType;j.domain(f).range(y),Pj(j);var N=Bj(j,cz(cz({},c),{},{realScaleType:M}));r===`xAxis`?(S=l===`top`&&!h||l===`bottom`&&h,b=n.left,x=u[_]-S*c.height):r===`yAxis`&&(S=l===`left`&&!h||l===`right`&&h,b=u[_]-S*c.width,x=n.top);var P=cz(cz(cz({},c),N),{},{realScaleType:M,x:b,y:x,scale:j,width:r===`xAxis`?n.width:c.width,height:r===`yAxis`?n.height:c.height});return P.bandSize=Yj(P,N),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*P.height:c.hide||(u[_]+=(S?-1:1)*P.width),cz(cz({},a),{},lz({},o,P))},{})},pz=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}},mz=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return pz({x:t,y:n},{x:r,y:i})},hz=function(){function e(t){iz(this,e),this.scale=t}return oz(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(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.bandAware,r=t.position;if(e!==void 0){if(r)switch(r){case`start`:return this.scale(e);case`middle`:var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case`end`:var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:`isInRange`,value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:`create`,value:function(t){return new e(t)}}])}();lz(hz,`EPS`,1e-4);var gz=function(e){var t=Object.keys(e).reduce(function(t,n){return cz(cz({},t),{},lz({},n,hz.create(e[n])))},{});return cz(cz({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,tz.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,nz.default)(e,function(e,n){return t[n].isInRange(e)})}})};function _z(e){return(e%180+180)%180}var vz=function(e){var t=e.width,n=e.height,r=_z(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},yz=o(((e,t)=>{var n=ub(),r=By(),i=Vy();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),bz=o(((e,t)=>{var n=PL();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),xz=o(((e,t)=>{var n=db(),r=ub(),i=bz(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),Sz=o(((e,t)=>{t.exports=yz()(xz())})),Cz=(0,l(bh()).default)(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(``)}),wz=l(Sz()),Tz=(0,S.createContext)(void 0),Ez=(0,S.createContext)(void 0),Dz=(0,S.createContext)(void 0),Oz=(0,S.createContext)({}),kz=(0,S.createContext)(void 0),Az=(0,S.createContext)(0),jz=(0,S.createContext)(0),Mz=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,a=e.clipPathId,o=e.children,s=e.width,c=e.height,l=Cz(i);return S.createElement(Tz.Provider,{value:n},S.createElement(Ez.Provider,{value:r},S.createElement(Oz.Provider,{value:i},S.createElement(Dz.Provider,{value:l},S.createElement(kz.Provider,{value:a},S.createElement(Az.Provider,{value:c},S.createElement(jz.Provider,{value:s},o)))))))},Nz=function(){return(0,S.useContext)(kz)},Pz=function(e){var t=(0,S.useContext)(Tz);t??xA(!1);var n=t[e];return n??xA(!1),n},Fz=function(){return Jh((0,S.useContext)(Tz))},Iz=function(){var e=(0,S.useContext)(Ez);return(0,wz.default)(e,function(e){return(0,nz.default)(e.domain,Number.isFinite)})||Jh(e)},Lz=function(e){var t=(0,S.useContext)(Ez);t??xA(!1);var n=t[e];return n??xA(!1),n},Rz=function(){return(0,S.useContext)(Dz)},zz=function(){return(0,S.useContext)(Oz)},Bz=function(){return(0,S.useContext)(jz)},Vz=function(){return(0,S.useContext)(Az)},Hz=l(pR());function Uz(e){"@babel/helpers - typeof";return Uz=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Uz(e)}function Wz(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Gz(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,rB(r.key),r)}}function Kz(e,t,n){return t&&Gz(e.prototype,t),n&&Gz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qz(e,t,n){return t=Zz(t),Jz(e,Xz()?Reflect.construct(t,n||[],Zz(e).constructor):t.apply(e,n))}function Jz(e,t){if(t&&(Uz(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Yz(e)}function Yz(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Xz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xz=function(){return!!e})()}function Zz(e){return Zz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zz(e)}function Qz(e,t){if(typeof t!=`function`&&t!==null)throw 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&&$z(e,t)}function $z(e,t){return $z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$z(e,t)}function eB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?eB(Object(n),!0).forEach(function(t){nB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nB(e,t,n){return t=rB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rB(e){var t=iB(e,`string`);return Uz(t)==`symbol`?t:t+``}function iB(e,t){if(Uz(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Uz(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function aB(e,t){return uB(e)||lB(e,t)||sB(e,t)||oB()}function oB(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sB(e,t){if(e){if(typeof e==`string`)return cB(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 cB(e,t)}}function cB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lB(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function uB(e){if(Array.isArray(e))return e}function dB(){return dB=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},dB.apply(this,arguments)}var fB=function(e,t){return S.isValidElement(e)?S.cloneElement(e,t):(0,ug.default)(e)?e(t):S.createElement(`line`,dB({},t,{className:`recharts-reference-line-line`}))},pB=function(e,t,n,r,i,a,o,s,c){var l=i.x,u=i.y,d=i.width,f=i.height;if(n){var p=c.y,m=e.y.apply(p,{position:a});if(mR(c,`discard`)&&!e.y.isInRange(m))return null;var h=[{x:l+d,y:m},{x:l,y:m}];return s===`left`?h.reverse():h}if(t){var g=c.x,_=e.x.apply(g,{position:a});if(mR(c,`discard`)&&!e.x.isInRange(_))return null;var v=[{x:_,y:u+f},{x:_,y:u}];return o===`top`?v.reverse():v}if(r){var y=c.segment.map(function(t){return e.apply(t,{position:a})});return mR(c,`discard`)&&(0,Hz.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function mB(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className;e.alwaysShow;var c=Nz(),l=Pz(i),u=Lz(a),d=Rz();if(!c||!d)return null;var f=pB(gz({x:l.scale,y:u.scale}),Wh(t),Wh(n),r&&r.length===2,d,e.position,l.orientation,u.orientation,e);if(!f)return null;var p=aB(f,2),m=p[0],h=m.x,g=m.y,_=p[1],v=_.x,y=_.y,b=tB(tB({clipPath:mR(e,`hidden`)?`url(#${c})`:void 0},Dg(e,!0)),{},{x1:h,y1:g,x2:v,y2:y});return S.createElement(Hg,{className:Ml(`recharts-reference-line`,s)},fB(o,b),PM.renderCallByParent(e,mz({x1:h,y1:g,x2:v,y2:y})))}var hB=function(e){function t(){return Wz(this,t),qz(this,t,arguments)}return Qz(t,e),Kz(t,[{key:`render`,value:function(){return S.createElement(mB,this.props)}}])}(S.Component);nB(hB,`displayName`,`ReferenceLine`),nB(hB,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function gB(){return gB=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},gB.apply(this,arguments)}function _B(e){"@babel/helpers - typeof";return _B=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_B(e)}function vB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vB(Object(n),!0).forEach(function(t){AB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bB(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xB(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,jB(r.key),r)}}function SB(e,t,n){return t&&xB(e.prototype,t),n&&xB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CB(e,t,n){return t=DB(t),wB(e,EB()?Reflect.construct(t,n||[],DB(e).constructor):t.apply(e,n))}function wB(e,t){if(t&&(_B(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return TB(e)}function TB(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function EB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EB=function(){return!!e})()}function DB(e){return DB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},DB(e)}function OB(e,t){if(typeof t!=`function`&&t!==null)throw 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&&kB(e,t)}function kB(e,t){return kB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kB(e,t)}function AB(e,t,n){return t=jB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jB(e){var t=MB(e,`string`);return _B(t)==`symbol`?t:t+``}function MB(e,t){if(_B(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_B(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var NB=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=gz({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return mR(e,`discard`)&&!a.isInRange(o)?null:o},PB=function(e){function t(){return bB(this,t),CB(this,t,arguments)}return OB(t,e),SB(t,[{key:`render`,value:function(){var e=this.props,n=e.x,r=e.y,i=e.r;e.alwaysShow;var a=e.clipPathId,o=Wh(n),s=Wh(r);if(!o||!s)return null;var c=NB(this.props);if(!c)return null;var l=c.x,u=c.y,d=this.props,f=d.shape,p=d.className,m=yB(yB({clipPath:mR(this.props,`hidden`)?`url(#${a})`:void 0},Dg(this.props,!0)),{},{cx:l,cy:u});return S.createElement(Hg,{className:Ml(`recharts-reference-dot`,p)},t.renderDot(f,m),PM.renderCallByParent(this.props,{x:l-i,y:u-i,width:2*i,height:2*i}))}}])}(S.Component);AB(PB,`displayName`,`ReferenceDot`),AB(PB,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),AB(PB,`renderDot`,function(e,t){return S.isValidElement(e)?S.cloneElement(e,t):(0,ug.default)(e)?e(t):S.createElement(kI,gB({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function FB(){return FB=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},FB.apply(this,arguments)}function IB(e){"@babel/helpers - typeof";return IB=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},IB(e)}function LB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LB(Object(n),!0).forEach(function(t){YB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zB(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function BB(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,XB(r.key),r)}}function VB(e,t,n){return t&&BB(e.prototype,t),n&&BB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HB(e,t,n){return t=KB(t),UB(e,GB()?Reflect.construct(t,n||[],KB(e).constructor):t.apply(e,n))}function UB(e,t){if(t&&(IB(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return WB(e)}function WB(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function GB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GB=function(){return!!e})()}function KB(e){return KB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},KB(e)}function qB(e,t){if(typeof t!=`function`&&t!==null)throw 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&&JB(e,t)}function JB(e,t){return JB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JB(e,t)}function YB(e,t,n){return t=XB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XB(e){var t=ZB(e,`string`);return IB(t)==`symbol`?t:t+``}function ZB(e,t){if(IB(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IB(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var QB=function(e,t,n,r,i){var a=i.x1,o=i.x2,s=i.y1,c=i.y2,l=i.xAxis,u=i.yAxis;if(!l||!u)return null;var d=gz({x:l.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:`start`}):d.x.rangeMin,y:n?d.y.apply(s,{position:`start`}):d.y.rangeMin},p={x:t?d.x.apply(o,{position:`end`}):d.x.rangeMax,y:r?d.y.apply(c,{position:`end`}):d.y.rangeMax};return mR(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:pz(f,p)},$B=function(e){function t(){return zB(this,t),HB(this,t,arguments)}return qB(t,e),VB(t,[{key:`render`,value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,a=e.y2,o=e.className;e.alwaysShow;var s=e.clipPathId,c=Wh(n),l=Wh(r),u=Wh(i),d=Wh(a),f=this.props.shape;if(!c&&!l&&!u&&!d&&!f)return null;var p=QB(c,l,u,d,this.props);if(!p&&!f)return null;var m=mR(this.props,`hidden`)?`url(#${s})`:void 0;return S.createElement(Hg,{className:Ml(`recharts-reference-area`,o)},t.renderRect(f,RB(RB({clipPath:m},Dg(this.props,!0)),p)),PM.renderCallByParent(this.props,p))}}])}(S.Component);YB($B,`displayName`,`ReferenceArea`),YB($B,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),YB($B,`renderRect`,function(e,t){return S.isValidElement(e)?S.cloneElement(e,t):(0,ug.default)(e)?e(t):S.createElement(DI,FB({},t,{className:`recharts-reference-area-rect`}))});function eV(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)if(n===void 0||n(e[i])===!0)r.push(e[i]);else return;return r}function tV(e,t,n){return vz({width:e.width+t.width,height:e.height+t.height},n)}function nV(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function rV(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function iV(e,t){return eV(e,t+1)}function aV(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:eV(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||rV(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function oV(e){"@babel/helpers - typeof";return oV=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},oV(e)}function sV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sV(Object(n),!0).forEach(function(t){lV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lV(e,t,n){return t=uV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uV(e){var t=dV(e,`string`);return oV(t)==`symbol`?t:t+``}function dV(e,t){if(oV(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(oV(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function fV(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t],l,u=function(){return l===void 0&&(l=n(r,t)),l};if(t===o-1){var d=e*(r.coordinate+e*u()/2-c);a[t]=r=cV(cV({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=cV(cV({},r),{},{tickCoord:r.coordinate});rV(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=cV(cV({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function pV(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=cV(cV({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),rV(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=cV(cV({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r=o[t],a,s=function(){return a===void 0&&(a=n(r,t)),a};if(t===0){var u=e*(r.coordinate-e*s()/2-c);o[t]=r=cV(cV({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=cV(cV({},r),{},{tickCoord:r.coordinate});rV(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=cV(cV({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function mV(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(G(c)||nS.isSsr)return iV(i,typeof c==`number`&&G(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?$S(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var i=(0,ug.default)(l)?l(e.value,r):e.value;return p===`width`?tV($S(i,{fontSize:t,letterSpacing:n}),m,d):$S(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?Vh(i[1].coordinate-i[0].coordinate):1,_=nV(a,g,p);return c===`equidistantPreserveStart`?aV(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?pV(g,_,h,i,o,c===`preserveStartEnd`):fV(g,_,h,i,o),f.filter(function(e){return e.isShow}))}var hV=[`viewBox`],gV=[`viewBox`],_V=[`ticks`];function vV(e){"@babel/helpers - typeof";return vV=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vV(e)}function yV(){return yV=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},yV.apply(this,arguments)}function bV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bV(Object(n),!0).forEach(function(t){PV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SV(e,t){if(e==null)return{};var n=CV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CV(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 wV(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function TV(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,FV(r.key),r)}}function EV(e,t,n){return t&&TV(e.prototype,t),n&&TV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DV(e,t,n){return t=jV(t),OV(e,AV()?Reflect.construct(t,n||[],jV(e).constructor):t.apply(e,n))}function OV(e,t){if(t&&(vV(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return kV(e)}function kV(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function AV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AV=function(){return!!e})()}function jV(e){return jV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jV(e)}function MV(e,t){if(typeof t!=`function`&&t!==null)throw 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&&NV(e,t)}function NV(e,t){return NV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NV(e,t)}function PV(e,t,n){return t=FV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e){var t=IV(e,`string`);return vV(t)==`symbol`?t:t+``}function IV(e,t){if(vV(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vV(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var LV=function(e){function t(e){var n;return wV(this,t),n=DV(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return MV(t,e),EV(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=SV(e,hV),i=this.props,a=i.viewBox,o=SV(i,gV);return!$h(n,a)||!$h(r,o)||!$h(t,this.state)}},{key:`componentDidMount`,value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`)[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.x,r=t.y,i=t.width,a=t.height,o=t.orientation,s=t.tickSize,c=t.mirror,l=t.tickMargin,u,d,f,p,m,h,g=c?-1:1,_=e.tickSize||s,v=G(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case`top`:u=d=e.coordinate,p=r+ +!c*a,f=p-g*_,h=f-g*l,m=v;break;case`left`:f=p=e.coordinate,d=n+ +!c*i,u=d-g*_,m=u-g*l,h=v;break;case`right`:f=p=e.coordinate,d=n+ +c*i,u=d+g*_,m=u+g*l,h=v;break;default:u=d=e.coordinate,p=r+ +c*a,f=p+g*_,h=f+g*l,m=v;break}return{line:{x1:u,y1:f,x2:d,y2:p},tick:{x:m,y:h}}}},{key:`getTickTextAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r;switch(t){case`left`:r=n?`start`:`end`;break;case`right`:r=n?`end`:`start`;break;default:r=`middle`;break}return r}},{key:`getTickVerticalAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=`end`;switch(t){case`left`:case`right`:r=`middle`;break;case`top`:r=n?`start`:`end`;break;default:r=n?`end`:`start`;break}return r}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=xV(xV(xV({},Dg(this.props,!1)),Dg(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var l=+(a===`top`&&!o||a===`bottom`&&o);c=xV(xV({},c),{},{x1:t,y1:n+l*i,x2:t+r,y2:n+l*i})}else{var u=+(a===`left`&&!o||a===`right`&&o);c=xV(xV({},c),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return S.createElement(`line`,yV({},c,{className:Ml(`recharts-cartesian-axis-line`,(0,Rh.default)(s,`className`))}))}},{key:`renderTicks`,value:function(e,n,r){var i=this,a=this.props,o=a.tickLine,s=a.stroke,c=a.tick,l=a.tickFormatter,u=a.unit,d=mV(xV(xV({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=Dg(this.props,!1),h=Dg(c,!1),g=xV(xV({},m),{},{fill:`none`},Dg(o,!1)),_=d.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,_=r.tick,v=xV(xV(xV(xV({textAnchor:f,verticalAnchor:p},m),{},{stroke:`none`,fill:s},h),_),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return S.createElement(Hg,yV({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},lg(i.props,e,n)),o&&S.createElement(`line`,yV({},g,a,{className:Ml(`recharts-cartesian-axis-tick-line`,(0,Rh.default)(o,`className`))})),c&&t.renderTickItem(c,v,`${(0,ug.default)(l)?l(e.value,n):e.value}${u||``}`))});return S.createElement(`g`,{className:`recharts-cartesian-axis-ticks`},_)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,a=t.ticksGenerator,o=t.className;if(t.hide)return null;var s=this.props,c=s.ticks,l=SV(s,_V),u=c;return(0,ug.default)(a)&&(u=c&&c.length>0?a(this.props):a(l)),r<=0||i<=0||!u||!u.length?null:S.createElement(Hg,{className:Ml(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),PM.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=Ml(t.className,`recharts-cartesian-axis-tick-value`);return r=S.isValidElement(e)?S.cloneElement(e,xV(xV({},t),{},{className:i})):(0,ug.default)(e)?e(xV(xV({},t),{},{className:i})):S.createElement(GC,yV({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(S.Component);PV(LV,`displayName`,`CartesianAxis`),PV(LV,`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 RV=[`x1`,`y1`,`x2`,`y2`,`key`],zV=[`offset`];function BV(e){"@babel/helpers - typeof";return BV=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},BV(e)}function VV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?VV(Object(n),!0).forEach(function(t){UV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UV(e,t,n){return t=WV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WV(e){var t=GV(e,`string`);return BV(t)==`symbol`?t:t+``}function GV(e,t){if(BV(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(BV(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function KV(){return KV=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},KV.apply(this,arguments)}function qV(e,t){if(e==null)return{};var n=JV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JV(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 YV=function(e){var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return S.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function XV(e,t){var n;if(S.isValidElement(e))n=S.cloneElement(e,t);else if((0,ug.default)(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=Dg(qV(t,RV),!1);c.offset;var l=qV(c,zV);n=S.createElement(`line`,KV({},l,{x1:r,y1:i,x2:a,y2:o,fill:`none`,key:s}))}return n}function ZV(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0||r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return XV(i,HV(HV({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:`line-${a}`,index:a}))});return S.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},o)}function QV(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0||r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return XV(i,HV(HV({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:`line-${a}`,index:a}))});return S.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},o)}function $V(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length)return null;var l=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==l[0]&&l.unshift(0);var u=l.map(function(e,s){var c=l[s+1]?l[s+1]-e:i+o-e;if(c<=0)return null;var u=s%t.length;return S.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:c,width:a,stroke:`none`,fill:t[u],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return S.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function eH(e){var t=e.vertical,n=t===void 0||t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var n=u[t+1]?u[t+1]-e:a+s-e;if(n<=0)return null;var l=t%r.length;return S.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:n,height:c,stroke:`none`,fill:r[l],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return S.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var tH=function(e,t){var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return Oj(mV(HV(HV(HV({},LV.defaultProps),n),{},{ticks:kj(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},nH=function(e,t){var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return Oj(mV(HV(HV(HV({},LV.defaultProps),n),{},{ticks:kj(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},rH={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[]};function iH(e){var t=Bz(),n=Vz(),r=zz(),i=HV(HV({},e),{},{stroke:e.stroke??rH.stroke,fill:e.fill??rH.fill,horizontal:e.horizontal??rH.horizontal,horizontalFill:e.horizontalFill??rH.horizontalFill,vertical:e.vertical??rH.vertical,verticalFill:e.verticalFill??rH.verticalFill,x:G(e.x)?e.x:r.left,y:G(e.y)?e.y:r.top,width:G(e.width)?e.width:r.width,height:G(e.height)?e.height:r.height}),a=i.x,o=i.y,s=i.width,c=i.height,l=i.syncWithTicks,u=i.horizontalValues,d=i.verticalValues,f=Fz(),p=Iz();if(!G(s)||s<=0||!G(c)||c<=0||!G(a)||a!==+a||!G(o)||o!==+o)return null;var m=i.verticalCoordinatesGenerator||tH,h=i.horizontalCoordinatesGenerator||nH,g=i.horizontalPoints,_=i.verticalPoints;if((!g||!g.length)&&(0,ug.default)(h)){var v=u&&u.length,y=h({yAxis:p?HV(HV({},p),{},{ticks:v?u:p.ticks}):void 0,width:t,height:n,offset:r},v?!0:l);`${BV(y)}`,Array.isArray(y)&&(g=y)}if((!_||!_.length)&&(0,ug.default)(m)){var b=d&&d.length,x=m({xAxis:f?HV(HV({},f),{},{ticks:b?d:f.ticks}):void 0,width:t,height:n,offset:r},b?!0:l);`${BV(x)}`,Array.isArray(x)&&(_=x)}return S.createElement(`g`,{className:`recharts-cartesian-grid`},S.createElement(YV,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(ZV,KV({},i,{offset:r,horizontalPoints:g,xAxis:f,yAxis:p})),S.createElement(QV,KV({},i,{offset:r,verticalPoints:_,xAxis:f,yAxis:p})),S.createElement($V,KV({},i,{horizontalPoints:g})),S.createElement(eH,KV({},i,{verticalPoints:_})))}iH.displayName=`CartesianGrid`;function aH(e){"@babel/helpers - typeof";return aH=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},aH(e)}function oH(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function sH(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,_H(r.key),r)}}function cH(e,t,n){return t&&sH(e.prototype,t),n&&sH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lH(e,t,n){return t=pH(t),uH(e,fH()?Reflect.construct(t,n||[],pH(e).constructor):t.apply(e,n))}function uH(e,t){if(t&&(aH(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return dH(e)}function dH(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function fH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fH=function(){return!!e})()}function pH(e){return pH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pH(e)}function mH(e,t){if(typeof t!=`function`&&t!==null)throw 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&&hH(e,t)}function hH(e,t){return hH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hH(e,t)}function gH(e,t,n){return t=_H(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _H(e){var t=vH(e,`string`);return aH(t)==`symbol`?t:t+``}function vH(e,t){if(aH(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(aH(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yH(){return yH=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},yH.apply(this,arguments)}function bH(e){var t=e.xAxisId,n=Bz(),r=Vz(),i=Pz(t);return i==null?null:S.createElement(LV,yH({},i,{className:Ml(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return kj(e,!0)}}))}var xH=function(e){function t(){return oH(this,t),lH(this,t,arguments)}return mH(t,e),cH(t,[{key:`render`,value:function(){return S.createElement(bH,this.props)}}])}(S.Component);gH(xH,`displayName`,`XAxis`),gH(xH,`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 SH(e){"@babel/helpers - typeof";return SH=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},SH(e)}function CH(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wH(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,PH(r.key),r)}}function TH(e,t,n){return t&&wH(e.prototype,t),n&&wH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EH(e,t,n){return t=AH(t),DH(e,kH()?Reflect.construct(t,n||[],AH(e).constructor):t.apply(e,n))}function DH(e,t){if(t&&(SH(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return OH(e)}function OH(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function kH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kH=function(){return!!e})()}function AH(e){return AH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AH(e)}function jH(e,t){if(typeof t!=`function`&&t!==null)throw 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&&MH(e,t)}function MH(e,t){return MH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MH(e,t)}function NH(e,t,n){return t=PH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=FH(e,`string`);return SH(t)==`symbol`?t:t+``}function FH(e,t){if(SH(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(SH(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function IH(){return IH=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},IH.apply(this,arguments)}var LH=function(e){var t=e.yAxisId,n=Bz(),r=Vz(),i=Lz(t);return i==null?null:S.createElement(LV,IH({},i,{className:Ml(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return kj(e,!0)}}))},RH=function(e){function t(){return CH(this,t),EH(this,t,arguments)}return jH(t,e),TH(t,[{key:`render`,value:function(){return S.createElement(LH,this.props)}}])}(S.Component);NH(RH,`displayName`,`YAxis`),NH(RH,`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 zH(e){return UH(e)||HH(e)||VH(e)||BH()}function BH(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VH(e,t){if(e){if(typeof e==`string`)return WH(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 WH(e,t)}}function HH(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function UH(e){if(Array.isArray(e))return WH(e)}function WH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var GH=function(e,t,n,r,i){var a=xg(e,hB),o=xg(e,PB),s=[].concat(zH(a),zH(o)),c=xg(e,$B),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&mR(t.props,`extendDomain`)&&G(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f=`${u}1`,p=`${u}2`;d=c.reduce(function(e,t){if(t.props[l]===n&&mR(t.props,`extendDomain`)&&G(t.props[f])&&G(t.props[p])){var r=t.props[f],i=t.props[p];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},d)}return i&&i.length&&(d=i.reduce(function(e,t){return G(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},KH=new(l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))())).default,qH=`recharts.syncMouseEvents`;function JH(e){"@babel/helpers - typeof";return JH=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JH(e)}function YH(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function XH(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,$H(r.key),r)}}function ZH(e,t,n){return t&&XH(e.prototype,t),n&&XH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QH(e,t,n){return t=$H(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $H(e){var t=eU(e,`string`);return JH(t)==`symbol`?t:t+``}function eU(e,t){if(JH(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JH(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var tU=function(){function e(){YH(this,e),QH(this,`activeIndex`,0),QH(this,`coordinateList`,[]),QH(this,`layout`,`horizontal`)}return ZH(e,[{key:`setDetails`,value:function(e){var t=e.coordinateList,n=t===void 0?null:t,r=e.container,i=r===void 0?null:r,a=e.layout,o=a===void 0?null:a,s=e.offset,c=s===void 0?null:s,l=e.mouseHandlerCallback,u=l===void 0?null:l;this.coordinateList=n??this.coordinateList??[],this.container=i??this.container,this.layout=o??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=u??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(e){if(this.coordinateList.length!==0)switch(e.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;default:break}}},{key:`setIndex`,value:function(e){this.activeIndex=e}},{key:`spoofMouse`,value:function(){if(this.layout===`horizontal`&&this.coordinateList.length!==0){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,i=this.coordinateList[this.activeIndex].coordinate,a=window?.scrollX||0,o=window?.scrollY||0,s=t+i+a,c=n+this.offset.top+r/2+o;this.mouseHandlerCallback({pageX:s,pageY:c})}}}])}();function nU(e,t,n){if(n===`number`&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&G(r)&&G(i))return!0}return!1}function rU(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 iU(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[oM(t,n,r,i),oM(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function aU(e,t,n){var r,i,a,o;if(e===`horizontal`)r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e===`vertical`)i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e===`centric`){var s=t.cx,c=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.angle,f=oM(s,c,l,d),p=oM(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return iU(t);return[{x:r,y:i},{x:a,y:o}]}function oU(e){"@babel/helpers - typeof";return oU=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},oU(e)}function sU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sU(Object(n),!0).forEach(function(t){lU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lU(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=dU(e,`string`);return oU(t)==`symbol`?t:t+``}function dU(e,t){if(oU(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(oU(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function fU(e){var t=e.element,n=e.tooltipEventType,r=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,c=e.tooltipAxisBandSize,l=e.layout,u=e.chartName,d=t.props.cursor??t.type.defaultProps?.cursor;if(!t||!d||!r||!i||u!==`ScatterChart`&&n!==`axis`)return null;var f,p=jN;if(u===`ScatterChart`)f=i,p=VI;else if(u===`BarChart`)f=rU(l,i,o,c),p=DI;else if(l===`radial`){var m=iU(i),h=m.cx,g=m.cy,_=m.radius;f={cx:h,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:_,outerRadius:_},p=_N}else f={points:aU(l,i,o)},p=jN;var v=cU(cU(cU(cU({stroke:`#ccc`,pointerEvents:`none`},o),f),Dg(d,!1)),{},{payload:a,payloadIndex:s,className:Ml(`recharts-tooltip-cursor`,d.className)});return(0,S.isValidElement)(d)?(0,S.cloneElement)(d,v):(0,S.createElement)(p,v)}var pU=[`item`],mU=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];function hU(e){"@babel/helpers - typeof";return hU=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hU(e)}function gU(){return gU=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},gU.apply(this,arguments)}function _U(e,t){return bU(e)||yU(e,t)||FU(e,t)||vU()}function vU(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yU(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function bU(e){if(Array.isArray(e))return e}function xU(e,t){if(e==null)return{};var n=SU(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SU(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 CU(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wU(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,BU(r.key),r)}}function TU(e,t,n){return t&&wU(e.prototype,t),n&&wU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EU(e,t,n){return t=AU(t),DU(e,kU()?Reflect.construct(t,n||[],AU(e).constructor):t.apply(e,n))}function DU(e,t){if(t&&(hU(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return OU(e)}function OU(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function kU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kU=function(){return!!e})()}function AU(e){return AU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AU(e)}function jU(e,t){if(typeof t!=`function`&&t!==null)throw 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&&MU(e,t)}function MU(e,t){return MU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MU(e,t)}function NU(e){return LU(e)||IU(e)||FU(e)||PU()}function PU(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FU(e,t){if(e){if(typeof e==`string`)return RU(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 RU(e,t)}}function IU(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function LU(e){if(Array.isArray(e))return RU(e)}function RU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zU(Object(n),!0).forEach(function(t){q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q(e,t,n){return t=BU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BU(e){var t=VU(e,`string`);return hU(t)==`symbol`?t:t+``}function VU(e,t){if(hU(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hU(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var HU={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},UU={width:`100%`,height:`100%`},WU={x:0,y:0};function GU(e){return e}var KU=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},qU=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.y};if(e===`vertical`)return{x:r.x,y:i.coordinate};if(e===`centric`){var a=i.coordinate,o=r.radius;return K(K(K({},r),oM(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return K(K(K({},r),oM(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return WU},JU=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,a=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(NU(e),NU(n)):e},[]);return a.length>0?a:e&&e.length&&G(r)&&G(i)?e.slice(r,i+1):[]};function YU(e){return e===`number`?[0,`auto`]:void 0}var XU=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=JU(t,e);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(i,s){var c=s.props.data??t;c&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1));var l=a.dataKey&&!a.allowDuplicatedCategory?Zh(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(NU(i),[Zj(s,l)]):i},[])},ZU=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=KU(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=vj(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:XU(e,t,l,u),activeCoordinate:qU(n,o,l,i)}}return null},QU=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=e.stackOffset,f=Dj(l,i);return n.reduce(function(t,n){var p=n.type.defaultProps===void 0?n.props:K(K({},n.type.defaultProps),n.props),m=p.type,h=p.dataKey,g=p.allowDataOverflow,_=p.allowDuplicatedCategory,v=p.scale,y=p.ticks,b=p.includeHidden,x=p[a];if(t[x])return t;var S=JU(e.data,{graphicalItems:r.filter(function(e){return(a in e.props?e.props[a]:e.type.defaultProps?.[a])===x}),dataStartIndex:s,dataEndIndex:c}),C=S.length,w,T,E;nU(p.domain,g,m)&&(w=Jj(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=_j(S,h,`category`)));var D=YU(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=_j(S,h,m),m===`category`&&f){var k=Yh(w);_&&k?(T=w,w=(0,GL.default)(0,C)):_||(w=Xj(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(NU(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,Bh.default)(e)}):Xj(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,Bh.default)(t)?e:[].concat(NU(e),[t])},[]);else if(m===`number`){var A=Tj(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===x&&(b||!n)}),h,i,l);A&&(w=A)}f&&(m===`number`||v!==`auto`)&&(E=_j(S,h,`category`))}else w=f?(0,GL.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:Gj(o[x].stackGroups,s,c):Ej(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(b||!n)}),m,l,!0);if(m===`number`)w=GH(u,w,x,i,y),O&&(w=Jj(O,w,g));else if(m===`category`&&O){var j=O;w.every(function(e){return j.indexOf(e)>=0})&&(w=j)}}return K(K({},t),{},q({},x,K(K({},p),{},{axisType:i,domain:w,categoricalDomain:E,duplicateDomain:T,originalDomain:p.domain??D,isCategorical:f,layout:l})))},{})},$U=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=JU(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=Dj(l,i),m=-1;return n.reduce(function(e,t){var h=(t.type.defaultProps===void 0?t.props:K(K({},t.type.defaultProps),t.props))[a],g=YU(`number`);if(!e[h]){m++;var _;return p?_=(0,GL.default)(0,f):o&&o[h]&&o[h].hasStack?(_=Gj(o[h].stackGroups,s,c),_=GH(u,_,h,i)):(_=Jj(g,Ej(d,n.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===h&&!n}),`number`,l),r.defaultProps.allowDataOverflow),_=GH(u,_,h,i)),K(K({},e),{},q({},h,K(K({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,Rh.default)(HU,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},eW=function(e,t){var n=t.axisType,r=n===void 0?`xAxis`:n,i=t.AxisComp,a=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.children,u=`${r}Id`,d=xg(l,i),f={};return d&&d.length?f=QU(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=$U(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},tW=function(e){var t=Jh(e),n=kj(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,fx.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:Yj(t,n)}},nW=function(e){var t=e.children,n=e.defaultShowTooltip,r=Sg(t,dR),i=0,a=0;return e.data&&e.data.length!==0&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},rW=function(e){return!e||!e.length?!1:e.some(function(e){var t=_g(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},iW=function(e){return e===`horizontal`?{numericAxisName:`yAxis`,cateAxisName:`xAxis`}:e===`vertical`?{numericAxisName:`xAxis`,cateAxisName:`yAxis`}:e===`centric`?{numericAxisName:`radiusAxis`,cateAxisName:`angleAxis`}:{numericAxisName:`angleAxis`,cateAxisName:`radiusAxis`}},aW=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,a=i===void 0?{}:i,o=e.yAxisMap,s=o===void 0?{}:o,c=n.width,l=n.height,u=n.children,d=n.margin||{},f=Sg(u,dR),p=Sg(u,Wb),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return!n.mirror&&!n.hide?K(K({},e),{},q({},r,e[r]+n.width)):e},{left:d.left||0,right:d.right||0}),h=K(K({},Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return!n.mirror&&!n.hide?K(K({},e),{},q({},r,(0,Rh.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||dR.defaultProps.height),p&&t&&(h=Sj(h,r,n,t));var _=c-h.left-h.right,v=l-h.top-h.bottom;return K(K({brushBottom:g},h),{},{width:Math.max(_,0),height:Math.max(v,0)})},oW=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},sW=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=r===void 0?`axis`:r,a=e.validateTooltipEventTypes,o=a===void 0?[`axis`]:a,s=e.axisComponents,c=e.legendContent,l=e.formatAxisMap,u=e.defaultProps,d=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,a=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,l=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=iW(u),h=m.numericAxisName,g=m.cateAxisName,_=rW(n),v=[];return n.forEach(function(n,m){var y=JU(e.data,{graphicalItems:[n],dataStartIndex:o,dataEndIndex:c}),b=n.type.defaultProps===void 0?n.props:K(K({},n.type.defaultProps),n.props),x=b.dataKey,S=b.maxBarSize,C=b[`${h}Id`],w=b[`${g}Id`],T=s.reduce(function(e,n){var r=t[`${n.axisType}Map`],i=b[`${n.axisType}Id`];!(r&&r[i]||n.axisType===`zAxis`)&&xA(!1);var a=r[i];return K(K({},e),{},q(q({},n.axisType,a),`${n.axisType}Ticks`,kj(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&Uj(n,r[C].stackGroups),k=_g(n.type).indexOf(`Bar`)>=0,A=Yj(E,D),j=[],M=_&&bj({barSize:l,stackGroups:r,totalSize:oW(T,g)});if(k){var N=(0,Bh.default)(S)?p:S,P=Yj(E,D,!0)??N??0;j=xj({barGap:d,barCategoryGap:f,bandSize:P===A?A:P,sizeList:M[w],maxBarSize:N}),P!==A&&(j=j.map(function(e){return K(K({},e),{},{position:K(K({},e.position),{},{offset:e.position.offset-P/2})})}))}var ee=n&&n.type&&n.type.getComposedData;ee&&v.push({props:K(K({},ee(K(K({},T),{},{displayedData:y,props:e,dataKey:x,item:n,bandSize:A,barPosition:j,offset:i,stackedData:O,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},q(q(q({key:n.key||`item-${m}`},h,T[h]),g,T[g]),`animationId`,a)),childIndex:Mg(n,e.children),item:n})}),v},f=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!Cg({props:i}))return null;var u=i.children,f=i.layout,p=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=iW(f),_=g.numericAxisName,v=g.cateAxisName,y=xg(u,n),b=zj(m,y,`${_}Id`,`${v}Id`,p,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return K(K({},e),{},q({},n,eW(i,K(K({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=aW(K(K({},x),{},{props:i,graphicalItems:y}),r?.legendBBox);Object.keys(x).forEach(function(e){x[e]=l(i,x[e],S,e.replace(`Map`,``),t)});var C=x[`${v}Map`],w=tW(C);return K(K({formattedGraphicalItems:d(i,K(K({},x),{},{dataStartIndex:a,dataEndIndex:o,updateId:c,graphicalItems:y,stackGroups:b,offset:S})),graphicalItems:y,offset:S,stackGroups:b},w),x)},p=function(e){function n(e){var r;return CU(this,n),r=EU(this,n,[e]),q(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),q(r,`accessibilityManager`,new tU),q(r,`handleLegendBBoxUpdate`,function(e){if(e){var t=r.state,n=t.dataStartIndex,i=t.dataEndIndex,a=t.updateId;r.setState(K({legendBBox:e},f({props:r.props,dataStartIndex:n,dataEndIndex:i,updateId:a},K(K({},r.state),{},{legendBBox:e}))))}}),q(r,`handleReceiveSyncEvent`,function(e,t,n){if(r.props.syncId===e){if(n===r.eventEmitterSymbol&&typeof r.props.syncMethod!=`function`)return;r.applySyncEvent(t)}}),q(r,`handleBrushChange`,function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var i=r.state.updateId;r.setState(function(){return K({dataStartIndex:t,dataEndIndex:n},f({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:i},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),q(r,`handleMouseEnter`,function(e){var t=r.getMouseInfo(e);if(t){var n=K(K({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseEnter;(0,ug.default)(i)&&i(n,e)}}),q(r,`triggeredAfterMouseMove`,function(e){var t=r.getMouseInfo(e),n=t?K(K({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseMove;(0,ug.default)(i)&&i(n,e)}),q(r,`handleItemMouseEnter`,function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),q(r,`handleItemMouseLeave`,function(){r.setState(function(){return{isTooltipActive:!1}})}),q(r,`handleMouseMove`,function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),q(r,`handleMouseLeave`,function(e){r.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;(0,ug.default)(n)&&n(t,e)}),q(r,`handleOuterEvent`,function(e){var t=jg(e),n=(0,Rh.default)(r.props,`${t}`);t&&(0,ug.default)(n)&&n((/.*touch.*/i.test(t)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))??{},e)}),q(r,`handleClick`,function(e){var t=r.getMouseInfo(e);if(t){var n=K(K({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onClick;(0,ug.default)(i)&&i(n,e)}}),q(r,`handleMouseDown`,function(e){var t=r.props.onMouseDown;(0,ug.default)(t)&&t(r.getMouseInfo(e),e)}),q(r,`handleMouseUp`,function(e){var t=r.props.onMouseUp;(0,ug.default)(t)&&t(r.getMouseInfo(e),e)}),q(r,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),q(r,`handleTouchStart`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),q(r,`handleTouchEnd`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),q(r,`handleDoubleClick`,function(e){var t=r.props.onDoubleClick;(0,ug.default)(t)&&t(r.getMouseInfo(e),e)}),q(r,`handleContextMenu`,function(e){var t=r.props.onContextMenu;(0,ug.default)(t)&&t(r.getMouseInfo(e),e)}),q(r,`triggerSyncEvent`,function(e){r.props.syncId!==void 0&&KH.emit(qH,r.props.syncId,e,r.eventEmitterSymbol)}),q(r,`applySyncEvent`,function(e){var t=r.props,n=t.layout,i=t.syncMethod,a=r.state.updateId,o=e.dataStartIndex,s=e.dataEndIndex;if(e.dataStartIndex!==void 0||e.dataEndIndex!==void 0)r.setState(K({dataStartIndex:o,dataEndIndex:s},f({props:r.props,dataStartIndex:o,dataEndIndex:s,updateId:a},r.state)));else if(e.activeTooltipIndex!==void 0){var c=e.chartX,l=e.chartY,u=e.activeTooltipIndex,d=r.state,p=d.offset,m=d.tooltipTicks;if(!p)return;if(typeof i==`function`)u=i(m,e);else if(i===`value`){u=-1;for(var h=0;h<m.length;h++)if(m[h].value===e.activeLabel){u=h;break}}var g=K(K({},p),{},{x:p.left,y:p.top}),_=Math.min(c,g.x+g.width),v=Math.min(l,g.y+g.height),y=m[u]&&m[u].value,b=XU(r.state,r.props.data,u),x=m[u]?{x:n===`horizontal`?m[u].coordinate:_,y:n===`horizontal`?v:m[u].coordinate}:WU;r.setState(K(K({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else r.setState(e)}),q(r,`renderCursor`,function(e){var n=r.state,i=n.isTooltipActive,a=n.activeCoordinate,o=n.activePayload,s=n.offset,c=n.activeTooltipIndex,l=n.tooltipAxisBandSize,u=r.getTooltipEventType(),d=e.props.active??i,f=r.props.layout,p=e.key||`_recharts-cursor`;return S.createElement(fU,{key:p,activeCoordinate:a,activePayload:o,activeTooltipIndex:c,chartName:t,element:e,isActive:d,layout:f,offset:s,tooltipAxisBandSize:l,tooltipEventType:u})}),q(r,`renderPolarAxis`,function(e,t,n){var i=(0,Rh.default)(e,`type.axisType`),a=(0,Rh.default)(r.state,`${i}Map`),o=e.type.defaultProps,s=o===void 0?e.props:K(K({},o),e.props),c=a&&a[s[`${i}Id`]];return(0,S.cloneElement)(e,K(K({},c),{},{className:Ml(i,c.className),key:e.key||`${t}-${n}`,ticks:kj(c,!0)}))}),q(r,`renderPolarGrid`,function(e){var t=e.props,n=t.radialLines,i=t.polarAngles,a=t.polarRadius,o=r.state,s=o.radiusAxisMap,c=o.angleAxisMap,l=Jh(s),u=Jh(c),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,S.cloneElement)(e,{polarAngles:Array.isArray(i)?i:kj(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:kj(l,!0).map(function(e){return e.coordinate}),cx:d,cy:f,innerRadius:p,outerRadius:m,key:e.key||`polar-grid`,radialLines:n})}),q(r,`renderLegend`,function(){var e=r.state.formattedGraphicalItems,t=r.props,n=t.children,i=t.width,a=t.height,o=r.props.margin||{},s=$A({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item;return(0,S.cloneElement)(l,K(K({},xU(s,pU)),{},{chartWidth:i,chartHeight:a,margin:o,onBBoxUpdate:r.handleLegendBBoxUpdate}))}),q(r,`renderTooltip`,function(){var e=r.props,t=e.children,n=e.accessibilityLayer,i=Sg(t,xS);if(!i)return null;var a=r.state,o=a.isTooltipActive,s=a.activeCoordinate,c=a.activePayload,l=a.activeLabel,u=a.offset,d=i.props.active??o;return(0,S.cloneElement)(i,{viewBox:K(K({},u),{},{x:u.left,y:u.top}),active:d,label:l,payload:d?c:[],coordinate:s,accessibilityLayer:n})}),q(r,`renderBrush`,function(e){var t=r.props,n=t.margin,i=t.data,a=r.state,o=a.offset,s=a.dataStartIndex,c=a.dataEndIndex,l=a.updateId;return(0,S.cloneElement)(e,{key:e.key||`_recharts-brush`,onChange:jj(r.handleBrushChange,e.props.onChange),data:i,x:G(e.props.x)?e.props.x:o.left,y:G(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(n.bottom||0),width:G(e.props.width)?e.props.width:o.width,startIndex:s,endIndex:c,updateId:`brush-${l}`})}),q(r,`renderReferenceElement`,function(e,t,n){if(!e)return null;var i=r.clipPathId,a=r.state,o=a.xAxisMap,s=a.yAxisMap,c=a.offset,l=e.type.defaultProps||{},u=e.props,d=u.xAxisId,f=d===void 0?l.xAxisId:d,p=u.yAxisId,m=p===void 0?l.yAxisId:p;return(0,S.cloneElement)(e,{key:e.key||`${t}-${n}`,xAxis:o[f],yAxis:s[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:i})}),q(r,`renderActivePoints`,function(e){var t=e.item,r=e.activePoint,i=e.basePoint,a=e.childIndex,o=e.isRange,s=[],c=t.props.key,l=t.item.type.defaultProps===void 0?t.item.props:K(K({},t.item.type.defaultProps),t.item.props),u=l.activeDot,d=l.dataKey,f=K(K({index:a,dataKey:d,cx:r.x,cy:r.y,r:4,fill:yj(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},Dg(u,!1)),sg(u));return s.push(n.renderActiveDot(u,f,`${c}-activePoint-${a}`)),i?s.push(n.renderActiveDot(u,K(K({},f),{},{cx:i.x,cy:i.y}),`${c}-basePoint-${a}`)):o&&s.push(null),s}),q(r,`renderGraphicChild`,function(e,t,n){var i=r.filterFormatItem(e,t,n);if(!i)return null;var a=r.getTooltipEventType(),o=r.state,s=o.isTooltipActive,c=o.tooltipAxis,l=o.activeTooltipIndex,u=o.activeLabel,d=r.props.children,f=Sg(d,xS),p=i.props,m=p.points,h=p.isRange,g=p.baseLine,_=i.item.type.defaultProps===void 0?i.item.props:K(K({},i.item.type.defaultProps),i.item.props),v=_.activeDot,y=_.hide,b=_.activeBar,x=_.activeShape,C=!!(!y&&s&&f&&(v||b||x)),w={};a!==`axis`&&f&&f.props.trigger===`click`?w={onClick:jj(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:jj(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:jj(r.handleItemMouseEnter,e.props.onMouseEnter)});var T=(0,S.cloneElement)(e,K(K({},i.props),w));function E(e){return typeof c.dataKey==`function`?c.dataKey(e.payload):null}if(C)if(l>=0){var D,O;if(c.dataKey&&!c.allowDuplicatedCategory){var k=typeof c.dataKey==`function`?E:`payload.${c.dataKey.toString()}`;D=Zh(m,k,u),O=h&&g&&Zh(g,k,u)}else D=m?.[l],O=h&&g&&g[l];if(x||b){var A=e.props.activeIndex===void 0?l:e.props.activeIndex;return[(0,S.cloneElement)(e,K(K(K({},i.props),w),{},{activeIndex:A})),null,null]}if(!(0,Bh.default)(D))return[T].concat(NU(r.renderActivePoints({item:i,activePoint:D,basePoint:O,childIndex:l,isRange:h})))}else{var j=(r.getItemByXY(r.state.activeCoordinate)??{graphicalItem:T}).graphicalItem,M=j.item,N=M===void 0?e:M,P=j.childIndex;return[(0,S.cloneElement)(N,K(K(K({},i.props),w),{},{activeIndex:P})),null,null]}return h?[T,null,null]:[T,null]}),q(r,`renderCustomized`,function(e,t,n){return(0,S.cloneElement)(e,K(K({key:`recharts-customized-${n}`},r.props),r.state))}),q(r,`renderMap`,{CartesianGrid:{handler:GU,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:GU},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:GU},YAxis:{handler:GU},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId=`${e.id??Kh(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,DS.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return jU(n,e),TU(n,[{key:`componentDidMount`,value:function(){this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:this.props.margin.left??0,top:this.props.margin.top??0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:`displayDefaultTooltip`,value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,a=Sg(t,xS);if(a){var o=a.props.defaultIndex;if(!(typeof o!=`number`||o<0||o>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[o]&&this.state.tooltipTicks[o].value,c=XU(this.state,n,o,s),l=this.state.tooltipTicks[o].coordinate,u=(this.state.offset.top+r)/2,d=i===`horizontal`?{x:l,y:u}:{y:l,x:u},f=this.state.formattedGraphicalItems.find(function(e){return e.item.type.name===`Scatter`});f&&(d=K(K({},d),f.props.points[o].tooltipPosition),c=f.props.points[o].tooltipPayload);var p={activeTooltipIndex:o,isTooltipActive:!0,activeLabel:s,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(o)}}}},{key:`getSnapshotBeforeUpdate`,value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:this.props.margin.left??0,top:this.props.margin.top??0}}),null):null}},{key:`componentDidUpdate`,value:function(e){Og([Sg(e.children,xS)],[Sg(this.props.children,xS)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=Sg(this.props.children,xS);if(e&&typeof e.props.shared==`boolean`){var t=e.props.shared?`axis`:`item`;return o.indexOf(t)>=0?t:i}return i}},{key:`getMouseInfo`,value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=eC(n),i={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,o=this.inRange(i.chartX,i.chartY,a);if(!o)return null;var s=this.state,c=s.xAxisMap,l=s.yAxisMap,u=this.getTooltipEventType(),d=ZU(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=Jh(c).scale,p=Jh(l).scale,m=f&&f.invert?f.invert(i.chartX):null,h=p&&p.invert?p.invert(i.chartY):null;return K(K({},i),{},{xValue:m,yValue:h},d)}return d?K(K({},i),d):null}},{key:`inRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=this.props.layout,i=e/n,a=t/n;if(r===`horizontal`||r===`vertical`){var o=this.state.offset;return i>=o.left&&i<=o.left+o.width&&a>=o.top&&a<=o.top+o.height?{x:i,y:a}:null}var s=this.state,c=s.angleAxisMap,l=s.radiusAxisMap;if(c&&l){var u=Jh(c);return dM({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Sg(e,xS),r={};return n&&t===`axis`&&(r=n.props.trigger===`click`?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),K(K({},sg(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){KH.on(qH,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){KH.removeListener(qH,this.handleReceiveSyncEvent)}},{key:`filterFormatItem`,value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,a=r.length;i<a;i++){var o=r[i];if(o.item===e||o.props.key===e.key||t===_g(o.item.type)&&n===o.childIndex)return o}return null}},{key:`renderClipPath`,value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,a=t.width;return S.createElement(`defs`,null,S.createElement(`clipPath`,{id:e},S.createElement(`rect`,{x:n,y:r,height:i,width:a})))}},{key:`getXScales`,value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=_U(t,2),r=n[0],i=n[1];return K(K({},e),{},q({},r,i.scale))},{}):null}},{key:`getYScales`,value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=_U(t,2),r=n[0],i=n[1];return K(K({},e),{},q({},r,i.scale))},{}):null}},{key:`getXScaleByAxisId`,value:function(e){var t;return(t=this.state.xAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getYScaleByAxisId`,value:function(e){var t;return(t=this.state.yAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getItemByXY`,value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=o.props,c=o.item,l=c.type.defaultProps===void 0?c.props:K(K({},c.type.defaultProps),c.props),u=_g(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return TI(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return dM(e,t)});if(f)return{graphicalItem:o,payload:f}}else if(CL(o,r)||wL(o,r)||TL(o,r)){var p=ML({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:K(K({},o),{},{childIndex:m}),payload:TL(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!Cg(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,a=t.height,o=t.style,s=t.compact,c=t.title,l=t.desc,u=Dg(xU(t,mU),!1);if(s)return S.createElement(Mz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(Lg,gU({},u,{width:i,height:a,title:c,desc:l}),this.renderClipPath(),Ag(n,this.renderMap)));this.props.accessibilityLayer&&(u.tabIndex=this.props.tabIndex??0,u.role=this.props.role??`application`,u.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},u.onFocus=function(){e.accessibilityManager.focus()});var d=this.parseEventsOfWrapper();return S.createElement(Mz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(`div`,gU({className:Ml(`recharts-wrapper`,r),style:K({position:`relative`,cursor:`default`,width:i,height:a},o)},d,{ref:function(t){e.container=t}}),S.createElement(Lg,gU({},u,{width:i,height:a,title:c,desc:l,style:UU}),this.renderClipPath(),Ag(n,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);q(p,`displayName`,t),q(p,`defaultProps`,K({layout:`horizontal`,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`},u)),q(p,`getDerivedStateFromProps`,function(e,t){var n=e.dataKey,r=e.data,i=e.children,a=e.width,o=e.height,s=e.layout,c=e.stackOffset,l=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(t.updateId===void 0){var p=nW(e);return K(K(K({},p),{},{updateId:0},f(K(K({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||o!==t.prevHeight||s!==t.prevLayout||c!==t.prevStackOffset||!$h(l,t.prevMargin)){var m=nW(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=K(K({},ZU(t,r,s)),{},{updateId:t.updateId+1}),_=K(K(K({},m),h),g);return K(K(K({},_),f(K({props:e},_),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(!Og(i,t.prevChildren)){var v=Sg(i,dR),y=v?v.props?.startIndex??u:u,b=v?v.props?.endIndex??d:d,x=y!==u||b!==d,S=!(0,Bh.default)(r)&&!x?t.updateId:t.updateId+1;return K(K({updateId:S},f(K(K({props:e},t),{},{updateId:S,dataStartIndex:y,dataEndIndex:b}),t)),{},{prevChildren:i,dataStartIndex:y,dataEndIndex:b})}return null}),q(p,`renderActiveDot`,function(e,t,n){var r=(0,S.isValidElement)(e)?(0,S.cloneElement)(e,t):(0,ug.default)(e)?e(t):S.createElement(kI,t);return S.createElement(Hg,{className:`recharts-active-dot`,key:n},r)});var m=(0,S.forwardRef)(function(e,t){return S.createElement(p,gU({},e,{ref:t}))});return m.displayName=p.displayName,m}({chartName:`BarChart`,GraphicalChild:ez,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:xH},{axisType:`yAxis`,AxisComp:RH}],formatAxisMap:fz}),J={getStaff:e=>U.get(`/admin/staff`,e),getStaffDetail:e=>U.get(`/admin/staff/${e}`),createStaff:e=>U.post(`/admin/staff`,e),updateStaff:(e,t)=>U.put(`/admin/staff/${e}`,t),deleteStaff:e=>U.del(`/admin/staff/${e}`),resetStaffPassword:e=>U.post(`/admin/staff/${e}/reset-password`),toggleStaffActive:e=>U.post(`/admin/staff/${e}/toggle-active`),getActivityLogs:e=>U.get(`/admin/activity-logs`,e),getBlockedDates:e=>U.get(`/admin/scheduling/blocked-dates`,e),createBlockedDate:e=>U.post(`/admin/scheduling/blocked-dates`,e),updateBlockedDate:(e,t)=>U.put(`/admin/scheduling/blocked-dates/${e}`,t),deleteBlockedDate:e=>U.del(`/admin/scheduling/blocked-dates/${e}`),getTimeSlots:()=>U.get(`/admin/scheduling/time-slots`),createTimeSlot:e=>U.post(`/admin/scheduling/time-slots`,e),updateTimeSlot:(e,t)=>U.put(`/admin/scheduling/time-slots/${e}`,t),getAvailableSlots:e=>U.get(`/admin/scheduling/available-slots`,{date:e}),getCalendar:(e,t)=>U.get(`/admin/scheduling/calendar`,{month:e,year:t}),getProducts:e=>U.get(`/admin/products`,e),getProduct:e=>U.get(`/admin/products/${e}`),createProduct:e=>U.post(`/admin/products`,e),updateProduct:(e,t)=>U.put(`/admin/products/${e}`,t),deleteProduct:e=>U.del(`/admin/products/${e}`),uploadProductImages:(e,t)=>U.post(`/admin/products/${e}/images`,t),getProductVariants:e=>U.get(`/admin/products/${e}/variants`),createProductVariant:(e,t)=>U.post(`/admin/products/${e}/variants`,t),updateVariant:(e,t)=>U.put(`/admin/variants/${e}`,t),deleteVariant:e=>U.del(`/admin/variants/${e}`),uploadVariantImages:(e,t)=>U.post(`/admin/variants/${e}/images`,t),getAddOns:e=>U.get(`/admin/add-ons`,e),createAddOn:e=>U.post(`/admin/add-ons`,e),updateAddOn:(e,t)=>U.put(`/admin/add-ons/${e}`,t),deleteAddOn:e=>U.del(`/admin/add-ons/${e}`),getCategories:e=>U.get(`/admin/categories`,e),createCategory:e=>U.post(`/admin/categories`,e),updateCategory:(e,t)=>U.put(`/admin/categories/${e}`,t),deleteCategory:e=>U.del(`/admin/categories/${e}`),getDeliveryZones:e=>U.get(`/admin/delivery-zones`,e),createDeliveryZone:e=>U.post(`/admin/delivery-zones`,e),updateDeliveryZone:(e,t)=>U.put(`/admin/delivery-zones/${e}`,t),deleteDeliveryZone:e=>U.del(`/admin/delivery-zones/${e}`),getOrders:e=>U.get(`/admin/orders`,e),getOrder:e=>U.get(`/admin/orders/${e}`),updateOrderStatus:(e,t)=>U.put(`/admin/orders/${e}/status`,t),updateOrderPayment:(e,t)=>U.put(`/admin/orders/${e}/payment`,t),getCustomers:e=>U.get(`/admin/customers`,e),getCustomer:e=>U.get(`/admin/customers/${e}`),getDashboardSummary:()=>U.get(`/admin/stats/summary`),getSettings:()=>U.get(`/admin/settings`),updateSettings:e=>U.post(`/admin/settings`,e),changePassword:e=>U.post(`/admin/change-password`,e)},cW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e),lW={completed:`bg-green-100 text-green-700`,processing:`bg-blue-100 text-blue-700`,ready_for_pickup:`bg-purple-100 text-purple-700`,out_for_delivery:`bg-orange-100 text-orange-700`,cancelled:`bg-red-100 text-red-700`,pending_payment:`bg-gray-100 text-gray-700`};function uW(){let e=dt(),{data:t,isLoading:n,isError:r,error:i}=Ei({queryKey:[`admin`,`dashboard-summary`],queryFn:()=>J.getDashboardSummary()}),a=t?.revenue??{},o=t?.total_orders??0,s=t?.total_customers??0,c=t?.top_products??[],l=t?.recent_orders??[],u=t?.order_status_counts??[],d=[{label:`Today`,amount:Number(a.revenue_today??0)},{label:`This Week`,amount:Number(a.revenue_this_week??0)},{label:`This Month`,amount:Number(a.revenue_this_month??0)}],f=u.map(e=>({status:e.order_status.replace(/_/g,` `),count:e.count}));return n?(0,L.jsx)(`div`,{className:`grid place-items-center py-24`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):r?(0,L.jsxs)(pm,{className:`p-6 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load dashboard data.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(i)})]}):(0,L.jsxs)(`div`,{className:`space-y-4 md:space-y-6`,children:[(0,L.jsxs)(`div`,{className:`mb-4 md:mb-6`,children:[(0,L.jsx)(`h1`,{className:`text-2xl md:text-3xl font-display text-forest`,children:`Dashboard`}),(0,L.jsx)(`p`,{className:`text-sm md:text-base text-muted-foreground mt-1`,children:`Welcome to Flora & Creations Admin`})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4`,children:[(0,L.jsx)(pm,{className:`p-4 md:p-6`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-xs md:text-sm text-muted-foreground`,children:`Total Revenue (confirmed)`}),(0,L.jsx)(`p`,{className:`text-xl md:text-2xl font-bold text-forest mt-1`,children:cW(Number(a.revenue_confirmed??0))}),(0,L.jsxs)(`p`,{className:`text-muted-foreground text-xs mt-2`,children:[cW(Number(a.revenue_total??0)),` total across all orders`]})]}),(0,L.jsx)(Uf,{className:`w-6 h-6 md:w-8 md:h-8 text-sage flex-shrink-0 ml-2`})]})}),(0,L.jsx)(pm,{className:`p-4 md:p-6`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-xs md:text-sm text-muted-foreground`,children:`Total Orders`}),(0,L.jsx)(`p`,{className:`text-xl md:text-2xl font-bold text-forest mt-1`,children:o}),(0,L.jsxs)(`p`,{className:`text-muted-foreground text-xs mt-2`,children:[t?.pending_fulfillment??0,` awaiting fulfillment`]})]}),(0,L.jsx)(If,{className:`w-6 h-6 md:w-8 md:h-8 text-forest flex-shrink-0 ml-2`})]})}),(0,L.jsx)(pm,{className:`p-4 md:p-6`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-xs md:text-sm text-muted-foreground`,children:`Total Customers`}),(0,L.jsx)(`p`,{className:`text-xl md:text-2xl font-bold text-forest mt-1`,children:s})]}),(0,L.jsx)(Jf,{className:`w-6 h-6 md:w-8 md:h-8 text-taupe flex-shrink-0 ml-2`})]})}),(0,L.jsx)(pm,{className:`p-4 md:p-6`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-xs md:text-sm text-muted-foreground`,children:`Payment Proof Pending`}),(0,L.jsx)(`p`,{className:`text-xl md:text-2xl font-bold text-forest mt-1`,children:t?.pending_verification??0}),(0,L.jsxs)(`p`,{className:`text-rose text-xs mt-2`,children:[t?.today_scheduled??0,` scheduled today`]})]}),(0,L.jsx)(Df,{className:`w-6 h-6 md:w-8 md:h-8 text-rose flex-shrink-0 ml-2`})]})})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4 md:gap-6`,children:[(0,L.jsxs)(pm,{className:`p-4 md:p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Revenue Snapshot`}),(0,L.jsx)(`div`,{className:`w-full h-64 md:h-80`,children:(0,L.jsx)(BS,{width:`100%`,height:`100%`,children:(0,L.jsxs)(sW,{data:d,margin:{top:5,right:10,left:-20,bottom:5},children:[(0,L.jsx)(iH,{strokeDasharray:`3 3`}),(0,L.jsx)(xH,{dataKey:`label`,tick:{fontSize:12}}),(0,L.jsx)(RH,{tick:{fontSize:12}}),(0,L.jsx)(xS,{formatter:e=>cW(e)}),(0,L.jsx)(Wb,{}),(0,L.jsx)(ez,{dataKey:`amount`,name:`Revenue`,fill:`#3b82f6`})]})})})]}),(0,L.jsxs)(pm,{className:`p-4 md:p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Orders by Status`}),(0,L.jsx)(`div`,{className:`w-full h-64 md:h-80`,children:(0,L.jsx)(BS,{width:`100%`,height:`100%`,children:(0,L.jsxs)(sW,{data:f,margin:{top:5,right:10,left:-20,bottom:5},children:[(0,L.jsx)(iH,{strokeDasharray:`3 3`}),(0,L.jsx)(xH,{dataKey:`status`,tick:{fontSize:11}}),(0,L.jsx)(RH,{tick:{fontSize:12}}),(0,L.jsx)(xS,{}),(0,L.jsx)(Wb,{}),(0,L.jsx)(ez,{dataKey:`count`,name:`Orders`,fill:`#8b5cf6`})]})})})]})]}),c.length>0&&(0,L.jsxs)(pm,{className:`p-4 md:p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Top Products`}),(0,L.jsx)(`div`,{className:`space-y-2`,children:c.slice(0,5).map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between border-b border-taupe/40 py-2 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-forest font-medium`,children:e.name}),(0,L.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.total_sold,` sold · `,cW(Number(e.total_revenue))]})]},e.id))})]}),(0,L.jsxs)(pm,{className:`p-4 md:p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Quick Actions`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2 md:gap-3`,children:[(0,L.jsx)(Cm,{onClick:()=>e(`/admin/products/new`),variant:`outline`,className:`text-xs md:text-sm h-auto py-2 md:py-3`,children:`Add Product`}),(0,L.jsx)(Cm,{onClick:()=>e(`/admin/orders`),variant:`outline`,className:`text-xs md:text-sm h-auto py-2 md:py-3`,children:`View Orders`}),(0,L.jsx)(Cm,{onClick:()=>e(`/admin/customers`),variant:`outline`,className:`text-xs md:text-sm h-auto py-2 md:py-3`,children:`Customers`}),(0,L.jsx)(Cm,{onClick:()=>e(`/admin/settings`),variant:`outline`,className:`text-xs md:text-sm h-auto py-2 md:py-3`,children:`Settings`})]})]}),(0,L.jsxs)(pm,{className:`p-4 md:p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Recent Orders`}),(0,L.jsx)(`div`,{className:`space-y-2 md:space-y-3 overflow-x-auto`,children:l.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No orders yet.`}):(0,L.jsxs)(`table`,{className:`w-full text-xs md:text-sm`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{className:`border-b border-taupe`,children:[(0,L.jsx)(`th`,{className:`text-left py-2 px-2 md:px-4 font-semibold text-muted-foreground`,children:`Order #`}),(0,L.jsx)(`th`,{className:`text-left py-2 px-2 md:px-4 font-semibold text-muted-foreground`,children:`Customer`}),(0,L.jsx)(`th`,{className:`text-left py-2 px-2 md:px-4 font-semibold text-muted-foreground hidden sm:table-cell`,children:`Amount`}),(0,L.jsx)(`th`,{className:`text-left py-2 px-2 md:px-4 font-semibold text-muted-foreground`,children:`Status`})]})}),(0,L.jsx)(`tbody`,{children:l.map(t=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40 cursor-pointer`,onClick:()=>e(`/admin/orders/${t.id}`),children:[(0,L.jsx)(`td`,{className:`py-2 px-2 md:px-4 text-forest font-medium`,children:t.order_number}),(0,L.jsx)(`td`,{className:`py-2 px-2 md:px-4 text-muted-foreground`,children:t.customer_name}),(0,L.jsx)(`td`,{className:`py-2 px-2 md:px-4 text-forest font-medium hidden sm:table-cell`,children:cW(Number(t.total))}),(0,L.jsx)(`td`,{className:`py-2 px-2 md:px-4`,children:(0,L.jsx)(`span`,{className:`inline-block px-2 py-1 text-xs rounded-full ${lW[t.order_status]??`bg-sage-mist text-foreground`}`,children:String(t.order_status).replace(/_/g,` `)})})]},t.id))})]})})]})]})}var dW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e);function fW(){let e=dt(),[t,n]=(0,S.useState)(``),{data:r,isLoading:i,isError:a,error:o}=Ei({queryKey:[`admin`,`orders`,t],queryFn:()=>J.getOrders({search:t||void 0,per_page:50})}),s=r?.data??[],c=e=>{switch(e){case`completed`:return`bg-green-100 text-green-800`;case`processing`:return`bg-blue-100 text-blue-800`;case`ready_for_pickup`:return`bg-purple-100 text-purple-800`;case`out_for_delivery`:return`bg-orange-100 text-orange-800`;case`cancelled`:return`bg-red-100 text-red-800`;default:return`bg-yellow-100 text-yellow-800`}};return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Orders`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage all customer orders`})]})}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mb-6`,children:[(0,L.jsx)(Nf,{className:`w-5 h-5 text-muted-foreground`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`Search by order number or customer...`,value:t,onChange:e=>n(e.target.value),className:`flex-1 border border-taupe rounded-lg px-3 py-2 text-sm`})]}),(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:i?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):a?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load orders.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(o)})]}):s.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No orders found.`}):(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Order #`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Customer`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Total`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Status`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Date`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Action`})]})}),(0,L.jsx)(`tbody`,{children:s.map(t=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 font-medium text-forest`,children:t.order_number}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:t.customer_name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:dW(Number(t.total))}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsx)(`span`,{className:`px-3 py-1 rounded-full text-xs font-medium ${c(t.order_status)}`,children:String(t.order_status).replace(/_/g,` `)})}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:new Date(t.created_at).toLocaleDateString()}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/orders/${t.id}`),size:`sm`,variant:`ghost`,className:`gap-2`,children:[(0,L.jsx)(uf,{className:`w-4 h-4`}),`View`]})})]},t.id))})]})})]})]})}var pW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e),mW=[{value:`pending_payment`,label:`Pending Payment`},{value:`processing`,label:`Processing`},{value:`ready_for_pickup`,label:`Ready for Pickup`},{value:`out_for_delivery`,label:`Out for Delivery`},{value:`completed`,label:`Completed`},{value:`cancelled`,label:`Cancelled`}];function hW(){let{id:e}=ht(),t=dt(),n=di(),r=Number(e),{data:i,isLoading:a,isError:o,error:s}=Ei({queryKey:[`admin`,`order`,r],queryFn:()=>J.getOrder(r),enabled:!!r}),[c,l]=(0,S.useState)(``);(0,S.useEffect)(()=>{i?.order_status&&l(i.order_status)},[i?.order_status]);let[u,d]=(0,S.useState)(null);(0,S.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]);let f=Di({mutationFn:e=>J.updateOrderStatus(r,{order_status:e}),onSuccess:()=>{R.success(`Order status updated`),n.invalidateQueries({queryKey:[`admin`,`order`,r]}),n.invalidateQueries({queryKey:[`admin`,`orders`]})},onError:e=>{R.error(Tp(e))}}),p=Di({mutationFn:e=>J.updateOrderPayment(r,{payment_status:e}),onSuccess:()=>{R.success(`Payment status updated`),n.invalidateQueries({queryKey:[`admin`,`order`,r]}),n.invalidateQueries({queryKey:[`admin`,`orders`]})},onError:e=>{R.error(Tp(e))}}),m=(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(Cm,{onClick:()=>t(`/admin/orders`),variant:`ghost`,size:`sm`,children:[(0,L.jsx)(Gd,{className:`w-4 h-4 mr-2`}),`Back`]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:i?`Order ${i.order_number}`:`Order #${e}`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Order details and management`})]})]});if(a)return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[m,(0,L.jsx)(`div`,{className:`grid place-items-center py-24`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})})]});if(o||!i)return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[m,(0,L.jsxs)(pm,{className:`p-6 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load this order.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s?Tp(s):`Order not found.`})]})]});let h=i.items??[],g=Number(i.subtotal??0),_=Number(i.delivery_fee??0),v=Number(i.total??0),y=i.delivery_address,b=i.payment_proofs??[];return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[m,(0,L.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6`,children:[(0,L.jsxs)(`div`,{className:`lg:col-span-2 space-y-6`,children:[(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Order Items`}),(0,L.jsx)(`div`,{className:`space-y-4`,children:h.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No items on this order.`}):h.map(e=>(0,L.jsxs)(`div`,{className:`border-b pb-4 last:border-b-0 last:pb-0`,children:[(0,L.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`font-medium text-forest`,children:e.product_name??`Product #${e.product_id}`}),(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Qty: `,e.quantity]}),e.variant&&(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[e.variant.size,e.variant.color].filter(Boolean).join(` / `)})]}),(0,L.jsx)(`p`,{className:`font-medium text-forest`,children:pW(Number(e.line_total))})]}),e.add_ons?.length>0&&(0,L.jsx)(`div`,{className:`mt-2 pl-4 space-y-1`,children:e.add_ons.map((e,t)=>(0,L.jsxs)(`div`,{className:`flex justify-between text-sm text-muted-foreground`,children:[(0,L.jsxs)(`span`,{children:[`+ `,e.add_on_name??`Add-on #${e.add_on_id}`]}),(0,L.jsx)(`span`,{children:pW(Number(e.price))})]},t))})]},e.id))}),(0,L.jsxs)(`div`,{className:`mt-4 pt-4 border-t`,children:[(0,L.jsxs)(`div`,{className:`flex justify-between`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Subtotal`}),(0,L.jsx)(`p`,{className:`text-forest`,children:pW(g)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between mt-2`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Delivery Fee`}),(0,L.jsx)(`p`,{className:`text-forest`,children:pW(_)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between mt-4 pt-4 border-t font-bold text-lg`,children:[(0,L.jsx)(`p`,{children:`Total`}),(0,L.jsx)(`p`,{children:pW(v)})]})]})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:i.fulfillment_type===`pickup`?`Pickup Information`:`Delivery Information`}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[i.fulfillment_type===`pickup`?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Fulfillment`}),(0,L.jsx)(`p`,{className:`text-forest`,children:`In-store Pickup`})]}):(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Delivery Address`}),(0,L.jsx)(`p`,{className:`text-forest`,children:y?[y.street_address,y.area,y.landmark].filter(Boolean).join(`, `):`No address on file`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Scheduled Date`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.scheduled_date})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Time Slot`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.scheduled_time_slot})]}),i.gift_note&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Gift Note`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.gift_note})]})]})]})]}),(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Customer Info`}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Name`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.customer_name})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Email`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.customer_email})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Phone`}),(0,L.jsx)(`p`,{className:`text-forest`,children:i.customer_phone})]})]})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Order Status`}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,children:mW.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,L.jsx)(Cm,{className:`w-full`,disabled:c===i.order_status||f.isPending,onClick:()=>f.mutate(c),children:f.isPending?`Updating…`:`Update Status`})]})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Payment Status`}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Status:`,` `,(0,L.jsx)(`span`,{className:`font-medium ${i.payment_status===`confirmed`?`text-green-600`:i.payment_status===`failed`?`text-red-600`:`text-yellow-600`}`,children:String(i.payment_status).replace(/_/g,` `)})]}),(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground capitalize`,children:[`Method: `,i.payment_method]}),b.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground italic pt-2`,children:`No payment proof submitted yet.`}):(0,L.jsxs)(`div`,{className:`pt-2 space-y-3`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Payment Proof`}),b.map(e=>{let t=pd(e.image_url);return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>t&&d(e),disabled:!t,className:`block w-full text-left border border-taupe rounded-lg overflow-hidden hover:opacity-90 transition disabled:cursor-not-allowed`,children:[t?(0,L.jsx)(`img`,{src:t,alt:`Payment proof submitted ${e.submitted_at}`,className:`w-full h-40 object-cover bg-muted`}):(0,L.jsx)(`div`,{className:`w-full h-40 grid place-items-center bg-muted text-xs text-muted-foreground`,children:`Image unavailable`}),(0,L.jsxs)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground flex justify-between`,children:[(0,L.jsxs)(`span`,{children:[`Submitted `,e.submitted_at]}),e.verified_at?(0,L.jsxs)(`span`,{className:`text-green-600`,children:[`Verified`,e.verified_by_name?` by ${e.verified_by_name}`:``]}):(0,L.jsx)(`span`,{className:`text-yellow-600`,children:`Awaiting review`})]})]},e.id)})]}),i.payment_status!==`confirmed`&&(0,L.jsxs)(`div`,{className:`flex gap-2 pt-2`,children:[(0,L.jsx)(Cm,{size:`sm`,variant:`outline`,disabled:p.isPending,onClick:()=>p.mutate(`confirmed`),children:`Confirm Payment`}),(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:p.isPending,onClick:()=>p.mutate(`failed`),children:`Mark Failed`})]})]})]})]})]}),u&&(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4`,onClick:()=>d(null),children:(0,L.jsxs)(`div`,{className:`relative max-w-3xl w-full max-h-[90vh] bg-white rounded-lg overflow-hidden flex flex-col`,onClick:e=>e.stopPropagation(),children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>d(null),className:`absolute top-3 right-3 z-10 rounded-full bg-black/60 text-white p-1.5 hover:bg-black/80 transition`,"aria-label":`Close`,children:(0,L.jsx)(Xf,{className:`w-5 h-5`})}),(0,L.jsx)(`div`,{className:`flex-1 overflow-auto bg-muted grid place-items-center`,children:(0,L.jsx)(`img`,{src:pd(u.image_url)??``,alt:`Payment proof submitted ${u.submitted_at}`,className:`max-w-full max-h-[75vh] object-contain`})}),(0,L.jsxs)(`div`,{className:`px-4 py-3 border-t text-sm text-muted-foreground flex justify-between items-center`,children:[(0,L.jsxs)(`span`,{children:[`Submitted `,u.submitted_at]}),u.verified_at?(0,L.jsxs)(`span`,{className:`text-green-600`,children:[`Verified`,u.verified_by_name?` by ${u.verified_by_name}`:``]}):(0,L.jsx)(`span`,{className:`text-yellow-600`,children:`Awaiting review`})]})]})})]})}var gW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e);function _W(){let e=dt(),t=di(),[n,r]=(0,S.useState)(``),{data:i,isLoading:a,isError:o,error:s}=Ei({queryKey:[`admin`,`products`,n],queryFn:()=>J.getProducts({search:n||void 0,per_page:50})}),c=Di({mutationFn:e=>J.deleteProduct(e),onSuccess:()=>{R.success(`Product deleted`),t.invalidateQueries({queryKey:[`admin`,`products`]})},onError:e=>{R.error(Tp(e))}}),l=i?.data??[],u=e=>{switch(e){case`active`:return`bg-green-100 text-green-800`;case`draft`:return`bg-yellow-100 text-yellow-800`;case`archived`:return`bg-gray-100 text-gray-800`;default:return`bg-gray-100 text-gray-800`}},d=(e,t)=>{window.confirm(`Delete "${t}"? This cannot be undone.`)&&c.mutate(e)};return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Products`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage your product catalog`})]}),(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/products/new`),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Product`]})]}),(0,L.jsx)(pm,{className:`p-4`,children:(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(Nf,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`Search products...`,value:n,onChange:e=>r(e.target.value),className:`w-full pl-10 pr-4 py-2 border border-taupe rounded-lg focus:outline-none focus:ring-2 focus:ring-sage`})]})}),(0,L.jsx)(pm,{className:`overflow-hidden`,children:a?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):o?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load products.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(s)})]}):l.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No products found.`}):(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`bg-cream border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Image`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Name`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Price`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Status`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Featured`}),(0,L.jsx)(`th`,{className:`text-right py-3 px-4 font-semibold text-muted-foreground`,children:`Actions`})]})}),(0,L.jsx)(`tbody`,{children:l.map(t=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsx)(`div`,{className:`w-12 h-12 rounded-lg overflow-hidden bg-sage-mist`,children:(0,L.jsx)(`img`,{src:pd(t.thumbnail||t.image)??``,alt:t.name,className:`w-full h-full object-cover`,onError:e=>{e.currentTarget.src=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/%3E%3C/svg%3E`}})})}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-forest font-medium`,children:t.name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-muted-foreground`,children:gW(Number(t.basePrice||t.base_price))}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsx)(`span`,{className:`inline-block px-2 py-1 text-xs rounded-full ${u(t.status)}`,children:t.status})}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-muted-foreground`,children:Number(t.featured)?`Yes`:`—`}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-right`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,L.jsx)(`button`,{onClick:()=>e(`/admin/products/${t.id}/edit`),className:`p-2 text-muted-foreground hover:text-forest hover:bg-sage-mist rounded-lg`,"aria-label":`Edit`,children:(0,L.jsx)(zf,{className:`w-4 h-4`})}),(0,L.jsx)(`button`,{onClick:()=>d(t.id,t.name),disabled:c.isPending,className:`p-2 text-muted-foreground hover:text-red-600 hover:bg-sage-mist rounded-lg disabled:opacity-50`,"aria-label":`Delete`,children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},t.id))})]})})})]})}function vW({productId:e}){let t=di(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)({size:``,color:``,price:``,stock_status:`in_stock`,sku:``}),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),{data:f,isLoading:p}=Ei({queryKey:[`admin`,`product`,e,`variants`],queryFn:()=>J.getProductVariants(e),enabled:!!e}),m=f?.data||[],h=Di({mutationFn:t=>J.createProductVariant(e,t),onSuccess:n=>{R.success(`Variant created successfully`),t.invalidateQueries({queryKey:[`admin`,`product`,e,`variants`]}),c.length>0&&n.data?.id?_(n.data.id):y()}}),g=Di({mutationFn:e=>J.updateVariant(i,e),onSuccess:()=>{R.success(`Variant updated successfully`),t.invalidateQueries({queryKey:[`admin`,`product`,e,`variants`]}),c.length>0?_(i):y()}}),_=async e=>{let t=new FormData;c.forEach(e=>{t.append(`images`,e)});try{await J.uploadVariantImages(e,t),R.success(`Variant images uploaded successfully`),y()}catch(e){R.error(`Failed to upload variant images: `+Tp(e))}},v=Di({mutationFn:e=>J.deleteVariant(e),onSuccess:()=>{R.success(`Variant deleted successfully`),t.invalidateQueries({queryKey:[`admin`,`product`,e,`variants`]})}}),y=()=>{s({size:``,color:``,price:``,stock_status:`in_stock`,sku:``}),l([]),d([]),r(!1),a(null)},b=e=>{let t=Array.from(e.target.files||[]);l(e=>[...e,...t]),t.forEach(e=>{let t=new FileReader;t.onloadend=()=>{d(e=>[...e,t.result])},t.readAsDataURL(e)})},x=e=>{l(t=>t.filter((t,n)=>n!==e)),d(t=>t.filter((t,n)=>n!==e))},C=t=>{if(t.preventDefault(),!o.price){R.error(`Price is required`);return}let n={size:o.size||null,color:o.color||null,price:parseFloat(o.price),stock_status:o.stock_status,sku:o.sku||`SKU-${e}-${Date.now()}`};i?g.mutate(n):h.mutate(n)},w=e=>{s({size:e.size||``,color:e.color||``,price:String(e.price),stock_status:e.stock_status,sku:e.sku}),e.images&&d(e.images.map(e=>e.image_url)),a(e.id),r(!0)},T=e=>{window.confirm(`Delete this variant?`)&&v.mutate(e)},E=h.isPending||g.isPending;return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold text-forest`,children:`Product Options/Variants`}),!n&&(0,L.jsxs)(Cm,{onClick:()=>r(!0),size:`sm`,className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Variant`]})]}),n&&(0,L.jsx)(pm,{className:`p-6 bg-sage-mist border-sage/20`,children:(0,L.jsxs)(`form`,{onSubmit:C,className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-1`,children:`Size (Optional)`}),(0,L.jsx)(`input`,{type:`text`,value:o.size,onChange:e=>s({...o,size:e.target.value}),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,placeholder:`e.g., Small, Medium, Large`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-1`,children:`Color (Optional)`}),(0,L.jsx)(`input`,{type:`text`,value:o.color,onChange:e=>s({...o,color:e.target.value}),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,placeholder:`e.g., Red, Blue, Green`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-1`,children:`Price (₦) *`}),(0,L.jsx)(`input`,{type:`number`,value:o.price,onChange:e=>s({...o,price:e.target.value}),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,placeholder:`Enter price`,step:`0.01`,required:!0})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-1`,children:`Stock Status`}),(0,L.jsxs)(`select`,{value:o.stock_status,onChange:e=>s({...o,stock_status:e.target.value}),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,children:[(0,L.jsx)(`option`,{value:`in_stock`,children:`In Stock`}),(0,L.jsx)(`option`,{value:`made_to_order`,children:`Made to Order`}),(0,L.jsx)(`option`,{value:`out_of_stock`,children:`Out of Stock`})]})]}),(0,L.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-1`,children:`SKU (Optional)`}),(0,L.jsx)(`input`,{type:`text`,value:o.sku,onChange:e=>s({...o,sku:e.target.value}),className:`w-full border border-taupe rounded-lg px-3 py-2 text-sm`,placeholder:`Auto-generated if empty`})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Variant Images`}),(0,L.jsxs)(`div`,{className:`border-2 border-dashed border-taupe rounded-lg p-4 text-center`,children:[(0,L.jsx)(Gf,{className:`w-6 h-6 text-muted-foreground mx-auto mb-2`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground mb-2`,children:`Upload images for this variant option`}),(0,L.jsx)(`input`,{type:`file`,multiple:!0,accept:`image/*`,onChange:b,className:`hidden`,id:`variant-image-input-${i||`new`}`}),(0,L.jsx)(`label`,{htmlFor:`variant-image-input-${i||`new`}`,children:(0,L.jsx)(Cm,{type:`button`,variant:`outline`,size:`sm`,className:`cursor-pointer`,children:`Select Images`})})]}),u.length>0&&(0,L.jsx)(`div`,{className:`mt-3 grid grid-cols-2 md:grid-cols-4 gap-2`,children:u.map((e,t)=>(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`img`,{src:e,alt:`Preview ${t}`,className:`w-full h-24 object-cover rounded border border-taupe`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>x(t),className:`absolute top-0 right-0 bg-red-500 text-white rounded-full p-0.5 hover:bg-red-600`,children:(0,L.jsx)(Xf,{className:`w-3 h-3`})})]},t))})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(Cm,{type:`submit`,disabled:E,className:`flex-1`,children:E?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(yf,{className:`w-4 h-4 mr-2 animate-spin`}),`Saving...`]}):(0,L.jsxs)(L.Fragment,{children:[i?`Update`:`Create`,` Variant`]})}),(0,L.jsx)(Cm,{type:`button`,onClick:y,variant:`outline`,className:`flex-1`,disabled:E,children:`Cancel`})]})]})}),(0,L.jsx)(pm,{className:`overflow-hidden`,children:p?(0,L.jsx)(`div`,{className:`grid place-items-center py-12`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):m.length===0?(0,L.jsx)(`div`,{className:`py-12 text-center text-muted-foreground`,children:(0,L.jsx)(`p`,{children:`No variants yet. Add one to get started.`})}):(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`bg-cream border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Size/Color`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Price`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Stock`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`SKU`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-muted-foreground`,children:`Images`}),(0,L.jsx)(`th`,{className:`text-right py-3 px-4 font-semibold text-muted-foreground`,children:`Actions`})]})}),(0,L.jsx)(`tbody`,{children:m.map(e=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 text-forest`,children:(0,L.jsxs)(`div`,{className:`font-medium`,children:[e.size&&(0,L.jsx)(`span`,{children:e.size}),e.size&&e.color&&(0,L.jsx)(`span`,{children:` / `}),e.color&&(0,L.jsx)(`span`,{children:e.color}),!e.size&&!e.color&&(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`—`})]})}),(0,L.jsxs)(`td`,{className:`py-3 px-4 text-muted-foreground`,children:[`₦`,Number(e.price).toLocaleString()]}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsx)(`span`,{className:`inline-block px-2 py-1 text-xs rounded-full ${e.stock_status===`in_stock`?`bg-green-100 text-green-800`:e.stock_status===`made_to_order`?`bg-sage-mist text-forest`:`bg-red-100 text-red-800`}`,children:e.stock_status.replace(`_`,` `)})}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-muted-foreground text-xs`,children:e.sku}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-muted-foreground`,children:e.images&&e.images.length>0?(0,L.jsxs)(`span`,{className:`text-xs bg-sage-mist text-forest px-2 py-1 rounded`,children:[e.images.length,` image`,e.images.length===1?``:`s`]}):(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`—`})}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-right`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,L.jsx)(`button`,{onClick:()=>w(e),className:`p-2 text-muted-foreground hover:text-forest hover:bg-sage-mist rounded-lg`,"aria-label":`Edit`,children:(0,L.jsx)(zf,{className:`w-4 h-4`})}),(0,L.jsx)(`button`,{onClick:()=>T(e.id),disabled:v.isPending,className:`p-2 text-muted-foreground hover:text-red-600 hover:bg-sage-mist rounded-lg disabled:opacity-50`,"aria-label":`Delete`,children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},e.id))})]})})})]})}function yW(){let{id:e}=ht(),t=dt(),n=di(),[r,i]=(0,S.useState)({name:``,description:``,base_price:``,status:`active`,featured:!1,category_ids:[]}),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(!1),{data:d,isLoading:f}=Ei({queryKey:[`admin`,`product`,e],queryFn:()=>e?J.getProduct(Number(e)):null,enabled:!!e}),{data:p,isLoading:m}=Ei({queryKey:[`admin`,`categories`],queryFn:()=>J.getCategories()});(0,S.useEffect)(()=>{if(d){let e=d.data||d;i({name:e.name||``,description:e.description||``,base_price:String(e.base_price||``),status:e.status||`active`,featured:!!e.featured,category_ids:e.category_ids||[]}),e.images&&Array.isArray(e.images)&&c(e.images.map(e=>pd(e.image_url||e.url||e)??``))}},[d]);let h=Di({mutationFn:e=>J.createProduct(e),onSuccess:e=>{R.success(`Product created successfully`),n.invalidateQueries({queryKey:[`admin`,`products`]});let r=e.data?.id||e.id;a.length>0&&r?_(r):t(`/admin/products`)},onError:e=>{R.error(e.message||`Failed to create product`),u(!1)}}),g=Di({mutationFn:t=>J.updateProduct(Number(e),t),onSuccess:()=>{R.success(`Product updated successfully`),n.invalidateQueries({queryKey:[`admin`,`products`]}),n.invalidateQueries({queryKey:[`admin`,`product`,e]}),a.length>0?_(Number(e)):t(`/admin/products`)},onError:e=>{R.error(e.message||`Failed to update product`),u(!1)}}),_=async e=>{if(a.length===0){t(`/admin/products`);return}try{let n=new FormData;a.forEach(e=>{n.append(`images[]`,e)}),await J.uploadProductImages(e,n),R.success(`Images uploaded successfully`),t(`/admin/products`)}catch(e){R.error(e.message||`Failed to upload images`),u(!1)}},v=e=>{let{name:t,value:n,type:r}=e.target;i(r===`checkbox`?n=>({...n,[t]:e.target.checked}):e=>({...e,[t]:n}))},y=e=>{i(t=>({...t,category_ids:t.category_ids.includes(e)?t.category_ids.filter(t=>t!==e):[...t.category_ids,e]}))},b=e=>{let t=Array.from(e.target.files||[]);o(e=>[...e,...t]),t.forEach(e=>{let t=new FileReader;t.onload=e=>{c(t=>[...t,e.target?.result])},t.readAsDataURL(e)})},x=e=>{o(t=>t.filter((t,n)=>n!==e)),c(t=>t.filter((t,n)=>n!==e))},C=async t=>{if(t.preventDefault(),u(!0),!r.name||!r.base_price){R.error(`Please fill all required fields`),u(!1);return}e?g.mutate(r):h.mutate(r)},w=Array.isArray(p)?p:p?.data||[];return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(Cm,{onClick:()=>t(`/admin/products`),variant:`ghost`,size:`sm`,children:[(0,L.jsx)(Gd,{className:`w-4 h-4 mr-2`}),`Back`]}),(0,L.jsx)(`div`,{children:(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:e?`Edit Product`:`Create Product`})})]}),(0,L.jsxs)(`form`,{onSubmit:C,className:`space-y-6`,children:[(0,L.jsxs)(pm,{className:`p-6 space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Product Name *`}),(0,L.jsx)(`input`,{type:`text`,name:`name`,value:r.name,onChange:v,className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`,placeholder:`Enter product name`,required:!0})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Description`}),(0,L.jsx)(`textarea`,{name:`description`,value:r.description,onChange:v,className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`,placeholder:`Enter product description`,rows:4})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Price *`}),(0,L.jsx)(`input`,{type:`number`,name:`base_price`,value:r.base_price,onChange:v,className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`,placeholder:`0.00`,step:`0.01`,required:!0})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Status`}),(0,L.jsxs)(`select`,{name:`status`,value:r.status,onChange:v,className:`w-full rounded-lg border border-taupe px-4 py-2 text-sm outline-none focus:ring-2 focus:ring-sage`,children:[(0,L.jsx)(`option`,{value:`active`,children:`Active`}),(0,L.jsx)(`option`,{value:`draft`,children:`Draft`}),(0,L.jsx)(`option`,{value:`archived`,children:`Archived`})]})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`input`,{type:`checkbox`,name:`featured`,checked:r.featured,onChange:v,className:`rounded border-taupe`}),(0,L.jsx)(`label`,{className:`text-sm font-medium text-forest`,children:`Featured Product`})]})]}),(0,L.jsxs)(pm,{className:`p-6 space-y-4`,children:[(0,L.jsx)(`h3`,{className:`font-semibold text-forest`,children:`Categories`}),m?(0,L.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,L.jsx)(yf,{className:`w-4 h-4 animate-spin`})}):w.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No categories available`}):(0,L.jsx)(`div`,{className:`space-y-2`,children:w.map(e=>(0,L.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:r.category_ids.includes(e.id),onChange:()=>y(e.id),className:`rounded border-taupe`}),(0,L.jsx)(`span`,{className:`text-sm text-forest`,children:e.name})]},e.id))})]}),(0,L.jsxs)(pm,{className:`p-6 space-y-4`,children:[(0,L.jsx)(`h3`,{className:`font-semibold text-forest`,children:`Product Images`}),(0,L.jsxs)(`label`,{className:`block`,children:[(0,L.jsxs)(`div`,{className:`border-2 border-dashed border-taupe rounded-lg p-6 text-center cursor-pointer hover:border-sage transition-colors`,children:[(0,L.jsx)(Gf,{className:`w-8 h-8 mx-auto mb-2 text-muted-foreground`}),(0,L.jsx)(`p`,{className:`text-sm font-medium text-forest`,children:`Click to upload images`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`PNG, JPG up to 10MB`})]}),(0,L.jsx)(`input`,{type:`file`,multiple:!0,accept:`image/*`,onChange:b,className:`hidden`})]}),s.length>0&&(0,L.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 gap-4`,children:s.map((e,t)=>(0,L.jsxs)(`div`,{className:`relative group`,children:[(0,L.jsx)(`img`,{src:e,alt:`Preview ${t}`,className:`w-full h-32 object-cover rounded-lg`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>x(t),className:`absolute top-1 right-1 bg-red-600 text-white p-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,L.jsx)(Xf,{className:`w-4 h-4`})})]},t))})]}),e&&(0,L.jsx)(vW,{productId:Number(e)}),(0,L.jsxs)(`div`,{className:`flex gap-3`,children:[(0,L.jsx)(Cm,{type:`submit`,disabled:l||h.isPending||g.isPending,className:`flex-1`,children:l||h.isPending||g.isPending?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(yf,{className:`w-4 h-4 mr-2 animate-spin`}),`Saving...`]}):e?`Update Product`:`Create Product`}),(0,L.jsx)(Cm,{type:`button`,onClick:()=>t(`/admin/products`),variant:`outline`,children:`Cancel`})]})]})]})}var bW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e),xW={id:null,name:``,price:``,type:`default`,active:!0};function SW(){let e=di(),[t,n]=(0,S.useState)(null),{data:r,isLoading:i,isError:a,error:o}=Ei({queryKey:[`admin`,`add-ons`],queryFn:()=>J.getAddOns()}),s=r??[],c=()=>e.invalidateQueries({queryKey:[`admin`,`add-ons`]}),l=Di({mutationFn:e=>J.createAddOn(e),onSuccess:()=>{c(),n(null)}}),u=Di({mutationFn:({id:e,data:t})=>J.updateAddOn(e,t),onSuccess:()=>{c(),n(null)}}),d=Di({mutationFn:e=>J.deleteAddOn(e),onSuccess:c}),f=()=>{if(!t||!t.name.trim()||!t.price)return;let e={name:t.name,price:Number(t.price),type:t.type,active:t.active};t.id?u.mutate({id:t.id,data:e}):l.mutate(e)},p=l.isPending||u.isPending;return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Add-ons`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage product add-ons`})]}),(0,L.jsxs)(Cm,{onClick:()=>n(xW),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add New`]})]}),t&&(0,L.jsxs)(pm,{className:`p-4 space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h2`,{className:`font-semibold text-forest`,children:t.id?`Edit add-on`:`New add-on`}),(0,L.jsx)(`button`,{onClick:()=>n(null),className:`text-muted-foreground hover:text-muted-foreground`,children:(0,L.jsx)(Xf,{className:`w-4 h-4`})})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-4`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Name`,value:t.name,onChange:e=>n({...t,name:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm sm:col-span-2`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`Type (e.g. beverages)`,value:t.type,onChange:e=>n({...t,type:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm`}),(0,L.jsx)(`input`,{type:`number`,placeholder:`Price (₦)`,value:t.price,onChange:e=>n({...t,price:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm`})]}),(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t.active,onChange:e=>n({...t,active:e.target.checked})}),`Active`]}),(0,L.jsx)(Cm,{onClick:f,disabled:p||!t.name.trim()||!t.price,size:`sm`,children:p?`Saving…`:`Save`})]}),(0,L.jsx)(pm,{className:`p-6`,children:(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:i?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):a?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load add-ons.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(o)})]}):s.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No add-ons yet.`}):(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Name`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Type`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Price`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Active`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Actions`})]})}),(0,L.jsx)(`tbody`,{children:s.map(e=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 font-medium text-forest`,children:e.name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:e.type}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:bW(Number(e.price))}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:Number(e.active)?`Yes`:`No`}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,onClick:()=>n({id:e.id,name:e.name,price:String(e.price),type:e.type,active:!!Number(e.active)}),children:(0,L.jsx)(zf,{className:`w-4 h-4`})}),(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,className:`text-red-600`,onClick:()=>{window.confirm(`Delete "${e.name}"?`)&&d.mutate(e.id)},children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},e.id))})]})})})]})}var CW={id:null,name:``,type:`product_type`};function wW(){let e=di(),[t,n]=(0,S.useState)(null),{data:r,isLoading:i,isError:a,error:o}=Ei({queryKey:[`admin`,`categories`],queryFn:()=>J.getCategories()}),s=r??[],c=()=>e.invalidateQueries({queryKey:[`admin`,`categories`]}),l=Di({mutationFn:e=>J.createCategory(e),onSuccess:()=>{c(),n(null)}}),u=Di({mutationFn:({id:e,data:t})=>J.updateCategory(e,t),onSuccess:()=>{c(),n(null)}}),d=Di({mutationFn:e=>J.deleteCategory(e),onSuccess:c}),f=()=>{!t||!t.name.trim()||(t.id?u.mutate({id:t.id,data:{name:t.name,type:t.type}}):l.mutate({name:t.name,type:t.type}))},p=l.isPending||u.isPending;return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Categories`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage product categories and occasions`})]}),(0,L.jsxs)(Cm,{onClick:()=>n(CW),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Category`]})]}),t&&(0,L.jsxs)(pm,{className:`p-4 space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h2`,{className:`font-semibold text-forest`,children:t.id?`Edit category`:`New category`}),(0,L.jsx)(`button`,{onClick:()=>n(null),className:`text-muted-foreground hover:text-muted-foreground`,children:(0,L.jsx)(Xf,{className:`w-4 h-4`})})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Name`,value:t.name,onChange:e=>n({...t,name:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm sm:col-span-2`}),(0,L.jsxs)(`select`,{value:t.type,onChange:e=>n({...t,type:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm`,children:[(0,L.jsx)(`option`,{value:`product_type`,children:`Product type`}),(0,L.jsx)(`option`,{value:`occasion`,children:`Occasion`})]})]}),(0,L.jsx)(Cm,{onClick:f,disabled:p||!t.name.trim(),size:`sm`,children:p?`Saving…`:`Save`})]}),(0,L.jsx)(pm,{className:`p-6`,children:(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:i?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):a?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load categories.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(o)})]}):s.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No categories yet.`}):(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Name`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Type`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Products`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Actions`})]})}),(0,L.jsx)(`tbody`,{children:s.map(e=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 font-medium text-forest`,children:e.name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:String(e.type).replace(`_`,` `)}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:e.product_count}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,onClick:()=>n({id:e.id,name:e.name,type:e.type}),children:(0,L.jsx)(zf,{className:`w-4 h-4`})}),(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,className:`text-red-600`,onClick:()=>{window.confirm(`Delete "${e.name}"?`)&&d.mutate(e.id)},children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},e.id))})]})})})]})}var TW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e),EW={id:null,area_name:``,fee:``};function DW(){let e=di(),[t,n]=(0,S.useState)(null),{data:r,isLoading:i,isError:a,error:o}=Ei({queryKey:[`admin`,`delivery-zones`],queryFn:()=>J.getDeliveryZones()}),s=r??[],c=()=>e.invalidateQueries({queryKey:[`admin`,`delivery-zones`]}),l=Di({mutationFn:e=>J.createDeliveryZone(e),onSuccess:()=>{c(),n(null)}}),u=Di({mutationFn:({id:e,data:t})=>J.updateDeliveryZone(e,t),onSuccess:()=>{c(),n(null)}}),d=Di({mutationFn:e=>J.deleteDeliveryZone(e),onSuccess:c}),f=()=>{if(!t||!t.area_name.trim()||!t.fee)return;let e={area_name:t.area_name,fee:Number(t.fee)};t.id?u.mutate({id:t.id,data:e}):l.mutate(e)},p=l.isPending||u.isPending;return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Delivery Zones`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage delivery areas and fees`})]}),(0,L.jsxs)(Cm,{onClick:()=>n(EW),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Zone`]})]}),t&&(0,L.jsxs)(pm,{className:`p-4 space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h2`,{className:`font-semibold text-forest`,children:t.id?`Edit zone`:`New zone`}),(0,L.jsx)(`button`,{onClick:()=>n(null),className:`text-muted-foreground hover:text-muted-foreground`,children:(0,L.jsx)(Xf,{className:`w-4 h-4`})})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Area name (e.g. Lagos Island)`,value:t.area_name,onChange:e=>n({...t,area_name:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm sm:col-span-2`}),(0,L.jsx)(`input`,{type:`number`,placeholder:`Fee (₦)`,value:t.fee,onChange:e=>n({...t,fee:e.target.value}),className:`border border-taupe rounded-lg px-3 py-2 text-sm`})]}),(0,L.jsx)(Cm,{onClick:f,disabled:p||!t.area_name.trim()||!t.fee,size:`sm`,children:p?`Saving…`:`Save`})]}),(0,L.jsx)(pm,{className:`p-6`,children:(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:i?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):a?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load delivery zones.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(o)})]}):s.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No delivery zones yet.`}):(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Area`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Fee`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Actions`})]})}),(0,L.jsx)(`tbody`,{children:s.map(e=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 font-medium text-forest`,children:e.area_name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:TW(Number(e.fee))}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,onClick:()=>n({id:e.id,area_name:e.area_name,fee:String(e.fee)}),children:(0,L.jsx)(zf,{className:`w-4 h-4`})}),(0,L.jsx)(Cm,{size:`sm`,variant:`ghost`,className:`text-red-600`,onClick:()=>{window.confirm(`Delete "${e.area_name}"?`)&&d.mutate(e.id)},children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},e.id))})]})})})]})}var OW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e);function kW(){let e=dt(),[t,n]=(0,S.useState)(``),{data:r,isLoading:i,isError:a,error:o}=Ei({queryKey:[`admin`,`customers`,t],queryFn:()=>J.getCustomers({search:t||void 0,per_page:50})}),s=r?.data??[];return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Customers`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`View and manage customer accounts`})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mb-6`,children:[(0,L.jsx)(Nf,{className:`w-5 h-5 text-muted-foreground`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`Search customers...`,value:t,onChange:e=>n(e.target.value),className:`flex-1 border border-taupe rounded-lg px-3 py-2 text-sm`})]}),(0,L.jsx)(`div`,{className:`overflow-x-auto`,children:i?(0,L.jsx)(`div`,{className:`grid place-items-center py-16`,children:(0,L.jsx)(yf,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):a?(0,L.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load customers.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(o)})]}):s.length===0?(0,L.jsx)(`div`,{className:`py-16 text-center text-muted-foreground`,children:`No customers found.`}):(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{className:`border-b border-taupe`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Name`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Email`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Phone`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Orders`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Total Spent`}),(0,L.jsx)(`th`,{className:`text-left py-3 px-4 font-semibold text-forest`,children:`Action`})]})}),(0,L.jsx)(`tbody`,{children:s.map(t=>(0,L.jsxs)(`tr`,{className:`border-b border-taupe/40 hover:bg-sage-mist/40`,children:[(0,L.jsx)(`td`,{className:`py-3 px-4 font-medium text-forest`,children:t.name}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:t.email}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:t.phone}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:t.total_orders}),(0,L.jsx)(`td`,{className:`py-3 px-4 text-foreground`,children:OW(Number(t.total_spent))}),(0,L.jsx)(`td`,{className:`py-3 px-4`,children:(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/customers/${t.id}`),size:`sm`,variant:`ghost`,className:`gap-2`,children:[(0,L.jsx)(uf,{className:`w-4 h-4`}),`View`]})})]},t.id))})]})})]})]})}function AW({className:e,...t}){return(0,L.jsx)(yf,{role:`status`,"aria-label":`Loading`,className:H(`h-6 w-6 animate-spin text-primary`,e),...t})}function jW(){let{id:e}=ht(),t=dt(),{data:n,isLoading:r,isError:i}=Ei({queryKey:[`admin`,`customer`,e],queryFn:()=>e?J.getCustomer(Number(e)):null,enabled:!!e});return r?(0,L.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,L.jsx)(AW,{})}):i||!n?(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-4`,children:(0,L.jsxs)(Cm,{onClick:()=>t(`/admin/customers`),variant:`ghost`,size:`sm`,children:[(0,L.jsx)(Gd,{className:`w-4 h-4 mr-2`}),`Back`]})}),(0,L.jsx)(pm,{className:`p-6 text-center`,children:(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Customer not found`})})]}):(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(Cm,{onClick:()=>t(`/admin/customers`),variant:`ghost`,size:`sm`,children:[(0,L.jsx)(Gd,{className:`w-4 h-4 mr-2`}),`Back`]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`h1`,{className:`text-3xl font-display text-forest`,children:[`Customer #`,n.id]}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Customer profile and order history`})]})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6`,children:[(0,L.jsx)(`div`,{className:`lg:col-span-2 space-y-6`,children:(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Customer Info`}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Full Name`}),(0,L.jsx)(`p`,{className:`text-forest font-medium`,children:n.name})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Email`}),(0,L.jsx)(`p`,{className:`text-forest font-medium`,children:n.email})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Phone`}),(0,L.jsx)(`p`,{className:`text-forest font-medium`,children:n.phone})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Joined`}),(0,L.jsx)(`p`,{className:`text-forest font-medium`,children:n.created_at?new Date(n.created_at).toLocaleDateString():`N/A`})]})]})]})}),(0,L.jsx)(`div`,{className:`space-y-6`,children:(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Statistics`}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Orders`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest`,children:n.total_orders||0})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Spent`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest`,children:tp(n.total_spent||0)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Average Order`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest`,children:n.total_orders&&n.total_orders>0?tp((n.total_spent||0)/n.total_orders):tp(0)})]})]})]})})]})]})}var MW=e=>new Intl.NumberFormat(`en-NG`,{style:`currency`,currency:`NGN`,maximumFractionDigits:0}).format(e);function NW(e,t){let n=t.map(e=>e.map(e=>`"${String(e).replace(/"/g,`""`)}"`).join(`,`)).join(` `),r=new Blob([n],{type:`text/csv;charset=utf-8;`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,a.click(),URL.revokeObjectURL(i)}function PW(){let{data:e,isLoading:t,isError:n,error:r}=Ei({queryKey:[`admin`,`dashboard-summary`],queryFn:()=>J.getDashboardSummary()}),i=e?.revenue??{},a=e?.total_orders??0,o=Number(i.revenue_total??0),s=a>0?o/a:0,c=e?.top_products??[],l=e?.recent_orders??[],u=(e?.order_status_counts??[]).map(e=>({status:e.order_status.replace(/_/g,` `),count:e.count}));return t?(0,L.jsx)(`div`,{className:`grid place-items-center py-24`,children:(0,L.jsx)(yf,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):n?(0,L.jsxs)(pm,{className:`p-6 text-center`,children:[(0,L.jsx)(`p`,{className:`font-semibold text-forest`,children:`Couldn't load report data.`}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Tp(r)})]}):(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Reports`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`View business analytics and reports`})]}),(0,L.jsxs)(Cm,{onClick:()=>{NW(`flora-recent-orders.csv`,[[`Order #`,`Customer`,`Total`,`Status`,`Date`],...l.map(e=>[e.order_number,e.customer_name,Number(e.total),e.order_status,new Date(e.created_at).toLocaleDateString()])])},className:`gap-2`,disabled:l.length===0,children:[(0,L.jsx)(of,{className:`w-4 h-4`}),`Export Recent Orders CSV`]})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Total Revenue`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest mt-1`,children:MW(o)})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Total Orders`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest mt-1`,children:a})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Average Order Value`}),(0,L.jsx)(`p`,{className:`text-2xl font-bold text-forest mt-1`,children:MW(s)})]})]}),(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Orders by Status`}),u.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground py-8 text-center`,children:`No order data yet.`}):(0,L.jsx)(BS,{width:`100%`,height:300,children:(0,L.jsxs)(sW,{data:u,children:[(0,L.jsx)(iH,{strokeDasharray:`3 3`}),(0,L.jsx)(xH,{dataKey:`status`,tick:{fontSize:11}}),(0,L.jsx)(RH,{}),(0,L.jsx)(xS,{}),(0,L.jsx)(Wb,{}),(0,L.jsx)(ez,{dataKey:`count`,name:`Orders`,fill:`#8b5cf6`})]})})]}),c.length>0&&(0,L.jsxs)(pm,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-bold text-forest mb-4`,children:`Top Products by Units Sold`}),(0,L.jsx)(BS,{width:`100%`,height:300,children:(0,L.jsxs)(sW,{data:c.slice(0,8).map(e=>({name:e.name,sold:Number(e.total_sold)})),children:[(0,L.jsx)(iH,{strokeDasharray:`3 3`}),(0,L.jsx)(xH,{dataKey:`name`,tick:{fontSize:10},interval:0,angle:-15,textAnchor:`end`,height:60}),(0,L.jsx)(RH,{}),(0,L.jsx)(xS,{}),(0,L.jsx)(ez,{dataKey:`sold`,name:`Units sold`,fill:`#3b82f6`})]})})]})]})}function FW(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),f=Di({mutationFn:e=>J.changePassword(e),onSuccess:()=>{R.success(`Password updated successfully`),t(``),r(``),a(``)},onError:e=>{R.error(e.message||`Failed to update password`)}});return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:`Change Password`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Update your admin account password`})]}),(0,L.jsx)(pm,{className:`p-6 max-w-md`,children:(0,L.jsxs)(`form`,{onSubmit:t=>{if(t.preventDefault(),!e||!n||!i){R.error(`Please fill in all fields`);return}if(n.length<8){R.error(`New password must be at least 8 characters`);return}if(n!==i){R.error(`New password and confirmation do not match`);return}f.mutate({current_password:e,new_password:n})},className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Current Password`}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`input`,{type:o?`text`:`password`,value:e,onChange:e=>t(e.target.value),className:`w-full border border-taupe rounded-lg px-3 py-2 pr-10 text-sm`,autoComplete:`current-password`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>s(!o),className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground`,tabIndex:-1,children:o?(0,L.jsx)(lf,{className:`w-4 h-4`}):(0,L.jsx)(uf,{className:`w-4 h-4`})})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`New Password`}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`input`,{type:c?`text`:`password`,value:n,onChange:e=>r(e.target.value),className:`w-full border border-taupe rounded-lg px-3 py-2 pr-10 text-sm`,autoComplete:`new-password`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>l(!c),className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground`,tabIndex:-1,children:c?(0,L.jsx)(lf,{className:`w-4 h-4`}):(0,L.jsx)(uf,{className:`w-4 h-4`})})]}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Minimum 8 characters`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block text-sm font-medium text-forest mb-2`,children:`Confirm New Password`}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`input`,{type:u?`text`:`password`,value:i,onChange:e=>a(e.target.value),className:`w-full border border-taupe rounded-lg px-3 py-2 pr-10 text-sm`,autoComplete:`new-password`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>d(!u),className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground`,tabIndex:-1,children:u?(0,L.jsx)(lf,{className:`w-4 h-4`}):(0,L.jsx)(uf,{className:`w-4 h-4`})})]})]}),(0,L.jsx)(`div`,{className:`flex gap-3`,children:(0,L.jsx)(Cm,{type:`submit`,disabled:f.isPending,children:f.isPending?`Saving...`:`Update Password`})})]})})]})}var IW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,L.jsx)(`table`,{ref:n,className:H(`w-full caption-bottom text-sm`,e),...t})}));IW.displayName=`Table`;var LW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`thead`,{ref:n,className:H(`[&_tr]:border-b`,e),...t}));LW.displayName=`TableHeader`;var RW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`tbody`,{ref:n,className:H(`[&_tr:last-child]:border-0`,e),...t}));RW.displayName=`TableBody`;var zW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`tfoot`,{ref:n,className:H(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));zW.displayName=`TableFooter`;var BW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`tr`,{ref:n,className:H(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));BW.displayName=`TableRow`;var VW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`th`,{ref:n,className:H(`h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));VW.displayName=`TableHead`;var HW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`td`,{ref:n,className:H(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));HW.displayName=`TableCell`;var UW=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`caption`,{ref:n,className:H(`mt-4 text-sm text-muted-foreground`,e),...t}));UW.displayName=`TableCaption`;var WW=S.forwardRef(({className:e,type:t,...n},r)=>(0,L.jsx)(`input`,{type:t,className:H(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:r,...n}));WW.displayName=`Input`;function GW(e){let t=e+`CollectionProvider`,[n,r]=la(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=S.useRef(null),a=S.useRef(new Map).current;return(0,L.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=da(s),l=S.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=ca(t,a(s,n).collectionRef);return(0,L.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=da(u),p=S.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=S.useRef(null),s=ca(t,o),c=a(u,n);return S.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,L.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return S.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var KW=S.createContext(void 0);function qW(e){let t=S.useContext(KW);return e||t||`ltr`}var JW=0,YW=null;function XW(){S.useEffect(()=>{YW||={start:ZW(),end:ZW()};let{start:e,end:t}=YW;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),JW++,()=>{JW===1&&(YW?.start.remove(),YW?.end.remove(),YW=null),JW=Math.max(0,JW-1)}},[])}function ZW(){let 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 QW=`focusScope.autoFocusOnMount`,$W=`focusScope.autoFocusOnUnmount`,eG={bubbles:!1,cancelable:!0},tG=`FocusScope`,nG=S.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=S.useState(null),l=Da(i),u=Da(a),d=S.useRef(null),f=ca(t,c),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:lG(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||lG(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&lG(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),S.useEffect(()=>{if(s){uG.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(QW,eG);s.addEventListener(QW,l),s.dispatchEvent(t),t.defaultPrevented||(rG(pG(aG(s)),{select:!0}),document.activeElement===e&&lG(s))}return()=>{s.removeEventListener(QW,l),setTimeout(()=>{let t=new CustomEvent($W,eG);s.addEventListener($W,u),s.dispatchEvent(t),t.defaultPrevented||lG(e??document.body,{select:!0}),s.removeEventListener($W,u),uG.remove(p)},0)}}},[s,l,u,p]);let m=S.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=iG(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&lG(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&lG(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(Ta.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});nG.displayName=tG;function rG(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(lG(r,{select:t}),document.activeElement!==n)return}function iG(e){let t=aG(e);return[oG(t,e),oG(t.reverse(),e)]}function aG(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oG(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):sG(r,{upTo:t})))return r}function sG(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 cG(e){return e instanceof HTMLInputElement&&`select`in e}function lG(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cG(e)&&t&&e.select()}}var uG=dG();function dG(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=fG(e,t),e.unshift(t)},remove(t){e=fG(e,t),e[0]?.resume()}}}function fG(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pG(e){return e.filter(e=>e.tagName!==`A`)}var mG=!1;function hG(){let[e,t]=S.useState(mG);return S.useEffect(()=>{mG||(mG=!0,t(!0))},[]),e}var gG=S.useSyncExternalStore;function _G(){return()=>{}}function vG(){return gG(_G,()=>!0,()=>!1)}var yG=typeof gG==`function`?vG:hG,bG=`rovingFocusGroup.onEntryFocus`,xG={bubbles:!1,cancelable:!0},SG=`RovingFocusGroup`,[CG,wG,TG]=GW(SG),[EG,DG]=la(SG,[TG]),[OG,kG]=EG(SG),AG=S.forwardRef((e,t)=>(0,L.jsx)(CG.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(CG.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(jG,{...e,ref:t})})}));AG.displayName=SG;var jG=S.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=S.useRef(null),p=ca(t,f),m=qW(a),[h,g]=Vc({prop:o,defaultProp:s??null,onChange:c,caller:SG}),[_,v]=S.useState(!1),y=Da(l),b=wG(n),x=S.useRef(!1),[C,w]=S.useState(0);return S.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(bG,y),()=>e.removeEventListener(bG,y)},[y]),(0,L.jsx)(OG,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:S.useCallback(e=>g(e),[g]),onItemShiftTab:S.useCallback(()=>v(!0),[]),onFocusableItemAdd:S.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:S.useCallback(()=>w(e=>e-1),[]),children:(0,L.jsx)(Ta.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:z(e.onMouseDown,()=>{x.current=!0}),onFocus:z(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(bG,xG);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);LG([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:z(e.onBlur,()=>v(!1))})})}),MG=`RovingFocusGroupItem`,NG=S.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Ka(),l=a||c,u=kG(MG,n),d=u.currentTabStopId===l,f=wG(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=yG();return Ua(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),S.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,L.jsx)(CG.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,L.jsx)(Ta.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:z(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=IG(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?RG(n,r+1):n.slice(r+1)}setTimeout(()=>LG(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});NG.displayName=MG;var PG={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function FG(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function IG(e,t,n){let r=FG(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return PG[r]}function LG(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function RG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zG=AG,BG=NG,VG=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},HG=new WeakMap,UG=new WeakMap,WG={},GG=0,KG=function(e){return e&&(e.host||KG(e.parentNode))},qG=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=KG(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},JG=function(e,t,n,r){var i=qG(t,Array.isArray(e)?e:[e]);WG[n]||(WG[n]=new WeakMap);var a=WG[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(HG.get(e)||0)+1,l=(a.get(e)||0)+1;HG.set(e,c),a.set(e,l),o.push(e),c===1&&i&&UG.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),GG++,function(){o.forEach(function(e){var t=HG.get(e)-1,i=a.get(e)-1;HG.set(e,t),a.set(e,i),t||(UG.has(e)||e.removeAttribute(r),UG.delete(e)),i||e.removeAttribute(n)}),GG--,GG||(HG=new WeakMap,HG=new WeakMap,UG=new WeakMap,WG={})}},YG=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||VG(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),JG(r,i,n,`aria-hidden`)):function(){return null}},XG=function(){return XG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XG.apply(this,arguments)};function ZG(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 QG(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var $G=`right-scroll-bar-position`,eK=`width-before-scroll-bar`,tK=`with-scroll-bars-hidden`,nK=`--removed-body-scroll-bar-size`;function rK(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function iK(e,t){var n=(0,S.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var aK=typeof window<`u`?S.useLayoutEffect:S.useEffect,oK=new WeakMap;function sK(e,t){var n=iK(t||null,function(t){return e.forEach(function(e){return rK(e,t)})});return aK(function(){var t=oK.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||rK(e,null)}),i.forEach(function(e){r.has(e)||rK(e,a)})}oK.set(n,e)},[e]),n}function cK(e){return e}function lK(e,t){t===void 0&&(t=cK);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function uK(e){e===void 0&&(e={});var t=lK(null);return t.options=XG({async:!0,ssr:!1},e),t}var dK=function(e){var t=e.sideCar,n=ZG(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return S.createElement(r,XG({},n))};dK.isSideCarExport=!0;function fK(e,t){return e.useMedium(t),dK}var pK=uK(),mK=function(){},hK=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:mK,onWheelCapture:mK,onTouchMoveCapture:mK}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ZG(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,C=sK([n,t]),w=XG(XG({},b),i);return S.createElement(S.Fragment,null,u&&S.createElement(x,{sideCar:pK,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?S.cloneElement(S.Children.only(s),XG(XG({},w),{ref:C})):S.createElement(v,XG({},w,{className:c,ref:C}),s))});hK.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hK.classNames={fullWidth:eK,zeroRight:$G};var gK,_K=function(){if(gK)return gK;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function vK(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=_K();return t&&e.setAttribute(`nonce`,t),e}function yK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bK(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var xK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vK())&&(yK(t,n),bK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},SK=function(){var e=xK();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},CK=function(){var e=SK();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},wK={left:0,top:0,right:0,gap:0},TK=function(e){return parseInt(e||``,10)||0},EK=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[TK(n),TK(r),TK(i)]},DK=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return wK;var t=EK(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])}},OK=CK(),kK=`data-scroll-locked`,AK=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` .${tK} { overflow: hidden ${r}; padding-right: ${s}px ${r}; } body[${kK}] { overflow: hidden ${r}; overscroll-behavior: contain; ${[t&&`position: relative ${r};`,n===`margin`&&` padding-left: ${i}px; padding-top: ${a}px; padding-right: ${o}px; margin-left:0; margin-top:0; margin-right: ${s}px ${r}; `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} } .${$G} { right: ${s}px ${r}; } .${eK} { margin-right: ${s}px ${r}; } .${$G} .${$G} { right: 0 ${r}; } .${eK} .${eK} { margin-right: 0 ${r}; } body[${kK}] { ${nK}: ${s}px; } `},jK=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},MK=function(){S.useEffect(function(){return document.body.setAttribute(kK,(jK()+1).toString()),function(){var e=jK()-1;e<=0?document.body.removeAttribute(kK):document.body.setAttribute(kK,e.toString())}},[])},NK=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;MK();var a=S.useMemo(function(){return DK(i)},[i]);return S.createElement(OK,{styles:AK(a,!t,i,n?``:`!important`)})},PK=!1;if(typeof window<`u`)try{var FK=Object.defineProperty({},"passive",{get:function(){return PK=!0,!0}});window.addEventListener(`test`,FK,FK),window.removeEventListener(`test`,FK,FK)}catch{PK=!1}var IK=PK?{passive:!1}:!1,LK=function(e){return e.tagName===`TEXTAREA`},RK=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!LK(e)&&n[t]===`visible`)},zK=function(e){return RK(e,`overflowY`)},BK=function(e){return RK(e,`overflowX`)},VK=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),WK(e,r)){var i=GK(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},HK=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},UK=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},WK=function(e,t){return e===`v`?zK(t):BK(t)},GK=function(e,t){return e===`v`?HK(t):UK(t)},KK=function(e,t){return e===`h`&&t===`rtl`?-1:1},qK=function(e,t,n,r,i){var a=KK(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=GK(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&WK(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},JK=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YK=function(e){return[e.deltaX,e.deltaY]},XK=function(e){return e&&`current`in e?e.current:e},ZK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},QK=function(e){return` .block-interactivity-${e} {pointer-events: none;} .allow-interactivity-${e} {pointer-events: all;} `},$K=0,eq=[];function tq(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState($K++)[0],a=S.useState(CK)[0],o=S.useRef(e);S.useEffect(function(){o.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=QG([e.lockRef.current],(e.shards||[]).map(XK),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=S.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=JK(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=VK(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=VK(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return qK(h,t,e,h===`h`?s:c,!0)},[]),c=S.useCallback(function(e){var n=e;if(!(!eq.length||eq[eq.length-1]!==a)){var r=`deltaY`in n?YK(n):JK(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ZK(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(XK).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=S.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:nq(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=S.useCallback(function(e){n.current=JK(e),r.current=void 0},[]),d=S.useCallback(function(t){l(t.type,YK(t),t.target,s(t,e.lockRef.current))},[]),f=S.useCallback(function(t){l(t.type,JK(t),t.target,s(t,e.lockRef.current))},[]);S.useEffect(function(){return eq.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,IK),document.addEventListener(`touchmove`,c,IK),document.addEventListener(`touchstart`,u,IK),function(){eq=eq.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,IK),document.removeEventListener(`touchmove`,c,IK),document.removeEventListener(`touchstart`,u,IK)}},[]);var p=e.removeScrollBar,m=e.inert;return S.createElement(S.Fragment,null,m?S.createElement(a,{styles:QK(i)}):null,p?S.createElement(NK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var rq=fK(pK,tq),iq=S.forwardRef(function(e,t){return S.createElement(hK,XG({},e,{ref:t,sideCar:rq}))});iq.classNames=hK.classNames;var aq=[`Enter`,` `],oq=[`ArrowDown`,`PageUp`,`Home`],sq=[`ArrowUp`,`PageDown`,`End`],cq=[...oq,...sq],lq={ltr:[...aq,`ArrowRight`],rtl:[...aq,`ArrowLeft`]},uq={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},dq=`Menu`,[fq,pq,mq]=GW(dq),[hq,gq]=la(dq,[mq,dc,DG]),_q=dc(),vq=DG(),[yq,bq]=hq(dq),[xq,Sq]=hq(dq),Cq=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=_q(t),[c,l]=S.useState(null),u=S.useRef(!1),d=Da(a),f=qW(i);return S.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),S.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,L.jsx)(Dc,{...s,children:(0,L.jsx)(yq,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,L.jsx)(xq,{scope:t,onClose:S.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Cq.displayName=dq;var wq=`MenuAnchor`,Tq=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=_q(n);return(0,L.jsx)(Oc,{...i,...r,ref:t})});Tq.displayName=wq;var Eq=`MenuPortal`,[Dq,Oq]=hq(Eq,{forceMount:void 0}),kq=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=bq(Eq,t);return(0,L.jsx)(Dq,{scope:t,forceMount:n,children:(0,L.jsx)(Pc,{present:n||a.open,children:(0,L.jsx)(Mc,{asChild:!0,container:i,children:r})})})};kq.displayName=Eq;var Aq=`MenuContent`,[jq,Mq]=hq(Aq),Nq=S.forwardRef((e,t)=>{let n=Oq(Aq,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bq(Aq,e.__scopeMenu),o=Sq(Aq,e.__scopeMenu);return(0,L.jsx)(fq.Provider,{scope:e.__scopeMenu,children:(0,L.jsx)(Pc,{present:r||a.open,children:(0,L.jsx)(fq.Slot,{scope:e.__scopeMenu,children:o.modal?(0,L.jsx)(Pq,{...i,ref:t}):(0,L.jsx)(Fq,{...i,ref:t})})})})}),Pq=S.forwardRef((e,t)=>{let n=bq(Aq,e.__scopeMenu),r=S.useRef(null),i=ca(t,r);return S.useEffect(()=>{let e=r.current;if(e)return YG(e)},[]),(0,L.jsx)(Lq,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Fq=S.forwardRef((e,t)=>{let n=bq(Aq,e.__scopeMenu);return(0,L.jsx)(Lq,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Iq=da(`MenuContent.ScrollLock`),Lq=S.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=bq(Aq,n),_=Sq(Aq,n),v=_q(n),y=vq(n),b=pq(n),[x,C]=S.useState(null),w=S.useRef(null),T=ca(t,w,g.onContentChange),E=S.useRef(0),D=S.useRef(``),O=S.useRef(0),k=S.useRef(null),A=S.useRef(`right`),j=S.useRef(0),M=m?iq:S.Fragment,N=m?{as:Iq,allowPinchZoom:!0}:void 0,P=e=>{let t=D.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=xJ(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};S.useEffect(()=>()=>window.clearTimeout(E.current),[]),XW();let ee=S.useCallback(e=>A.current===k.current?.side&&CJ(e,k.current?.area),[]);return(0,L.jsx)(jq,{scope:n,searchRef:D,onItemEnter:S.useCallback(e=>{ee(e)&&e.preventDefault()},[ee]),onItemLeave:S.useCallback(e=>{ee(e)||(w.current?.focus(),C(null))},[ee]),onTriggerLeave:S.useCallback(e=>{ee(e)&&e.preventDefault()},[ee]),pointerGraceTimerRef:O,onPointerGraceIntentChange:S.useCallback(e=>{k.current=e},[]),children:(0,L.jsx)(M,{...N,children:(0,L.jsx)(nG,{asChild:!0,trapped:i,onMountAutoFocus:z(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,L.jsx)(Pa,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,L.jsx)(zG,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:C,onEntryFocus:z(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,L.jsx)(kc,{role:`menu`,"aria-orientation":`vertical`,"data-state":gJ(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:z(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!cq.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);sq.includes(e.key)&&a.reverse(),yJ(a)}),onBlur:z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:z(e.onPointerMove,wJ(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})});Nq.displayName=Aq;var Rq=`MenuGroup`,zq=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,L.jsx)(Ta.div,{role:`group`,...r,ref:t})});zq.displayName=Rq;var Bq=`MenuLabel`,Vq=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,L.jsx)(Ta.div,{...r,ref:t})});Vq.displayName=Bq;var Hq=`MenuItem`,Uq=`menu.itemSelect`,Wq=S.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=S.useRef(null),o=Sq(Hq,e.__scopeMenu),s=Mq(Hq,e.__scopeMenu),c=ca(t,a),l=S.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Uq,{bubbles:!0,cancelable:!0});e.addEventListener(Uq,e=>r?.(e),{once:!0}),Ea(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,L.jsx)(Gq,{...i,ref:c,disabled:n,onClick:z(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:z(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||aq.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Wq.displayName=Hq;var Gq=S.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Mq(Hq,n),s=vq(n),c=S.useRef(null),l=ca(t,c),[u,d]=S.useState(!1),[f,p]=S.useState(``);return S.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,L.jsx)(fq.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,L.jsx)(BG,{asChild:!0,...s,focusable:!r,children:(0,L.jsx)(Ta.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:z(e.onPointerMove,wJ(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,wJ(e=>o.onItemLeave(e))),onFocus:z(e.onFocus,()=>d(!0)),onBlur:z(e.onBlur,()=>d(!1))})})})}),Kq=`MenuCheckboxItem`,qq=S.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,L.jsx)(tJ,{scope:e.__scopeMenu,checked:n,children:(0,L.jsx)(Wq,{role:`menuitemcheckbox`,"aria-checked":_J(n)?`mixed`:n,...i,ref:t,"data-state":vJ(n),onSelect:z(i.onSelect,()=>r?.(_J(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qq.displayName=Kq;var Jq=`MenuRadioGroup`,[Yq,Xq]=hq(Jq,{value:void 0,onValueChange:()=>{}}),Zq=S.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Da(r);return(0,L.jsx)(Yq,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,L.jsx)(zq,{...i,ref:t})})});Zq.displayName=Jq;var Qq=`MenuRadioItem`,$q=S.forwardRef((e,t)=>{let{value:n,...r}=e,i=Xq(Qq,e.__scopeMenu),a=n===i.value;return(0,L.jsx)(tJ,{scope:e.__scopeMenu,checked:a,children:(0,L.jsx)(Wq,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":vJ(a),onSelect:z(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});$q.displayName=Qq;var eJ=`MenuItemIndicator`,[tJ,nJ]=hq(eJ,{checked:!1}),rJ=S.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=nJ(eJ,n);return(0,L.jsx)(Pc,{present:r||_J(a.checked)||a.checked===!0,children:(0,L.jsx)(Ta.span,{...i,ref:t,"data-state":vJ(a.checked)})})});rJ.displayName=eJ;var iJ=`MenuSeparator`,aJ=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,L.jsx)(Ta.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});aJ.displayName=iJ;var oJ=`MenuArrow`,sJ=S.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=_q(n);return(0,L.jsx)(Ac,{...i,...r,ref:t})});sJ.displayName=oJ;var cJ=`MenuSub`,[lJ,uJ]=hq(cJ),dJ=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=bq(cJ,t),o=_q(t),[s,c]=S.useState(null),[l,u]=S.useState(null),d=Da(i);return S.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,L.jsx)(Dc,{...o,children:(0,L.jsx)(yq,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,L.jsx)(lJ,{scope:t,contentId:Ka(),triggerId:Ka(),trigger:s,onTriggerChange:c,children:n})})})};dJ.displayName=cJ;var fJ=`MenuSubTrigger`,pJ=S.forwardRef((e,t)=>{let n=bq(fJ,e.__scopeMenu),r=Sq(fJ,e.__scopeMenu),i=uJ(fJ,e.__scopeMenu),a=Mq(fJ,e.__scopeMenu),o=S.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=S.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);S.useEffect(()=>u,[u]),S.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=ca(t,i.onTriggerChange);return(0,L.jsx)(Tq,{asChild:!0,...l,children:(0,L.jsx)(Gq,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":gJ(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,wJ(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:z(e.onPointerLeave,wJ(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||lq[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});pJ.displayName=fJ;var mJ=`MenuSubContent`,hJ=S.forwardRef((e,t)=>{let n=Oq(Aq,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=bq(Aq,e.__scopeMenu),s=Sq(Aq,e.__scopeMenu),c=uJ(mJ,e.__scopeMenu),l=S.useRef(null),u=ca(t,l);return(0,L.jsx)(fq.Provider,{scope:e.__scopeMenu,children:(0,L.jsx)(Pc,{present:r||o.open,children:(0,L.jsx)(fq.Slot,{scope:e.__scopeMenu,children:(0,L.jsx)(Lq,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:z(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:z(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=uq[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});hJ.displayName=mJ;function gJ(e){return e?`open`:`closed`}function _J(e){return e===`indeterminate`}function vJ(e){return _J(e)?`indeterminate`:e?`checked`:`unchecked`}function yJ(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function bJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xJ(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=bJ(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function SJ(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function CJ(e,t){return t?SJ({x:e.clientX,y:e.clientY},t):!1}function wJ(e){return t=>t.pointerType===`mouse`?e(t):void 0}var TJ=Cq,EJ=Tq,DJ=kq,OJ=Nq,kJ=zq,AJ=Vq,jJ=Wq,MJ=qq,NJ=Zq,PJ=$q,FJ=rJ,IJ=aJ,LJ=sJ,RJ=pJ,zJ=hJ,BJ=`DropdownMenu`,[VJ,HJ]=la(BJ,[gq]),UJ=gq(),[WJ,GJ]=VJ(BJ),KJ=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=UJ(t),l=S.useRef(null),[u,d]=Vc({prop:i,defaultProp:a??!1,onChange:o,caller:BJ});return(0,L.jsx)(WJ,{scope:t,triggerId:Ka(),triggerRef:l,contentId:Ka(),open:u,onOpenChange:d,onOpenToggle:S.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,L.jsx)(TJ,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};KJ.displayName=BJ;var qJ=`DropdownMenuTrigger`,JJ=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=GJ(qJ,n),o=UJ(n),s=ca(t,a.triggerRef);return(0,L.jsx)(EJ,{asChild:!0,...o,children:(0,L.jsx)(Ta.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});JJ.displayName=qJ;var YJ=`DropdownMenuPortal`,XJ=e=>{let{__scopeDropdownMenu:t,...n}=e,r=UJ(t);return(0,L.jsx)(DJ,{...r,...n})};XJ.displayName=YJ;var ZJ=`DropdownMenuContent`,QJ=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=GJ(ZJ,n),a=UJ(n),o=S.useRef(!1);return(0,L.jsx)(OJ,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});QJ.displayName=ZJ;var $J=`DropdownMenuGroup`,eY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(kJ,{...i,...r,ref:t})});eY.displayName=$J;var tY=`DropdownMenuLabel`,nY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(AJ,{...i,...r,ref:t})});nY.displayName=tY;var rY=`DropdownMenuItem`,iY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(jJ,{...i,...r,ref:t})});iY.displayName=rY;var aY=`DropdownMenuCheckboxItem`,oY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(MJ,{...i,...r,ref:t})});oY.displayName=aY;var sY=`DropdownMenuRadioGroup`,cY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(NJ,{...i,...r,ref:t})});cY.displayName=sY;var lY=`DropdownMenuRadioItem`,uY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(PJ,{...i,...r,ref:t})});uY.displayName=lY;var dY=`DropdownMenuItemIndicator`,fY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(FJ,{...i,...r,ref:t})});fY.displayName=dY;var pY=`DropdownMenuSeparator`,mY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(IJ,{...i,...r,ref:t})});mY.displayName=pY;var hY=`DropdownMenuArrow`,gY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(LJ,{...i,...r,ref:t})});gY.displayName=hY;var _Y=`DropdownMenuSubTrigger`,vY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(RJ,{...i,...r,ref:t})});vY.displayName=_Y;var yY=`DropdownMenuSubContent`,bY=S.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=UJ(n);return(0,L.jsx)(zJ,{...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)`}})});bY.displayName=yY;var xY=KJ,SY=JJ,CY=XJ,wY=QJ,TY=nY,EY=iY,DY=oY,OY=uY,kY=fY,AY=mY,jY=vY,MY=bY,NY=xY,PY=SY,FY=S.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,L.jsxs)(jY,{ref:i,className:H(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,L.jsx)($d,{className:`ml-auto`})]}));FY.displayName=jY.displayName;var IY=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(MY,{ref:n,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin)`,e),...t}));IY.displayName=MY.displayName;var LY=S.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,L.jsx)(CY,{children:(0,L.jsx)(wY,{ref:r,sideOffset:t,className:H(`z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin)`,e),...n})}));LY.displayName=wY.displayName;var RY=S.forwardRef(({className:e,inset:t,...n},r)=>(0,L.jsx)(EY,{ref:r,className:H(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));RY.displayName=EY.displayName;var zY=S.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,L.jsxs)(DY,{ref:i,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...r,children:[(0,L.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,L.jsx)(kY,{children:(0,L.jsx)(Xd,{className:`h-4 w-4`})})}),t]}));zY.displayName=DY.displayName;var BY=S.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsxs)(OY,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,L.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,L.jsx)(kY,{children:(0,L.jsx)(nf,{className:`h-2 w-2 fill-current`})})}),t]}));BY.displayName=OY.displayName;var VY=S.forwardRef(({className:e,inset:t,...n},r)=>(0,L.jsx)(TY,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));VY.displayName=TY.displayName;var HY=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(AY,{ref:n,className:H(`-mx-1 my-1 h-px bg-muted`,e),...t}));HY.displayName=AY.displayName;var UY=({className:e,...t})=>(0,L.jsx)(`span`,{className:H(`ml-auto text-xs tracking-widest opacity-60`,e),...t});UY.displayName=`DropdownMenuShortcut`;var WY=({className:e,...t})=>(0,L.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,className:H(`mx-auto flex w-full justify-center`,e),...t});WY.displayName=`Pagination`;var GY=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`ul`,{ref:n,className:H(`flex flex-row items-center gap-1`,e),...t}));GY.displayName=`PaginationContent`;var KY=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(`li`,{ref:n,className:H(``,e),...t}));KY.displayName=`PaginationItem`;var qY=({className:e,isActive:t,size:n=`icon`,...r})=>(0,L.jsx)(`a`,{"aria-current":t?`page`:void 0,className:H(Sm({variant:t?`outline`:`ghost`,size:n}),e),...r});qY.displayName=`PaginationLink`;var JY=({className:e,...t})=>(0,L.jsxs)(qY,{"aria-label":`Go to previous page`,size:`default`,className:H(`gap-1 pl-2.5`,e),...t,children:[(0,L.jsx)(Qd,{className:`h-4 w-4`}),(0,L.jsx)(`span`,{children:`Previous`})]});JY.displayName=`PaginationPrevious`;var YY=({className:e,...t})=>(0,L.jsxs)(qY,{"aria-label":`Go to next page`,size:`default`,className:H(`gap-1 pr-2.5`,e),...t,children:[(0,L.jsx)(`span`,{children:`Next`}),(0,L.jsx)($d,{className:`h-4 w-4`})]});YY.displayName=`PaginationNext`;var XY=({className:e,...t})=>(0,L.jsxs)(`span`,{"aria-hidden":!0,className:H(`flex h-9 w-9 items-center justify-center`,e),...t,children:[(0,L.jsx)(cf,{className:`h-4 w-4`}),(0,L.jsx)(`span`,{className:`sr-only`,children:`More pages`})]});XY.displayName=`PaginationEllipsis`;var ZY=xm(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function QY({className:e,variant:t,...n}){return(0,L.jsx)(`div`,{className:H(ZY({variant:t}),e),...n})}var $Y=()=>{let e=di();return{useStaffList:(e=1,t=20,n,r)=>Ei({queryKey:[`staff`,e,t,n,r],queryFn:()=>J.getStaff({page:e,limit:t,role:n,search:r}),staleTime:300*1e3}),useStaffDetail:e=>Ei({queryKey:[`staff`,e],queryFn:()=>J.getStaffDetail(e),enabled:!!e,staleTime:300*1e3}),createStaff:Di({mutationFn:e=>J.createStaff(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`staff`]}),R.success(`Staff member created successfully`)},onError:e=>{R.error(e.message||`Failed to create staff member`)}}),updateStaff:Di({mutationFn:({id:e,data:t})=>J.updateStaff(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`staff`]}),R.success(`Staff member updated successfully`)},onError:e=>{R.error(e.message||`Failed to update staff member`)}}),deleteStaff:Di({mutationFn:e=>J.deleteStaff(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`staff`]}),R.success(`Staff member deleted successfully`)},onError:e=>{R.error(e.message||`Failed to delete staff member`)}}),resetPassword:Di({mutationFn:e=>J.resetStaffPassword(e),onSuccess:()=>{R.success(`Password reset email sent`)},onError:e=>{R.error(e.message||`Failed to reset password`)}}),toggleActive:Di({mutationFn:e=>J.toggleStaffActive(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`staff`]}),R.success(`Staff status updated`)},onError:e=>{R.error(e.message||`Failed to update staff status`)}}),useActivityLogs:(e=1,t=50,n,r)=>Ei({queryKey:[`activity-logs`,e,t,n,r],queryFn:()=>J.getActivityLogs({page:e,limit:t,staff_id:n,action:r}),staleTime:120*1e3})}},eX=`Dialog`,[tX,nX]=la(eX),[rX,iX]=tX(eX),aX=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=S.useRef(null),c=S.useRef(null),[l,u]=Vc({prop:r,defaultProp:i??!1,onChange:a,caller:eX});return(0,L.jsx)(rX,{scope:t,triggerRef:s,contentRef:c,contentId:Ka(),titleId:Ka(),descriptionId:Ka(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};aX.displayName=eX;var oX=`DialogTrigger`,sX=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=iX(oX,n),a=ca(t,i.triggerRef);return(0,L.jsx)(Ta.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":DX(i.open),...r,ref:a,onClick:z(e.onClick,i.onOpenToggle)})});sX.displayName=oX;var cX=`DialogPortal`,[lX,uX]=tX(cX,{forceMount:void 0}),dX=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=iX(cX,t);return(0,L.jsx)(lX,{scope:t,forceMount:n,children:S.Children.map(r,e=>(0,L.jsx)(Pc,{present:n||a.open,children:(0,L.jsx)(Mc,{asChild:!0,container:i,children:e})}))})};dX.displayName=cX;var fX=`DialogOverlay`,pX=S.forwardRef((e,t)=>{let n=uX(fX,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=iX(fX,e.__scopeDialog);return a.modal?(0,L.jsx)(Pc,{present:r||a.open,children:(0,L.jsx)(hX,{...i,ref:t})}):null});pX.displayName=fX;var mX=da(`DialogOverlay.RemoveScroll`),hX=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=iX(fX,n),a=ca(t,La());return(0,L.jsx)(iq,{as:mX,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(Ta.div,{"data-state":DX(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),gX=`DialogContent`,_X=S.forwardRef((e,t)=>{let n=uX(gX,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=iX(gX,e.__scopeDialog);return(0,L.jsx)(Pc,{present:r||a.open,children:a.modal?(0,L.jsx)(vX,{...i,ref:t}):(0,L.jsx)(yX,{...i,ref:t})})});_X.displayName=gX;var vX=S.forwardRef((e,t)=>{let n=iX(gX,e.__scopeDialog),r=S.useRef(null),i=ca(t,n.contentRef,r);return S.useEffect(()=>{let e=r.current;if(e)return YG(e)},[]),(0,L.jsx)(bX,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault())})}),yX=S.forwardRef((e,t)=>{let n=iX(gX,e.__scopeDialog),r=S.useRef(!1),i=S.useRef(!1);return(0,L.jsx)(bX,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),bX=S.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=iX(gX,n);return XW(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(nG,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Pa,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":DX(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),xX=`DialogTitle`,SX=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=iX(xX,n);return(0,L.jsx)(Ta.h2,{id:i.titleId,...r,ref:t})});SX.displayName=xX;var CX=`DialogDescription`,wX=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=iX(CX,n);return(0,L.jsx)(Ta.p,{id:i.descriptionId,...r,ref:t})});wX.displayName=CX;var TX=`DialogClose`,EX=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=iX(TX,n);return(0,L.jsx)(Ta.button,{type:`button`,...r,ref:t,onClick:z(e.onClick,()=>i.onOpenChange(!1))})});EX.displayName=TX;function DX(e){return e?`open`:`closed`}var OX=`AlertDialog`,[kX,AX]=la(OX,[nX]),jX=nX(),MX=e=>{let{__scopeAlertDialog:t,...n}=e,r=jX(t);return(0,L.jsx)(aX,{...r,...n,modal:!0})};MX.displayName=OX;var NX=`AlertDialogTrigger`,PX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=jX(n);return(0,L.jsx)(sX,{...i,...r,ref:t})});PX.displayName=NX;var FX=`AlertDialogPortal`,IX=e=>{let{__scopeAlertDialog:t,...n}=e,r=jX(t);return(0,L.jsx)(dX,{...r,...n})};IX.displayName=FX;var LX=`AlertDialogOverlay`,RX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=jX(n);return(0,L.jsx)(pX,{...i,...r,ref:t})});RX.displayName=LX;var zX=`AlertDialogContent`,[BX,VX]=kX(zX),HX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=jX(n),o=ca(t,S.useRef(null)),s=S.useRef(null);return(0,L.jsx)(BX,{scope:n,cancelRef:s,children:(0,L.jsx)(_X,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:z(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});HX.displayName=zX;var UX=`AlertDialogTitle`,WX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=jX(n);return(0,L.jsx)(SX,{...i,...r,ref:t})});WX.displayName=UX;var GX=`AlertDialogDescription`,KX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=jX(n);return(0,L.jsx)(wX,{...i,...r,ref:t})});KX.displayName=GX;var qX=`AlertDialogAction`,JX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=jX(n);return(0,L.jsx)(EX,{...i,...r,ref:t})});JX.displayName=qX;var YX=`AlertDialogCancel`,XX=S.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=VX(YX,n),a=jX(n),o=ca(t,i);return(0,L.jsx)(EX,{...a,...r,ref:o})});XX.displayName=YX;var ZX=MX,QX=IX,$X=RX,eZ=HX,tZ=JX,nZ=XX,rZ=WX,iZ=KX,aZ=ZX,oZ=QX,sZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)($X,{className:H(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));sZ.displayName=$X.displayName;var cZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsxs)(oZ,{children:[(0,L.jsx)(sZ,{}),(0,L.jsx)(eZ,{ref:n,className:H(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg`,e),...t})]}));cZ.displayName=eZ.displayName;var lZ=({className:e,...t})=>(0,L.jsx)(`div`,{className:H(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});lZ.displayName=`AlertDialogHeader`;var uZ=({className:e,...t})=>(0,L.jsx)(`div`,{className:H(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});uZ.displayName=`AlertDialogFooter`;var dZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(rZ,{ref:n,className:H(`text-lg font-semibold`,e),...t}));dZ.displayName=rZ.displayName;var fZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(iZ,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));fZ.displayName=iZ.displayName;var pZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(tZ,{ref:n,className:H(Sm(),e),...t}));pZ.displayName=tZ.displayName;var mZ=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(nZ,{ref:n,className:H(Sm({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));mZ.displayName=nZ.displayName;function hZ({open:e,title:t,description:n,onConfirm:r,onCancel:i,isLoading:a=!1}){return(0,L.jsx)(aZ,{open:e,onOpenChange:e=>!e&&i(),children:(0,L.jsxs)(cZ,{children:[(0,L.jsxs)(lZ,{children:[(0,L.jsx)(dZ,{children:t}),(0,L.jsx)(fZ,{children:n})]}),(0,L.jsxs)(uZ,{children:[(0,L.jsx)(mZ,{disabled:a,onClick:i,children:`Cancel`}),(0,L.jsx)(pZ,{disabled:a,onClick:r,children:a?`Working…`:`Confirm`})]})]})})}function gZ(){let e=dt(),{useStaffList:t,deleteStaff:n,toggleActive:r,resetPassword:i}=$Y(),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(null),{data:p,isLoading:m}=t(a,20,l||void 0,s||void 0),h=async e=>{await n.mutateAsync(e),f(null)},g=async e=>{await r.mutateAsync(e)},_=async e=>{await i.mutateAsync(e)};if(m)return(0,L.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,L.jsx)(AW,{})});let v=Array.isArray(p)?p:p?.data??[],y=Array.isArray(p)?{}:p?.pagination??{};return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Staff Management`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage your team members and permissions`})]}),(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/staff/new`),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Staff Member`]})]}),(0,L.jsxs)(`div`,{className:`flex gap-4`,children:[(0,L.jsx)(WW,{placeholder:`Search by name or email...`,value:s,onChange:e=>{c(e.target.value),o(1)},className:`max-w-sm`}),(0,L.jsxs)(`select`,{value:l,onChange:e=>{u(e.target.value),o(1)},className:`px-3 py-2 border border-border rounded-md`,children:[(0,L.jsx)(`option`,{value:``,children:`All Roles`}),(0,L.jsx)(`option`,{value:`admin`,children:`Admin`}),(0,L.jsx)(`option`,{value:`staff`,children:`Staff`})]})]}),(0,L.jsx)(`div`,{className:`border border-border rounded-lg overflow-hidden`,children:(0,L.jsxs)(IW,{children:[(0,L.jsx)(LW,{children:(0,L.jsxs)(BW,{children:[(0,L.jsx)(VW,{children:`Name`}),(0,L.jsx)(VW,{children:`Email`}),(0,L.jsx)(VW,{children:`Phone`}),(0,L.jsx)(VW,{children:`Role`}),(0,L.jsx)(VW,{children:`Status`}),(0,L.jsx)(VW,{children:`Last Login`}),(0,L.jsx)(VW,{className:`text-right`,children:`Actions`})]})}),(0,L.jsx)(RW,{children:v.length===0?(0,L.jsx)(BW,{children:(0,L.jsx)(HW,{colSpan:7,className:`text-center py-8 text-muted-foreground`,children:`No staff members found`})}):v.map(t=>(0,L.jsxs)(BW,{children:[(0,L.jsx)(HW,{className:`font-medium`,children:t.name}),(0,L.jsx)(HW,{children:t.email}),(0,L.jsx)(HW,{children:t.phone}),(0,L.jsx)(HW,{children:(0,L.jsx)(QY,{variant:t.role===`admin`?`default`:`secondary`,children:t.role})}),(0,L.jsx)(HW,{children:(0,L.jsx)(QY,{variant:t.is_active?`default`:`destructive`,children:t.is_active?`Active`:`Inactive`})}),(0,L.jsx)(HW,{className:`text-sm text-muted-foreground`,children:t.last_login?new Date(t.last_login).toLocaleDateString():`Never`}),(0,L.jsx)(HW,{className:`text-right`,children:(0,L.jsxs)(NY,{children:[(0,L.jsx)(PY,{asChild:!0,children:(0,L.jsx)(Cm,{variant:`ghost`,size:`sm`,children:(0,L.jsx)(sf,{className:`w-4 h-4`})})}),(0,L.jsxs)(LY,{align:`end`,children:[(0,L.jsxs)(RY,{onClick:()=>e(`/admin/staff/${t.id}`),children:[(0,L.jsx)(uf,{className:`w-4 h-4 mr-2`}),`View`]}),(0,L.jsxs)(RY,{onClick:()=>e(`/admin/staff/${t.id}/edit`),children:[(0,L.jsx)(kf,{className:`w-4 h-4 mr-2`}),`Edit`]}),(0,L.jsxs)(RY,{onClick:()=>_(t.id),children:[(0,L.jsx)(Mf,{className:`w-4 h-4 mr-2`}),`Reset Password`]}),(0,L.jsx)(RY,{onClick:()=>g(t.id),children:t.is_active?`Deactivate`:`Activate`}),(0,L.jsxs)(RY,{className:`text-destructive`,onClick:()=>f(t.id),children:[(0,L.jsx)(Hf,{className:`w-4 h-4 mr-2`}),`Delete`]})]})]})})]},t.id))})]})}),y.last_page>1&&(0,L.jsx)(WY,{currentPage:a,totalPages:y.last_page,onPageChange:o}),(0,L.jsx)(hZ,{open:d!==null,title:`Delete Staff Member`,description:`This action cannot be undone. The staff member will be permanently deleted.`,onConfirm:()=>d!==null&&h(d),onCancel:()=>f(null),isLoading:n.isPending})]})}var _Z=e=>e.type===`checkbox`,vZ=e=>e instanceof Date,yZ=e=>e==null,bZ=e=>typeof e==`object`,xZ=e=>!yZ(e)&&!Array.isArray(e)&&bZ(e)&&!vZ(e),SZ=e=>xZ(e)&&e.target?_Z(e.target)?e.target.checked:e.target.value:e,CZ=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),wZ=e=>{let t=e.constructor&&e.constructor.prototype;return xZ(t)&&t.hasOwnProperty(`isPrototypeOf`)},TZ=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function EZ(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(TZ&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(xZ(e)&&wZ(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=EZ(e[t]));return r}var DZ={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},OZ={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},kZ={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},AZ=`root`,jZ=[`__proto__`,`constructor`,`prototype`],MZ=/^\w*$/,NZ=e=>MZ.test(e),PZ=e=>e===void 0,FZ=/[.[\]'"]/,IZ=e=>e.split(FZ).filter(Boolean),Y=(e,t,n)=>{if(!t||!xZ(e))return n;let r=NZ(t)?[t]:IZ(t);if(r.some(e=>jZ.includes(e)))return n;let i=r.reduce((e,t)=>yZ(e)?void 0:e[t],e);return PZ(i)||i===e?PZ(e[t])?n:e[t]:i},LZ=e=>typeof e==`boolean`,RZ=e=>typeof e==`function`,zZ=(e,t,n)=>{let r=-1,i=NZ(t)?[t]:IZ(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=xZ(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(jZ.includes(t))return;e[t]=a,e=e[t]}},BZ=S.createContext(null);BZ.displayName=`HookFormControlContext`;var VZ=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==OZ.all&&(t._proxyFormState[i]=!r||OZ.all),n&&(n[i]=!0),e[i]}});return i},HZ=TZ?S.useLayoutEffect:S.useEffect,UZ=e=>typeof e==`string`,WZ=(e,t,n,r,i)=>UZ(e)?(r&&t.watch.add(e),Y(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Y(n,e))):(r&&(t.watchAll=!0),n),GZ=e=>yZ(e)||!bZ(e),KZ=(e,t)=>t.length===0&&!Array.isArray(e)&&!wZ(e);function qZ(e,t,n=new WeakMap){if(e===t)return!0;if(GZ(e)||GZ(t))return Object.is(e,t);if(vZ(e)&&vZ(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(KZ(e,r)||KZ(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;let a=n.get(e);if(a&&a.has(t))return!0;if(a)a.add(t);else{let r=new WeakSet;r.add(t),n.set(e,r)}for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(vZ(r)&&vZ(e)||(xZ(r)||Array.isArray(r))&&(xZ(e)||Array.isArray(e))?!qZ(r,e,n):!Object.is(r,e))return!1}}return!0}var JZ=e=>{let t={};for(let n of Object.keys(e))if(bZ(e[n])&&e[n]!==null&&!vZ(e[n])){let r=JZ(e[n]);for(let e of Object.keys(r))t[`${n}.${e}`]=r[e]}else t[n]=e[n];return t},YZ=S.createContext(null);YZ.displayName=`HookFormContext`;var XZ=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ZZ=e=>Array.isArray(e)?e.filter(Boolean):[],QZ=e=>Array.isArray(e)?e:[e],$Z=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function eQ(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&xZ(i)&&a){let e=eQ(i,a);xZ(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var tQ=e=>xZ(e)&&!Object.keys(e).length,nQ=e=>e.type===`file`,rQ=e=>{if(!TZ)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},iQ=e=>e.type===`select-multiple`,aQ=e=>e.type===`radio`,oQ=e=>aQ(e)||_Z(e),sQ=e=>rQ(e)&&e.isConnected;function cQ(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(yZ(e)){e=void 0;break}e=e[t[r]],r++}return e}function lQ(e){for(let t in e)if(e.hasOwnProperty(t)&&!PZ(e[t]))return!1;return!0}function uQ(e,t){if(UZ(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:NZ(t)?[t]:IZ(t);if(n.some(e=>jZ.includes(String(e))))return e;let r=n.length===1?e:cQ(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(xZ(r)&&tQ(r)||Array.isArray(r)&&lQ(r))&&uQ(e,n.slice(0,-1)),e}var dQ=e=>{for(let t in e)if(RZ(e[t]))return!0;return!1};function fQ(e){return Array.isArray(e)||xZ(e)&&!dQ(e)}function pQ(e,t={}){for(let n in e){let r=e[n];fQ(r)?(t[n]=Array.isArray(r)?[]:{},pQ(r,t[n])):PZ(r)||(t[n]=!0)}return t}function mQ(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){let t=e.map(e=>mQ(e));return t.some(e=>e!==void 0)?t:void 0}if(xZ(e)){let t={};for(let n in e){let r=mQ(e[n]);PZ(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function hQ(e,t,n){n||=pQ(t);for(let r in e){let i=e[r];if(fQ(i))PZ(t)||GZ(n[r])?n[r]=pQ(i,Array.isArray(i)?[]:{}):hQ(i,yZ(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!qZ(i,e)}}return mQ(n)||{}}var gQ={value:!1,isValid:!1},_Q={value:!0,isValid:!0},vQ=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!PZ(e[0].attributes.value)?PZ(e[0].value)||e[0].value===``?_Q:{value:e[0].value,isValid:!0}:_Q:gQ}return gQ},yQ=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>PZ(e)?e:t?e===``?NaN:e&&+e:n&&UZ(e)?new Date(e):r?r(e):e,bQ={isValid:!1,value:null},xQ=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,bQ):bQ;function SQ(e){let t=e.ref;return nQ(t)?t.files:aQ(t)?xQ(e.refs).value:iQ(t)?[...t.selectedOptions].map(({value:e})=>e):_Z(t)?vQ(e.refs).value:yQ(PZ(t.value)?e.ref.value:t.value,e)}var CQ=(e,t,n,r)=>{let i={};for(let n of e){let e=Y(t,n);e&&zZ(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},wQ=e=>e instanceof RegExp,TQ=e=>PZ(e)?e:wQ(e)?e.source:xZ(e)?wQ(e.value)?e.value.source:e.value:e,EQ=e=>({isOnSubmit:!e||e===OZ.onSubmit,isOnBlur:e===OZ.onBlur,isOnChange:e===OZ.onChange,isOnAll:e===OZ.all,isOnTouch:e===OZ.onTouched}),DQ=`AsyncFunction`,OQ=e=>{if(!e||!e.validate)return!1;if(RZ(e.validate))return e.validate.constructor.name===DQ;if(xZ(e.validate)){for(let t in e.validate)if(e.validate[t].constructor.name===DQ)return!0}return!1},kQ=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),AQ=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(let n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===`.`)return!0;return!1},jQ=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=Y(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(jQ(a,t))break}else if(xZ(a)&&jQ(a,t))break}}};function MQ(e,t,n){let r=Y(e,n);if(r||NZ(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=Y(t,r),o=Y(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var NQ=(e,t,n,r)=>{n(e);let{name:i,...a}=e,o=Object.keys(a);return!o.length||r&&o.length>=Object.keys(t).length||o.find(e=>t[e]===(!r||OZ.all))},PQ=(e,t,n)=>!e||!t||e===t||QZ(e).some(e=>e&&(n?e===t||e.startsWith(t+`.`):e.startsWith(t)||t.startsWith(e))),FQ=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,IQ=(e,t)=>!ZZ(Y(e,t)).length&&uQ(e,t),LQ=(e,t,n)=>{let r=Y(e,n),i=Array.isArray(r)?r:[];return zZ(i,AZ,t[n]),zZ(e,n,i),e};function RQ(e,t,n=`validate`){if(UZ(e)||Array.isArray(e)&&e.every(UZ)||LZ(e)&&!e)return{type:n,message:UZ(e)?e:``,ref:t}}var zQ=e=>xZ(e)&&!wQ(e)?e:{value:e,message:``},BQ=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=Y(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{if(i&&y.reportValidity){let t=LZ(e)?``:e||``;s?s.forEach(e=>e.setCustomValidity(t)):y.setCustomValidity(t),y.reportValidity()}},x={},S=aQ(o),C=_Z(o),w=S||C,T=(g||nQ(o))&&PZ(o.value)&&PZ(v)||rQ(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,E=XZ.bind(null,h,r,x),D=(e,t,n,r=kZ.maxLength,i=kZ.minLength)=>{let a=e?t:n;x[h]={type:e?r:i,message:a,ref:o,...E(e?r:i,a)}};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||yZ(v))||LZ(v)&&!v||C&&!vQ(s).isValid||S&&!xQ(s).isValid)){let{value:e,message:t}=UZ(c)?{value:!!c,message:c}:zQ(c);if(e&&(x[h]={type:kZ.required,message:t,ref:y,...E(kZ.required,t)},!r))return b(t),x}if(!T&&(!yZ(d)||!yZ(f))){let e,t,n=zQ(f),i=zQ(d);if(!yZ(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;yZ(n.value)||(e=r>n.value),yZ(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;UZ(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),UZ(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(D(!!e,n.message,i.message,kZ.max,kZ.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(UZ(v)||a&&Array.isArray(v))){let e=zQ(l),t=zQ(u),n=!yZ(e.value)&&v.length>+e.value,i=!yZ(t.value)&&v.length<+t.value;if((n||i)&&(D(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&UZ(v)){let{value:e,message:t}=zQ(p);if(wQ(e)&&!v.match(e)&&(x[h]={type:kZ.pattern,message:t,ref:o,...E(kZ.pattern,t)},!r))return b(t),x}if(m){if(RZ(m)){let e=RQ(await m(v,n),y);if(e&&(x[h]={...e,...E(kZ.validate,e.message)},!r))return b(e.message),x}else if(xZ(m)){let e={};for(let t in m){if(!tQ(e)&&!r)break;let i=RQ(await m[t](v,n),y,t);i&&(e={...i,...E(t,i.message)},b(i.message),r&&(x[h]=e))}if(!tQ(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},VQ={mode:OZ.onSubmit,reValidateMode:OZ.onChange,shouldFocusError:!0},HQ=`form`,UQ={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function WQ(e={}){let t={...VQ,...e},n={...EZ(UQ),isLoading:RZ(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=(xZ(t.defaultValues)||xZ(t.values))&&EZ(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:EZ(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u=0,d=EQ(t.mode),f=EQ(t.reValidateMode),p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p},h={...m},g={array:$Z(),state:$Z()},_=t.criteriaMode===OZ.all,v=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},y=async e=>{if(!o.keepIsValid&&!t.disabled&&(m.isValid||h.isValid||e)){let e;t.resolver?(e=tQ((await k()).errors),b()):e=await M({fields:r,onlyCheckValid:!0,eventType:DZ.VALID}),e!==n.isValid&&g.state.next({isValid:e})}},b=(e,r)=>{!t.disabled&&(m.isValidating||m.validatingFields||h.isValidating||h.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?zZ(n.validatingFields,e,r):uQ(n.validatingFields,e))}),g.state.next({validatingFields:n.validatingFields,isValidating:!tQ(n.validatingFields)}))},x=()=>{n.dirtyFields=hQ(i,a)},S=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(Y(r,e))){let t=s(Y(r,e),c.argA,c.argB);l&&zZ(r,e,t)}if(u&&Array.isArray(Y(n.errors,e))){let t=s(Y(n.errors,e),c.argA,c.argB);l&&zZ(n.errors,e,t),IQ(n.errors,e)}if((m.touchedFields||h.touchedFields)&&u&&Array.isArray(Y(n.touchedFields,e))){let t=s(Y(n.touchedFields,e),c.argA,c.argB);l&&zZ(n.touchedFields,e,t)}(m.dirtyFields||h.dirtyFields)&&x(),g.state.next({name:e,isDirty:P(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else zZ(a,e,i)},C=(e,t)=>{zZ(n.errors,e,t),n.errors={...n.errors},g.state.next({errors:n.errors})},w=e=>{n.errors=e,g.state.next({errors:n.errors,isValid:!1})},T=e=>{let t=NZ(e)?[e]:IZ(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=yZ(n)?n:n[i],r=yZ(r)?r:r[i],n===null&&r!==null)return!0}return!1},E=(t,c,l,u)=>{let d=Y(r,t);if(d){if(T(t))return;let r=PZ(Y(a,t)),f=Y(a,t,PZ(l)?Y(i,t):l);PZ(f)||u&&u.defaultChecked||c?zZ(a,t,c?f:SQ(d._f)):I(t,f),o.mount&&!o.action&&(y(),r&&n.isDirty&&(m.isDirty||h.isDirty)&&(P()||(n.isDirty=!1,g.state.next({...n}))),e.shouldUnregister&&r&&!PZ(Y(a,t))&&AQ(t,s)&&(o.watch=!0))}},D=(e,r,o,s,c)=>{let l=!1,u=!1,d={name:e};if(!t.disabled){if(!o||s){let t=qZ(Y(i,e),r);(m.isDirty||h.isDirty)&&(u=n.isDirty,n.isDirty=d.isDirty=!t||P(),l=u!==d.isDirty),u=!!Y(n.dirtyFields,e),t===n.isDirty?t?uQ(n.dirtyFields,e):zZ(n.dirtyFields,e,!0):n.dirtyFields=hQ(i,a),d.dirtyFields=n.dirtyFields,l||=(m.dirtyFields||h.dirtyFields)&&u!==!t}if(o){let t=Y(n.touchedFields,e);t||(zZ(n.touchedFields,e,o),d.touchedFields=n.touchedFields,l||=(m.touchedFields||h.touchedFields)&&t!==o)}l&&c&&g.state.next(d)}return l?d:{}},O=(e,r,i,a)=>{let o=Y(n.errors,e),s=(m.isValid||h.isValid)&&LZ(r)&&n.isValid!==r;if(t.delayError&&i?(c=v(()=>C(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?zZ(n.errors,e,i):uQ(n.errors,e),n.errors={...n.errors}),(i?!qZ(o,i):o)||!tQ(a)||s){let t={...a,...s&&LZ(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},g.state.next(t)}},k=async e=>(b(e,!0),await t.resolver(a,t.context,CQ(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),A=async e=>{let{errors:t}=await k(e);if(b(e),e){for(let r of e){let e=Y(t,r);e?s.array.has(r)&&xZ(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e)))?LQ(n.errors,{[r]:e},r):zZ(n.errors,r,e):uQ(n.errors,r)}n.errors={...n.errors}}else n.errors=t;return t},j=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:a,formState:n,name:t,eventType:r});if(xZ(i))for(let e in i){let t=i[e];t&&de(`${HQ}.${e}`,{message:UZ(t.message)?t.message:``,type:t.type||kZ.validate})}else UZ(i)||!i?de(HQ,{message:i||``,type:kZ.validate}):ue(HQ);return i}return!0},M=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await j({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r,...d}=u;if(r){let o=s.array.has(r.name),c=u._f&&OQ(u._f),d=m.validatingFields||m.isValidating||h.validatingFields||h.isValidating;c&&d&&b([r.name],!0);let f=await BQ(u,s.disabled,a,_,t.shouldUseNativeValidation&&!i,o);if(c&&d&&b([r.name]),f[r.name]&&(l.valid=!1,i)||(!i&&(Y(f,r.name)?o?LQ(n.errors,f,r.name):zZ(n.errors,r.name,f[r.name]):uQ(n.errors,r.name)),e.shouldUseNativeValidation&&f[r.name]))break}!tQ(d)&&await M({context:l,onlyCheckValid:i,fields:d,name:o,eventType:c})}}return l.valid},N=()=>{for(let e of s.unMount){let t=Y(r,e);t&&(t._f.refs?t._f.refs.every(e=>!sQ(e)):!sQ(t._f.ref))&&he(e)}s.unMount=new Set},P=(e,n)=>!t.disabled&&(e&&n&&zZ(a,e,n),!qZ(o.mount?a:i,i)),ee=(e,t,n)=>WZ(e,s,{...o.mount?a:PZ(t)?i:UZ(e)?{[e]:t}:t},n,t),F=e=>ZZ(Y(o.mount?a:i,e,t.shouldUnregister?Y(i,e,[]):[])),I=(e,t,n={},i=!1,o=!1)=>{let s=Y(r,e),c=t;if(s){let n=s._f;n&&(!n.disabled&&zZ(a,e,yQ(t,n)),c=rQ(n.ref)&&yZ(t)?``:t,iQ(n.ref)?[...n.ref.options].forEach(e=>e.selected=c.includes(e.value)):n.refs?_Z(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(c)?e.checked=!!c.find(t=>t===e.value):e.checked=c===e.value||!!c)}):n.refs.forEach(e=>e.checked=e.value===c):nQ(n.ref)?n.ref.value=``:(n.ref.value=c,!n.ref.type&&!o&&g.state.next({name:e,values:i?a:EZ(a)})))}(n.shouldDirty||n.shouldTouch)&&D(e,c,n.shouldTouch,n.shouldDirty,!o),n.shouldValidate&&se(e)},te=(e,t,n,i=!1,a=!1)=>{for(let o in t){if(!t.hasOwnProperty(o))return;let c=t[o],l=e+`.`+o,u=Y(r,l);(s.array.has(e)||xZ(c)||u&&!u._f)&&!vZ(c)?te(l,c,n,i,a):I(l,c,n,i,a)}},ne=(e,t,i,c,l=!1)=>{let u=Y(r,e),d=s.array.has(e),f=c?t:EZ(t),p=qZ(Y(a,e),f);if(p||zZ(a,e,f),d)g.array.next({name:e,values:c?a:EZ(a)}),(m.isDirty||m.dirtyFields||h.isDirty||h.dirtyFields)&&i.shouldDirty&&(x(),l||g.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:P(e,f)}));else{let t=Array.isArray(f)&&!f.length||tQ(f);!u||u._f||yZ(f)||t?I(e,f,i,c,l):te(e,f,i,c,l)}if(!p&&!l){let t=AQ(e,s),r=c?a:EZ(a);g.state.next({...t&&n,name:o.mount||t?e:void 0,values:r})}},re=(e,t,n={})=>ne(e,t,n,!1),ie=(e,t={})=>{let r=RZ(e)?e(a):e;if(!qZ(a,r)){a={...a,...r};let e=JZ(r);for(let n of s.mount)n in e&&ne(n,e[n],t,!0,!0);g.state.next({...n,name:void 0,type:void 0,...u?{values:a}:{}}),t.shouldValidate&&y()}},ae=async i=>{o.mount=!0;let l=i.target,p=l.name,v=!0,x=Y(r,p),S=e=>{v=Number.isNaN(e)||vZ(e)&&isNaN(e.getTime())||qZ(e,Y(a,p,e))};if(x){let o,C,w=l.type?SQ(x._f):SZ(i),T=i.type===DZ.BLUR||i.type===DZ.FOCUS_OUT,E=!kQ(x._f)&&!e.validate&&!t.resolver&&!Y(n.errors,p)&&!x._f.deps,A=E||FQ(T,Y(n.touchedFields,p),n.isSubmitted,f,d),N=AQ(p,s,T);zZ(a,p,w),T?(!l||!l.readOnly)&&(x._f.onBlur&&x._f.onBlur(i),c&&c(0)):x._f.onChange&&x._f.onChange(i);let P=D(p,w,T),ee=!tQ(P)||N;if(!T&&g.state.next({name:p,type:i.type,...u?{values:EZ(a)}:{}}),A)return(!E||!n.isValid)&&(m.isValid||h.isValid)&&(t.mode===`onBlur`?T&&y():T||y()),ee&&g.state.next({name:p,...N?{}:P});if(!t.resolver&&e.validate&&await j({name:p,eventType:i.type}),!T&&N&&g.state.next({...n}),t.resolver){let{errors:e}=await k([p]);if(b([p]),S(w),!v){!tQ(P)&&g.state.next(P);return}let t=MQ(n.errors,r,p),i=MQ(e,r,t.name||p);o=i.error,p=i.name,C=tQ(e)}else b([p],!0),o=(await BQ(x,s.disabled,a,_,t.shouldUseNativeValidation))[p],b([p]),S(w),v&&(o?C=!1:(m.isValid||h.isValid)&&(C=await M({fields:r,onlyCheckValid:!0,name:p,eventType:i.type})));v&&(x._f.deps&&(!Array.isArray(x._f.deps)||x._f.deps.length>0)&&se(x._f.deps),O(p,C,o,P))}},oe=(e,t)=>{if(Y(n.errors,t)&&e.focus)return e.focus(),1},se=async(e,i={})=>{let a,o,c=QZ(e);if(t.resolver){let t=await A(PZ(e)?e:c);a=tQ(t),o=e?!c.some(e=>Y(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=Y(r,e);return await M({fields:t&&t._f?{[e]:t}:t,eventType:DZ.TRIGGER})}))).every(Boolean),!(!o&&!n.isValid)&&y()):o=a=await M({fields:r,name:e,eventType:DZ.TRIGGER});return g.state.next({...!UZ(e)||(m.isValid||h.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&jQ(r,oe,e?c:s.mount),o},ce=(e,t)=>{let r={...o.mount?a:i};return t&&(r=eQ(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),PZ(e)?r:UZ(e)?Y(r,e):e.map(e=>Y(r,e))},le=(e,t)=>({invalid:!!Y((t||n).errors,e),isDirty:!!Y((t||n).dirtyFields,e),error:Y((t||n).errors,e),isValidating:!!Y(n.validatingFields,e),isTouched:!!Y((t||n).touchedFields,e)}),ue=e=>{let t=e?QZ(e):void 0;t?.forEach(e=>uQ(n.errors,e)),t?t.forEach(e=>{g.state.next({name:e,errors:n.errors})}):g.state.next({errors:{}})},de=(e,t,i)=>{let a=(Y(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=Y(n.errors,e)||{};zZ(n.errors,e,{...l,...t,ref:a}),g.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},fe=(e,t)=>{if(RZ(e)){u++;let{unsubscribe:n}=g.state.subscribe({next:n=>`values`in n&&e(n.values||ee(void 0,t),n)}),r=!1;return{unsubscribe:()=>{r||(r=!0,u--,n())}}}return ee(e,t,!0)},pe=e=>{let t=!!e.formState?.values;t&&u++;let{unsubscribe:r}=g.state.subscribe({next:t=>{if(PQ(e.name,t.name,e.exact)&&NQ(t,e.formState||m,Te,e.reRenderRoot)){let r={...a};e.callback({values:r,...n,...t,defaultValues:i})}}});if(!t)return r;let o=!1;return()=>{o||(o=!0,u--,r())}},me=e=>(o.mount=!0,h={...h,...e.formState},pe({...e,formState:{...p,...e.formState}})),he=(e,o={})=>{for(let c of e?QZ(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(uQ(r,c),uQ(a,c)),!o.keepError&&uQ(n.errors,c),!o.keepDirty&&uQ(n.dirtyFields,c),!o.keepTouched&&uQ(n.touchedFields,c),!o.keepIsValidating&&uQ(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&uQ(i,c);g.state.next({values:EZ(a)}),g.state.next({...n,...o.keepDirty?{isDirty:P()}:{}}),!o.keepIsValid&&y()},ge=({disabled:e,name:t})=>{if(LZ(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&y()}},_e=(e,n={})=>{let a=Y(r,e),c=LZ(n.disabled)||LZ(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return zZ(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a&&!l?ge({disabled:LZ(n.disabled)?n.disabled:t.disabled,name:e}):E(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:TQ(n.min),max:TQ(n.max),minLength:TQ(n.minLength),maxLength:TQ(n.maxLength),pattern:TQ(n.pattern)}:{},name:e,onChange:ae,onBlur:ae,ref:c=>{if(c){s.registerName.add(e),_e(e,n),s.registerName.delete(e),a=Y(r,e);let t=PZ(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=oQ(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;zZ(r,e,{_f:{...a._f,...o?{refs:[...l.filter(sQ),t,...Array.isArray(Y(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),E(e,!1,void 0,t)}else a=Y(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(CZ(s.array,e)&&o.action)&&s.unMount.add(e)}}},ve=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&jQ(r,oe,s.mount),ye=e=>{LZ(e)&&(g.state.next({disabled:e}),jQ(r,(t,n)=>{let i=Y(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},be=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=EZ(a);if(g.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await k();b(),n.errors=e,l=EZ(t)}else await M({fields:r,eventType:DZ.SUBMIT});if(s.disabled.size)for(let e of s.disabled)uQ(l,e);if(uQ(n.errors,AZ),tQ(n.errors)){g.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),ve(),setTimeout(ve);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tQ(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},xe=(e,t={})=>{Y(r,e)&&(PZ(t.defaultValue)?re(e,EZ(Y(i,e))):(re(e,t.defaultValue),zZ(i,e,EZ(t.defaultValue))),t.keepTouched||uQ(n.touchedFields,e),t.keepDirty||(uQ(n.dirtyFields,e),n.isDirty=t.defaultValue?P(e,EZ(Y(i,e))):P()),t.keepError||(uQ(n.errors,e),m.isValid&&y()),g.state.next({...n}))},Se=(e,c={})=>{let l=e?EZ(e):i,u=EZ(l),d=tQ(e),f=u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(hQ(i,a))]);for(let t of Array.from(e)){let e=Y(n.dirtyFields,t),r=Y(a,t),i=Y(f,t);e&&!PZ(r)?zZ(f,t,r):!e&&!PZ(i)&&re(t,i)}}else{if(TZ&&PZ(e))for(let e of s.mount){let t=Y(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(rQ(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)re(e,Y(f,e));else r={}}if(t.shouldUnregister){if(a=c.keepDefaultValues?EZ(i):{},c.keepFieldsRef)for(let e of s.mount)zZ(a,e,Y(f,e))}else a=EZ(f);g.array.next({values:{...f}}),g.state.next({name:void 0,type:void 0,values:{...f}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!m.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!tQ(f),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),g.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:d?!1:c.keepDirty?n.isDirty:c.keepValues?P():!!(c.keepDefaultValues&&!qZ(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:d?{}:c.keepDirtyValues?c.keepDefaultValues&&a?hQ(i,a):n.dirtyFields:c.keepDefaultValues&&e?hQ(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Ce=(e,n)=>Se(RZ(e)?e(a):e,{...t.resetOptions,...n}),we=(e,t={})=>{let n=Y(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&RZ(e.select)&&e.select()})}},Te=e=>{let{name:t,type:r,values:i,...a}=e;n={...n,...a}},Ee={control:{register:_e,unregister:he,getFieldState:le,handleSubmit:be,setError:de,_subscribe:pe,_runSchema:k,_updateIsValidating:b,_focusError:ve,_getWatch:ee,_getDirty:P,_setValid:y,_setFieldArray:S,_setDisabledField:ge,_setErrors:w,_getFieldArray:F,_reset:Se,_resetDefaultValues:()=>RZ(t.defaultValues)&&t.defaultValues().then(e=>{Ce(e,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:ye,_subjects:g,_proxyFormState:m,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e},d=EQ(t.mode),f=EQ(t.reValidateMode)}},subscribe:me,trigger:se,register:_e,handleSubmit:be,watch:fe,setValue:re,setValues:ie,getValues:ce,reset:Ce,resetField:xe,resetDefaultValues:(e,t={})=>{if(i=EZ(e),!t.keepDirty){let e=hQ(i,a);n.dirtyFields=e,n.isDirty=!tQ(e)}t.keepIsValid||y(),g.state.next({...n,defaultValues:i})},clearErrors:ue,unregister:he,setError:de,setFocus:we,getFieldState:le};return{...Ee,formControl:Ee}}function GQ(e={}){let t=S.useRef(void 0),n=S.useRef(void 0),r=S.useRef(e.formControl),[i,a]=S.useState(()=>({...EZ(UQ),isLoading:RZ(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:RZ(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!RZ(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...r}=WQ(e);t.current={...r,formState:i}}let o=t.current.control;return o._options=e,HZ(()=>{let e=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return a(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),S.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),S.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),S.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),S.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),S.useEffect(()=>{if(o._proxyFormState.isDirty){let e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),S.useEffect(()=>{e.values&&!qZ(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),o._options.resetOptions?.keepIsValid||o._setValid(),n.current=e.values,a(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),S.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=S.useMemo(()=>VZ(i,o),[o,i]),t.current}var KQ=(e,t,n)=>{if(e&&`reportValidity`in e){let r=Y(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},qQ=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?KQ(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>KQ(t,n,e))}},JQ=(e,t)=>{t.shouldUseNativeValidation&&qQ(e,t);let n={};for(let r in e){let i=Y(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(YQ(t.names||Object.keys(e),r)){let e=Object.assign({},Y(n,r));zZ(e,`root`,a),zZ(n,r,e)}else zZ(n,r,a)}return n},YQ=(e,t)=>{let n=XQ(t).replace(/[.*+?^${}()|\\]/g,`\\$&`);return e.some(e=>XQ(e).match(`^${n}\\.\\d+`))};function XQ(e){return e.replace(/[\[\]]/g,``)}Object.freeze({status:`aborted`});function ZQ(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var QQ=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},$Q={};function e$(e){return e&&Object.assign($Q,e),$Q}function t$(e,t){return typeof t==`bigint`?t.toString():t}var n$=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};-Number.MAX_VALUE,Number.MAX_VALUE;function r$(e){return typeof e==`string`?e:e?.message}function i$(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=r$(e.inst?._zod.def?.error?.(e))??r$(t?.error?.(e))??r$(n.customError?.(e))??r$(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}var a$=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,t$,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},o$=ZQ(`$ZodError`,a$),s$=ZQ(`$ZodError`,a$,{Parent:Error}),c$=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new QQ;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>i$(e,a,e$())));throw n$(t,i?.callee),t}return o.value})(s$),l$=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>i$(e,a,e$())));throw n$(t,i?.callee),t}return o.value})(s$);function u$(){return u$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u$.apply(null,arguments)}function d$(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function f$(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(`unionErrors`in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=XZ(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function p$(e,t){for(var n={},r=function(){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(u$({},t,{path:[].concat(r.path,t.path)}))})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=XZ(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()};e.length;)r();return n}function m$(e,t,n){if(n===void 0&&(n={}),function(e){return`_def`in e&&typeof e._def==`object`&&`typeName`in e._def}(e))return function(r,i,a){try{return Promise.resolve(d$(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&qQ({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:JQ(f$(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(d$(function(){return Promise.resolve((n.mode===`sync`?c$:l$)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&qQ({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof o$}(e))return{values:{},errors:JQ(p$(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var h$;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(h$||={});var g$;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(g$||={});var X=h$.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),_$=e=>{switch(typeof e){case`undefined`:return X.undefined;case`string`:return X.string;case`number`:return Number.isNaN(e)?X.nan:X.number;case`boolean`:return X.boolean;case`function`:return X.function;case`bigint`:return X.bigint;case`symbol`:return X.symbol;case`object`:return Array.isArray(e)?X.array:e===null?X.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?X.promise:typeof Map<`u`&&e instanceof Map?X.map:typeof Set<`u`&&e instanceof Set?X.set:typeof Date<`u`&&e instanceof Date?X.date:X.object;default:return X.unknown}},Z=h$.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),v$=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,h$.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};v$.create=e=>new v$(e);var y$=(e,t)=>{let n;switch(e.code){case Z.invalid_type:n=e.received===X.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,h$.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${h$.joinValues(e.keys,`, `)}`;break;case Z.invalid_union:n=`Invalid input`;break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${h$.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${h$.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n=`Invalid function arguments`;break;case Z.invalid_return_type:n=`Invalid function return type`;break;case Z.invalid_date:n=`Invalid date`;break;case Z.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:h$.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Z.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Z.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Z.custom:n=`Invalid input`;break;case Z.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,h$.assertNever(e)}return{message:n}},b$=y$;function x$(){return b$}var S$=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Q(e,t){let n=x$(),r=S$({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===y$?void 0:y$].filter(e=>!!e)});e.common.issues.push(r)}var C$=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return w$;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return w$;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},w$=Object.freeze({status:`aborted`}),T$=e=>({status:`dirty`,value:e}),E$=e=>({status:`valid`,value:e}),D$=e=>e.status===`aborted`,O$=e=>e.status===`dirty`,k$=e=>e.status===`valid`,A$=e=>typeof Promise<`u`&&e instanceof Promise,$;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})($||={});var j$=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},M$=(e,t)=>{if(k$(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new v$(e.common.issues);return this._error=t,this._error}}};function N$(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var P$=class{get description(){return this._def.description}_getType(e){return _$(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C$,ctx:{common:e.parent.common,data:e.data,parsedType:_$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(A$(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_$(e)};return M$(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_$(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return k$(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>k$(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_$(e)},r=this._parse({data:e,path:n.path,parent:n});return M$(n,await(A$(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Z.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new L1({schema:this,typeName:K1.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return R1.create(this,this._def)}nullable(){return z1.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return v1.create(this)}promise(){return I1.create(this,this._def)}or(e){return x1.create([this,e],this._def)}and(e){return T1.create(this,e,this._def)}transform(e){return new L1({...N$(this._def),schema:this,typeName:K1.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new B1({...N$(this._def),innerType:this,defaultValue:t,typeName:K1.ZodDefault})}brand(){return new U1({typeName:K1.ZodBranded,type:this,...N$(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new V1({...N$(this._def),innerType:this,catchValue:t,typeName:K1.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return W1.create(this,e)}readonly(){return G1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},F$=/^c[^\s-]{8,}$/i,I$=/^[0-9a-z]+$/,L$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,R$=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,z$=/^[a-z0-9_-]{21}$/i,B$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,H$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,U$=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,W$,G$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,J$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Y$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,X$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Z$=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Q$=RegExp(`^${Z$}$`);function $$(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function e1(e){return RegExp(`^${$$(e)}$`)}function t1(e){let t=`${Z$}T${$$(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function n1(e,t){return!!((t===`v4`||!t)&&G$.test(e)||(t===`v6`||!t)&&q$.test(e))}function r1(e,t){if(!B$.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function i1(e,t){return!!((t===`v4`||!t)&&K$.test(e)||(t===`v6`||!t)&&J$.test(e))}var a1=class e extends P${_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==X.string){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.string,received:t.parsedType}),w$}let t=new C$,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?Q(n,{code:Z.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&Q(n,{code:Z.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)H$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`email`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)W$||=new RegExp(U$,`u`),W$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`emoji`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)R$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`uuid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)z$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`nanoid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)F$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cuid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)I$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cuid2`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)L$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`ulid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Q(n,{validation:`url`,code:Z.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`regex`,code:Z.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?t1(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?Q$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?e1(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?V$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`duration`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?n1(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`ip`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?r1(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`jwt`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?i1(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cidr`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Y$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`base64`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?X$.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`base64url`,code:Z.invalid_string,message:r.message}),t.dirty()):h$.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Z.invalid_string,...$.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...$.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...$.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...$.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...$.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...$.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...$.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...$.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...$.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...$.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...$.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...$.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...$.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...$.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...$.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...$.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...$.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};a1.create=e=>new a1({checks:[],typeName:K1.ZodString,coerce:e?.coerce??!1,...N$(e)});function o1(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var s1=class e extends P${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==X.number){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.number,received:t.parsedType}),w$}let t,n=new C$;for(let r of this._def.checks)r.kind===`int`?h$.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?o1(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_finite,message:r.message}),n.dirty()):h$.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,$.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,$.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,$.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,$.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:$.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:$.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:$.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:$.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&h$.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};s1.create=e=>new s1({checks:[],typeName:K1.ZodNumber,coerce:e?.coerce||!1,...N$(e)});var c1=class e extends P${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==X.bigint)return this._getInvalidInput(e);let t,n=new C$;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):h$.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.bigint,received:t.parsedType}),w$}gte(e,t){return this.setLimit(`min`,e,!0,$.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,$.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,$.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,$.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:$.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};c1.create=e=>new c1({checks:[],typeName:K1.ZodBigInt,coerce:e?.coerce??!1,...N$(e)});var l1=class extends P${_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==X.boolean){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.boolean,received:t.parsedType}),w$}return E$(e.data)}};l1.create=e=>new l1({typeName:K1.ZodBoolean,coerce:e?.coerce||!1,...N$(e)});var u1=class e extends P${_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==X.date){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.date,received:t.parsedType}),w$}if(Number.isNaN(e.data.getTime()))return Q(this._getOrReturnCtx(e),{code:Z.invalid_date}),w$;let t=new C$,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):h$.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};u1.create=e=>new u1({checks:[],coerce:e?.coerce||!1,typeName:K1.ZodDate,...N$(e)});var d1=class extends P${_parse(e){if(this._getType(e)!==X.symbol){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.symbol,received:t.parsedType}),w$}return E$(e.data)}};d1.create=e=>new d1({typeName:K1.ZodSymbol,...N$(e)});var f1=class extends P${_parse(e){if(this._getType(e)!==X.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.undefined,received:t.parsedType}),w$}return E$(e.data)}};f1.create=e=>new f1({typeName:K1.ZodUndefined,...N$(e)});var p1=class extends P${_parse(e){if(this._getType(e)!==X.null){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.null,received:t.parsedType}),w$}return E$(e.data)}};p1.create=e=>new p1({typeName:K1.ZodNull,...N$(e)});var m1=class extends P${constructor(){super(...arguments),this._any=!0}_parse(e){return E$(e.data)}};m1.create=e=>new m1({typeName:K1.ZodAny,...N$(e)});var h1=class extends P${constructor(){super(...arguments),this._unknown=!0}_parse(e){return E$(e.data)}};h1.create=e=>new h1({typeName:K1.ZodUnknown,...N$(e)});var g1=class extends P${_parse(e){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.never,received:t.parsedType}),w$}};g1.create=e=>new g1({typeName:K1.ZodNever,...N$(e)});var _1=class extends P${_parse(e){if(this._getType(e)!==X.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.void,received:t.parsedType}),w$}return E$(e.data)}};_1.create=e=>new _1({typeName:K1.ZodVoid,...N$(e)});var v1=class e extends P${_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==X.array)return Q(t,{code:Z.invalid_type,expected:X.array,received:t.parsedType}),w$;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(Q(t,{code:e?Z.too_big:Z.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(Q(t,{code:Z.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(Q(t,{code:Z.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new j$(t,e,t.path,n)))).then(e=>C$.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new j$(t,e,t.path,n)));return C$.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:$.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:$.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:$.toString(n)}})}nonempty(e){return this.min(1,e)}};v1.create=(e,t)=>new v1({type:e,minLength:null,maxLength:null,exactLength:null,typeName:K1.ZodArray,...N$(t)});function y1(e){if(e instanceof b1){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=R1.create(y1(r))}return new b1({...e._def,shape:()=>t})}else if(e instanceof v1)return new v1({...e._def,type:y1(e.element)});else if(e instanceof R1)return R1.create(y1(e.unwrap()));else if(e instanceof z1)return z1.create(y1(e.unwrap()));else if(e instanceof E1)return E1.create(e.items.map(e=>y1(e)));else return e}var b1=class e extends P${constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=h$.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==X.object){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.object,received:t.parsedType}),w$}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof g1&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new j$(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof g1){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Q(n,{code:Z.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new j$(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>C$.mergeObjectSync(t,e)):C$.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return $.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:$.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:K1.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of h$.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of h$.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return y1(this)}partial(t){let n={};for(let e of h$.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of h$.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof R1;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return N1(h$.objectKeys(this.shape))}};b1.create=(e,t)=>new b1({shape:()=>e,unknownKeys:`strip`,catchall:g1.create(),typeName:K1.ZodObject,...N$(t)}),b1.strictCreate=(e,t)=>new b1({shape:()=>e,unknownKeys:`strict`,catchall:g1.create(),typeName:K1.ZodObject,...N$(t)}),b1.lazycreate=(e,t)=>new b1({shape:e,unknownKeys:`strip`,catchall:g1.create(),typeName:K1.ZodObject,...N$(t)});var x1=class extends P${_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new v$(e.ctx.common.issues));return Q(t,{code:Z.invalid_union,unionErrors:n}),w$}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new v$(e));return Q(t,{code:Z.invalid_union,unionErrors:i}),w$}}get options(){return this._def.options}};x1.create=(e,t)=>new x1({options:e,typeName:K1.ZodUnion,...N$(t)});var S1=e=>e instanceof j1?S1(e.schema):e instanceof L1?S1(e.innerType()):e instanceof M1?[e.value]:e instanceof P1?e.options:e instanceof F1?h$.objectValues(e.enum):e instanceof B1?S1(e._def.innerType):e instanceof f1?[void 0]:e instanceof p1?[null]:e instanceof R1?[void 0,...S1(e.unwrap())]:e instanceof z1?[null,...S1(e.unwrap())]:e instanceof U1||e instanceof G1?S1(e.unwrap()):e instanceof V1?S1(e._def.innerType):[],C1=class e extends P${_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==X.object)return Q(t,{code:Z.invalid_type,expected:X.object,received:t.parsedType}),w$;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Q(t,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),w$)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=S1(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:K1.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...N$(r)})}};function w1(e,t){let n=_$(e),r=_$(t);if(e===t)return{valid:!0,data:e};if(n===X.object&&r===X.object){let n=h$.objectKeys(t),r=h$.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=w1(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===X.array&&r===X.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=w1(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===X.date&&r===X.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var T1=class extends P${_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(D$(e)||D$(r))return w$;let i=w1(e.value,r.value);return i.valid?((O$(e)||O$(r))&&t.dirty(),{status:t.value,value:i.data}):(Q(n,{code:Z.invalid_intersection_types}),w$)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};T1.create=(e,t,n)=>new T1({left:e,right:t,typeName:K1.ZodIntersection,...N$(n)});var E1=class e extends P${_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.array)return Q(n,{code:Z.invalid_type,expected:X.array,received:n.parsedType}),w$;if(n.data.length<this._def.items.length)return Q(n,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),w$;!this._def.rest&&n.data.length>this._def.items.length&&(Q(n,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new j$(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>C$.mergeArray(t,e)):C$.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};E1.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new E1({items:e,typeName:K1.ZodTuple,rest:null,...N$(t)})};var D1=class e extends P${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.object)return Q(n,{code:Z.invalid_type,expected:X.object,received:n.parsedType}),w$;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new j$(n,e,n.path,e)),value:a._parse(new j$(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?C$.mergeObjectAsync(t,r):C$.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof P$?new e({keyType:t,valueType:n,typeName:K1.ZodRecord,...N$(r)}):new e({keyType:a1.create(),valueType:t,typeName:K1.ZodRecord,...N$(n)})}},O1=class extends P${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.map)return Q(n,{code:Z.invalid_type,expected:X.map,received:n.parsedType}),w$;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new j$(n,e,n.path,[a,`key`])),value:i._parse(new j$(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return w$;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return w$;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};O1.create=(e,t,n)=>new O1({valueType:t,keyType:e,typeName:K1.ZodMap,...N$(n)});var k1=class e extends P${_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.set)return Q(n,{code:Z.invalid_type,expected:X.set,received:n.parsedType}),w$;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(Q(n,{code:Z.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(Q(n,{code:Z.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return w$;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new j$(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:$.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:$.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};k1.create=(e,t)=>new k1({valueType:e,minSize:null,maxSize:null,typeName:K1.ZodSet,...N$(t)});var A1=class e extends P${constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==X.function)return Q(t,{code:Z.invalid_type,expected:X.function,received:t.parsedType}),w$;function n(e,n){return S$({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x$(),y$].filter(e=>!!e),issueData:{code:Z.invalid_arguments,argumentsError:n}})}function r(e,n){return S$({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x$(),y$].filter(e=>!!e),issueData:{code:Z.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof I1){let e=this;return E$(async function(...t){let o=new v$([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return E$(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new v$([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new v$([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:E1.create(t).rest(h1.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||E1.create([]).rest(h1.create()),returns:n||h1.create(),typeName:K1.ZodFunction,...N$(r)})}},j1=class extends P${get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};j1.create=(e,t)=>new j1({getter:e,typeName:K1.ZodLazy,...N$(t)});var M1=class extends P${_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Q(t,{received:t.data,code:Z.invalid_literal,expected:this._def.value}),w$}return{status:`valid`,value:e.data}}get value(){return this._def.value}};M1.create=(e,t)=>new M1({value:e,typeName:K1.ZodLiteral,...N$(t)});function N1(e,t){return new P1({values:e,typeName:K1.ZodEnum,...N$(t)})}var P1=class e extends P${_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Q(t,{expected:h$.joinValues(n),received:t.parsedType,code:Z.invalid_type}),w$}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Q(t,{received:t.data,code:Z.invalid_enum_value,options:n}),w$}return E$(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};P1.create=N1;var F1=class extends P${_parse(e){let t=h$.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==X.string&&n.parsedType!==X.number){let e=h$.objectValues(t);return Q(n,{expected:h$.joinValues(e),received:n.parsedType,code:Z.invalid_type}),w$}if(this._cache||=new Set(h$.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=h$.objectValues(t);return Q(n,{received:n.data,code:Z.invalid_enum_value,options:e}),w$}return E$(e.data)}get enum(){return this._def.values}};F1.create=(e,t)=>new F1({values:e,typeName:K1.ZodNativeEnum,...N$(t)});var I1=class extends P${unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==X.promise&&t.common.async===!1?(Q(t,{code:Z.invalid_type,expected:X.promise,received:t.parsedType}),w$):E$((t.parsedType===X.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};I1.create=(e,t)=>new I1({type:e,typeName:K1.ZodPromise,...N$(t)});var L1=class extends P${innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===K1.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Q(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return w$;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?w$:r.status===`dirty`||t.value===`dirty`?T$(r.value):r});{if(t.value===`aborted`)return w$;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?w$:r.status===`dirty`||t.value===`dirty`?T$(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?w$:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?w$:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!k$(e))return w$;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>k$(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):w$);h$.assertNever(r)}};L1.create=(e,t,n)=>new L1({schema:e,typeName:K1.ZodEffects,effect:t,...N$(n)}),L1.createWithPreprocess=(e,t,n)=>new L1({schema:t,effect:{type:`preprocess`,transform:e},typeName:K1.ZodEffects,...N$(n)});var R1=class extends P${_parse(e){return this._getType(e)===X.undefined?E$(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R1.create=(e,t)=>new R1({innerType:e,typeName:K1.ZodOptional,...N$(t)});var z1=class extends P${_parse(e){return this._getType(e)===X.null?E$(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};z1.create=(e,t)=>new z1({innerType:e,typeName:K1.ZodNullable,...N$(t)});var B1=class extends P${_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===X.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};B1.create=(e,t)=>new B1({innerType:e,typeName:K1.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...N$(t)});var V1=class extends P${_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return A$(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new v$(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new v$(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};V1.create=(e,t)=>new V1({innerType:e,typeName:K1.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...N$(t)});var H1=class extends P${_parse(e){if(this._getType(e)!==X.nan){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.nan,received:t.parsedType}),w$}return{status:`valid`,value:e.data}}};H1.create=e=>new H1({typeName:K1.ZodNaN,...N$(e)});var U1=class extends P${_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},W1=class e extends P${_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?w$:e.status===`dirty`?(t.dirty(),T$(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?w$:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:K1.ZodPipeline})}},G1=class extends P${_parse(e){let t=this._def.innerType._parse(e),n=e=>(k$(e)&&(e.value=Object.freeze(e.value)),e);return A$(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};G1.create=(e,t)=>new G1({innerType:e,typeName:K1.ZodReadonly,...N$(t)}),b1.lazycreate;var K1;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(K1||={});var q1=a1.create;s1.create,H1.create,c1.create,l1.create,u1.create,d1.create,f1.create,p1.create,m1.create,h1.create,g1.create,_1.create,v1.create;var J1=b1.create;b1.strictCreate,x1.create,C1.create,T1.create,E1.create,D1.create,O1.create,k1.create,A1.create,j1.create,M1.create;var Y1=P1.create;F1.create,I1.create,L1.create,R1.create,z1.create,L1.createWithPreprocess,W1.create;var X1=`Label`,Z1=S.forwardRef((e,t)=>(0,L.jsx)(Ta.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Z1.displayName=X1;var Q1=Z1,$1=xm(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),e0=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(Q1,{ref:n,className:H($1(),e),...t}));e0.displayName=Q1.displayName;function t0(e,[t,n]){return Math.min(n,Math.max(t,e))}function n0(e){let t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var r0=[` `,`Enter`,`ArrowUp`,`ArrowDown`],i0=[` `,`Enter`],a0=`Select`,[o0,s0,c0]=GW(a0),[l0,u0]=la(a0,[c0,dc]),d0=dc(),[f0,p0]=l0(a0),[m0,h0]=l0(a0),g0=`SelectProvider`;function _0(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=d0(t),[_,v]=S.useState(null),[y,b]=S.useState(null),[x,C]=S.useState(!1),w=qW(l),[T,E]=Vc({prop:r,defaultProp:i??!1,onChange:a,caller:a0}),[D,O]=Vc({prop:o,defaultProp:s,onChange:c,caller:a0}),k=S.useRef(null),A=S.useRef(D);S.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=()=>O(A.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=!_||!!m||!!_.closest(`form`),[M,N]=S.useState(new Set),P=Ka(),ee=Array.from(M).map(e=>e.props.value).join(`;`),F=S.useCallback(e=>{N(t=>new Set(t).add(e))},[]),I=S.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:ee,isFormControl:j};return(0,L.jsx)(Dc,{...g,children:(0,L.jsx)(f0,{scope:t,...te,children:(0,L.jsx)(o0.Provider,{scope:t,children:(0,L.jsx)(m0,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:I,children:_2(h)?h(te):n})})})})}_0.displayName=g0;var v0=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,L.jsx)(_0,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,L.jsxs)(L.Fragment,{children:[n,e?(0,L.jsx)(g2,{__scopeSelect:t}):null]})})};v0.displayName=a0;var y0=`SelectTrigger`,b0=S.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=d0(n),o=p0(y0,n),s=o.disabled||r,c=ca(t,o.onTriggerChange),l=s0(n),u=S.useRef(`touch`),[d,f,p]=y2(e=>{let t=l().filter(e=>!e.disabled),n=b2(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,L.jsx)(Oc,{asChild:!0,...a,children:(0,L.jsx)(Ta.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":v2(o.value)?``:void 0,...i,ref:c,onClick:z(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:z(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:z(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&r0.includes(e.key)&&(m(),e.preventDefault())})})})});b0.displayName=y0;var x0=`SelectValue`,S0=S.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=p0(x0,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=ca(t,c.onValueNodeChange);Ua(()=>{l(u)},[l,u]);let f=v2(c.value);return(0,L.jsx)(Ta.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,L.jsx)(S.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});S0.displayName=x0;var C0=`SelectIcon`,w0=S.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,L.jsx)(Ta.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});w0.displayName=C0;var T0=`SelectPortal`,[E0,D0]=l0(T0,{forceMount:void 0}),O0=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,L.jsx)(E0,{scope:e.__scopeSelect,forceMount:n,children:(0,L.jsx)(Mc,{asChild:!0,...r})})};O0.displayName=T0;var k0=`SelectContent`,A0=S.forwardRef((e,t)=>{let n=D0(k0,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=p0(k0,e.__scopeSelect),[o,s]=S.useState();return Ua(()=>{s(new DocumentFragment)},[]),(0,L.jsx)(Pc,{present:r||a.open,children:({present:e})=>e?(0,L.jsx)(L0,{...i,ref:t}):(0,L.jsx)(j0,{...i,fragment:o})})});A0.displayName=k0;var j0=S.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ki.createPortal((0,L.jsx)(N0,{scope:n,children:(0,L.jsx)(o0.Slot,{scope:n,children:(0,L.jsx)(`div`,{ref:t,children:r})})}),i):null});j0.displayName=`SelectContentFragment`;var M0=10,[N0,P0]=l0(k0),F0=`SelectContentImpl`,I0=da(`SelectContent.RemoveScroll`),L0=S.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=p0(k0,n),[y,b]=S.useState(null),[x,C]=S.useState(null),w=ca(t,b),[T,E]=S.useState(null),[D,O]=S.useState(null),k=s0(n),[A,j]=S.useState(!1),M=S.useRef(!1);S.useEffect(()=>{if(y)return YG(y)},[y]),XW();let N=S.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,x]),P=S.useCallback(()=>N([T,y]),[N,T,y]);S.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:ee,triggerPointerDownPosRef:F}=v;S.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ee(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ee,F]),S.useEffect(()=>{let e=()=>ee(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ee]);let[I,te]=y2(e=>{let t=k().filter(e=>!e.disabled),n=b2(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=S.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),re=S.useCallback(()=>y?.focus(),[y]),ie=S.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),ae=r===`popper`?V0:z0,oe=ae===V0?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,L.jsx)(N0,{scope:n,content:y,viewport:x,onViewportChange:C,itemRefCallback:ne,selectedItem:T,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:I,children:(0,L.jsx)(iq,{as:I0,allowPinchZoom:!0,children:(0,L.jsx)(nG,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:z(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,L.jsx)(Pa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,L.jsx)(ae,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...oe,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:z(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});L0.displayName=F0;var R0=`SelectItemAlignedPosition`,z0=S.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=p0(k0,n),o=P0(k0,n),[s,c]=S.useState(null),[l,u]=S.useState(null),d=ca(t,u),f=s0(n),p=S.useRef(!1),m=S.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=S.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-M0,d=t0(a,[M0,Math.max(M0,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-M0,d=t0(a,[M0,Math.max(M0,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-M0*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-M0,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${M0}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Ua(()=>y(),[y]);let[b,x]=S.useState();return Ua(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,L.jsx)(H0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,L.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,L.jsx)(Ta.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});z0.displayName=R0;var B0=`SelectPopperPosition`,V0=S.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=M0,...a}=e,o=d0(n);return(0,L.jsx)(kc,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});V0.displayName=B0;var[H0,U0]=l0(k0,{}),W0=`SelectViewport`,G0=S.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=P0(W0,n),o=U0(W0,n),s=ca(t,a.onViewportChange),c=S.useRef(0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.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}),(0,L.jsx)(o0.Slot,{scope:n,children:(0,L.jsx)(Ta.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:z(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-M0*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});G0.displayName=W0;var K0=`SelectGroup`,[q0,J0]=l0(K0),Y0=S.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ka();return(0,L.jsx)(q0,{scope:n,id:i,children:(0,L.jsx)(Ta.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Y0.displayName=K0;var X0=`SelectLabel`,Z0=S.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=J0(X0,n);return(0,L.jsx)(Ta.div,{id:i.id,...r,ref:t})});Z0.displayName=X0;var Q0=`SelectItem`,[$0,e2]=l0(Q0),t2=S.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=p0(Q0,n),c=P0(Q0,n),l=s.value===r,[u,d]=S.useState(a??``),[f,p]=S.useState(!1),m=ca(t,Da(e=>c.itemRefCallback?.(e,r,i))),h=Ka(),g=S.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,L.jsx)($0,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:S.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,L.jsx)(o0.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,L.jsx)(Ta.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:z(o.onFocus,()=>p(!0)),onBlur:z(o.onBlur,()=>p(!1)),onClick:z(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:z(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:z(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:z(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:z(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(i0.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});t2.displayName=Q0;var n2=`SelectItemText`,r2=S.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=p0(n2,n),s=P0(n2,n),c=e2(n2,n),l=h0(n2,n),[u,d]=S.useState(null),f=Da(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=ca(t,d,c.onItemTextChange,f),m=u?.textContent,h=S.useMemo(()=>(0,L.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Ua(()=>(g(h),()=>_(h)),[g,_,h]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ta.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!v2(o.value)?ki.createPortal(a.children,o.valueNode):null]})});r2.displayName=n2;var i2=`SelectItemIndicator`,a2=S.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return e2(i2,n).isSelected?(0,L.jsx)(Ta.span,{"aria-hidden":!0,...r,ref:t}):null});a2.displayName=i2;var o2=`SelectScrollUpButton`,s2=S.forwardRef((e,t)=>{let n=P0(o2,e.__scopeSelect),r=U0(o2,e.__scopeSelect),[i,a]=S.useState(!1),o=ca(t,r.onScrollButtonChange);return Ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(u2,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});s2.displayName=o2;var c2=`SelectScrollDownButton`,l2=S.forwardRef((e,t)=>{let n=P0(c2,e.__scopeSelect),r=U0(c2,e.__scopeSelect),[i,a]=S.useState(!1),o=ca(t,r.onScrollButtonChange);return Ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(u2,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});l2.displayName=c2;var u2=S.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=P0(`SelectScrollButton`,n),o=S.useRef(null),s=s0(n),c=S.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Ua(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,L.jsx)(Ta.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:z(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:z(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:z(i.onPointerLeave,()=>{c()})})}),d2=`SelectSeparator`,f2=S.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,L.jsx)(Ta.div,{"aria-hidden":!0,...r,ref:t})});f2.displayName=d2;var p2=`SelectArrow`,m2=S.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=d0(n);return P0(p2,n).position===`popper`?(0,L.jsx)(Ac,{...i,...r,ref:t}):null});m2.displayName=p2;var h2=`SelectBubbleInput`,g2=S.forwardRef(({__scopeSelect:e,...t},n)=>{let r=p0(h2,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=S.useRef(null),m=ca(n,p),h=i??``,g=n0(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return S.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,L.jsxs)(Ta.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Wc,...t.style},ref:m,defaultValue:h,children:[v2(i)&&!_?(0,L.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});g2.displayName=h2;function _2(e){return typeof e==`function`}function v2(e){return e===``||e===void 0}function y2(e){let t=Da(e),n=S.useRef(``),r=S.useRef(0),i=S.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=S.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function b2(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=x2(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function x2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var S2=v0,C2=S0,w2=S.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsxs)(b0,{ref:r,className:H(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...n,children:[t,(0,L.jsx)(w0,{asChild:!0,children:(0,L.jsx)(Zd,{className:`h-4 w-4 opacity-50`})})]}));w2.displayName=b0.displayName;var T2=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(s2,{ref:n,className:H(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(ef,{className:`h-4 w-4`})}));T2.displayName=s2.displayName;var E2=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(l2,{ref:n,className:H(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(Zd,{className:`h-4 w-4`})}));E2.displayName=l2.displayName;var D2=S.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>(0,L.jsx)(O0,{children:(0,L.jsxs)(A0,{ref:i,className:H(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,L.jsx)(T2,{}),(0,L.jsx)(G0,{className:H(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,L.jsx)(E2,{})]})}));D2.displayName=A0.displayName;var O2=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(Z0,{ref:n,className:H(`px-2 py-1.5 text-sm font-semibold`,e),...t}));O2.displayName=Z0.displayName;var k2=S.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsxs)(t2,{ref:r,className:H(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,L.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,L.jsx)(a2,{children:(0,L.jsx)(Xd,{className:`h-4 w-4`})})}),(0,L.jsx)(r2,{children:t})]}));k2.displayName=t2.displayName;var A2=S.forwardRef(({className:e,...t},n)=>(0,L.jsx)(f2,{ref:n,className:H(`-mx-1 my-1 h-px bg-muted`,e),...t}));A2.displayName=f2.displayName;var j2=J1({name:q1().min(2,`Name is required`),email:q1().email(`Valid email is required`),phone:q1().min(10,`Valid phone is required`),password:q1().min(6,`Password must be at least 6 characters`),role:Y1([`admin`,`staff`],{errorMap:()=>({message:`Please select a role`})})});function M2(){let e=dt(),t=ht(),n=t?.id?parseInt(t.id):null,r=n&&n!==0,[i,a]=(0,S.useState)(!1),{useStaffDetail:o,createStaff:s,updateStaff:c}=$Y(),{data:l,isLoading:u}=o(n||0),{register:d,handleSubmit:f,formState:{errors:p,isSubmitting:m},reset:h,watch:g,setValue:_}=GQ({resolver:m$(j2),defaultValues:{name:``,email:``,phone:``,password:``,role:`staff`}}),v=g(`role`);return(0,S.useEffect)(()=>{r&&l?.staff&&h({name:l.staff.name,email:l.staff.email,phone:l.staff.phone,password:``,role:l.staff.role||`staff`})},[l,r,h]),r&&u?(0,L.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,L.jsx)(AW,{})}):(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/staff`),variant:`ghost`,size:`sm`,children:[(0,L.jsx)(Gd,{className:`w-4 h-4 mr-2`}),`Back`]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-display text-forest`,children:r?`Edit Staff`:`Add Staff`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:r?`Update staff member details`:`Create a new staff member`})]})]}),(0,L.jsx)(pm,{className:`p-6`,children:(0,L.jsxs)(`form`,{onSubmit:f(async t=>{try{if(r&&n){let e=t.password?t:{...t,password:void 0};await c.mutateAsync({id:n,data:e}),R.success(`Staff updated successfully`)}else await s.mutateAsync(t),R.success(`Staff created successfully`);e(`/admin/staff`)}catch(e){R.error(e.message||`Failed to save staff`)}}),className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`name`,className:`text-forest font-medium`,children:`Full Name *`}),(0,L.jsx)(WW,{id:`name`,placeholder:`Enter full name`,...d(`name`),className:`mt-2`}),p.name&&(0,L.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:p.name.message})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`email`,className:`text-forest font-medium`,children:`Email *`}),(0,L.jsx)(WW,{id:`email`,type:`email`,placeholder:`Enter email address`,...d(`email`),className:`mt-2`}),p.email&&(0,L.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:p.email.message})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`phone`,className:`text-forest font-medium`,children:`Phone *`}),(0,L.jsx)(WW,{id:`phone`,placeholder:`Enter phone number`,...d(`phone`),className:`mt-2`}),p.phone&&(0,L.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:p.phone.message})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(e0,{htmlFor:`password`,className:`text-forest font-medium`,children:[`Password `,r&&(0,L.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`(leave blank to keep current)`}),` *`]}),(0,L.jsxs)(`div`,{className:`relative mt-2`,children:[(0,L.jsx)(WW,{id:`password`,type:i?`text`:`password`,placeholder:r?`Leave blank to keep current password`:`Enter password (min 6 characters)`,...d(`password`),className:`pr-10`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>a(!i),className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,children:i?(0,L.jsx)(lf,{className:`w-4 h-4`}):(0,L.jsx)(uf,{className:`w-4 h-4`})})]}),p.password&&(0,L.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:p.password.message}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Staff will use this email and password to login to their account`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{className:`text-forest font-medium mb-2 block`,children:`Role *`}),(0,L.jsxs)(S2,{value:v,onValueChange:e=>_(`role`,e),children:[(0,L.jsx)(w2,{children:(0,L.jsx)(C2,{placeholder:`Select a role`})}),(0,L.jsxs)(D2,{children:[(0,L.jsx)(k2,{value:`staff`,children:`Staff`}),(0,L.jsx)(k2,{value:`admin`,children:`Admin`})]})]}),p.role&&(0,L.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:p.role.message}),(0,L.jsx)(`div`,{className:`mt-3 p-3 bg-sage-mist rounded-lg`,children:(0,L.jsx)(`p`,{className:`text-sm text-foreground`,children:v===`admin`?`👤 Admin: Full access to all admin features and settings`:`👥 Staff: Limited access to manage products and orders`})})]}),(0,L.jsx)(`div`,{className:`p-4 bg-amber-50 border border-amber-200 rounded-lg`,children:(0,L.jsxs)(`p`,{className:`text-sm text-amber-900`,children:[(0,L.jsx)(`strong`,{children:`📝 Note:`}),` Staff will receive a confirmation email with their login credentials. They can use their email and password to access the admin panel.`]})}),(0,L.jsxs)(`div`,{className:`flex gap-3 pt-4`,children:[(0,L.jsx)(Cm,{type:`submit`,disabled:m||s.isPending||c.isPending,className:`flex-1`,children:m||s.isPending||c.isPending?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(yf,{className:`w-4 h-4 mr-2 animate-spin`}),`Saving...`]}):r?`Update Staff`:`Create Staff`}),(0,L.jsx)(Cm,{type:`button`,onClick:()=>e(`/admin/staff`),variant:`outline`,children:`Cancel`})]})]})})]})}var N2=()=>{let e=di();return{useBlockedDates:(e=1,t=20,n,r)=>Ei({queryKey:[`blocked-dates`,e,t,n,r],queryFn:()=>J.getBlockedDates({page:e,limit:t,start_date:n,end_date:r}),staleTime:300*1e3}),createBlockedDate:Di({mutationFn:e=>J.createBlockedDate(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`blocked-dates`]}),R.success(`Blocked date created`)},onError:e=>{R.error(e.message||`Failed to create blocked date`)}}),updateBlockedDate:Di({mutationFn:({id:e,data:t})=>J.updateBlockedDate(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`blocked-dates`]}),R.success(`Blocked date updated`)},onError:e=>{R.error(e.message||`Failed to update blocked date`)}}),deleteBlockedDate:Di({mutationFn:e=>J.deleteBlockedDate(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`blocked-dates`]}),R.success(`Blocked date deleted`)},onError:e=>{R.error(e.message||`Failed to delete blocked date`)}}),useTimeSlots:()=>Ei({queryKey:[`time-slots`],queryFn:()=>J.getTimeSlots(),staleTime:600*1e3}),createTimeSlot:Di({mutationFn:e=>J.createTimeSlot(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`time-slots`]}),R.success(`Time slot created`)},onError:e=>{R.error(e.message||`Failed to create time slot`)}}),updateTimeSlot:Di({mutationFn:({id:e,data:t})=>J.updateTimeSlot(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`time-slots`]}),R.success(`Time slot updated`)},onError:e=>{R.error(e.message||`Failed to update time slot`)}}),useAvailableSlots:e=>Ei({queryKey:[`available-slots`,e],queryFn:()=>J.getAvailableSlots(e),enabled:!!e,staleTime:120*1e3}),useCalendar:(e,t)=>Ei({queryKey:[`calendar`,e,t],queryFn:()=>J.getCalendar(e,t),staleTime:300*1e3})}};function P2(){let e=dt(),{useBlockedDates:t,deleteBlockedDate:n}=N2(),[r,i]=(0,S.useState)(1),[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(null),{data:d,isLoading:f}=t(r,20,a||void 0,s||void 0),p=async e=>{await n.mutateAsync(e),u(null)};if(f)return(0,L.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,L.jsx)(AW,{})});let m=d?.data||[],h=d?.pagination||{};return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Blocked Dates`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage delivery blocked dates and holidays`})]}),(0,L.jsxs)(Cm,{onClick:()=>e(`/admin/scheduling/blocked-dates/new`),className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Block Date`]})]}),(0,L.jsxs)(`div`,{className:`flex gap-4`,children:[(0,L.jsx)(WW,{type:`date`,value:a,onChange:e=>{o(e.target.value),i(1)},placeholder:`Start Date`,className:`max-w-sm`}),(0,L.jsx)(WW,{type:`date`,value:s,onChange:e=>{c(e.target.value),i(1)},placeholder:`End Date`,className:`max-w-sm`})]}),(0,L.jsx)(`div`,{className:`border border-border rounded-lg overflow-hidden`,children:(0,L.jsxs)(IW,{children:[(0,L.jsx)(LW,{children:(0,L.jsxs)(BW,{children:[(0,L.jsx)(VW,{children:`Date`}),(0,L.jsx)(VW,{children:`Time Slot`}),(0,L.jsx)(VW,{children:`Max Orders`}),(0,L.jsx)(VW,{children:`Description`}),(0,L.jsx)(VW,{children:`Created By`}),(0,L.jsx)(VW,{className:`text-right`,children:`Actions`})]})}),(0,L.jsx)(RW,{children:m.length===0?(0,L.jsx)(BW,{children:(0,L.jsx)(HW,{colSpan:6,className:`text-center py-8 text-muted-foreground`,children:`No blocked dates found`})}):m.map(t=>(0,L.jsxs)(BW,{children:[(0,L.jsx)(HW,{className:`font-medium`,children:new Date(t.blocked_date).toLocaleDateString()}),(0,L.jsx)(HW,{children:t.time_slot?(0,L.jsx)(QY,{variant:`outline`,children:t.time_slot}):(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`All`})}),(0,L.jsx)(HW,{children:t.max_orders||`-`}),(0,L.jsx)(HW,{className:`max-w-xs truncate`,children:t.description}),(0,L.jsx)(HW,{className:`text-sm text-muted-foreground`,children:t.created_by_name}),(0,L.jsx)(HW,{className:`text-right`,children:(0,L.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,L.jsx)(Cm,{variant:`ghost`,size:`sm`,onClick:()=>e(`/admin/scheduling/blocked-dates/${t.id}/edit`),children:(0,L.jsx)(kf,{className:`w-4 h-4`})}),(0,L.jsx)(Cm,{variant:`ghost`,size:`sm`,onClick:()=>u(t.id),className:`text-destructive`,children:(0,L.jsx)(Hf,{className:`w-4 h-4`})})]})})]},t.id))})]})}),h.pages>1&&(0,L.jsx)(WY,{currentPage:r,totalPages:h.pages,onPageChange:i}),(0,L.jsx)(hZ,{open:l!==null,title:`Delete Blocked Date`,description:`This action cannot be undone.`,onConfirm:()=>l!==null&&p(l),onCancel:()=>u(null),isLoading:n.isPending})]})}function F2(){let{useTimeSlots:e,createTimeSlot:t,updateTimeSlot:n}=N2(),{data:r,isLoading:i}=e(),[a,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(!1),{register:l,handleSubmit:u,reset:d,watch:f}=GQ({defaultValues:{slot_name:``,start_time:`08:00`,end_time:`12:00`,max_orders:10}}),p=async e=>{try{a?await n.mutateAsync({id:a,data:e}):await t.mutateAsync(e),d(),c(!1),o(null)}catch(e){console.error(e)}},m=e=>{d({slot_name:e.slot_name,start_time:e.start_time,end_time:e.end_time,max_orders:e.max_orders}),o(e.id),c(!0)};if(i)return(0,L.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,L.jsx)(AW,{})});let h=r?.data||[];return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Time Slots`}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage delivery time slots`})]}),(0,L.jsxs)(Cm,{onClick:()=>{c(!s),s&&d(),o(null)},className:`gap-2`,children:[(0,L.jsx)(jf,{className:`w-4 h-4`}),`Add Time Slot`]})]}),s&&(0,L.jsx)(pm,{className:`p-6`,children:(0,L.jsxs)(`form`,{onSubmit:u(p),className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`slot_name`,children:`Slot Name`}),(0,L.jsx)(WW,{id:`slot_name`,placeholder:`Morning`,...l(`slot_name`)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`max_orders`,children:`Max Orders`}),(0,L.jsx)(WW,{id:`max_orders`,type:`number`,...l(`max_orders`,{valueAsNumber:!0})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`start_time`,children:`Start Time`}),(0,L.jsx)(WW,{id:`start_time`,type:`time`,...l(`start_time`)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(e0,{htmlFor:`end_time`,children:`End Time`}),(0,L.jsx)(WW,{id:`end_time`,type:`time`,...l(`end_time`)})]})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsxs)(Cm,{type:`submit`,disabled:t.isPending||n.isPending,children:[a?`Update`:`Create`,` Time Slot`]}),(0,L.jsx)(Cm,{type:`button`,variant:`outline`,onClick:()=>{c(!1),d(),o(null)},children:`Cancel`})]})]})}),(0,L.jsx)(`div`,{className:`border border-border rounded-lg overflow-hidden`,children:(0,L.jsxs)(IW,{children:[(0,L.jsx)(LW,{children:(0,L.jsxs)(BW,{children:[(0,L.jsx)(VW,{children:`Slot Name`}),(0,L.jsx)(VW,{children:`Start Time`}),(0,L.jsx)(VW,{children:`End Time`}),(0,L.jsx)(VW,{children:`Max Orders`}),(0,L.jsx)(VW,{children:`Status`}),(0,L.jsx)(VW,{className:`text-right`,children:`Actions`})]})}),(0,L.jsx)(RW,{children:h.length===0?(0,L.jsx)(BW,{children:(0,L.jsx)(HW,{colSpan:6,className:`text-center py-8 text-muted-foreground`,children:`No time slots configured`})}):h.map(e=>(0,L.jsxs)(BW,{children:[(0,L.jsx)(HW,{className:`font-medium`,children:e.slot_name}),(0,L.jsx)(HW,{children:e.start_time}),(0,L.jsx)(HW,{children:e.end_time}),(0,L.jsx)(HW,{children:e.max_orders}),(0,L.jsx)(HW,{children:(0,L.jsx)(QY,{variant:e.is_active?`default`:`secondary`,children:e.is_active?`Active`:`Inactive`})}),(0,L.jsx)(HW,{className:`text-right`,children:(0,L.jsx)(`div`,{className:`flex gap-2 justify-end`,children:(0,L.jsx)(Cm,{variant:`ghost`,size:`sm`,onClick:()=>m(e),children:(0,L.jsx)(kf,{className:`w-4 h-4`})})})})]},e.id))})]})})]})}var I2=new ci({defaultOptions:{queries:{retry:1,staleTime:60*1e3}},queryCache:new si({onError:(e,t)=>{Dp(`query:${String(t.queryKey[0])}`,e)}}),mutationCache:new ii({onError:(e,t,n,r)=>{Dp(`mutation:${r.options.mutationKey??`unknown`}`,e),R.error(Tp(e))}})});function L2(){return(0,L.jsx)(bp,{children:(0,L.jsx)(Bt,{})})}function R2(){return(0,L.jsxs)(Ut,{children:[(0,L.jsxs)(Vt,{element:(0,L.jsx)(L2,{}),children:[(0,L.jsx)(Vt,{path:`/`,element:(0,L.jsx)(Lp,{})}),(0,L.jsx)(Vt,{path:`/shop`,element:(0,L.jsx)(Lp,{})}),(0,L.jsx)(Vt,{path:`/products/:slug`,element:(0,L.jsx)(Rp,{})}),(0,L.jsx)(Vt,{path:`/cart`,element:(0,L.jsx)(zp,{})}),(0,L.jsx)(Vt,{path:`/checkout`,element:(0,L.jsx)(Vp,{})}),(0,L.jsx)(Vt,{path:`/order-confirmation`,element:(0,L.jsx)(Wp,{})}),(0,L.jsx)(Vt,{path:`/login`,element:(0,L.jsx)(Jp,{})}),(0,L.jsx)(Vt,{path:`/register`,element:(0,L.jsx)(Yp,{})}),(0,L.jsx)(Vt,{path:`/contact`,element:(0,L.jsx)(om,{})}),(0,L.jsx)(Vt,{path:`/about`,element:(0,L.jsx)(cm,{})}),(0,L.jsx)(Vt,{path:`/faq`,element:(0,L.jsx)(um,{})}),(0,L.jsx)(Vt,{path:`/order/:reference`,element:(0,L.jsx)(Wp,{})})]}),(0,L.jsx)(Vt,{path:`/account/*`,element:(0,L.jsx)(Op,{children:(0,L.jsx)(Cp,{children:(0,L.jsx)(Zp,{})})})}),(0,L.jsx)(Vt,{path:`/admin/login`,element:(0,L.jsx)(wm,{})}),(0,L.jsx)(Vt,{path:`/admin/*`,element:(0,L.jsx)(Tm,{children:(0,L.jsx)(jm,{children:(0,L.jsxs)(Ut,{children:[(0,L.jsx)(Vt,{path:`/`,element:(0,L.jsx)(uW,{})}),(0,L.jsx)(Vt,{path:`/orders`,element:(0,L.jsx)(fW,{})}),(0,L.jsx)(Vt,{path:`/orders/:id`,element:(0,L.jsx)(hW,{})}),(0,L.jsx)(Vt,{path:`/products`,element:(0,L.jsx)(_W,{})}),(0,L.jsx)(Vt,{path:`/products/new`,element:(0,L.jsx)(yW,{})}),(0,L.jsx)(Vt,{path:`/products/:id/edit`,element:(0,L.jsx)(yW,{})}),(0,L.jsx)(Vt,{path:`/products/:id`,element:(0,L.jsx)(yW,{})}),(0,L.jsx)(Vt,{path:`/addons`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(SW,{})})}),(0,L.jsx)(Vt,{path:`/categories`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(wW,{})})}),(0,L.jsx)(Vt,{path:`/delivery-zones`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(DW,{})})}),(0,L.jsx)(Vt,{path:`/customers`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(kW,{})})}),(0,L.jsx)(Vt,{path:`/customers/:id`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(jW,{})})}),(0,L.jsx)(Vt,{path:`/reports`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(PW,{})})}),(0,L.jsx)(Vt,{path:`/settings`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(FW,{})})}),(0,L.jsx)(Vt,{path:`/staff`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(gZ,{})})}),(0,L.jsx)(Vt,{path:`/staff/new`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(M2,{})})}),(0,L.jsx)(Vt,{path:`/staff/:id`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(M2,{})})}),(0,L.jsx)(Vt,{path:`/staff/:id/edit`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(M2,{})})}),(0,L.jsx)(Vt,{path:`/scheduling/blocked-dates`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(P2,{})})}),(0,L.jsx)(Vt,{path:`/scheduling/time-slots`,element:(0,L.jsx)(Tm,{requiredRole:`admin`,children:(0,L.jsx)(F2,{})})})]})})})}),(0,L.jsx)(Vt,{path:`/404`,element:(0,L.jsx)(fm,{})}),(0,L.jsx)(Vt,{path:`*`,element:(0,L.jsx)(fm,{})})]})}function z2(){return(0,L.jsx)(Ld,{children:(0,L.jsx)(fi,{client:I2,children:(0,L.jsx)(cd,{defaultTheme:`light`,children:(0,L.jsx)(Ed,{children:(0,L.jsx)(Ad,{children:(0,L.jsx)(Fd,{children:(0,L.jsxs)(ad,{children:[(0,L.jsx)(aa,{}),(0,L.jsx)(Nn,{children:(0,L.jsx)(R2,{})})]})})})})})})})}Oi.createRoot(document.getElementById(`root`)).render((0,L.jsx)(S.StrictMode,{children:(0,L.jsx)(z2,{})}));
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 hero-bouquet-DoRrHviF.jpg
JPG
1.4 MB
2026-08-16 09:09
EDIT
📄 index-BrpJpVUN.js
JS
1.1 MB
2026-08-16 09:09
EDIT
📄 index-C0yivAR1.css
CSS
99.7 KB
2026-08-16 09:09
EDIT
📄 logo-BPrl4oKL.png
PNG
2.2 MB
2026-08-16 09:55
EDIT