var fj=e=>{throw TypeError(e)};var hy=(e,t,n)=>t.has(e)||fj("Cannot "+n);var q=(e,t,n)=>(hy(e,t,"read from private field"),n?n.call(e):t.get(e)),Oe=(e,t,n)=>t.has(e)?fj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(hy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ut=(e,t,n)=>(hy(e,t,"access private method"),n);var Bf=(e,t,n,r)=>({set _(a){he(e,t,a,n)},get _(){return q(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Uf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var FA={exports:{}},Ip={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var x$=Symbol.for("react.transitional.element"),b$=Symbol.for("react.fragment");function GA(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:x$,type:e,key:r,ref:t!==void 0?t:null,props:n}}Ip.Fragment=b$;Ip.jsx=GA;Ip.jsxs=GA;FA.exports=Ip;var s=FA.exports,KA={exports:{}},me={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Mb=Symbol.for("react.transitional.element"),j$=Symbol.for("react.portal"),S$=Symbol.for("react.fragment"),w$=Symbol.for("react.strict_mode"),N$=Symbol.for("react.profiler"),O$=Symbol.for("react.consumer"),A$=Symbol.for("react.context"),C$=Symbol.for("react.forward_ref"),E$=Symbol.for("react.suspense"),_$=Symbol.for("react.memo"),YA=Symbol.for("react.lazy"),T$=Symbol.for("react.activity"),dj=Symbol.iterator;function k$(e){return e===null||typeof e!="object"?null:(e=dj&&e[dj]||e["@@iterator"],typeof e=="function"?e:null)}var VA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},WA=Object.assign,XA={};function Do(e,t,n){this.props=e,this.context=t,this.refs=XA,this.updater=n||VA}Do.prototype.isReactComponent={};Do.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")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QA(){}QA.prototype=Do.prototype;function Pb(e,t,n){this.props=e,this.context=t,this.refs=XA,this.updater=n||VA}var $b=Pb.prototype=new QA;$b.constructor=Pb;WA($b,Do.prototype);$b.isPureReactComponent=!0;var hj=Array.isArray;function Uv(){}var tt={H:null,A:null,T:null,S:null},ZA=Object.prototype.hasOwnProperty;function Rb(e,t,n){var r=n.ref;return{$$typeof:Mb,type:e,key:t,ref:r!==void 0?r:null,props:n}}function M$(e,t){return Rb(e.type,t,e.props)}function Db(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mb}function P$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pj=/\/+/g;function py(e,t){return typeof e=="object"&&e!==null&&e.key!=null?P$(""+e.key):t.toString(36)}function $$(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Uv,Uv):(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 rl(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Mb:case j$:l=!0;break;case YA:return l=e._init,rl(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+py(e,0):r,hj(a)?(n="",l!=null&&(n=l.replace(pj,"$&/")+"/"),rl(a,t,n,"",function(u){return u})):a!=null&&(Db(a)&&(a=M$(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(pj,"$&/")+"/")+l)),t.push(a)),1;l=0;var o=r===""?".":r+":";if(hj(e))for(var c=0;c<e.length;c++)r=e[c],i=o+py(r,c),l+=rl(r,t,n,i,a);else if(c=k$(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,i=o+py(r,c++),l+=rl(r,t,n,i,a);else if(i==="object"){if(typeof e.then=="function")return rl($$(e),t,n,r,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function qf(e,t,n){if(e==null)return e;var r=[],a=0;return rl(e,r,"","",function(i){return t.call(n,i,a++)}),r}function R$(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var mj=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!==null&&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)},D$={map:qf,forEach:function(e,t,n){qf(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return qf(e,function(){t++}),t},toArray:function(e){return qf(e,function(t){return t})||[]},only:function(e){if(!Db(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Activity=T$;me.Children=D$;me.Component=Do;me.Fragment=S$;me.Profiler=N$;me.PureComponent=Pb;me.StrictMode=w$;me.Suspense=E$;me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=tt;me.__COMPILER_RUNTIME={__proto__:null,c:function(e){return tt.H.useMemoCache(e)}};me.cache=function(e){return function(){return e.apply(null,arguments)}};me.cacheSignal=function(){return null};me.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=WA({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!ZA.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var l=Array(i),o=0;o<i;o++)l[o]=arguments[o+2];r.children=l}return Rb(e.type,a,r)};me.createContext=function(e){return e={$$typeof:A$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:O$,_context:e},e};me.createElement=function(e,t,n){var r,a={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)ZA.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var o=Array(l),c=0;c<l;c++)o[c]=arguments[c+2];a.children=o}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return Rb(e,i,a)};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:C$,render:e}};me.isValidElement=Db;me.lazy=function(e){return{$$typeof:YA,_payload:{_status:-1,_result:e},_init:R$}};me.memo=function(e,t){return{$$typeof:_$,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=tt.T,n={};tt.T=n;try{var r=e(),a=tt.S;a!==null&&a(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Uv,mj)}catch(i){mj(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),tt.T=t}};me.unstable_useCacheRefresh=function(){return tt.H.useCacheRefresh()};me.use=function(e){return tt.H.use(e)};me.useActionState=function(e,t,n){return tt.H.useActionState(e,t,n)};me.useCallback=function(e,t){return tt.H.useCallback(e,t)};me.useContext=function(e){return tt.H.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e,t){return tt.H.useDeferredValue(e,t)};me.useEffect=function(e,t){return tt.H.useEffect(e,t)};me.useEffectEvent=function(e){return tt.H.useEffectEvent(e)};me.useId=function(){return tt.H.useId()};me.useImperativeHandle=function(e,t,n){return tt.H.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return tt.H.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return tt.H.useLayoutEffect(e,t)};me.useMemo=function(e,t){return tt.H.useMemo(e,t)};me.useOptimistic=function(e,t){return tt.H.useOptimistic(e,t)};me.useReducer=function(e,t,n){return tt.H.useReducer(e,t,n)};me.useRef=function(e){return tt.H.useRef(e)};me.useState=function(e){return tt.H.useState(e)};me.useSyncExternalStore=function(e,t,n){return tt.H.useSyncExternalStore(e,t,n)};me.useTransition=function(){return tt.H.useTransition()};me.version="19.2.7";KA.exports=me;var S=KA.exports;const T=$e(S);var JA={exports:{}},Bp={},eC={exports:{}},tC={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(P,z){var B=P.length;P.push(z);e:for(;0<B;){var K=B-1>>>1,V=P[K];if(0<a(V,z))P[K]=z,P[B]=V,B=K;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var z=P[0],B=P.pop();if(B!==z){P[0]=B;e:for(var K=0,V=P.length,X=V>>>1;K<X;){var Z=2*(K+1)-1,ne=P[Z],ie=Z+1,je=P[ie];if(0>a(ne,B))ie<V&&0>a(je,ne)?(P[K]=je,P[ie]=B,K=ie):(P[K]=ne,P[Z]=B,K=Z);else if(ie<V&&0>a(je,B))P[K]=je,P[ie]=B,K=ie;else break e}}return z}function a(P,z){var B=P.sortIndex-z.sortIndex;return B!==0?B:P.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],u=[],f=1,d=null,h=3,m=!1,j=!1,v=!1,p=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function x(P){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=P)r(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(u)}}function N(P){if(v=!1,x(P),!j)if(n(c)!==null)j=!0,w||(w=!0,k());else{var z=n(u);z!==null&&C(N,z.startTime-P)}}var w=!1,O=-1,A=5,E=-1;function M(){return p?!0:!(e.unstable_now()-E<A)}function $(){if(p=!1,w){var P=e.unstable_now();E=P;var z=!0;try{e:{j=!1,v&&(v=!1,g(O),O=-1),m=!0;var B=h;try{t:{for(x(P),d=n(c);d!==null&&!(d.expirationTime>P&&M());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var V=K(d.expirationTime<=P);if(P=e.unstable_now(),typeof V=="function"){d.callback=V,x(P),z=!0;break t}d===n(c)&&r(c),x(P)}else r(c);d=n(c)}if(d!==null)z=!0;else{var X=n(u);X!==null&&C(N,X.startTime-P),z=!1}}break e}finally{d=null,h=B,m=!1}z=void 0}}finally{z?k():w=!1}}}var k;if(typeof b=="function")k=function(){b($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,_=I.port2;I.port1.onmessage=$,k=function(){_.postMessage(null)}}else k=function(){y($,0)};function C(P,z){O=y(function(){P(e.unstable_now())},z)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(P){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var B=h;h=z;try{return P()}finally{h=B}},e.unstable_requestPaint=function(){p=!0},e.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var B=h;h=P;try{return z()}finally{h=B}},e.unstable_scheduleCallback=function(P,z,B){var K=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?K+B:K):B=K,P){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=B+V,P={id:f++,callback:z,priorityLevel:P,startTime:B,expirationTime:V,sortIndex:-1},B>K?(P.sortIndex=B,t(u,P),n(c)===null&&P===n(u)&&(v?(g(O),O=-1):v=!0,C(N,B-K))):(P.sortIndex=V,t(c,P),j||m||(j=!0,w||(w=!0,k()))),P},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(P){var z=h;return function(){var B=h;h=z;try{return P.apply(this,arguments)}finally{h=B}}}})(tC);eC.exports=tC;var L$=eC.exports,nC={exports:{}},un={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var z$=S;function rC(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 Ha(){}var rn={d:{f:Ha,r:function(){throw Error(rC(522))},D:Ha,C:Ha,L:Ha,m:Ha,X:Ha,S:Ha,M:Ha},p:0,findDOMNode:null},I$=Symbol.for("react.portal");function B$(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I$,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Rc=z$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Up(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=rn;un.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(rC(299));return B$(e,t,null,n)};un.flushSync=function(e){var t=Rc.T,n=rn.p;try{if(Rc.T=null,rn.p=2,e)return e()}finally{Rc.T=t,rn.p=n,rn.d.f()}};un.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,rn.d.C(e,t))};un.prefetchDNS=function(e){typeof e=="string"&&rn.d.D(e)};un.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Up(n,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?rn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):n==="script"&&rn.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};un.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Up(t.as,t.crossOrigin);rn.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==null&&rn.d.M(e)};un.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Up(n,t.crossOrigin);rn.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})}};un.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Up(t.as,t.crossOrigin);rn.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 rn.d.m(e)};un.requestFormReset=function(e){rn.d.r(e)};un.unstable_batchedUpdates=function(e,t){return e(t)};un.useFormState=function(e,t,n){return Rc.H.useFormState(e,t,n)};un.useFormStatus=function(){return Rc.H.useHostTransitionStatus()};un.version="19.2.7";function aC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aC)}catch(e){console.error(e)}}aC(),nC.exports=un;var U$=nC.exports;/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Mt=L$,iC=S,q$=U$;function F(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 sC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function lf(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 lC(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 oC(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 yj(e){if(lf(e)!==e)throw Error(F(188))}function H$(e){var t=e.alternate;if(!t){if(t=lf(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return yj(a),e;if(i===r)return yj(a),t;i=i.sibling}throw Error(F(188))}if(n.return!==r.return)n=a,r=i;else{for(var l=!1,o=a.child;o;){if(o===n){l=!0,n=a,r=i;break}if(o===r){l=!0,r=a,n=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===n){l=!0,n=i,r=a;break}if(o===r){l=!0,r=i,n=a;break}o=o.sibling}if(!l)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function cC(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=cC(e),t!==null)return t;e=e.sibling}return null}var nt=Object.assign,F$=Symbol.for("react.element"),Hf=Symbol.for("react.transitional.element"),_c=Symbol.for("react.portal"),sl=Symbol.for("react.fragment"),uC=Symbol.for("react.strict_mode"),qv=Symbol.for("react.profiler"),fC=Symbol.for("react.consumer"),pa=Symbol.for("react.context"),Lb=Symbol.for("react.forward_ref"),Hv=Symbol.for("react.suspense"),Fv=Symbol.for("react.suspense_list"),zb=Symbol.for("react.memo"),Ka=Symbol.for("react.lazy"),Gv=Symbol.for("react.activity"),G$=Symbol.for("react.memo_cache_sentinel"),vj=Symbol.iterator;function uc(e){return e===null||typeof e!="object"?null:(e=vj&&e[vj]||e["@@iterator"],typeof e=="function"?e:null)}var K$=Symbol.for("react.client.reference");function Kv(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===K$?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sl:return"Fragment";case qv:return"Profiler";case uC:return"StrictMode";case Hv:return"Suspense";case Fv:return"SuspenseList";case Gv:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _c:return"Portal";case pa:return e.displayName||"Context";case fC:return(e._context.displayName||"Context")+".Consumer";case Lb:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zb:return t=e.displayName||null,t!==null?t:Kv(e.type)||"Memo";case Ka:t=e._payload,e=e._init;try{return Kv(e(t))}catch{}}return null}var Tc=Array.isArray,de=iC.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Me=q$.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ps={pending:!1,data:null,method:null,action:null},Yv=[],ll=-1;function Xr(e){return{current:e}}function It(e){0>ll||(e.current=Yv[ll],Yv[ll]=null,ll--)}function Ye(e,t){ll++,Yv[ll]=e.current,e.current=t}var Gr=Xr(null),au=Xr(null),pi=Xr(null),Jd=Xr(null);function eh(e,t){switch(Ye(pi,t),Ye(au,e),Ye(Gr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wS(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wS(t),e=k_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}It(Gr),Ye(Gr,e)}function Gl(){It(Gr),It(au),It(pi)}function Vv(e){e.memoizedState!==null&&Ye(Jd,e);var t=Gr.current,n=k_(t,e.type);t!==n&&(Ye(au,e),Ye(Gr,n))}function th(e){au.current===e&&(It(Gr),It(au)),Jd.current===e&&(It(Jd),mu._currentValue=ps)}var my,gj;function Vi(e){if(my===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);my=t&&t[1]||"",gj=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+my+e+gj}var yy=!1;function vy(e,t){if(!e||yy)return"";yy=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(m){var h=m}Reflect.construct(e,[],d)}else{try{d.call()}catch(m){h=m}e.call(d.prototype)}}else{try{throw Error()}catch(m){h=m}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),l=i[0],o=i[1];if(l&&o){var c=l.split(`
`),u=o.split(`
`);for(a=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===c.length||a===u.length)for(r=c.length-1,a=u.length-1;1<=r&&0<=a&&c[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(c[r]!==u[a]){if(r!==1||a!==1)do if(r--,a--,0>a||c[r]!==u[a]){var f=`
`+c[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{yy=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vi(n):""}function Y$(e,t){switch(e.tag){case 26:case 27:case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return e.child!==t&&t!==null?Vi("Suspense Fallback"):Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 15:return vy(e.type,!1);case 11:return vy(e.type.render,!1);case 1:return vy(e.type,!0);case 31:return Vi("Activity");default:return""}}function xj(e){try{var t="",n=null;do t+=Y$(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}var Wv=Object.prototype.hasOwnProperty,Ib=Mt.unstable_scheduleCallback,gy=Mt.unstable_cancelCallback,V$=Mt.unstable_shouldYield,W$=Mt.unstable_requestPaint,kn=Mt.unstable_now,X$=Mt.unstable_getCurrentPriorityLevel,dC=Mt.unstable_ImmediatePriority,hC=Mt.unstable_UserBlockingPriority,nh=Mt.unstable_NormalPriority,Q$=Mt.unstable_LowPriority,pC=Mt.unstable_IdlePriority,Z$=Mt.log,J$=Mt.unstable_setDisableYieldValue,of=null,Mn=null;function si(e){if(typeof Z$=="function"&&J$(e),Mn&&typeof Mn.setStrictMode=="function")try{Mn.setStrictMode(of,e)}catch{}}var Pn=Math.clz32?Math.clz32:n4,e4=Math.log,t4=Math.LN2;function n4(e){return e>>>=0,e===0?32:31-(e4(e)/t4|0)|0}var Ff=256,Gf=262144,Kf=4194304;function Wi(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 qp(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=Wi(r):(l&=o,l!==0?a=Wi(l):n||(n=o&~e,n!==0&&(a=Wi(n))))):(o=r&~i,o!==0?a=Wi(o):l!==0?a=Wi(l):n||(n=r&~e,n!==0&&(a=Wi(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function cf(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function r4(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 mC(){var e=Kf;return Kf<<=1,!(Kf&62914560)&&(Kf=4194304),e}function xy(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function uf(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function a4(e,t,n,r,a,i){var l=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 o=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var f=31-Pn(n),d=1<<f;o[f]=0,c[f]=-1;var h=u[f];if(h!==null)for(u[f]=null,f=0;f<h.length;f++){var m=h[f];m!==null&&(m.lane&=-536870913)}n&=~d}r!==0&&yC(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(l&~t))}function yC(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function vC(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function gC(e,t){var n=t&-t;return n=n&42?1:Bb(n),n&(e.suspendedLanes|t)?0:n}function Bb(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 Ub(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function xC(){var e=Me.p;return e!==0?e:(e=window.event,e===void 0?32:q_(e.type))}function bj(e,t){var n=Me.p;try{return Me.p=e,t()}finally{Me.p=n}}var Pi=Math.random().toString(36).slice(2),Ft="__reactFiber$"+Pi,xn="__reactProps$"+Pi,Lo="__reactContainer$"+Pi,Xv="__reactEvents$"+Pi,i4="__reactListeners$"+Pi,s4="__reactHandles$"+Pi,jj="__reactResources$"+Pi,ff="__reactMarker$"+Pi;function qb(e){delete e[Ft],delete e[xn],delete e[Xv],delete e[i4],delete e[s4]}function ol(e){var t=e[Ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lo]||n[Ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ES(e);e!==null;){if(n=e[Ft])return n;e=ES(e)}return t}e=n,n=e.parentNode}return null}function zo(e){if(e=e[Ft]||e[Lo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(F(33))}function Ol(e){var t=e[jj];return t||(t=e[jj]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[ff]=!0}var bC=new Set,jC={};function Ls(e,t){Kl(e,t),Kl(e+"Capture",t)}function Kl(e,t){for(jC[e]=t,e=0;e<t.length;e++)bC.add(t[e])}var l4=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]*$"),Sj={},wj={};function o4(e){return Wv.call(wj,e)?!0:Wv.call(Sj,e)?!1:l4.test(e)?wj[e]=!0:(Sj[e]=!0,!1)}function Td(e,t,n){if(o4(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 Yf(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 na(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 Vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function SC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function c4(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qv(e){if(!e._valueTracker){var t=SC(e)?"checked":"value";e._valueTracker=c4(e,t,""+e[t])}}function wC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=SC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var u4=/[\n"\\]/g;function Qn(e){return e.replace(u4,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zv(e,t,n,r,a,i,l,o){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vn(t)):e.value!==""+Vn(t)&&(e.value=""+Vn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Jv(e,l,Vn(t)):n!=null?Jv(e,l,Vn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Vn(o):e.removeAttribute("name")}function NC(e,t,n,r,a,i,l,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Qv(e);return}n=n!=null?""+Vn(n):"",t=t!=null?""+Vn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Qv(e)}function Jv(e,t,n){t==="number"&&rh(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function OC(e,t,n){if(t!=null&&(t=""+Vn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Vn(n):""}function AC(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(F(92));if(Tc(r)){if(1<r.length)throw Error(F(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Vn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Qv(e)}function Yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var f4=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 Nj(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||f4.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function CC(e,t,n){if(t!=null&&typeof t!="object")throw Error(F(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&&Nj(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&Nj(e,i,t[i])}function Hb(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 d4=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"]]),h4=/^[\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 kd(e){return h4.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ma(){}var eg=null;function Fb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cl=null,Cl=null;function Oj(e){var t=zo(e);if(t&&(e=t.stateNode)){var n=e[xn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zv(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="'+Qn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[xn]||null;if(!a)throw Error(F(90));Zv(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&&wC(r)}break e;case"textarea":OC(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Al(e,!!n.multiple,t,!1)}}}var by=!1;function EC(e,t,n){if(by)return e(t,n);by=!0;try{var r=e(t);return r}finally{if(by=!1,(cl!==null||Cl!==null)&&(em(),cl&&(t=cl,e=Cl,Cl=cl=null,Oj(t),e)))for(t=0;t<e.length;t++)Oj(e[t])}}function iu(e,t){var n=e.stateNode;if(n===null)return null;var r=n[xn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tg=!1;if(Oa)try{var fc={};Object.defineProperty(fc,"passive",{get:function(){tg=!0}}),window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{tg=!1}var li=null,Gb=null,Md=null;function _C(){if(Md)return Md;var e,t=Gb,n=t.length,r,a="value"in li?li.value:li.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===a[i-r];r++);return Md=a.slice(e,1<r?1-r:void 0)}function Pd(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 Vf(){return!0}function Aj(){return!1}function bn(e){function t(n,r,a,i,l){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Vf:Aj,this.isPropagationStopped=Aj,this}return nt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vf)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vf)},persist:function(){},isPersistent:Vf}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hp=bn(zs),df=nt({},zs,{view:0,detail:0}),p4=bn(df),jy,Sy,dc,Fp=nt({},df,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kb,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!==dc&&(dc&&e.type==="mousemove"?(jy=e.screenX-dc.screenX,Sy=e.screenY-dc.screenY):Sy=jy=0,dc=e),jy)},movementY:function(e){return"movementY"in e?e.movementY:Sy}}),Cj=bn(Fp),m4=nt({},Fp,{dataTransfer:0}),y4=bn(m4),v4=nt({},df,{relatedTarget:0}),wy=bn(v4),g4=nt({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),x4=bn(g4),b4=nt({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),j4=bn(b4),S4=nt({},zs,{data:0}),Ej=bn(S4),w4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N4={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"},O4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=O4[e])?!!t[e]:!1}function Kb(){return A4}var C4=nt({},df,{key:function(e){if(e.key){var t=w4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kb,charCode:function(e){return e.type==="keypress"?Pd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),E4=bn(C4),_4=nt({},Fp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_j=bn(_4),T4=nt({},df,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kb}),k4=bn(T4),M4=nt({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),P4=bn(M4),$4=nt({},Fp,{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}),R4=bn($4),D4=nt({},zs,{newState:0,oldState:0}),L4=bn(D4),z4=[9,13,27,32],Yb=Oa&&"CompositionEvent"in window,Dc=null;Oa&&"documentMode"in document&&(Dc=document.documentMode);var I4=Oa&&"TextEvent"in window&&!Dc,TC=Oa&&(!Yb||Dc&&8<Dc&&11>=Dc),Tj=" ",kj=!1;function kC(e,t){switch(e){case"keyup":return z4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ul=!1;function B4(e,t){switch(e){case"compositionend":return MC(t);case"keypress":return t.which!==32?null:(kj=!0,Tj);case"textInput":return e=t.data,e===Tj&&kj?null:e;default:return null}}function U4(e,t){if(ul)return e==="compositionend"||!Yb&&kC(e,t)?(e=_C(),Md=Gb=li=null,ul=!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 TC&&t.locale!=="ko"?null:t.data;default:return null}}var q4={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 Mj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!q4[e.type]:t==="textarea"}function PC(e,t,n,r){cl?Cl?Cl.push(r):Cl=[r]:cl=r,t=jh(t,"onChange"),0<t.length&&(n=new Hp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Lc=null,su=null;function H4(e){E_(e,0)}function Gp(e){var t=kc(e);if(wC(t))return e}function Pj(e,t){if(e==="change")return t}var $C=!1;if(Oa){var Ny;if(Oa){var Oy="oninput"in document;if(!Oy){var $j=document.createElement("div");$j.setAttribute("oninput","return;"),Oy=typeof $j.oninput=="function"}Ny=Oy}else Ny=!1;$C=Ny&&(!document.documentMode||9<document.documentMode)}function Rj(){Lc&&(Lc.detachEvent("onpropertychange",RC),su=Lc=null)}function RC(e){if(e.propertyName==="value"&&Gp(su)){var t=[];PC(t,su,e,Fb(e)),EC(H4,t)}}function F4(e,t,n){e==="focusin"?(Rj(),Lc=t,su=n,Lc.attachEvent("onpropertychange",RC)):e==="focusout"&&Rj()}function G4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gp(su)}function K4(e,t){if(e==="click")return Gp(t)}function Y4(e,t){if(e==="input"||e==="change")return Gp(t)}function V4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:V4;function lu(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 a=n[r];if(!Wv.call(t,a)||!Dn(e[a],t[a]))return!1}return!0}function Dj(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lj(e,t){var n=Dj(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dj(n)}}function DC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?DC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function LC(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rh(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=rh(e.document)}return t}function Vb(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 W4=Oa&&"documentMode"in document&&11>=document.documentMode,fl=null,ng=null,zc=null,rg=!1;function zj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rg||fl==null||fl!==rh(r)||(r=fl,"selectionStart"in r&&Vb(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}),zc&&lu(zc,r)||(zc=r,r=jh(ng,"onSelect"),0<r.length&&(t=new Hp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fl)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Ay={},zC={};Oa&&(zC=document.createElement("div").style,"AnimationEvent"in window||(delete dl.animationend.animation,delete dl.animationiteration.animation,delete dl.animationstart.animation),"TransitionEvent"in window||delete dl.transitionend.transition);function Is(e){if(Ay[e])return Ay[e];if(!dl[e])return e;var t=dl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zC)return Ay[e]=t[n];return e}var IC=Is("animationend"),BC=Is("animationiteration"),UC=Is("animationstart"),X4=Is("transitionrun"),Q4=Is("transitionstart"),Z4=Is("transitioncancel"),qC=Is("transitionend"),HC=new Map,ag="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(" ");ag.push("scrollEnd");function _r(e,t){HC.set(e,t),Ls(t,[e])}var ah=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!==null&&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)},Yn=[],hl=0,Wb=0;function Kp(){for(var e=hl,t=Wb=hl=0;t<e;){var n=Yn[t];Yn[t++]=null;var r=Yn[t];Yn[t++]=null;var a=Yn[t];Yn[t++]=null;var i=Yn[t];if(Yn[t++]=null,r!==null&&a!==null){var l=r.pending;l===null?a.next=a:(a.next=l.next,l.next=a),r.pending=a}i!==0&&FC(n,a,i)}}function Yp(e,t,n,r){Yn[hl++]=e,Yn[hl++]=t,Yn[hl++]=n,Yn[hl++]=r,Wb|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Xb(e,t,n,r){return Yp(e,t,n,r),ih(e)}function Bs(e,t){return Yp(e,null,null,t),ih(e)}function FC(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Pn(n),e=i.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=n|536870912),i):null}function ih(e){if(50<Yc)throw Yc=0,Og=null,Error(F(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pl={};function J4(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 En(e,t,n,r){return new J4(e,t,n,r)}function Qb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ba(e,t){var n=e.alternate;return n===null?(n=En(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 GC(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 $d(e,t,n,r,a,i){var l=0;if(r=e,typeof e=="function")Qb(e)&&(l=1);else if(typeof e=="string")l=aD(e,n,Gr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Gv:return e=En(31,n,t,a),e.elementType=Gv,e.lanes=i,e;case sl:return ms(n.children,a,i,t);case uC:l=8,a|=24;break;case qv:return e=En(12,n,t,a|2),e.elementType=qv,e.lanes=i,e;case Hv:return e=En(13,n,t,a),e.elementType=Hv,e.lanes=i,e;case Fv:return e=En(19,n,t,a),e.elementType=Fv,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pa:l=10;break e;case fC:l=9;break e;case Lb:l=11;break e;case zb:l=14;break e;case Ka:l=16,r=null;break e}l=29,n=Error(F(130,e===null?"null":typeof e,"")),r=null}return t=En(l,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function ms(e,t,n,r){return e=En(7,e,r,t),e.lanes=n,e}function Cy(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function KC(e){var t=En(18,null,null,0);return t.stateNode=e,t}function Ey(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ij=new WeakMap;function Zn(e,t){if(typeof e=="object"&&e!==null){var n=Ij.get(e);return n!==void 0?n:(t={value:e,source:t,stack:xj(t)},Ij.set(e,t),t)}return{value:e,source:t,stack:xj(t)}}var ml=[],yl=0,sh=null,ou=0,Wn=[],Xn=0,Oi=null,Br=1,Ur="";function ua(e,t){ml[yl++]=ou,ml[yl++]=sh,sh=e,ou=t}function YC(e,t,n){Wn[Xn++]=Br,Wn[Xn++]=Ur,Wn[Xn++]=Oi,Oi=e;var r=Br;e=Ur;var a=32-Pn(r)-1;r&=~(1<<a),n+=1;var i=32-Pn(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Br=1<<32-Pn(t)+a|n<<a|r,Ur=i+e}else Br=1<<i|n<<a|r,Ur=e}function Zb(e){e.return!==null&&(ua(e,1),YC(e,1,0))}function Jb(e){for(;e===sh;)sh=ml[--yl],ml[yl]=null,ou=ml[--yl],ml[yl]=null;for(;e===Oi;)Oi=Wn[--Xn],Wn[Xn]=null,Ur=Wn[--Xn],Wn[Xn]=null,Br=Wn[--Xn],Wn[Xn]=null}function VC(e,t){Wn[Xn++]=Br,Wn[Xn++]=Ur,Wn[Xn++]=Oi,Br=t.id,Ur=t.overflow,Oi=e}var Gt=null,Je=null,Ce=!1,mi=null,Jn=!1,ig=Error(F(519));function Ai(e){var t=Error(F(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu(Zn(t,e)),ig}function Bj(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ft]=e,t[xn]=r,n){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(n=0;n<hu.length;n++)Se(hu[n],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),NC(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),AC(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||T_(t.textContent,n)?(r.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),r.onScroll!=null&&Se("scroll",t),r.onScrollEnd!=null&&Se("scrollend",t),r.onClick!=null&&(t.onclick=ma),t=!0):t=!1,t||Ai(e,!0)}function Uj(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:Gt=Gt.return}}function Ws(e){if(e!==Gt)return!1;if(!Ce)return Uj(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Tg(e.type,e.memoizedProps)),n=!n),n&&Je&&Ai(e),Uj(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Je=CS(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Je=CS(e)}else t===27?(t=Je,$i(e.type)?(e=$g,$g=null,Je=e):Je=t):Je=Gt?ar(e.stateNode.nextSibling):null;return!0}function Ns(){Je=Gt=null,Ce=!1}function _y(){var e=mi;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),mi=null),e}function cu(e){mi===null?mi=[e]:mi.push(e)}var sg=Xr(null),Us=null,ya=null;function Wa(e,t,n){Ye(sg,t._currentValue),t._currentValue=n}function ja(e){e._currentValue=sg.current,It(sg)}function lg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function og(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var l=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var c=0;c<t.length;c++)if(o.context===t[c]){i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),lg(i.return,n,e),r||(l=null);break e}i=o.next}}else if(a.tag===18){if(l=a.return,l===null)throw Error(F(341));l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),lg(l,n,e),l=null}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===e){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}}function Io(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var l=a.alternate;if(l===null)throw Error(F(387));if(l=l.memoizedProps,l!==null){var o=a.type;Dn(a.pendingProps.value,l.value)||(e!==null?e.push(o):e=[o])}}else if(a===Jd.current){if(l=a.alternate,l===null)throw Error(F(387));l.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(mu):e=[mu])}a=a.return}e!==null&&og(t,e,n,r),t.flags|=262144}function lh(e){for(e=e.firstContext;e!==null;){if(!Dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Os(e){Us=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yt(e){return WC(Us,e)}function Wf(e,t){return Us===null&&Os(e),WC(e,t)}function WC(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(F(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var eR=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},tR=Mt.unstable_scheduleCallback,nR=Mt.unstable_NormalPriority,Ot={$$typeof:pa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function e0(){return{controller:new eR,data:new Map,refCount:0}}function hf(e){e.refCount--,e.refCount===0&&tR(nR,function(){e.controller.abort()})}var Ic=null,cg=0,Vl=0,El=null;function rR(e,t){if(Ic===null){var n=Ic=[];cg=0,Vl=O0(),El={status:"pending",value:void 0,then:function(r){n.push(r)}}}return cg++,t.then(qj,qj),t}function qj(){if(--cg===0&&Ic!==null){El!==null&&(El.status="fulfilled");var e=Ic;Ic=null,Vl=0,El=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function aR(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var Hj=de.S;de.S=function(e,t){c_=kn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&rR(e,t),Hj!==null&&Hj(e,t)};var ys=Xr(null);function t0(){var e=ys.current;return e!==null?e:He.pooledCache}function Rd(e,t){t===null?Ye(ys,ys.current):Ye(ys,t.pool)}function XC(){var e=t0();return e===null?null:{parent:Ot._currentValue,pool:e}}var Bo=Error(F(460)),n0=Error(F(474)),Vp=Error(F(542)),oh={then:function(){}};function Fj(e){return e=e.status,e==="fulfilled"||e==="rejected"}function QC(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ma,ma),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kj(e),e;default:if(typeof t.status=="string")t.then(ma,ma);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(F(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kj(e),e}throw vs=t,Bo}}function Xi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(vs=n,Bo):n}}var vs=null;function Gj(){if(vs===null)throw Error(F(459));var e=vs;return vs=null,e}function Kj(e){if(e===Bo||e===Vp)throw Error(F(483))}var _l=null,uu=0;function Xf(e){var t=uu;return uu+=1,_l===null&&(_l=[]),QC(_l,e,t)}function hc(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qf(e,t){throw t.$$typeof===F$?Error(F(525)):(e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ZC(e){function t(y,g){if(e){var b=y.deletions;b===null?(y.deletions=[g],y.flags|=16):b.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y){for(var g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function a(y,g){return y=ba(y,g),y.index=0,y.sibling=null,y}function i(y,g,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<g?(y.flags|=67108866,g):b):(y.flags|=67108866,g)):(y.flags|=1048576,g)}function l(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function o(y,g,b,x){return g===null||g.tag!==6?(g=Cy(b,y.mode,x),g.return=y,g):(g=a(g,b),g.return=y,g)}function c(y,g,b,x){var N=b.type;return N===sl?f(y,g,b.props.children,x,b.key):g!==null&&(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ka&&Xi(N)===g.type)?(g=a(g,b.props),hc(g,b),g.return=y,g):(g=$d(b.type,b.key,b.props,null,y.mode,x),hc(g,b),g.return=y,g)}function u(y,g,b,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Ey(b,y.mode,x),g.return=y,g):(g=a(g,b.children||[]),g.return=y,g)}function f(y,g,b,x,N){return g===null||g.tag!==7?(g=ms(b,y.mode,x,N),g.return=y,g):(g=a(g,b),g.return=y,g)}function d(y,g,b){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Cy(""+g,y.mode,b),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Hf:return b=$d(g.type,g.key,g.props,null,y.mode,b),hc(b,g),b.return=y,b;case _c:return g=Ey(g,y.mode,b),g.return=y,g;case Ka:return g=Xi(g),d(y,g,b)}if(Tc(g)||uc(g))return g=ms(g,y.mode,b,null),g.return=y,g;if(typeof g.then=="function")return d(y,Xf(g),b);if(g.$$typeof===pa)return d(y,Wf(y,g),b);Qf(y,g)}return null}function h(y,g,b,x){var N=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return N!==null?null:o(y,g,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Hf:return b.key===N?c(y,g,b,x):null;case _c:return b.key===N?u(y,g,b,x):null;case Ka:return b=Xi(b),h(y,g,b,x)}if(Tc(b)||uc(b))return N!==null?null:f(y,g,b,x,null);if(typeof b.then=="function")return h(y,g,Xf(b),x);if(b.$$typeof===pa)return h(y,g,Wf(y,b),x);Qf(y,b)}return null}function m(y,g,b,x,N){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return y=y.get(b)||null,o(g,y,""+x,N);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Hf:return y=y.get(x.key===null?b:x.key)||null,c(g,y,x,N);case _c:return y=y.get(x.key===null?b:x.key)||null,u(g,y,x,N);case Ka:return x=Xi(x),m(y,g,b,x,N)}if(Tc(x)||uc(x))return y=y.get(b)||null,f(g,y,x,N,null);if(typeof x.then=="function")return m(y,g,b,Xf(x),N);if(x.$$typeof===pa)return m(y,g,b,Wf(g,x),N);Qf(g,x)}return null}function j(y,g,b,x){for(var N=null,w=null,O=g,A=g=0,E=null;O!==null&&A<b.length;A++){O.index>A?(E=O,O=null):E=O.sibling;var M=h(y,O,b[A],x);if(M===null){O===null&&(O=E);break}e&&O&&M.alternate===null&&t(y,O),g=i(M,g,A),w===null?N=M:w.sibling=M,w=M,O=E}if(A===b.length)return n(y,O),Ce&&ua(y,A),N;if(O===null){for(;A<b.length;A++)O=d(y,b[A],x),O!==null&&(g=i(O,g,A),w===null?N=O:w.sibling=O,w=O);return Ce&&ua(y,A),N}for(O=r(O);A<b.length;A++)E=m(O,y,A,b[A],x),E!==null&&(e&&E.alternate!==null&&O.delete(E.key===null?A:E.key),g=i(E,g,A),w===null?N=E:w.sibling=E,w=E);return e&&O.forEach(function($){return t(y,$)}),Ce&&ua(y,A),N}function v(y,g,b,x){if(b==null)throw Error(F(151));for(var N=null,w=null,O=g,A=g=0,E=null,M=b.next();O!==null&&!M.done;A++,M=b.next()){O.index>A?(E=O,O=null):E=O.sibling;var $=h(y,O,M.value,x);if($===null){O===null&&(O=E);break}e&&O&&$.alternate===null&&t(y,O),g=i($,g,A),w===null?N=$:w.sibling=$,w=$,O=E}if(M.done)return n(y,O),Ce&&ua(y,A),N;if(O===null){for(;!M.done;A++,M=b.next())M=d(y,M.value,x),M!==null&&(g=i(M,g,A),w===null?N=M:w.sibling=M,w=M);return Ce&&ua(y,A),N}for(O=r(O);!M.done;A++,M=b.next())M=m(O,y,A,M.value,x),M!==null&&(e&&M.alternate!==null&&O.delete(M.key===null?A:M.key),g=i(M,g,A),w===null?N=M:w.sibling=M,w=M);return e&&O.forEach(function(k){return t(y,k)}),Ce&&ua(y,A),N}function p(y,g,b,x){if(typeof b=="object"&&b!==null&&b.type===sl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Hf:e:{for(var N=b.key;g!==null;){if(g.key===N){if(N=b.type,N===sl){if(g.tag===7){n(y,g.sibling),x=a(g,b.props.children),x.return=y,y=x;break e}}else if(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ka&&Xi(N)===g.type){n(y,g.sibling),x=a(g,b.props),hc(x,b),x.return=y,y=x;break e}n(y,g);break}else t(y,g);g=g.sibling}b.type===sl?(x=ms(b.props.children,y.mode,x,b.key),x.return=y,y=x):(x=$d(b.type,b.key,b.props,null,y.mode,x),hc(x,b),x.return=y,y=x)}return l(y);case _c:e:{for(N=b.key;g!==null;){if(g.key===N)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(y,g.sibling),x=a(g,b.children||[]),x.return=y,y=x;break e}else{n(y,g);break}else t(y,g);g=g.sibling}x=Ey(b,y.mode,x),x.return=y,y=x}return l(y);case Ka:return b=Xi(b),p(y,g,b,x)}if(Tc(b))return j(y,g,b,x);if(uc(b)){if(N=uc(b),typeof N!="function")throw Error(F(150));return b=N.call(b),v(y,g,b,x)}if(typeof b.then=="function")return p(y,g,Xf(b),x);if(b.$$typeof===pa)return p(y,g,Wf(y,b),x);Qf(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(n(y,g.sibling),x=a(g,b),x.return=y,y=x):(n(y,g),x=Cy(b,y.mode,x),x.return=y,y=x),l(y)):n(y,g)}return function(y,g,b,x){try{uu=0;var N=p(y,g,b,x);return _l=null,N}catch(O){if(O===Bo||O===Vp)throw O;var w=En(29,O,null,y.mode);return w.lanes=x,w.return=y,w}finally{}}}var As=ZC(!0),JC=ZC(!1),Ya=!1;function r0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ug(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 yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=ih(e),FC(e,null,n),t}return Yp(e,r,t,n),ih(e)}function Bc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vC(e,n)}}function Ty(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,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 fg=!1;function Uc(){if(fg){var e=El;if(e!==null)throw e}}function qc(e,t,n,r){fg=!1;var a=e.updateQueue;Ya=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,l===null?i=u:l.next=u,l=c;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(i!==null){var d=a.baseState;l=0,f=u=c=null,o=i;do{var h=o.lane&-536870913,m=h!==o.lane;if(m?(Ae&h)===h:(r&h)===h){h!==0&&h===Vl&&(fg=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var j=e,v=o;h=t;var p=n;switch(v.tag){case 1:if(j=v.payload,typeof j=="function"){d=j.call(p,d,h);break e}d=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=v.payload,h=typeof j=="function"?j.call(p,d,h):j,h==null)break e;d=nt({},d,h);break e;case 2:Ya=!0}}h=o.callback,h!==null&&(e.flags|=64,m&&(e.flags|=8192),m=a.callbacks,m===null?a.callbacks=[h]:m.push(h))}else m={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,l|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;m=o,o=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);f===null&&(c=d),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Ei|=l,e.lanes=l,e.memoizedState=d}}function eE(e,t){if(typeof e!="function")throw Error(F(191,e));e.call(t)}function tE(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eE(n[e],t)}var Wl=Xr(null),ch=Xr(0);function Yj(e,t){e=_a,Ye(ch,e),Ye(Wl,t),_a=e|t.baseLanes}function dg(){Ye(ch,_a),Ye(Wl,Wl.current)}function a0(){_a=ch.current,It(Wl),It(ch)}var Ln=Xr(null),rr=null;function Xa(e){var t=e.alternate;Ye(gt,gt.current&1),Ye(Ln,e),rr===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(rr=e)}function hg(e){Ye(gt,gt.current),Ye(Ln,e),rr===null&&(rr=e)}function nE(e){e.tag===22?(Ye(gt,gt.current),Ye(Ln,e),rr===null&&(rr=e)):Qa()}function Qa(){Ye(gt,gt.current),Ye(Ln,Ln.current)}function Cn(e){It(Ln),rr===e&&(rr=null),It(gt)}var gt=Xr(0);function uh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Mg(n)||Pg(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 Aa=0,ve=null,Ue=null,wt=null,fh=!1,Tl=!1,Cs=!1,dh=0,fu=0,kl=null,iR=0;function ht(){throw Error(F(321))}function i0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function s0(e,t,n,r,a,i){return Aa=i,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,de.H=e===null||e.memoizedState===null?PE:v0,Cs=!1,i=n(r,a),Cs=!1,Tl&&(i=aE(t,n,r,a)),rE(e),i}function rE(e){de.H=du;var t=Ue!==null&&Ue.next!==null;if(Aa=0,wt=Ue=ve=null,fh=!1,fu=0,kl=null,t)throw Error(F(300));e===null||At||(e=e.dependencies,e!==null&&lh(e)&&(At=!0))}function aE(e,t,n,r){ve=e;var a=0;do{if(Tl&&(kl=null),fu=0,Tl=!1,25<=a)throw Error(F(301));if(a+=1,wt=Ue=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}de.H=$E,i=t(n,r)}while(Tl);return i}function sR(){var e=de.H,t=e.useState()[0];return t=typeof t.then=="function"?pf(t):t,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(ve.flags|=1024),t}function l0(){var e=dh!==0;return dh=0,e}function o0(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function c0(e){if(fh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fh=!1}Aa=0,wt=Ue=ve=null,Tl=!1,fu=dh=0,kl=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?ve.memoizedState=wt=e:wt=wt.next=e,wt}function xt(){if(Ue===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=wt===null?ve.memoizedState:wt.next;if(t!==null)wt=t,Ue=e;else{if(e===null)throw ve.alternate===null?Error(F(467)):Error(F(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},wt===null?ve.memoizedState=wt=e:wt=wt.next=e}return wt}function Wp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pf(e){var t=fu;return fu+=1,kl===null&&(kl=[]),e=QC(kl,e,t),t=ve,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,de.H=t===null||t.memoizedState===null?PE:v0),e}function Xp(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pf(e);if(e.$$typeof===pa)return Yt(e)}throw Error(F(438,String(e)))}function u0(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ve.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wp(),ve.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]=G$;return t.index++,n}function Ca(e,t){return typeof t=="function"?t(e):t}function Dd(e){var t=xt();return f0(t,Ue,e)}function f0(e,t,n){var r=e.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=l=null,c=null,u=t,f=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ae&d)===d:(Aa&d)===d){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Vl&&(f=!0);else if((Aa&h)===h){u=u.next,h===Vl&&(f=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=d,l=i):c=c.next=d,ve.lanes|=h,Ei|=h;d=u.action,Cs&&n(i,d),i=u.hasEagerState?u.eagerState:n(i,d)}else h={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,l=i):c=c.next=h,ve.lanes|=d,Ei|=d;u=u.next}while(u!==null&&u!==t);if(c===null?l=i:c.next=o,!Dn(i,e.memoizedState)&&(At=!0,f&&(n=El,n!==null)))throw n;e.memoizedState=i,e.baseState=l,e.baseQueue=c,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ky(e){var t=xt(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);Dn(i,t.memoizedState)||(At=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function iE(e,t,n){var r=ve,a=xt(),i=Ce;if(i){if(n===void 0)throw Error(F(407));n=n()}else n=t();var l=!Dn((Ue||a).memoizedState,n);if(l&&(a.memoizedState=n,At=!0),a=a.queue,d0(oE.bind(null,r,a,e),[e]),a.getSnapshot!==t||l||wt!==null&&wt.memoizedState.tag&1){if(r.flags|=2048,Xl(9,{destroy:void 0},lE.bind(null,r,a,n,t),null),He===null)throw Error(F(349));i||Aa&127||sE(r,t,n)}return n}function sE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=Wp(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lE(e,t,n,r){t.value=n,t.getSnapshot=r,cE(t)&&uE(e)}function oE(e,t,n){return n(function(){cE(t)&&uE(e)})}function cE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function uE(e){var t=Bs(e,2);t!==null&&vn(t,e,2)}function pg(e){var t=en();if(typeof e=="function"){var n=e;if(e=n(),Cs){si(!0);try{n()}finally{si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t}function fE(e,t,n,r){return e.baseState=n,f0(e,Ue,typeof r=="function"?r:Ca)}function lR(e,t,n,r,a){if(Zp(e))throw Error(F(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){i.listeners.push(l)}};de.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,dE(t,i)):(i.next=n.next,t.pending=n.next=i)}}function dE(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=de.T,l={};de.T=l;try{var o=n(a,r),c=de.S;c!==null&&c(l,o),Vj(e,t,o)}catch(u){mg(e,t,u)}finally{i!==null&&l.types!==null&&(i.types=l.types),de.T=i}}else try{i=n(a,r),Vj(e,t,i)}catch(u){mg(e,t,u)}}function Vj(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){Wj(e,t,r)},function(r){return mg(e,t,r)}):Wj(e,t,n)}function Wj(e,t,n){t.status="fulfilled",t.value=n,hE(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,dE(e,n)))}function mg(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,hE(t),t=t.next;while(t!==r)}e.action=null}function hE(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function pE(e,t){return t}function Xj(e,t){if(Ce){var n=He.formState;if(n!==null){e:{var r=ve;if(Ce){if(Je){t:{for(var a=Je,i=Jn;a.nodeType!==8;){if(!i){a=null;break t}if(a=ar(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Je=ar(a.nextSibling),r=a.data==="F!";break e}}Ai(r)}r=!1}r&&(t=n[0])}}return n=en(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pE,lastRenderedState:t},n.queue=r,n=TE.bind(null,ve,r),r.dispatch=n,r=pg(!1),i=y0.bind(null,ve,!1,r.queue),r=en(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=lR.bind(null,ve,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qj(e){var t=xt();return mE(t,Ue,e)}function mE(e,t,n){if(t=f0(e,t,pE)[0],e=Dd(Ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=pf(t)}catch(l){throw l===Bo?Vp:l}else r=t;t=xt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,Xl(9,{destroy:void 0},oR.bind(null,a,n),null)),[r,i,e]}function oR(e,t){e.action=t}function Zj(e){var t=xt(),n=Ue;if(n!==null)return mE(t,n,e);xt(),t=t.memoizedState,n=xt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Xl(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Wp(),ve.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 yE(){return xt().memoizedState}function Ld(e,t,n,r){var a=en();ve.flags|=e,a.memoizedState=Xl(1|t,{destroy:void 0},n,r===void 0?null:r)}function Qp(e,t,n,r){var a=xt();r=r===void 0?null:r;var i=a.memoizedState.inst;Ue!==null&&r!==null&&i0(r,Ue.memoizedState.deps)?a.memoizedState=Xl(t,i,n,r):(ve.flags|=e,a.memoizedState=Xl(1|t,i,n,r))}function Jj(e,t){Ld(8390656,8,e,t)}function d0(e,t){Qp(2048,8,e,t)}function cR(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=Wp(),ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vE(e){var t=xt().memoizedState;return cR({ref:t,nextImpl:e}),function(){if(ke&2)throw Error(F(440));return t.impl.apply(void 0,arguments)}}function gE(e,t){return Qp(4,2,e,t)}function xE(e,t){return Qp(4,4,e,t)}function bE(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 jE(e,t,n){n=n!=null?n.concat([e]):null,Qp(4,4,bE.bind(null,t,e),n)}function h0(){}function SE(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&i0(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wE(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&i0(t,r[1]))return r[0];if(r=e(),Cs){si(!0);try{e()}finally{si(!1)}}return n.memoizedState=[r,t],r}function p0(e,t,n){return n===void 0||Aa&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=f_(),ve.lanes|=e,Ei|=e,n)}function NE(e,t,n,r){return Dn(n,t)?n:Wl.current!==null?(e=p0(e,n,r),Dn(e,t)||(At=!0),e):!(Aa&42)||Aa&1073741824&&!(Ae&261930)?(At=!0,e.memoizedState=n):(e=f_(),ve.lanes|=e,Ei|=e,t)}function OE(e,t,n,r,a){var i=Me.p;Me.p=i!==0&&8>i?i:8;var l=de.T,o={};de.T=o,y0(e,!1,t,n);try{var c=a(),u=de.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=aR(c,r);Hc(e,t,f,$n(e))}else Hc(e,t,r,$n(e))}catch(d){Hc(e,t,{then:function(){},status:"rejected",reason:d},$n())}finally{Me.p=i,l!==null&&o.types!==null&&(l.types=o.types),de.T=l}}function uR(){}function yg(e,t,n,r){if(e.tag!==5)throw Error(F(476));var a=AE(e).queue;OE(e,a,t,ps,n===null?uR:function(){return CE(e),n(r)})}function AE(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ps,baseState:ps,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:ps},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function CE(e){var t=AE(e);t.next===null&&(t=e.alternate.memoizedState),Hc(e,t.next.queue,{},$n())}function m0(){return Yt(mu)}function EE(){return xt().memoizedState}function _E(){return xt().memoizedState}function fR(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=$n();e=yi(n);var r=vi(t,e,n);r!==null&&(vn(r,t,n),Bc(r,t,n)),t={cache:e0()},e.payload=t;return}t=t.return}}function dR(e,t,n){var r=$n();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zp(e)?kE(t,n):(n=Xb(e,t,n,r),n!==null&&(vn(n,e,r),ME(n,t,r)))}function TE(e,t,n){var r=$n();Hc(e,t,n,r)}function Hc(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zp(e))kE(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(a.hasEagerState=!0,a.eagerState=o,Dn(o,l))return Yp(e,t,a,0),He===null&&Kp(),!1}catch{}finally{}if(n=Xb(e,t,a,r),n!==null)return vn(n,e,r),ME(n,t,r),!0}return!1}function y0(e,t,n,r){if(r={lane:2,revertLane:O0(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zp(e)){if(t)throw Error(F(479))}else t=Xb(e,n,r,2),t!==null&&vn(t,e,2)}function Zp(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function kE(e,t){Tl=fh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ME(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vC(e,n)}}var du={readContext:Yt,use:Xp,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};du.useEffectEvent=ht;var PE={readContext:Yt,use:Xp,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Yt,useEffect:Jj,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ld(4194308,4,bE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ld(4194308,4,e,t)},useInsertionEffect:function(e,t){Ld(4,2,e,t)},useMemo:function(e,t){var n=en();t=t===void 0?null:t;var r=e();if(Cs){si(!0);try{e()}finally{si(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=en();if(n!==void 0){var a=n(t);if(Cs){si(!0);try{n(t)}finally{si(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=dR.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=pg(e);var t=e.queue,n=TE.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:h0,useDeferredValue:function(e,t){var n=en();return p0(n,e,t)},useTransition:function(){var e=pg(!1);return e=OE.bind(null,ve,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ve,a=en();if(Ce){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),He===null)throw Error(F(349));Ae&127||sE(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Jj(oE.bind(null,r,i,e),[e]),r.flags|=2048,Xl(9,{destroy:void 0},lE.bind(null,r,i,n,t),null),n},useId:function(){var e=en(),t=He.identifierPrefix;if(Ce){var n=Ur,r=Br;n=(r&~(1<<32-Pn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=dh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=iR++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:m0,useFormState:Xj,useActionState:Xj,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=y0.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:u0,useCacheRefresh:function(){return en().memoizedState=fR.bind(null,ve)},useEffectEvent:function(e){var t=en(),n={impl:e};return t.memoizedState=n,function(){if(ke&2)throw Error(F(440));return n.impl.apply(void 0,arguments)}}},v0={readContext:Yt,use:Xp,useCallback:SE,useContext:Yt,useEffect:d0,useImperativeHandle:jE,useInsertionEffect:gE,useLayoutEffect:xE,useMemo:wE,useReducer:Dd,useRef:yE,useState:function(){return Dd(Ca)},useDebugValue:h0,useDeferredValue:function(e,t){var n=xt();return NE(n,Ue.memoizedState,e,t)},useTransition:function(){var e=Dd(Ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:pf(e),t]},useSyncExternalStore:iE,useId:EE,useHostTransitionStatus:m0,useFormState:Qj,useActionState:Qj,useOptimistic:function(e,t){var n=xt();return fE(n,Ue,e,t)},useMemoCache:u0,useCacheRefresh:_E};v0.useEffectEvent=vE;var $E={readContext:Yt,use:Xp,useCallback:SE,useContext:Yt,useEffect:d0,useImperativeHandle:jE,useInsertionEffect:gE,useLayoutEffect:xE,useMemo:wE,useReducer:ky,useRef:yE,useState:function(){return ky(Ca)},useDebugValue:h0,useDeferredValue:function(e,t){var n=xt();return Ue===null?p0(n,e,t):NE(n,Ue.memoizedState,e,t)},useTransition:function(){var e=ky(Ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:pf(e),t]},useSyncExternalStore:iE,useId:EE,useHostTransitionStatus:m0,useFormState:Zj,useActionState:Zj,useOptimistic:function(e,t){var n=xt();return Ue!==null?fE(n,Ue,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:u0,useCacheRefresh:_E};$E.useEffectEvent=vE;function My(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:nt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vg={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$n(),a=yi(r);a.payload=t,n!=null&&(a.callback=n),t=vi(e,a,r),t!==null&&(vn(t,e,r),Bc(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$n(),a=yi(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=vi(e,a,r),t!==null&&(vn(t,e,r),Bc(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$n(),r=yi(n);r.tag=2,t!=null&&(r.callback=t),t=vi(e,r,n),t!==null&&(vn(t,e,n),Bc(t,e,n))}};function eS(e,t,n,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!lu(n,r)||!lu(a,i):!0}function tS(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&&vg.enqueueReplaceState(t,t.state,null)}function Es(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=nt({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function RE(e){ah(e)}function DE(e){console.error(e)}function LE(e){ah(e)}function hh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function nS(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function gg(e,t,n){return n=yi(n),n.tag=3,n.payload={element:null},n.callback=function(){hh(e,t)},n}function zE(e){return e=yi(e),e.tag=3,e}function IE(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){nS(t,n,r)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){nS(t,n,r),typeof a!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function hR(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Io(t,n,a,!0),n=Ln.current,n!==null){switch(n.tag){case 31:case 13:return rr===null?gh():n.alternate===null&&yt===0&&(yt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===oh?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Hy(e,r,a)),!1;case 22:return n.flags|=65536,r===oh?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)),Hy(e,r,a)),!1}throw Error(F(435,n.tag))}return Hy(e,r,a),gh(),!1}if(Ce)return t=Ln.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ig&&(e=Error(F(422),{cause:r}),cu(Zn(e,n)))):(r!==ig&&(t=Error(F(423),{cause:r}),cu(Zn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Zn(r,n),a=gg(e.stateNode,r,a),Ty(e,a),yt!==4&&(yt=2)),!1;var i=Error(F(520),{cause:r});if(i=Zn(i,n),Kc===null?Kc=[i]:Kc.push(i),yt!==4&&(yt=2),t===null)return!0;r=Zn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=gg(n.stateNode,r,e),Ty(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(gi===null||!gi.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=zE(a),IE(a,e,n,r),Ty(n,a),!1}n=n.return}while(n!==null);return!1}var g0=Error(F(461)),At=!1;function Ht(e,t,n,r){t.child=e===null?JC(t,null,n,r):As(t,e.child,n,r)}function rS(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}else l=r;return Os(t),r=s0(e,t,n,l,i,a),o=l0(),e!==null&&!At?(o0(e,t,a),Ea(e,t,a)):(Ce&&o&&Zb(t),t.flags|=1,Ht(e,t,r,a),t.child)}function aS(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!Qb(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,BE(e,t,i,r,a)):(e=$d(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!x0(e,a)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:lu,n(l,r)&&e.ref===t.ref)return Ea(e,t,a)}return t.flags|=1,e=ba(i,r),e.ref=t.ref,e.return=t,t.child=e}function BE(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(lu(i,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=i,x0(e,a))e.flags&131072&&(At=!0);else return t.lanes=e.lanes,Ea(e,t,a)}return xg(e,t,n,r,a)}function UE(e,t,n,r){var a=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return iS(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rd(t,i!==null?i.cachePool:null),i!==null?Yj(t,i):dg(),nE(t);else return r=t.lanes=536870912,iS(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(Rd(t,i.cachePool),Yj(t,i),Qa(),t.memoizedState=null):(e!==null&&Rd(t,null),dg(),Qa());return Ht(e,t,a,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function iS(e,t,n,r,a){var i=t0();return i=i===null?null:{parent:Ot._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Rd(t,null),dg(),nE(t),e!==null&&Io(e,t,r,!0),t.childLanes=a,null}function zd(e,t){return t=ph({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sS(e,t,n){return As(t,e.child,null,n),e=zd(t,t.pendingProps),e.flags|=2,Cn(t),t.memoizedState=null,e}function pR(e,t,n){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(r.mode==="hidden")return e=zd(t,r),t.lanes=536870912,Mc(null,e);if(hg(t),(e=Je)?(e=P_(e,Jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},n=KC(e),n.return=t,t.child=n,Gt=t,Je=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return zd(t,r)}var i=e.memoizedState;if(i!==null){var l=i.dehydrated;if(hg(t),a)if(t.flags&256)t.flags&=-257,t=sS(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(F(558));else if(At||Io(e,t,n,!1),a=(n&e.childLanes)!==0,At||a){if(r=He,r!==null&&(l=gC(r,n),l!==0&&l!==i.retryLane))throw i.retryLane=l,Bs(e,l),vn(r,e,l),g0;gh(),t=sS(e,t,n)}else e=i.treeContext,Je=ar(l.nextSibling),Gt=t,Ce=!0,mi=null,Jn=!1,e!==null&&VC(t,e),t=zd(t,r),t.flags|=4096;return t}return e=ba(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Id(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(F(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xg(e,t,n,r,a){return Os(t),n=s0(e,t,n,r,void 0,a),r=l0(),e!==null&&!At?(o0(e,t,a),Ea(e,t,a)):(Ce&&r&&Zb(t),t.flags|=1,Ht(e,t,n,a),t.child)}function lS(e,t,n,r,a,i){return Os(t),t.updateQueue=null,n=aE(t,r,n,a),rE(e),r=l0(),e!==null&&!At?(o0(e,t,i),Ea(e,t,i)):(Ce&&r&&Zb(t),t.flags|=1,Ht(e,t,n,i),t.child)}function oS(e,t,n,r,a){if(Os(t),t.stateNode===null){var i=pl,l=n.contextType;typeof l=="object"&&l!==null&&(i=Yt(l)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=vg,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},r0(t),l=n.contextType,i.context=typeof l=="object"&&l!==null?Yt(l):pl,i.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(My(t,n,l,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(l=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),l!==i.state&&vg.enqueueReplaceState(i,i.state,null),qc(t,r,i,a),Uc(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,c=Es(n,o);i.props=c;var u=i.context,f=n.contextType;l=pl,typeof f=="object"&&f!==null&&(l=Yt(f));var d=n.getDerivedStateFromProps;f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||u!==l)&&tS(t,i,r,l),Ya=!1;var h=t.memoizedState;i.state=h,qc(t,r,i,a),Uc(),u=t.memoizedState,o||h!==u||Ya?(typeof d=="function"&&(My(t,n,d,r),u=t.memoizedState),(c=Ya||eS(t,n,c,r,h,u,l))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=l,r=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ug(e,t),l=t.memoizedProps,f=Es(n,l),i.props=f,d=t.pendingProps,h=i.context,u=n.contextType,c=pl,typeof u=="object"&&u!==null&&(c=Yt(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||h!==c)&&tS(t,i,r,c),Ya=!1,h=t.memoizedState,i.state=h,qc(t,r,i,a),Uc();var m=t.memoizedState;l!==d||h!==m||Ya||e!==null&&e.dependencies!==null&&lh(e.dependencies)?(typeof o=="function"&&(My(t,n,o,r),m=t.memoizedState),(f=Ya||eS(t,n,f,r,h,m,c)||e!==null&&e.dependencies!==null&&lh(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=f):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Id(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=As(t,e.child,null,a),t.child=As(t,null,n,a)):Ht(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Ea(e,t,a),e}function cS(e,t,n,r){return Ns(),t.flags|=256,Ht(e,t,n,r),t.child}var Py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $y(e){return{baseLanes:e,cachePool:XC()}}function Ry(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Tn),e}function qE(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),l&&(a=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(a?Xa(t):Qa(),(e=Je)?(e=P_(e,Jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},n=KC(e),n.return=t,t.child=n,Gt=t,Je=null)):e=null,e===null)throw Ai(t);return Pg(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,a?(Qa(),a=t.mode,o=ph({mode:"hidden",children:o},a),r=ms(r,a,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=$y(n),r.childLanes=Ry(e,l,n),t.memoizedState=Py,Mc(null,r)):(Xa(t),bg(t,o))}var c=e.memoizedState;if(c!==null&&(o=c.dehydrated,o!==null)){if(i)t.flags&256?(Xa(t),t.flags&=-257,t=Dy(e,t,n)):t.memoizedState!==null?(Qa(),t.child=e.child,t.flags|=128,t=null):(Qa(),o=r.fallback,a=t.mode,r=ph({mode:"visible",children:r.children},a),o=ms(o,a,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,As(t,e.child,null,n),r=t.child,r.memoizedState=$y(n),r.childLanes=Ry(e,l,n),t.memoizedState=Py,t=Mc(null,r));else if(Xa(t),Pg(o)){if(l=o.nextSibling&&o.nextSibling.dataset,l)var u=l.dgst;l=u,r=Error(F(419)),r.stack="",r.digest=l,cu({value:r,source:null,stack:null}),t=Dy(e,t,n)}else if(At||Io(e,t,n,!1),l=(n&e.childLanes)!==0,At||l){if(l=He,l!==null&&(r=gC(l,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,Bs(e,r),vn(l,e,r),g0;Mg(o)||gh(),t=Dy(e,t,n)}else Mg(o)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Je=ar(o.nextSibling),Gt=t,Ce=!0,mi=null,Jn=!1,e!==null&&VC(t,e),t=bg(t,r.children),t.flags|=4096);return t}return a?(Qa(),o=r.fallback,a=t.mode,c=e.child,u=c.sibling,r=ba(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,u!==null?o=ba(u,o):(o=ms(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,Mc(null,r),r=t.child,o=e.child.memoizedState,o===null?o=$y(n):(a=o.cachePool,a!==null?(c=Ot._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=XC(),o={baseLanes:o.baseLanes|n,cachePool:a}),r.memoizedState=o,r.childLanes=Ry(e,l,n),t.memoizedState=Py,Mc(e.child,r)):(Xa(t),n=e.child,e=n.sibling,n=ba(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function bg(e,t){return t=ph({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ph(e,t){return e=En(22,e,null,t),e.lanes=0,e}function Dy(e,t,n){return As(t,e.child,null,n),e=bg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uS(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lg(e.return,t,n)}function Ly(e,t,n,r,a,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=a,l.treeForkCount=i)}function HE(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var l=gt.current,o=(l&2)!==0;if(o?(l=l&1|2,t.flags|=128):l&=1,Ye(gt,l),Ht(e,t,r,n),r=Ce?ou:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uS(e,n,t);else if(e.tag===19)uS(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&uh(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ly(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&uh(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ly(t,!0,n,null,i,r);break;case"together":Ly(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ea(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ei|=t.lanes,!(n&t.childLanes))if(e!==null){if(Io(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function x0(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&lh(e)))}function mR(e,t,n){switch(t.tag){case 3:eh(t,t.stateNode.containerInfo),Wa(t,Ot,e.memoizedState.cache),Ns();break;case 27:case 5:Vv(t);break;case 4:eh(t,t.stateNode.containerInfo);break;case 10:Wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hg(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Xa(t),t.flags|=128,null):n&t.child.childLanes?qE(e,t,n):(Xa(t),e=Ea(e,t,n),e!==null?e.sibling:null);Xa(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Io(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return HE(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ye(gt,gt.current),r)break;return null;case 22:return t.lanes=0,UE(e,t,n,t.pendingProps);case 24:Wa(t,Ot,e.memoizedState.cache)}return Ea(e,t,n)}function FE(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!x0(e,n)&&!(t.flags&128))return At=!1,mR(e,t,n);At=!!(e.flags&131072)}else At=!1,Ce&&t.flags&1048576&&YC(t,ou,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Xi(t.elementType),t.type=e,typeof e=="function")Qb(e)?(r=Es(e,r),t.tag=1,t=oS(null,t,e,r,n)):(t.tag=0,t=xg(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===Lb){t.tag=11,t=rS(null,t,e,r,n);break e}else if(a===zb){t.tag=14,t=aS(null,t,e,r,n);break e}}throw t=Kv(e)||e,Error(F(306,t,""))}}return t;case 0:return xg(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Es(r,t.pendingProps),oS(e,t,r,a,n);case 3:e:{if(eh(t,t.stateNode.containerInfo),e===null)throw Error(F(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,ug(e,t),qc(t,r,null,n);var l=t.memoizedState;if(r=l.cache,Wa(t,Ot,r),r!==i.cache&&og(t,[Ot],n,!0),Uc(),r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cS(e,t,r,n);break e}else if(r!==a){a=Zn(Error(F(424)),t),cu(a),t=cS(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Je=ar(e.firstChild),Gt=t,Ce=!0,mi=null,Jn=!0,n=JC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ns(),r===a){t=Ea(e,t,n);break e}Ht(e,t,r,n)}t=t.child}return t;case 26:return Id(e,t),e===null?(n=TS(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,r=Sh(pi.current).createElement(n),r[Ft]=t,r[xn]=e,Vt(r,n,e),Lt(r),t.stateNode=r):t.memoizedState=TS(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Vv(t),e===null&&Ce&&(r=t.stateNode=$_(t.type,t.pendingProps,pi.current),Gt=t,Jn=!0,a=Je,$i(t.type)?($g=a,Je=ar(r.firstChild)):Je=a),Ht(e,t,t.pendingProps.children,n),Id(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((a=r=Je)&&(r=GR(r,t.type,t.pendingProps,Jn),r!==null?(t.stateNode=r,Gt=t,Je=ar(r.firstChild),Jn=!1,a=!0):a=!1),a||Ai(t)),Vv(t),a=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,r=i.children,Tg(a,i)?r=null:l!==null&&Tg(a,l)&&(t.flags|=32),t.memoizedState!==null&&(a=s0(e,t,sR,null,null,n),mu._currentValue=a),Id(e,t),Ht(e,t,r,n),t.child;case 6:return e===null&&Ce&&((e=n=Je)&&(n=KR(n,t.pendingProps,Jn),n!==null?(t.stateNode=n,Gt=t,Je=null,e=!0):e=!1),e||Ai(t)),null;case 13:return qE(e,t,n);case 4:return eh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=As(t,null,r,n):Ht(e,t,r,n),t.child;case 11:return rS(e,t,t.type,t.pendingProps,n);case 7:return Ht(e,t,t.pendingProps,n),t.child;case 8:return Ht(e,t,t.pendingProps.children,n),t.child;case 12:return Ht(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wa(t,t.type,r.value),Ht(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Os(t),a=Yt(a),r=r(a),t.flags|=1,Ht(e,t,r,n),t.child;case 14:return aS(e,t,t.type,t.pendingProps,n);case 15:return BE(e,t,t.type,t.pendingProps,n);case 19:return HE(e,t,n);case 31:return pR(e,t,n);case 22:return UE(e,t,n,t.pendingProps);case 24:return Os(t),r=Yt(Ot),e===null?(a=t0(),a===null&&(a=He,i=e0(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},r0(t),Wa(t,Ot,a)):(e.lanes&n&&(ug(e,t),qc(t,null,null,n),Uc()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wa(t,Ot,r)):(r=i.cache,Wa(t,Ot,r),r!==a.cache&&og(t,[Ot],n,!0))),Ht(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(F(156,t.tag))}function ra(e){e.flags|=4}function zy(e,t,n,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(p_())e.flags|=8192;else throw vs=oh,n0}else e.flags&=-16777217}function fS(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!L_(t))if(p_())e.flags|=8192;else throw vs=oh,n0}function Zf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mC():536870912,e.lanes|=t,Ql|=t)}function pc(e,t){if(!Ce)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 Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yR(e,t,n){var r=t.pendingProps;switch(Jb(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ja(Ot),Gl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?ra(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_y())),Xe(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(ra(t),i!==null?(Xe(t),fS(t,i)):(Xe(t),zy(t,a,null,r,n))):i?i!==e.memoizedState?(ra(t),Xe(t),fS(t,i)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&ra(t),Xe(t),zy(t,a,e,r,n)),null;case 27:if(th(t),n=pi.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Xe(t),null}e=Gr.current,Ws(t)?Bj(t):(e=$_(a,r,n),t.stateNode=e,ra(t))}return Xe(t),null;case 5:if(th(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Xe(t),null}if(i=Gr.current,Ws(t))Bj(t);else{var l=Sh(pi.current);switch(i){case 1:i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=l.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?l.createElement(a,{is:r.is}):l.createElement(a)}}i[Ft]=t,i[xn]=r;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=i;e:switch(Vt(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ra(t)}}return Xe(t),zy(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(e=pi.current,Ws(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Gt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ft]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||T_(e.nodeValue,n)),e||Ai(t,!0)}else e=Sh(e).createTextNode(r),e[Ft]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ws(t),n!==null){if(e===null){if(!r)throw Error(F(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(557));e[Ft]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=_y(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Cn(t),t):(Cn(t),null);if(t.flags&128)throw Error(F(558))}return Xe(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(F(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(F(317));a[Ft]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),a=!1}else a=_y(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Cn(t),t):(Cn(t),null)}return Cn(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),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Zf(t,t.updateQueue),Xe(t),null);case 4:return Gl(),e===null&&A0(t.stateNode.containerInfo),Xe(t),null;case 10:return ja(t.type),Xe(t),null;case 19:if(It(gt),r=t.memoizedState,r===null)return Xe(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)pc(r,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=uh(e),i!==null){for(t.flags|=128,pc(r,!1),e=i.updateQueue,t.updateQueue=e,Zf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)GC(n,e),n=n.sibling;return Ye(gt,gt.current&1|2),Ce&&ua(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&kn()>yh&&(t.flags|=128,a=!0,pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uh(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Zf(t,e),pc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return Xe(t),null}else 2*kn()-r.renderingStartTime>yh&&n!==536870912&&(t.flags|=128,a=!0,pc(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=kn(),e.sibling=null,n=gt.current,Ye(gt,a?n&1|2:n&1),Ce&&ua(t,r.treeForkCount),e):(Xe(t),null);case 22:case 23:return Cn(t),a0(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&Zf(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&&It(ys),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(Ot),Xe(t),null;case 25:return null;case 30:return null}throw Error(F(156,t.tag))}function vR(e,t){switch(Jb(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(Ot),Gl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return th(t),null;case 31:if(t.memoizedState!==null){if(Cn(t),t.alternate===null)throw Error(F(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return It(gt),null;case 4:return Gl(),null;case 10:return ja(t.type),null;case 22:case 23:return Cn(t),a0(),e!==null&&It(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(Ot),null;case 25:return null;default:return null}}function GE(e,t){switch(Jb(t),t.tag){case 3:ja(Ot),Gl();break;case 26:case 27:case 5:th(t);break;case 4:Gl();break;case 31:t.memoizedState!==null&&Cn(t);break;case 13:Cn(t);break;case 19:It(gt);break;case 10:ja(t.type);break;case 22:case 23:Cn(t),a0(),e!==null&&It(ys);break;case 24:ja(Ot)}}function mf(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,l=n.inst;r=i(),l.destroy=r}n=n.next}while(n!==a)}}catch(o){Le(t,t.return,o)}}function Ci(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var l=r.inst,o=l.destroy;if(o!==void 0){l.destroy=void 0,a=t;var c=n,u=o;try{u()}catch(f){Le(a,c,f)}}}r=r.next}while(r!==i)}}catch(f){Le(t,t.return,f)}}function KE(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{tE(t,n)}catch(r){Le(e,e.return,r)}}}function YE(e,t,n){n.props=Es(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Le(e,t,r)}}function Fc(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(a){Le(e,t,a)}}function qr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Le(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Le(e,t,a)}else n.current=null}function VE(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Le(e,e.return,a)}}function Iy(e,t,n){try{var r=e.stateNode;IR(r,e.type,n,t),r[xn]=t}catch(a){Le(e,e.return,a)}}function WE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$i(e.type)||e.tag===4}function By(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||WE(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&&$i(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jg(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=ma));else if(r!==4&&(r===27&&$i(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(jg(e,t,n),e=e.sibling;e!==null;)jg(e,t,n),e=e.sibling}function mh(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&&$i(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(mh(e,t,n),e=e.sibling;e!==null;)mh(e,t,n),e=e.sibling}function XE(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Vt(t,r,n),t[Ft]=e,t[xn]=n}catch(i){Le(e,e.return,i)}}var ha=!1,Nt=!1,Uy=!1,dS=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function gR(e,t){if(e=e.containerInfo,Eg=Ah,e=LC(e),Vb(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{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,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var m;d!==n||a!==0&&d.nodeType!==3||(o=l+a),d!==i||r!==0&&d.nodeType!==3||(c=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++u===a&&(o=l),h===i&&++f===r&&(c=l),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_g={focusedElem:e,selectionRange:n},Ah=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,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&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var j=Es(n.type,a);e=r.getSnapshotBeforeUpdate(j,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){Le(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)kg(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":kg(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(F(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function QE(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ia(e,n),r&4&&mf(5,n);break;case 1:if(ia(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Le(n,n.return,l)}else{var a=Es(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Le(n,n.return,l)}}r&64&&KE(n),r&512&&Fc(n,n.return);break;case 3:if(ia(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{tE(e,t)}catch(l){Le(n,n.return,l)}}break;case 27:t===null&&r&4&&XE(n);case 26:case 5:ia(e,n),t===null&&r&4&&VE(n),r&512&&Fc(n,n.return);break;case 12:ia(e,n);break;case 31:ia(e,n),r&4&&e_(e,n);break;case 13:ia(e,n),r&4&&t_(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=CR.bind(null,n),YR(e,n))));break;case 22:if(r=n.memoizedState!==null||ha,!r){t=t!==null&&t.memoizedState!==null||Nt,a=ha;var i=Nt;ha=r,(Nt=t)&&!i?la(e,n,(n.subtreeFlags&8772)!==0):ia(e,n),ha=a,Nt=i}break;case 30:break;default:ia(e,n)}}function ZE(e){var t=e.alternate;t!==null&&(e.alternate=null,ZE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qb(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 rt=null,pn=!1;function aa(e,t,n){for(n=n.child;n!==null;)JE(e,t,n),n=n.sibling}function JE(e,t,n){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(of,n)}catch{}switch(n.tag){case 26:Nt||qr(n,t),aa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||qr(n,t);var r=rt,a=pn;$i(n.type)&&(rt=n.stateNode,pn=!1),aa(e,t,n),Vc(n.stateNode),rt=r,pn=a;break;case 5:Nt||qr(n,t);case 6:if(r=rt,a=pn,rt=null,aa(e,t,n),rt=r,pn=a,rt!==null)if(pn)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(n.stateNode)}catch(i){Le(n,t,i)}else try{rt.removeChild(n.stateNode)}catch(i){Le(n,t,i)}break;case 18:rt!==null&&(pn?(e=rt,OS(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),to(e)):OS(rt,n.stateNode));break;case 4:r=rt,a=pn,rt=n.stateNode.containerInfo,pn=!0,aa(e,t,n),rt=r,pn=a;break;case 0:case 11:case 14:case 15:Ci(2,n,t),Nt||Ci(4,n,t),aa(e,t,n);break;case 1:Nt||(qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&YE(n,t,r)),aa(e,t,n);break;case 21:aa(e,t,n);break;case 22:Nt=(r=Nt)||n.memoizedState!==null,aa(e,t,n),Nt=r;break;default:aa(e,t,n)}}function e_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{to(e)}catch(n){Le(t,t.return,n)}}}function t_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{to(e)}catch(n){Le(t,t.return,n)}}function xR(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dS),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dS),t;default:throw Error(F(435,e.tag))}}function Jf(e,t){var n=xR(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var a=ER.bind(null,e,r);r.then(a,a)}})}function fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 27:if($i(o.type)){rt=o.stateNode,pn=!1;break e}break;case 5:rt=o.stateNode,pn=!1;break e;case 3:case 4:rt=o.stateNode.containerInfo,pn=!0;break e}o=o.return}if(rt===null)throw Error(F(160));JE(i,l,a),rt=null,pn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)n_(t,e),t=t.sibling}var vr=null;function n_(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fn(t,e),dn(e),r&4&&(Ci(3,e,e.return),mf(3,e),Ci(5,e,e.return));break;case 1:fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),r&64&&ha&&(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=vr;if(fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ff]||i[Ft]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),Vt(i,r,n),i[Ft]=e,Lt(i),r=i;break e;case"link":var l=MS("link","href",a).get(r+(n.href||""));if(l){for(var o=0;o<l.length;o++)if(i=l[o],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(o,1);break t}}i=a.createElement(r),Vt(i,r,n),a.head.appendChild(i);break;case"meta":if(l=MS("meta","content",a).get(r+(n.content||""))){for(o=0;o<l.length;o++)if(i=l[o],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(o,1);break t}}i=a.createElement(r),Vt(i,r,n),a.head.appendChild(i);break;default:throw Error(F(468,r))}i[Ft]=e,Lt(i),r=i}e.stateNode=r}else PS(a,e.type,e.stateNode);else e.stateNode=kS(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?PS(a,e.type,e.stateNode):kS(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Iy(e,e.memoizedProps,n.memoizedProps)}break;case 27:fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),n!==null&&r&4&&Iy(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),e.flags&32){a=e.stateNode;try{Yl(a,"")}catch(j){Le(e,e.return,j)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Iy(e,a,n!==null?n.memoizedProps:a)),r&1024&&(Uy=!0);break;case 6:if(fn(t,e),dn(e),r&4){if(e.stateNode===null)throw Error(F(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(j){Le(e,e.return,j)}}break;case 3:if(qd=null,a=vr,vr=wh(t.containerInfo),fn(t,e),vr=a,dn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{to(t.containerInfo)}catch(j){Le(e,e.return,j)}Uy&&(Uy=!1,r_(e));break;case 4:r=vr,vr=wh(e.stateNode.containerInfo),fn(t,e),dn(e),vr=r;break;case 12:fn(t,e),dn(e);break;case 31:fn(t,e),dn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 13:fn(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Jp=kn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 22:a=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=ha,f=Nt;if(ha=u||a,Nt=f||c,fn(t,e),Nt=f,ha=u,dn(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||c||ha||Nt||Qi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,a)l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{o=c.stateNode;var d=c.memoizedProps.style,h=d!=null&&d.hasOwnProperty("display")?d.display:null;o.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(j){Le(c,c.return,j)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(j){Le(c,c.return,j)}}}else if(t.tag===18){if(n===null){c=t;try{var m=c.stateNode;a?AS(m,!0):AS(c.stateNode,!1)}catch(j){Le(c,c.return,j)}}}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 e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;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,Jf(e,n))));break;case 19:fn(t,e),dn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 30:break;case 21:break;default:fn(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(WE(r)){n=r;break}r=r.return}if(n==null)throw Error(F(160));switch(n.tag){case 27:var a=n.stateNode,i=By(e);mh(e,i,a);break;case 5:var l=n.stateNode;n.flags&32&&(Yl(l,""),n.flags&=-33);var o=By(e);mh(e,o,l);break;case 3:case 4:var c=n.stateNode.containerInfo,u=By(e);jg(e,u,c);break;default:throw Error(F(161))}}catch(f){Le(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;r_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)QE(e,t.alternate,t),t=t.sibling}function Qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ci(4,t,t.return),Qi(t);break;case 1:qr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&YE(t,t.return,n),Qi(t);break;case 27:Vc(t.stateNode);case 26:case 5:qr(t,t.return),Qi(t);break;case 22:t.memoizedState===null&&Qi(t);break;case 30:Qi(t);break;default:Qi(t)}e=e.sibling}}function la(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,l=i.flags;switch(i.tag){case 0:case 11:case 15:la(a,i,n),mf(4,i);break;case 1:if(la(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){Le(r,r.return,u)}if(r=i,a=r.updateQueue,a!==null){var o=r.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)eE(c[a],o)}catch(u){Le(r,r.return,u)}}n&&l&64&&KE(i),Fc(i,i.return);break;case 27:XE(i);case 26:case 5:la(a,i,n),n&&r===null&&l&4&&VE(i),Fc(i,i.return);break;case 12:la(a,i,n);break;case 31:la(a,i,n),n&&l&4&&e_(a,i);break;case 13:la(a,i,n),n&&l&4&&t_(a,i);break;case 22:i.memoizedState===null&&la(a,i,n),Fc(i,i.return);break;case 30:break;default:la(a,i,n)}t=t.sibling}}function b0(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&&hf(n))}function j0(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hf(e))}function hr(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)a_(e,t,n,r),t=t.sibling}function a_(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:hr(e,t,n,r),a&2048&&mf(9,t);break;case 1:hr(e,t,n,r);break;case 3:hr(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hf(e)));break;case 12:if(a&2048){hr(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,l=i.id,o=i.onPostCommit;typeof o=="function"&&o(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Le(t,t.return,c)}}else hr(e,t,n,r);break;case 31:hr(e,t,n,r);break;case 13:hr(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,l=t.alternate,t.memoizedState!==null?i._visibility&2?hr(e,t,n,r):Gc(e,t):i._visibility&2?hr(e,t,n,r):(i._visibility|=2,al(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&b0(l,t);break;case 24:hr(e,t,n,r),a&2048&&j0(t.alternate,t);break;default:hr(e,t,n,r)}}function al(e,t,n,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,l=t,o=n,c=r,u=l.flags;switch(l.tag){case 0:case 11:case 15:al(i,l,o,c,a),mf(8,l);break;case 23:break;case 22:var f=l.stateNode;l.memoizedState!==null?f._visibility&2?al(i,l,o,c,a):Gc(i,l):(f._visibility|=2,al(i,l,o,c,a)),a&&u&2048&&b0(l.alternate,l);break;case 24:al(i,l,o,c,a),a&&u&2048&&j0(l.alternate,l);break;default:al(i,l,o,c,a)}t=t.sibling}}function Gc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:Gc(n,r),a&2048&&b0(r.alternate,r);break;case 24:Gc(n,r),a&2048&&j0(r.alternate,r);break;default:Gc(n,r)}t=t.sibling}}var Pc=8192;function Xs(e,t,n){if(e.subtreeFlags&Pc)for(e=e.child;e!==null;)i_(e,t,n),e=e.sibling}function i_(e,t,n){switch(e.tag){case 26:Xs(e,t,n),e.flags&Pc&&e.memoizedState!==null&&iD(n,vr,e.memoizedState,e.memoizedProps);break;case 5:Xs(e,t,n);break;case 3:case 4:var r=vr;vr=wh(e.stateNode.containerInfo),Xs(e,t,n),vr=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pc,Pc=16777216,Xs(e,t,n),Pc=r):Xs(e,t,n));break;default:Xs(e,t,n)}}function s_(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 mc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Dt=r,o_(r,e)}s_(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)l_(e),e=e.sibling}function l_(e){switch(e.tag){case 0:case 11:case 15:mc(e),e.flags&2048&&Ci(9,e,e.return);break;case 3:mc(e);break;case 12:mc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bd(e)):mc(e);break;default:mc(e)}}function Bd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Dt=r,o_(r,e)}s_(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ci(8,t,t.return),Bd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bd(t));break;default:Bd(t)}e=e.sibling}}function o_(e,t){for(;Dt!==null;){var n=Dt;switch(n.tag){case 0:case 11:case 15:Ci(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:hf(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Dt=r;else e:for(n=e;Dt!==null;){r=Dt;var a=r.sibling,i=r.return;if(ZE(r),r===n){Dt=null;break e}if(a!==null){a.return=i,Dt=a;break e}Dt=i}}}var bR={getCacheForType:function(e){var t=Yt(Ot),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Yt(Ot).controller.signal}},jR=typeof WeakMap=="function"?WeakMap:Map,ke=0,He=null,we=null,Ae=0,De=0,Nn=null,oi=!1,Uo=!1,S0=!1,_a=0,yt=0,Ei=0,gs=0,w0=0,Tn=0,Ql=0,Kc=null,mn=null,Sg=!1,Jp=0,c_=0,yh=1/0,vh=null,gi=null,Tt=0,xi=null,Zl=null,Sa=0,wg=0,Ng=null,u_=null,Yc=0,Og=null;function $n(){return ke&2&&Ae!==0?Ae&-Ae:de.T!==null?O0():xC()}function f_(){if(Tn===0)if(!(Ae&536870912)||Ce){var e=Gf;Gf<<=1,!(Gf&3932160)&&(Gf=262144),Tn=e}else Tn=536870912;return e=Ln.current,e!==null&&(e.flags|=32),Tn}function vn(e,t,n){(e===He&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Jl(e,0),ci(e,Ae,Tn,!1)),uf(e,n),(!(ke&2)||e!==He)&&(e===He&&(!(ke&2)&&(gs|=n),yt===4&&ci(e,Ae,Tn,!1)),Qr(e))}function d_(e,t,n){if(ke&6)throw Error(F(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||cf(e,t),a=r?NR(e,t):qy(e,t,!0),i=r;do{if(a===0){Uo&&!r&&ci(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!SR(n)){a=qy(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var o=e;a=Kc;var c=o.current.memoizedState.isDehydrated;if(c&&(Jl(o,l).flags|=256),l=qy(o,l,!1),l!==2){if(S0&&!c){o.errorRecoveryDisabledLanes|=i,gs|=i,a=4;break e}i=mn,mn=a,i!==null&&(mn===null?mn=i:mn.push.apply(mn,i))}a=l}if(i=!1,a!==2)continue}}if(a===1){Jl(e,0),ci(e,t,0,!0);break}e:{switch(r=e,i=a,i){case 0:case 1:throw Error(F(345));case 4:if((t&4194048)!==t)break;case 6:ci(r,t,Tn,!oi);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(F(329))}if((t&62914560)===t&&(a=Jp+300-kn(),10<a)){if(ci(r,t,Tn,!oi),qp(r,0,!0)!==0)break e;Sa=t,r.timeoutHandle=M_(hS.bind(null,r,n,mn,vh,Sg,t,Tn,gs,Ql,oi,i,"Throttled",-0,0),a);break e}hS(r,n,mn,vh,Sg,t,Tn,gs,Ql,oi,i,null,-0,0)}}break}while(!0);Qr(e)}function hS(e,t,n,r,a,i,l,o,c,u,f,d,h,m){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:ma},i_(t,i,d);var j=(i&62914560)===i?Jp-kn():(i&4194048)===i?c_-kn():0;if(j=sD(d,j),j!==null){Sa=i,e.cancelPendingCommit=j(mS.bind(null,e,t,i,n,r,a,l,o,c,f,d,null,h,m)),ci(e,i,l,!u);return}}mS(e,t,i,n,r,a,l,o,c)}function SR(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 a=n[r],i=a.getSnapshot;a=a.value;try{if(!Dn(i(),a))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 ci(e,t,n,r){t&=~w0,t&=~gs,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-Pn(a),l=1<<i;r[i]=-1,a&=~l}n!==0&&yC(e,n,t)}function em(){return ke&6?!0:(yf(0),!1)}function N0(){if(we!==null){if(De===0)var e=we.return;else e=we,ya=Us=null,c0(e),_l=null,uu=0,e=we;for(;e!==null;)GE(e.alternate,e),e=e.return;we=null}}function Jl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qR(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sa=0,N0(),He=e,we=n=ba(e.current,null),Ae=t,De=0,Nn=null,oi=!1,Uo=cf(e,t),S0=!1,Ql=Tn=w0=gs=Ei=yt=0,mn=Kc=null,Sg=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-Pn(r),i=1<<a;t|=e[a],r&=~i}return _a=t,Kp(),n}function h_(e,t){ve=null,de.H=du,t===Bo||t===Vp?(t=Gj(),De=3):t===n0?(t=Gj(),De=4):De=t===g0?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nn=t,we===null&&(yt=1,hh(e,Zn(t,e.current)))}function p_(){var e=Ln.current;return e===null?!0:(Ae&4194048)===Ae?rr===null:(Ae&62914560)===Ae||Ae&536870912?e===rr:!1}function m_(){var e=de.H;return de.H=du,e===null?du:e}function y_(){var e=de.A;return de.A=bR,e}function gh(){yt=4,oi||(Ae&4194048)!==Ae&&Ln.current!==null||(Uo=!0),!(Ei&134217727)&&!(gs&134217727)||He===null||ci(He,Ae,Tn,!1)}function qy(e,t,n){var r=ke;ke|=2;var a=m_(),i=y_();(He!==e||Ae!==t)&&(vh=null,Jl(e,t)),t=!1;var l=yt;e:do try{if(De!==0&&we!==null){var o=we,c=Nn;switch(De){case 8:N0(),l=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var u=De;if(De=0,Nn=null,vl(e,o,c,u),n&&Uo){l=0;break e}break;default:u=De,De=0,Nn=null,vl(e,o,c,u)}}wR(),l=yt;break}catch(f){h_(e,f)}while(!0);return t&&e.shellSuspendCounter++,ya=Us=null,ke=r,de.H=a,de.A=i,we===null&&(He=null,Ae=0,Kp()),l}function wR(){for(;we!==null;)v_(we)}function NR(e,t){var n=ke;ke|=2;var r=m_(),a=y_();He!==e||Ae!==t?(vh=null,yh=kn()+500,Jl(e,t)):Uo=cf(e,t);e:do try{if(De!==0&&we!==null){t=we;var i=Nn;t:switch(De){case 1:De=0,Nn=null,vl(e,t,i,1);break;case 2:case 9:if(Fj(i)){De=0,Nn=null,pS(t);break}t=function(){De!==2&&De!==9||He!==e||(De=7),Qr(e)},i.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Fj(i)?(De=0,Nn=null,pS(t)):(De=0,Nn=null,vl(e,t,i,7));break;case 5:var l=null;switch(we.tag){case 26:l=we.memoizedState;case 5:case 27:var o=we;if(l?L_(l):o.stateNode.complete){De=0,Nn=null;var c=o.sibling;if(c!==null)we=c;else{var u=o.return;u!==null?(we=u,tm(u)):we=null}break t}}De=0,Nn=null,vl(e,t,i,5);break;case 6:De=0,Nn=null,vl(e,t,i,6);break;case 8:N0(),yt=6;break e;default:throw Error(F(462))}}OR();break}catch(f){h_(e,f)}while(!0);return ya=Us=null,de.H=r,de.A=a,ke=n,we!==null?0:(He=null,Ae=0,Kp(),yt)}function OR(){for(;we!==null&&!V$();)v_(we)}function v_(e){var t=FE(e.alternate,e,_a);e.memoizedProps=e.pendingProps,t===null?tm(e):we=t}function pS(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lS(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=lS(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:c0(t);default:GE(n,t),t=we=GC(t,_a),t=FE(n,t,_a)}e.memoizedProps=e.pendingProps,t===null?tm(e):we=t}function vl(e,t,n,r){ya=Us=null,c0(t),_l=null,uu=0;var a=t.return;try{if(hR(e,a,t,n,Ae)){yt=1,hh(e,Zn(n,e.current)),we=null;return}}catch(i){if(a!==null)throw we=a,i;yt=1,hh(e,Zn(n,e.current)),we=null;return}t.flags&32768?(Ce||r===1?e=!0:Uo||Ae&536870912?e=!1:(oi=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ln.current,r!==null&&r.tag===13&&(r.flags|=16384))),g_(t,e)):tm(t)}function tm(e){var t=e;do{if(t.flags&32768){g_(t,oi);return}e=t.return;var n=yR(t.alternate,t,_a);if(n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);yt===0&&(yt=5)}function g_(e,t){do{var n=vR(e.alternate,e);if(n!==null){n.flags&=32767,we=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=n}while(e!==null);yt=6,we=null}function mS(e,t,n,r,a,i,l,o,c){e.cancelPendingCommit=null;do nm();while(Tt!==0);if(ke&6)throw Error(F(327));if(t!==null){if(t===e.current)throw Error(F(177));if(i=t.lanes|t.childLanes,i|=Wb,a4(e,n,i,l,o,c),e===He&&(we=He=null,Ae=0),Zl=t,xi=e,Sa=n,wg=i,Ng=a,u_=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,_R(nh,function(){return w_(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=de.T,de.T=null,a=Me.p,Me.p=2,l=ke,ke|=4;try{gR(e,t,n)}finally{ke=l,Me.p=a,de.T=r}}Tt=1,x_(),b_(),j_()}}function x_(){if(Tt===1){Tt=0;var e=xi,t=Zl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=de.T,de.T=null;var r=Me.p;Me.p=2;var a=ke;ke|=4;try{n_(t,e);var i=_g,l=LC(e.containerInfo),o=i.focusedElem,c=i.selectionRange;if(l!==o&&o&&o.ownerDocument&&DC(o.ownerDocument.documentElement,o)){if(c!==null&&Vb(o)){var u=c.start,f=c.end;if(f===void 0&&(f=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(f,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var m=h.getSelection(),j=o.textContent.length,v=Math.min(c.start,j),p=c.end===void 0?v:Math.min(c.end,j);!m.extend&&v>p&&(l=p,p=v,v=l);var y=Lj(o,v),g=Lj(o,p);if(y&&g&&(m.rangeCount!==1||m.anchorNode!==y.node||m.anchorOffset!==y.offset||m.focusNode!==g.node||m.focusOffset!==g.offset)){var b=d.createRange();b.setStart(y.node,y.offset),m.removeAllRanges(),v>p?(m.addRange(b),m.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),m.addRange(b))}}}}for(d=[],m=o;m=m.parentNode;)m.nodeType===1&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<d.length;o++){var x=d[o];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}Ah=!!Eg,_g=Eg=null}finally{ke=a,Me.p=r,de.T=n}}e.current=t,Tt=2}}function b_(){if(Tt===2){Tt=0;var e=xi,t=Zl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=de.T,de.T=null;var r=Me.p;Me.p=2;var a=ke;ke|=4;try{QE(e,t.alternate,t)}finally{ke=a,Me.p=r,de.T=n}}Tt=3}}function j_(){if(Tt===4||Tt===3){Tt=0,W$();var e=xi,t=Zl,n=Sa,r=u_;t.subtreeFlags&10256||t.flags&10256?Tt=5:(Tt=0,Zl=xi=null,S_(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(gi=null),Ub(n),t=t.stateNode,Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(of,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=de.T,a=Me.p,Me.p=2,de.T=null;try{for(var i=e.onRecoverableError,l=0;l<r.length;l++){var o=r[l];i(o.value,{componentStack:o.stack})}}finally{de.T=t,Me.p=a}}Sa&3&&nm(),Qr(e),a=e.pendingLanes,n&261930&&a&42?e===Og?Yc++:(Yc=0,Og=e):Yc=0,yf(0)}}function S_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hf(t)))}function nm(){return x_(),b_(),j_(),w_()}function w_(){if(Tt!==5)return!1;var e=xi,t=wg;wg=0;var n=Ub(Sa),r=de.T,a=Me.p;try{Me.p=32>n?32:n,de.T=null,n=Ng,Ng=null;var i=xi,l=Sa;if(Tt=0,Zl=xi=null,Sa=0,ke&6)throw Error(F(331));var o=ke;if(ke|=4,l_(i.current),a_(i,i.current,l,n),ke=o,yf(0,!1),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(of,i)}catch{}return!0}finally{Me.p=a,de.T=r,S_(e,t)}}function yS(e,t,n){t=Zn(n,t),t=gg(e.stateNode,t,2),e=vi(e,t,2),e!==null&&(uf(e,2),Qr(e))}function Le(e,t,n){if(e.tag===3)yS(e,e,n);else for(;t!==null;){if(t.tag===3){yS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gi===null||!gi.has(r))){e=Zn(n,e),n=zE(2),r=vi(t,n,2),r!==null&&(IE(n,r,t,e),uf(r,2),Qr(r));break}}t=t.return}}function Hy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jR;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(S0=!0,a.add(n),e=AR.bind(null,e,t,n),t.then(e,e))}function AR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,He===e&&(Ae&n)===n&&(yt===4||yt===3&&(Ae&62914560)===Ae&&300>kn()-Jp?!(ke&2)&&Jl(e,0):w0|=n,Ql===Ae&&(Ql=0)),Qr(e)}function N_(e,t){t===0&&(t=mC()),e=Bs(e,t),e!==null&&(uf(e,t),Qr(e))}function CR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),N_(e,n)}function ER(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(F(314))}r!==null&&r.delete(t),N_(e,n)}function _R(e,t){return Ib(e,t)}var xh=null,il=null,Ag=!1,bh=!1,Fy=!1,ui=0;function Qr(e){e!==il&&e.next===null&&(il===null?xh=il=e:il=il.next=e),bh=!0,Ag||(Ag=!0,kR())}function yf(e,t){if(!Fy&&bh){Fy=!0;do for(var n=!1,r=xh;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Pn(42|e)+1)-1,i&=a&~(l&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,vS(r,i))}else i=Ae,i=qp(r,r===He?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||cf(r,i)||(n=!0,vS(r,i));r=r.next}while(n);Fy=!1}}function TR(){O_()}function O_(){bh=Ag=!1;var e=0;ui!==0&&UR()&&(e=ui);for(var t=kn(),n=null,r=xh;r!==null;){var a=r.next,i=A_(r,t);i===0?(r.next=null,n===null?xh=a:n.next=a,a===null&&(il=n)):(n=r,(e!==0||i&3)&&(bh=!0)),r=a}Tt!==0&&Tt!==5||yf(e),ui!==0&&(ui=0)}function A_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var l=31-Pn(i),o=1<<l,c=a[l];c===-1?(!(o&n)||o&r)&&(a[l]=r4(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}if(t=He,n=Ae,n=qp(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&gy(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||cf(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&gy(r),Ub(n)){case 2:case 8:n=hC;break;case 32:n=nh;break;case 268435456:n=pC;break;default:n=nh}return r=C_.bind(null,e),n=Ib(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&gy(r),e.callbackPriority=2,e.callbackNode=null,2}function C_(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(nm()&&e.callbackNode!==n)return null;var r=Ae;return r=qp(e,e===He?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(d_(e,r,t),A_(e,kn()),e.callbackNode!=null&&e.callbackNode===n?C_.bind(null,e):null)}function vS(e,t){if(nm())return null;d_(e,t,!0)}function kR(){HR(function(){ke&6?Ib(dC,TR):O_()})}function O0(){if(ui===0){var e=Vl;e===0&&(e=Ff,Ff<<=1,!(Ff&261888)&&(Ff=256)),ui=e}return ui}function gS(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kd(""+e)}function xS(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 MR(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=gS((a[xn]||null).action),l=r.submitter;l&&(t=(t=l[xn]||null)?gS(t.formAction):l.getAttribute("formAction"),t!==null&&(i=t,l=null));var o=new Hp("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ui!==0){var c=l?xS(a,l):new FormData(a);yg(n,{pending:!0,data:c,method:a.method,action:i},null,c)}}else typeof i=="function"&&(o.preventDefault(),c=l?xS(a,l):new FormData(a),yg(n,{pending:!0,data:c,method:a.method,action:i},i,c))},currentTarget:a}]})}}for(var Gy=0;Gy<ag.length;Gy++){var Ky=ag[Gy],PR=Ky.toLowerCase(),$R=Ky[0].toUpperCase()+Ky.slice(1);_r(PR,"on"+$R)}_r(IC,"onAnimationEnd");_r(BC,"onAnimationIteration");_r(UC,"onAnimationStart");_r("dblclick","onDoubleClick");_r("focusin","onFocus");_r("focusout","onBlur");_r(X4,"onTransitionRun");_r(Q4,"onTransitionStart");_r(Z4,"onTransitionCancel");_r(qC,"onTransitionEnd");Kl("onMouseEnter",["mouseout","mouseover"]);Kl("onMouseLeave",["mouseout","mouseover"]);Kl("onPointerEnter",["pointerout","pointerover"]);Kl("onPointerLeave",["pointerout","pointerover"]);Ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ls("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hu="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(" "),RR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hu));function E_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(f){ah(f)}a.currentTarget=null,i=c}else for(l=0;l<r.length;l++){if(o=r[l],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(f){ah(f)}a.currentTarget=null,i=c}}}}function Se(e,t){var n=t[Xv];n===void 0&&(n=t[Xv]=new Set);var r=e+"__bubble";n.has(r)||(__(t,e,2,!1),n.add(r))}function Yy(e,t,n){var r=0;t&&(r|=4),__(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function A0(e){if(!e[ed]){e[ed]=!0,bC.forEach(function(n){n!=="selectionchange"&&(RR.has(n)||Yy(n,!1,e),Yy(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ed]||(t[ed]=!0,Yy("selectionchange",!1,t))}}function __(e,t,n,r){switch(q_(t)){case 2:var a=cD;break;case 8:a=uD;break;default:a=T0}n=a.bind(null,t,n,e),a=void 0,!tg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Vy(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===a)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&l.stateNode.containerInfo===a)return;l=l.return}for(;o!==null;){if(l=ol(o),l===null)return;if(c=l.tag,c===5||c===6||c===26||c===27){r=i=l;continue e}o=o.parentNode}}r=r.return}EC(function(){var u=i,f=Fb(n),d=[];e:{var h=HC.get(e);if(h!==void 0){var m=Hp,j=e;switch(e){case"keypress":if(Pd(n)===0)break e;case"keydown":case"keyup":m=E4;break;case"focusin":j="focus",m=wy;break;case"focusout":j="blur",m=wy;break;case"beforeblur":case"afterblur":m=wy;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Cj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=y4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=k4;break;case IC:case BC:case UC:m=x4;break;case qC:m=P4;break;case"scroll":case"scrollend":m=p4;break;case"wheel":m=R4;break;case"copy":case"cut":case"paste":m=j4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=_j;break;case"toggle":case"beforetoggle":m=L4}var v=(t&4)!==0,p=!v&&(e==="scroll"||e==="scrollend"),y=v?h!==null?h+"Capture":null:h;v=[];for(var g=u,b;g!==null;){var x=g;if(b=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||b===null||y===null||(x=iu(g,y),x!=null&&v.push(pu(g,x,b))),p)break;g=g.return}0<v.length&&(h=new m(h,j,null,n,f),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==eg&&(j=n.relatedTarget||n.fromElement)&&(ol(j)||j[Lo]))break e;if((m||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,m?(j=n.relatedTarget||n.toElement,m=u,j=j?ol(j):null,j!==null&&(p=lf(j),v=j.tag,j!==p||v!==5&&v!==27&&v!==6)&&(j=null)):(m=null,j=u),m!==j)){if(v=Cj,x="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=_j,x="onPointerLeave",y="onPointerEnter",g="pointer"),p=m==null?h:kc(m),b=j==null?h:kc(j),h=new v(x,g+"leave",m,n,f),h.target=p,h.relatedTarget=b,x=null,ol(f)===u&&(v=new v(y,g+"enter",j,n,f),v.target=b,v.relatedTarget=p,x=v),p=x,m&&j)t:{for(v=DR,y=m,g=j,b=0,x=y;x;x=v(x))b++;x=0;for(var N=g;N;N=v(N))x++;for(;0<b-x;)y=v(y),b--;for(;0<x-b;)g=v(g),x--;for(;b--;){if(y===g||g!==null&&y===g.alternate){v=y;break t}y=v(y),g=v(g)}v=null}else v=null;m!==null&&bS(d,h,m,v,!1),j!==null&&p!==null&&bS(d,p,j,v,!0)}}e:{if(h=u?kc(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var w=Pj;else if(Mj(h))if($C)w=Y4;else{w=G4;var O=F4}else m=h.nodeName,!m||m.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&Hb(u.elementType)&&(w=Pj):w=K4;if(w&&(w=w(e,u))){PC(d,w,n,f);break e}O&&O(e,h,u),e==="focusout"&&u&&h.type==="number"&&u.memoizedProps.value!=null&&Jv(h,"number",h.value)}switch(O=u?kc(u):window,e){case"focusin":(Mj(O)||O.contentEditable==="true")&&(fl=O,ng=u,zc=null);break;case"focusout":zc=ng=fl=null;break;case"mousedown":rg=!0;break;case"contextmenu":case"mouseup":case"dragend":rg=!1,zj(d,n,f);break;case"selectionchange":if(W4)break;case"keydown":case"keyup":zj(d,n,f)}var A;if(Yb)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ul?kC(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(TC&&n.locale!=="ko"&&(ul||E!=="onCompositionStart"?E==="onCompositionEnd"&&ul&&(A=_C()):(li=f,Gb="value"in li?li.value:li.textContent,ul=!0)),O=jh(u,E),0<O.length&&(E=new Ej(E,e,null,n,f),d.push({event:E,listeners:O}),A?E.data=A:(A=MC(n),A!==null&&(E.data=A)))),(A=I4?B4(e,n):U4(e,n))&&(E=jh(u,"onBeforeInput"),0<E.length&&(O=new Ej("onBeforeInput","beforeinput",null,n,f),d.push({event:O,listeners:E}),O.data=A)),MR(d,e,u,n,f)}E_(d,t)})}function pu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jh(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=iu(e,n),a!=null&&r.unshift(pu(e,a,i)),a=iu(e,t),a!=null&&r.push(pu(e,a,i))),e.tag===3)return r;e=e.return}return[]}function DR(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bS(e,t,n,r,a){for(var i=t._reactName,l=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===r)break;o!==5&&o!==26&&o!==27||u===null||(c=u,a?(u=iu(n,i),u!=null&&l.unshift(pu(n,u,c))):a||(u=iu(n,i),u!=null&&l.push(pu(n,u,c)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var LR=/\r\n?/g,zR=/\u0000|\uFFFD/g;function jS(e){return(typeof e=="string"?e:""+e).replace(LR,`
`).replace(zR,"")}function T_(e,t){return t=jS(t),jS(e)===t}function Ie(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Yl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Yl(e,""+r);break;case"className":Yf(e,"class",r);break;case"tabIndex":Yf(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Yf(e,n,r);break;case"style":CC(e,r,i);break;case"data":if(t!=="object"){Yf(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=kd(""+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 i=="function"&&(n==="formAction"?(t!=="input"&&Ie(e,t,"name",a.name,a,null),Ie(e,t,"formEncType",a.formEncType,a,null),Ie(e,t,"formMethod",a.formMethod,a,null),Ie(e,t,"formTarget",a.formTarget,a,null)):(Ie(e,t,"encType",a.encType,a,null),Ie(e,t,"method",a.method,a,null),Ie(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=kd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ma);break;case"onScroll":r!=null&&Se("scroll",e);break;case"onScrollEnd":r!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(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=kd(""+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":r===!0?e.setAttribute(n,""):r!==!1&&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":Se("beforetoggle",e),Se("toggle",e),Td(e,"popover",r);break;case"xlinkActuate":na(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":na(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":na(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":na(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":na(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":na(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":na(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Td(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=d4.get(n)||n,Td(e,n,r))}}function Cg(e,t,n,r,a,i){switch(n){case"style":CC(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Yl(e,r):(typeof r=="number"||typeof r=="bigint")&&Yl(e,""+r);break;case"onScroll":r!=null&&Se("scroll",e);break;case"onScrollEnd":r!=null&&Se("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jC.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[xn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Td(e,n,r)}}}function Vt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var l=n[i];if(l!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(F(137,t));default:Ie(e,t,i,l,n,null)}}a&&Ie(e,t,"srcSet",n.srcSet,n,null),r&&Ie(e,t,"src",n.src,n,null);return;case"input":Se("invalid",e);var o=i=l=a=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":a=f;break;case"type":l=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(F(137,t));break;default:Ie(e,t,r,f,n,null)}}NC(e,i,o,c,u,l,a,!1);return;case"select":Se("invalid",e),r=l=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":l=o;break;case"multiple":r=o;default:Ie(e,t,a,o,n,null)}t=i,n=l,e.multiple=!!r,t!=null?Al(e,!!r,t,!1):n!=null&&Al(e,!!r,n,!0);return;case"textarea":Se("invalid",e),i=a=r=null;for(l in n)if(n.hasOwnProperty(l)&&(o=n[l],o!=null))switch(l){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(F(91));break;default:Ie(e,t,l,o,n,null)}AC(e,r,a,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ie(e,t,c,r,n,null)}return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(r=0;r<hu.length;r++)Se(hu[r],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("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(F(137,t));default:Ie(e,t,u,r,n,null)}return;default:if(Hb(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&Cg(e,t,f,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Ie(e,t,o,r,n,null))}function IR(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,i=null,l=null,o=null,c=null,u=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":c=d;default:r.hasOwnProperty(m)||Ie(e,t,m,null,r,d)}}for(var h in r){var m=r[h];if(d=n[h],r.hasOwnProperty(h)&&(m!=null||d!=null))switch(h){case"type":i=m;break;case"name":a=m;break;case"checked":u=m;break;case"defaultChecked":f=m;break;case"value":l=m;break;case"defaultValue":o=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(F(137,t));break;default:m!==d&&Ie(e,t,h,m,r,d)}}Zv(e,l,o,c,u,f,i,a);return;case"select":m=l=o=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":m=c;default:r.hasOwnProperty(i)||Ie(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(i!=null||c!=null))switch(a){case"value":h=i;break;case"defaultValue":o=i;break;case"multiple":l=i;default:i!==c&&Ie(e,t,a,i,r,c)}t=o,n=l,r=m,h!=null?Al(e,!!n,h,!1):!!r!=!!n&&(t!=null?Al(e,!!n,t,!0):Al(e,!!n,n?[]:"",!1));return;case"textarea":m=h=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ie(e,t,o,null,r,a)}for(l in r)if(a=r[l],i=n[l],r.hasOwnProperty(l)&&(a!=null||i!=null))switch(l){case"value":h=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(F(91));break;default:a!==i&&Ie(e,t,l,a,r,i)}OC(e,h,m);return;case"option":for(var j in n)if(h=n[j],n.hasOwnProperty(j)&&h!=null&&!r.hasOwnProperty(j))switch(j){case"selected":e.selected=!1;break;default:Ie(e,t,j,null,r,h)}for(c in r)if(h=r[c],m=n[c],r.hasOwnProperty(c)&&h!==m&&(h!=null||m!=null))switch(c){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ie(e,t,c,h,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 v in n)h=n[v],n.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v)&&Ie(e,t,v,null,r,h);for(u in r)if(h=r[u],m=n[u],r.hasOwnProperty(u)&&h!==m&&(h!=null||m!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(F(137,t));break;default:Ie(e,t,u,h,r,m)}return;default:if(Hb(t)){for(var p in n)h=n[p],n.hasOwnProperty(p)&&h!==void 0&&!r.hasOwnProperty(p)&&Cg(e,t,p,void 0,r,h);for(f in r)h=r[f],m=n[f],!r.hasOwnProperty(f)||h===m||h===void 0&&m===void 0||Cg(e,t,f,h,r,m);return}}for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!=null&&!r.hasOwnProperty(y)&&Ie(e,t,y,null,r,h);for(d in r)h=r[d],m=n[d],!r.hasOwnProperty(d)||h===m||h==null&&m==null||Ie(e,t,d,h,r,m)}function SS(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BR(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,l=a.initiatorType,o=a.duration;if(i&&o&&SS(l)){for(l=0,o=a.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>o)break;var f=c.transferSize,d=c.initiatorType;f&&SS(d)&&(c=c.responseEnd,l+=f*(c<o?1:(o-u)/(c-u)))}if(--r,t+=8*(i+l)/(a.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 Eg=null,_g=null;function Sh(e){return e.nodeType===9?e:e.ownerDocument}function wS(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 k_(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 Tg(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 Wy=null;function UR(){var e=window.event;return e&&e.type==="popstate"?e===Wy?!1:(Wy=e,!0):(Wy=null,!1)}var M_=typeof setTimeout=="function"?setTimeout:void 0,qR=typeof clearTimeout=="function"?clearTimeout:void 0,NS=typeof Promise=="function"?Promise:void 0,HR=typeof queueMicrotask=="function"?queueMicrotask:typeof NS<"u"?function(e){return NS.resolve(null).then(e).catch(FR)}:M_;function FR(e){setTimeout(function(){throw e})}function $i(e){return e==="head"}function OS(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(a),to(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Vc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Vc(n);for(var i=n.firstChild;i;){var l=i.nextSibling,o=i.nodeName;i[ff]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=l}}else n==="body"&&Vc(e.ownerDocument.body);n=a}while(n);to(t)}function AS(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 kg(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":kg(n),qb(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function GR(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ff])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ar(e.nextSibling),e===null)break}return null}function KR(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ar(e.nextSibling),e===null))return null;return e}function P_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ar(e.nextSibling),e===null))return null;return e}function Mg(e){return e.data==="$?"||e.data==="$~"}function Pg(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function YR(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 ar(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 $g=null;function CS(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ar(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function ES(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 $_(e,t,n){switch(t=Sh(n),e){case"html":if(e=t.documentElement,!e)throw Error(F(452));return e;case"head":if(e=t.head,!e)throw Error(F(453));return e;case"body":if(e=t.body,!e)throw Error(F(454));return e;default:throw Error(F(451))}}function Vc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qb(e)}var ir=new Map,_S=new Set;function wh(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $a=Me.d;Me.d={f:VR,r:WR,D:XR,C:QR,L:ZR,m:JR,X:tD,S:eD,M:nD};function VR(){var e=$a.f(),t=em();return e||t}function WR(e){var t=zo(e);t!==null&&t.tag===5&&t.type==="form"?CE(t):$a.r(e)}var qo=typeof document>"u"?null:document;function R_(e,t,n){var r=qo;if(r&&typeof t=="string"&&t){var a=Qn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),_S.has(a)||(_S.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Vt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function XR(e){$a.D(e),R_("dns-prefetch",e,null)}function QR(e,t){$a.C(e,t),R_("preconnect",e,t)}function ZR(e,t,n){$a.L(e,t,n);var r=qo;if(r&&e&&t){var a='link[rel="preload"][as="'+Qn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Qn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Qn(n.imageSizes)+'"]')):a+='[href="'+Qn(e)+'"]';var i=a;switch(t){case"style":i=eo(e);break;case"script":i=Ho(e)}ir.has(i)||(e=nt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ir.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(vf(i))||t==="script"&&r.querySelector(gf(i))||(t=r.createElement("link"),Vt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function JR(e,t){$a.m(e,t);var n=qo;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Qn(r)+'"][href="'+Qn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ho(e)}if(!ir.has(i)&&(e=nt({rel:"modulepreload",href:e},t),ir.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gf(i)))return}r=n.createElement("link"),Vt(r,"link",e),Lt(r),n.head.appendChild(r)}}}function eD(e,t,n){$a.S(e,t,n);var r=qo;if(r&&e){var a=Ol(r).hoistableStyles,i=eo(e);t=t||"default";var l=a.get(i);if(!l){var o={loading:0,preload:null};if(l=r.querySelector(vf(i)))o.loading=5;else{e=nt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ir.get(i))&&C0(e,n);var c=l=r.createElement("link");Lt(c),Vt(c,"link",e),c._p=new Promise(function(u,f){c.onload=u,c.onerror=f}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ud(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:o},a.set(i,l)}}}function tD(e,t){$a.X(e,t);var n=qo;if(n&&e){var r=Ol(n).hoistableScripts,a=Ho(e),i=r.get(a);i||(i=n.querySelector(gf(a)),i||(e=nt({src:e,async:!0},t),(t=ir.get(a))&&E0(e,t),i=n.createElement("script"),Lt(i),Vt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function nD(e,t){$a.M(e,t);var n=qo;if(n&&e){var r=Ol(n).hoistableScripts,a=Ho(e),i=r.get(a);i||(i=n.querySelector(gf(a)),i||(e=nt({src:e,async:!0,type:"module"},t),(t=ir.get(a))&&E0(e,t),i=n.createElement("script"),Lt(i),Vt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function TS(e,t,n,r){var a=(a=pi.current)?wh(a):null;if(!a)throw Error(F(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=eo(n.href),n=Ol(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=eo(n.href);var i=Ol(a).hoistableStyles,l=i.get(e);if(l||(a=a.ownerDocument||a,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,l),(i=a.querySelector(vf(e)))&&!i._p&&(l.instance=i,l.state.loading=5),ir.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},ir.set(e,n),i||rD(a,e,n,l.state))),t&&r===null)throw Error(F(528,""));return l}if(t&&r!==null)throw Error(F(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ho(n),n=Ol(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(F(444,e))}}function eo(e){return'href="'+Qn(e)+'"'}function vf(e){return'link[rel="stylesheet"]['+e+"]"}function D_(e){return nt({},e,{"data-precedence":e.precedence,precedence:null})}function rD(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}),Vt(t,"link",n),Lt(t),e.head.appendChild(t))}function Ho(e){return'[src="'+Qn(e)+'"]'}function gf(e){return"script[async]"+e}function kS(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Qn(n.href)+'"]');if(r)return t.instance=r,Lt(r),r;var a=nt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Lt(r),Vt(r,"style",a),Ud(r,n.precedence,e),t.instance=r;case"stylesheet":a=eo(n.href);var i=e.querySelector(vf(a));if(i)return t.state.loading|=4,t.instance=i,Lt(i),i;r=D_(n),(a=ir.get(a))&&C0(r,a),i=(e.ownerDocument||e).createElement("link"),Lt(i);var l=i;return l._p=new Promise(function(o,c){l.onload=o,l.onerror=c}),Vt(i,"link",r),t.state.loading|=4,Ud(i,n.precedence,e),t.instance=i;case"script":return i=Ho(n.src),(a=e.querySelector(gf(i)))?(t.instance=a,Lt(a),a):(r=n,(a=ir.get(i))&&(r=nt({},n),E0(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Lt(a),Vt(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(F(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Ud(r,n.precedence,e));return t.instance}function Ud(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,l=0;l<r.length;l++){var o=r[l];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function C0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function E0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qd=null;function MS(e,t,n){if(qd===null){var r=new Map,a=qd=new Map;a.set(n,r)}else a=qd,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ff]||i[Ft]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var l=i.getAttribute(t)||"";l=e+l;var o=r.get(l);o?o.push(i):r.set(l,[i])}}return r}function PS(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function aD(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 L_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function iD(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=eo(r.href),i=t.querySelector(vf(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Lt(i);return}i=t.ownerDocument||t,r=D_(r),(a=ir.get(a))&&C0(r,a),i=i.createElement("link"),Lt(i);var l=i;l._p=new Promise(function(o,c){l.onload=o,l.onerror=c}),Vt(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Nh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xy=0;function sD(e,t){return e.stylesheets&&e.count===0&&Hd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Hd(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Xy===0&&(Xy=62500*BR());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hd(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Xy?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Nh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Oh=null;function Hd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oh=new Map,t.forEach(lD,e),Oh=null,Nh.call(e))}function lD(e,t){if(!(t.state.loading&4)){var n=Oh.get(e);if(n)var r=n.get(null);else{n=new Map,Oh.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var l=a[i];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),r=l)}r&&n.set(null,r)}a=t.instance,l=a.getAttribute("data-precedence"),i=n.get(l)||r,i===r&&n.set(null,a),n.set(l,a),this.count++,r=Nh.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var mu={$$typeof:pa,Provider:null,Consumer:null,_currentValue:ps,_currentValue2:ps,_threadCount:0};function oD(e,t,n,r,a,i,l,o,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=xy(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xy(0),this.hiddenUpdates=xy(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function z_(e,t,n,r,a,i,l,o,c,u,f,d){return e=new oD(e,t,n,l,c,u,f,d,o),t=1,i===!0&&(t|=24),i=En(3,null,null,t),e.current=i,i.stateNode=e,t=e0(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},r0(i),e}function I_(e){return e?(e=pl,e):pl}function B_(e,t,n,r,a,i){a=I_(a),r.context===null?r.context=a:r.pendingContext=a,r=yi(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=vi(e,r,t),n!==null&&(vn(n,e,t),Bc(n,e,t))}function $S(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _0(e,t){$S(e,t),(e=e.alternate)&&$S(e,t)}function U_(e){if(e.tag===13||e.tag===31){var t=Bs(e,67108864);t!==null&&vn(t,e,67108864),_0(e,67108864)}}function RS(e){if(e.tag===13||e.tag===31){var t=$n();t=Bb(t);var n=Bs(e,t);n!==null&&vn(n,e,t),_0(e,t)}}var Ah=!0;function cD(e,t,n,r){var a=de.T;de.T=null;var i=Me.p;try{Me.p=2,T0(e,t,n,r)}finally{Me.p=i,de.T=a}}function uD(e,t,n,r){var a=de.T;de.T=null;var i=Me.p;try{Me.p=8,T0(e,t,n,r)}finally{Me.p=i,de.T=a}}function T0(e,t,n,r){if(Ah){var a=Rg(r);if(a===null)Vy(e,t,r,Ch,n),DS(e,r);else if(dD(a,e,t,n,r))r.stopPropagation();else if(DS(e,r),t&4&&-1<fD.indexOf(e)){for(;a!==null;){var i=zo(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var l=Wi(i.pendingLanes);if(l!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;l;){var c=1<<31-Pn(l);o.entanglements[1]|=c,l&=~c}Qr(i),!(ke&6)&&(yh=kn()+500,yf(0))}}break;case 31:case 13:o=Bs(i,2),o!==null&&vn(o,i,2),em(),_0(i,2)}if(i=Rg(r),i===null&&Vy(e,t,r,Ch,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else Vy(e,t,r,null,n)}}function Rg(e){return e=Fb(e),k0(e)}var Ch=null;function k0(e){if(Ch=null,e=ol(e),e!==null){var t=lf(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=lC(t),e!==null)return e;e=null}else if(n===31){if(e=oC(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 Ch=e,null}function q_(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(X$()){case dC:return 2;case hC:return 8;case nh:case Q$:return 32;case pC:return 268435456;default:return 32}default:return 32}}var Dg=!1,bi=null,ji=null,Si=null,yu=new Map,vu=new Map,Za=[],fD="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 DS(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":yu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(t.pointerId)}}function yc(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=zo(t),t!==null&&U_(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function dD(e,t,n,r,a){switch(t){case"focusin":return bi=yc(bi,e,t,n,r,a),!0;case"dragenter":return ji=yc(ji,e,t,n,r,a),!0;case"mouseover":return Si=yc(Si,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return yu.set(i,yc(yu.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,vu.set(i,yc(vu.get(i)||null,e,t,n,r,a)),!0}return!1}function H_(e){var t=ol(e.target);if(t!==null){var n=lf(t);if(n!==null){if(t=n.tag,t===13){if(t=lC(n),t!==null){e.blockedOn=t,bj(e.priority,function(){RS(n)});return}}else if(t===31){if(t=oC(n),t!==null){e.blockedOn=t,bj(e.priority,function(){RS(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 Fd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rg(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);eg=r,n.target.dispatchEvent(r),eg=null}else return t=zo(n),t!==null&&U_(t),e.blockedOn=n,!1;t.shift()}return!0}function LS(e,t,n){Fd(e)&&n.delete(t)}function hD(){Dg=!1,bi!==null&&Fd(bi)&&(bi=null),ji!==null&&Fd(ji)&&(ji=null),Si!==null&&Fd(Si)&&(Si=null),yu.forEach(LS),vu.forEach(LS)}function td(e,t){e.blockedOn===t&&(e.blockedOn=null,Dg||(Dg=!0,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,hD)))}var nd=null;function zS(e){nd!==e&&(nd=e,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,function(){nd===e&&(nd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(k0(r||n)===null)continue;break}var i=zo(n);i!==null&&(e.splice(t,3),t-=3,yg(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function to(e){function t(c){return td(c,e)}bi!==null&&td(bi,e),ji!==null&&td(ji,e),Si!==null&&td(Si,e),yu.forEach(t),vu.forEach(t);for(var n=0;n<Za.length;n++){var r=Za[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Za.length&&(n=Za[0],n.blockedOn===null);)H_(n),n.blockedOn===null&&Za.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],l=a[xn]||null;if(typeof i=="function")l||zS(n);else if(l){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,l=i[xn]||null)o=l.formAction;else if(k0(a)!==null)continue}else o=l.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),zS(n)}}}function F_(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(l){return a=l})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=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),a!==null&&(a(),a=null)}}}function M0(e){this._internalRoot=e}rm.prototype.render=M0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));var n=t.current,r=$n();B_(n,r,e,t,null,null)};rm.prototype.unmount=M0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;B_(e.current,2,null,e,null,null),em(),t[Lo]=null}};function rm(e){this._internalRoot=e}rm.prototype.unstable_scheduleHydration=function(e){if(e){var t=xC();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Za.length&&t!==0&&t<Za[n].priority;n++);Za.splice(n,0,e),n===0&&H_(e)}};var IS=iC.version;if(IS!=="19.2.7")throw Error(F(527,IS,"19.2.7"));Me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=H$(t),e=e!==null?cC(e):null,e=e===null?null:e.stateNode,e};var pD={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:de,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{of=rd.inject(pD),Mn=rd}catch{}}Bp.createRoot=function(e,t){if(!sC(e))throw Error(F(299));var n=!1,r="",a=RE,i=DE,l=LE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=z_(e,1,!1,null,null,n,r,null,a,i,l,F_),e[Lo]=t.current,A0(e),new M0(t)};Bp.hydrateRoot=function(e,t,n){if(!sC(e))throw Error(F(299));var r=!1,a="",i=RE,l=DE,o=LE,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=z_(e,1,!0,t,n??null,r,a,c,i,l,o,F_),t.context=I_(null),n=t.current,r=$n(),r=Bb(r),a=yi(r),a.callback=null,vi(n,a,r),n=r,t.current.lanes=n,uf(t,n),Qr(t),e[Lo]=t.current,A0(e),new rm(t)};Bp.version="19.2.7";function G_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(G_)}catch(e){console.error(e)}}G_(),JA.exports=Bp;var mD=JA.exports;const yD=$e(mD);/**
 * react-router v7.17.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var BS="popstate";function US(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function vD(e={}){function t(r,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:l,search:o,hash:c}=i||r.location;return Lg("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:gu(a)}return xD(t,n,null,e)}function it(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Cr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gD(){return Math.random().toString(36).substring(2,10)}function qS(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 Lg(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fo(t):t,state:n,key:t&&t.key||r||gD(),mask:a}}function gu({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 Fo(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 xD(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o="POP",c=null,u=f();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function f(){return(l.state||{idx:null}).idx}function d(){o="POP";let p=f(),y=p==null?null:p-u;u=p,c&&c({action:o,location:v.location,delta:y})}function h(p,y){o="PUSH";let g=US(p)?p:Lg(v.location,p,y);u=f()+1;let b=qS(g,u),x=v.createHref(g.mask||g);try{l.pushState(b,"",x)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(x)}i&&c&&c({action:o,location:v.location,delta:1})}function m(p,y){o="REPLACE";let g=US(p)?p:Lg(v.location,p,y);u=f();let b=qS(g,u),x=v.createHref(g.mask||g);l.replaceState(b,"",x),i&&c&&c({action:o,location:v.location,delta:0})}function j(p){return bD(a,p)}let v={get action(){return o},get location(){return e(a,l)},listen(p){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(BS,d),c=p,()=>{a.removeEventListener(BS,d),c=null}},createHref(p){return t(a,p)},createURL:j,encodeLocation(p){let y=j(p);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(p){return l.go(p)}};return v}function bD(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),it(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:gu(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function K_(e,t,n="/"){return jD(e,t,n,!1)}function jD(e,t,n,r,a){let i=typeof t=="string"?Fo(t):t,l=Ta(i.pathname||"/",n);if(l==null)return null;let o=SD(e),c=null,u=$D(l);for(let f=0;c==null&&f<o.length;++f)c=MD(o[f],u,r);return c}function SD(e){let t=Y_(e);return wD(t),t}function Y_(e,t=[],n=[],r="",a=!1){let i=(l,o,c=a,u)=>{let f={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&c)return;it(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=Sr([r,f.relativePath]),h=n.concat(f);l.children&&l.children.length>0&&(it(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Y_(l.children,t,h,d,c)),!(l.path==null&&!l.index)&&t.push({path:d,score:TD(d,l.index),routesMeta:h})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))i(l,o);else for(let u of V_(l.path))i(l,o,!0,u)}),t}function V_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=V_(r.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function wD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ND=/^:[\w-]+$/,OD=3,AD=2,CD=1,ED=10,_D=-2,HS=e=>e==="*";function TD(e,t){let n=e.split("/"),r=n.length;return n.some(HS)&&(r+=_D),t&&(r+=AD),n.filter(a=>!HS(a)).reduce((a,i)=>a+(ND.test(i)?OD:i===""?CD:ED),r)}function kD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function MD(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",d=Eh({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Eh({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),l.push({params:a,pathname:Sr([i,d.pathname]),pathnameBase:zD(Sr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Sr([i,d.pathnameBase]))}return l}function Eh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=PD(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:d},h)=>{if(f==="*"){let j=o[h]||"";l=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const m=o[h];return d&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function PD(e,t=!1,n=!0){Cr(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c,u,f)=>{if(r.push({paramName:o,isOptional:c!=null}),c){let d=f.charAt(u+l.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function $D(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cr(!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 Ta(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var RD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function DD(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Fo(e):e,i;return n?(n=W_(n),n.startsWith("/")?i=FS(n.substring(1),"/"):i=FS(n,t)):i=t,{pathname:i,search:ID(r),hash:BD(a)}}function FS(e,t){let n=_h(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Qy(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 LD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function P0(e){let t=LD(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function am(e,t,n,r=!1){let a;typeof e=="string"?a=Fo(e):(a={...e},it(!a.pathname||!a.pathname.includes("?"),Qy("?","pathname","search",a)),it(!a.pathname||!a.pathname.includes("#"),Qy("#","pathname","hash",a)),it(!a.search||!a.search.includes("#"),Qy("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=n;else{let d=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let c=DD(a,o),u=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}var W_=e=>e.replace(/\/\/+/g,"/"),Sr=e=>W_(e.join("/")),_h=e=>e.replace(/\/+$/,""),zD=e=>_h(e).replace(/^\/*/,"/"),ID=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,BD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,UD=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 qD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function HD(e){let t=e.map(n=>n.route.path).filter(Boolean);return Sr(t)||"/"}var X_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Q_(e,t){let n=e;if(typeof n!="string"||!RD.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(X_)try{let i=new URL(window.location.href),l=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Ta(l.pathname,t);l.origin===i.origin&&o!=null?n=o+l.search+l.hash:a=!0}catch{Cr(!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:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z_=["POST","PUT","PATCH","DELETE"];new Set(Z_);var FD=["GET",...Z_];new Set(FD);var Go=S.createContext(null);Go.displayName="DataRouter";var im=S.createContext(null);im.displayName="DataRouterState";var J_=S.createContext(!1);function GD(){return S.useContext(J_)}var eT=S.createContext({isTransitioning:!1});eT.displayName="ViewTransition";var KD=S.createContext(new Map);KD.displayName="Fetchers";var YD=S.createContext(null);YD.displayName="Await";var In=S.createContext(null);In.displayName="Navigation";var xf=S.createContext(null);xf.displayName="Location";var Tr=S.createContext({outlet:null,matches:[],isDataRoute:!1});Tr.displayName="Route";var $0=S.createContext(null);$0.displayName="RouteError";var tT="REACT_ROUTER_ERROR",VD="REDIRECT",WD="ROUTE_ERROR_RESPONSE";function XD(e){if(e.startsWith(`${tT}:${VD}:{`))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 QD(e){if(e.startsWith(`${tT}:${WD}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new UD(t.status,t.statusText,t.data)}catch{}}function ZD(e,{relative:t}={}){it(Ko(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(In),{hash:a,pathname:i,search:l}=bf(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:Sr([n,i])),r.createHref({pathname:o,search:l,hash:a})}function Ko(){return S.useContext(xf)!=null}function Zr(){return it(Ko(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(xf).location}var nT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rT(e){S.useContext(In).static||S.useLayoutEffect(e)}function sm(){let{isDataRoute:e}=S.useContext(Tr);return e?h5():JD()}function JD(){it(Ko(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Go),{basename:t,navigator:n}=S.useContext(In),{matches:r}=S.useContext(Tr),{pathname:a}=Zr(),i=JSON.stringify(P0(r)),l=S.useRef(!1);return rT(()=>{l.current=!0}),S.useCallback((c,u={})=>{if(Cr(l.current,nT),!l.current)return;if(typeof c=="number"){n.go(c);return}let f=am(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Sr([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,a,e])}var e5=S.createContext(null);function t5(e){let t=S.useContext(Tr).outlet;return S.useMemo(()=>t&&S.createElement(e5.Provider,{value:e},t),[t,e])}function bf(e,{relative:t}={}){let{matches:n}=S.useContext(Tr),{pathname:r}=Zr(),a=JSON.stringify(P0(n));return S.useMemo(()=>am(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function n5(e,t){return aT(e,t)}function aT(e,t,n){var p;it(Ko(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=S.useContext(In),{matches:a}=S.useContext(Tr),i=a[a.length-1],l=i?i.params:{},o=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";sT(o,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${y}">) 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="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=Zr(),d;if(t){let y=typeof t=="string"?Fo(t):t;it(c==="/"||((p=y.pathname)==null?void 0:p.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 "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",m=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let j=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):K_(e,{pathname:m});Cr(u||j!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Cr(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.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 v=l5(j&&j.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Sr([c,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Sr([c,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&v?S.createElement(xf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},v):v}function r5(){let e=d5(),t=qD(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)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=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:i},"ErrorBoundary")," or"," ",S.createElement("code",{style:i},"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:a},n):null,l)}var a5=S.createElement(r5,null),iT=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?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=QD(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(Tr.Provider,{value:this.props.routeContext},S.createElement($0.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(i5,{error:e},t):t}};iT.contextType=J_;var Zy=new WeakMap;function i5({children:e,error:t}){let{basename:n}=S.useContext(In);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=XD(t.digest);if(r){let a=Zy.get(t);if(a)throw a;let i=Q_(r.location,n);if(X_&&!Zy.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Zy.set(t,l),l}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function s5({routeContext:e,match:t,children:n}){let r=S.useContext(Go);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Tr.Provider,{value:e},n)}function l5(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);it(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,o=-1;if(n&&r){l=r.renderFallback;for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=f),d.route.id){let{loaderData:h,errors:m}=r,j=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!m||m[d.route.id]===void 0);if(d.route.lazy||j){n.isStatic&&(l=!0),o>=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=r&&c?(f,d)=>{var h,m;c(f,{location:r.location,params:((m=(h=r.matches)==null?void 0:h[0])==null?void 0:m.params)??{},pattern:HD(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let m,j=!1,v=null,p=null;r&&(m=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||a5,l&&(o<0&&h===0?(sT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,p=null):o===h&&(j=!0,p=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),g=()=>{let b;return m?b=v:j?b=p:d.route.Component?b=S.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=f,S.createElement(s5,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?S.createElement(iT,{location:r.location,revalidation:r.revalidation,component:v,error:m,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):g()},null)}function R0(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function o5(e){let t=S.useContext(Go);return it(t,R0(e)),t}function c5(e){let t=S.useContext(im);return it(t,R0(e)),t}function u5(e){let t=S.useContext(Tr);return it(t,R0(e)),t}function D0(e){let t=u5(e),n=t.matches[t.matches.length-1];return it(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function f5(){return D0("useRouteId")}function d5(){var r;let e=S.useContext($0),t=c5("useRouteError"),n=D0("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function h5(){let{router:e}=o5("useNavigate"),t=D0("useNavigate"),n=S.useRef(!1);return rT(()=>{n.current=!0}),S.useCallback(async(a,i={})=>{Cr(n.current,nT),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var GS={};function sT(e,t,n){!t&&!GS[e]&&(GS[e]=!0,Cr(!1,n))}S.memo(p5);function p5({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return aT(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function lT({to:e,replace:t,state:n,relative:r}){it(Ko(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=S.useContext(In);Cr(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=S.useContext(Tr),{pathname:l}=Zr(),o=sm(),c=am(e,P0(i),l,r==="path"),u=JSON.stringify(c);return S.useEffect(()=>{o(JSON.parse(u),{replace:t,state:n,relative:r})},[o,u,r,t,n]),null}function m5(e){return t5(e.context)}function fe(e){it(!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 y5({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:l}){it(!Ko(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=S.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:l,future:{}}),[o,a,i,l]);typeof n=="string"&&(n=Fo(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:m="default",mask:j}=n,v=S.useMemo(()=>{let p=Ta(u,o);return p==null?null:{location:{pathname:p,search:f,hash:d,state:h,key:m,mask:j},navigationType:r}},[o,u,f,d,h,m,r,j]);return Cr(v!=null,`<Router basename="${o}"> is not able to match the URL "${u}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:S.createElement(In.Provider,{value:c},S.createElement(xf.Provider,{children:t,value:v}))}function v5({children:e,location:t}){return n5(zg(e),t)}function zg(e,t=[]){let n=[];return S.Children.forEach(e,(r,a)=>{if(!S.isValidElement(r))return;let i=[...t,a];if(r.type===S.Fragment){n.push.apply(n,zg(r.props.children,i));return}it(r.type===fe,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=zg(r.props.children,i)),n.push(l)}),n}var Gd="get",Kd="application/x-www-form-urlencoded";function lm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function g5(e){return lm(e)&&e.tagName.toLowerCase()==="button"}function x5(e){return lm(e)&&e.tagName.toLowerCase()==="form"}function b5(e){return lm(e)&&e.tagName.toLowerCase()==="input"}function j5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function S5(e,t){return e.button===0&&(!t||t==="_self")&&!j5(e)}var ad=null;function w5(){if(ad===null)try{new FormData(document.createElement("form"),0),ad=!1}catch{ad=!0}return ad}var N5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jy(e){return e!=null&&!N5.has(e)?(Cr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kd}"`),null):e}function O5(e,t){let n,r,a,i,l;if(x5(e)){let o=e.getAttribute("action");r=o?Ta(o,t):null,n=e.getAttribute("method")||Gd,a=Jy(e.getAttribute("enctype"))||Kd,i=new FormData(e)}else if(g5(e)||b5(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(r=c?Ta(c,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||Gd,a=Jy(e.getAttribute("formenctype"))||Jy(o.getAttribute("enctype"))||Kd,i=new FormData(o,e),!w5()){let{name:u,type:f,value:d}=e;if(f==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Gd,r=null,a=Kd,l=e}return i&&a==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function L0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oT(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Ta(a.pathname,t)==="/"?a.pathname=`${_h(t)}/_root.${r}`:a.pathname=`${_h(a.pathname)}.${r}`,a}async function A5(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function C5(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 E5(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let l=await A5(i,n);return l.links?l.links():[]}return[]}));return M5(r.flat(1).filter(C5).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function KS(e,t,n,r,a,i){let l=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,o=(c,u)=>{var f;return n[u].pathname!==c.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>l(c,u)||o(c,u)):i==="data"?t.filter((c,u)=>{var d;let f=r.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(l(c,u)||o(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function _5(e,t,{includeHydrateFallback:n}={}){return T5(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function T5(e){return[...new Set(e)]}function k5(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function M5(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(k5(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function z0(){let e=S.useContext(Go);return L0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function P5(){let e=S.useContext(im);return L0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var I0=S.createContext(void 0);I0.displayName="FrameworkContext";function B0(){let e=S.useContext(I0);return L0(e,"You must render this element inside a <HydratedRouter> element"),e}function $5(e,t){let n=S.useContext(I0),[r,a]=S.useState(!1),[i,l]=S.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:u,onMouseLeave:f,onTouchStart:d}=t,h=S.useRef(null);S.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=y=>{y.forEach(g=>{l(g.isIntersecting)})},p=new IntersectionObserver(v,{threshold:.5});return h.current&&p.observe(h.current),()=>{p.disconnect()}}},[e]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{a(!0)},j=()=>{a(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:vc(o,m),onBlur:vc(c,j),onMouseEnter:vc(u,m),onMouseLeave:vc(f,j),onTouchStart:vc(d,m)}]:[!1,h,{}]}function vc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function R5({page:e,...t}){let n=GD(),{router:r}=z0(),a=S.useMemo(()=>K_(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?S.createElement(L5,{page:e,matches:a,...t}):S.createElement(z5,{page:e,matches:a,...t}):null}function D5(e){let{manifest:t,routeModules:n}=B0(),[r,a]=S.useState([]);return S.useEffect(()=>{let i=!1;return E5(e,t,n).then(l=>{i||a(l)}),()=>{i=!0}},[e,t,n]),r}function L5({page:e,matches:t,...n}){let r=Zr(),{future:a}=B0(),{basename:i}=z0(),l=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=oT(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?c=!0:u.push(f.route.id);return c&&u.length>0&&o.searchParams.set("_routes",u.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,l.map(o=>S.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function z5({page:e,matches:t,...n}){let r=Zr(),{future:a,manifest:i,routeModules:l}=B0(),{basename:o}=z0(),{loaderData:c,matches:u}=P5(),f=S.useMemo(()=>KS(e,t,u,i,r,"data"),[e,t,u,i,r]),d=S.useMemo(()=>KS(e,t,u,i,r,"assets"),[e,t,u,i,r]),h=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,p=!1;if(t.forEach(g=>{var x;let b=i.routes[g.route.id];!b||!b.hasLoader||(!f.some(N=>N.route.id===g.route.id)&&g.route.id in c&&((x=l[g.route.id])!=null&&x.shouldRevalidate)||b.hasClientLoader?p=!0:v.add(g.route.id))}),v.size===0)return[];let y=oT(e,o,a.v8_trailingSlashAwareDataRequests,"data");return p&&v.size>0&&y.searchParams.set("_routes",t.filter(g=>v.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,c,r,i,f,t,e,l]),m=S.useMemo(()=>_5(d,i),[d,i]),j=D5(d);return S.createElement(S.Fragment,null,h.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),m.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),j.map(({key:v,link:p})=>S.createElement("link",{key:v,nonce:n.nonce,...p,crossOrigin:p.crossOrigin??n.crossOrigin})))}function I5(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var B5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{B5&&(window.__reactRouterVersion="7.17.0")}catch{}function U5({basename:e,children:t,useTransitions:n,window:r}){let a=S.useRef();a.current==null&&(a.current=vD({window:r,v5Compat:!0}));let i=a.current,[l,o]=S.useState({action:i.action,location:i.location}),c=S.useCallback(u=>{n===!1?o(u):S.startTransition(()=>o(u))},[n]);return S.useLayoutEffect(()=>i.listen(c),[i,c]),S.createElement(y5,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}var cT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jf=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:l,mask:o,state:c,target:u,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:m,...j},v){let{basename:p,navigator:y,useTransitions:g}=S.useContext(In),b=typeof f=="string"&&cT.test(f),x=Q_(f,p);f=x.to;let N=ZD(f,{relative:a}),w=Zr(),O=null;if(o){let C=am(o,[],w.mask?w.mask.pathname:"/",!0);p!=="/"&&(C.pathname=C.pathname==="/"?p:Sr([p,C.pathname])),O=y.createHref(C)}let[A,E,M]=$5(r,j),$=F5(f,{replace:l,mask:o,state:c,target:u,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:m,useTransitions:g});function k(C){t&&t(C),C.defaultPrevented||$(C)}let I=!(x.isExternal||i),_=S.createElement("a",{...j,...M,href:(I?O:void 0)||x.absoluteURL||N,onClick:I?k:t,ref:I5(v,E),target:u,"data-discover":!b&&n==="render"?"true":void 0});return A&&!b?S.createElement(S.Fragment,null,_,S.createElement(R5,{page:N})):_});jf.displayName="Link";var uT=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:l,viewTransition:o,children:c,...u},f){let d=bf(l,{relative:u.relative}),h=Zr(),m=S.useContext(im),{navigator:j,basename:v}=S.useContext(In),p=m!=null&&W5(d)&&o===!0,y=j.encodeLocation?j.encodeLocation(d).pathname:d.pathname,g=h.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(g=g.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=Ta(b,v)||b);const x=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let N=g===y||!a&&g.startsWith(y)&&g.charAt(x)==="/",w=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),O={isActive:N,isPending:w,isTransitioning:p},A=N?t:void 0,E;typeof r=="function"?E=r(O):E=[r,N?"active":null,w?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(O):i;return S.createElement(jf,{...u,"aria-current":A,className:E,ref:f,style:M,to:l,viewTransition:o},typeof c=="function"?c(O):c)});uT.displayName="NavLink";var q5=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:l=Gd,action:o,onSubmit:c,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...m},j)=>{let{useTransitions:v}=S.useContext(In),p=Y5(),y=V5(o,{relative:u}),g=l.toLowerCase()==="get"?"get":"post",b=typeof o=="string"&&cT.test(o),x=N=>{if(c&&c(N),N.defaultPrevented)return;N.preventDefault();let w=N.nativeEvent.submitter,O=(w==null?void 0:w.getAttribute("formmethod"))||l,A=()=>p(w||N.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});v&&n!==!1?S.startTransition(()=>A()):A()};return S.createElement("form",{ref:j,method:g,action:y,onSubmit:r?c:x,...m,"data-discover":!b&&e==="render"?"true":void 0})});q5.displayName="Form";function H5(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function fT(e){let t=S.useContext(Go);return it(t,H5(e)),t}function F5(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:o,defaultShouldRevalidate:c,useTransitions:u}={}){let f=sm(),d=Zr(),h=bf(e,{relative:l});return S.useCallback(m=>{if(S5(m,t)){m.preventDefault();let j=n!==void 0?n:gu(d)===gu(h),v=()=>f(e,{replace:j,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:o,defaultShouldRevalidate:c});u?S.startTransition(()=>v()):v()}},[d,f,h,n,r,a,t,e,i,l,o,c,u])}var G5=0,K5=()=>`__${String(++G5)}__`;function Y5(){let{router:e}=fT("useSubmit"),{basename:t}=S.useContext(In),n=f5(),r=e.fetch,a=e.navigate;return S.useCallback(async(i,l={})=>{let{action:o,method:c,encType:u,formData:f,body:d}=O5(i,t);if(l.navigate===!1){let h=l.fetcherKey||K5();await r(h,n,l.action||o,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,flushSync:l.flushSync})}else await a(l.action||o,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function V5(e,{relative:t}={}){let{basename:n}=S.useContext(In),r=S.useContext(Tr);it(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...bf(e||".",{relative:t})},l=Zr();if(e==null){i.search=l.search;let o=new URLSearchParams(i.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Sr([n,i.pathname])),gu(i)}function W5(e,{relative:t}={}){let n=S.useContext(eT);it(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=fT("useViewTransitionState"),a=bf(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ta(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ta(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Eh(a.pathname,l)!=null||Eh(a.pathname,i)!=null}var om=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(){}},os,ei,Dl,RA,X5=(RA=class extends om{constructor(){super();Oe(this,os);Oe(this,ei);Oe(this,Dl);he(this,Dl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,ei)||this.setEventListener(q(this,Dl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,ei))==null||t.call(this),he(this,ei,void 0))}setEventListener(t){var n;he(this,Dl,t),(n=q(this,ei))==null||n.call(this),he(this,ei,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){q(this,os)!==t&&(he(this,os,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof q(this,os)=="boolean"?q(this,os):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},os=new WeakMap,ei=new WeakMap,Dl=new WeakMap,RA),dT=new X5,Q5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,kb,DA,Z5=(DA=class{constructor(){Oe(this,ti,Q5);Oe(this,kb,!1)}setTimeoutProvider(e){he(this,ti,e)}setTimeout(e,t){return q(this,ti).setTimeout(e,t)}clearTimeout(e){q(this,ti).clearTimeout(e)}setInterval(e,t){return q(this,ti).setInterval(e,t)}clearInterval(e){q(this,ti).clearInterval(e)}},ti=new WeakMap,kb=new WeakMap,DA),Ig=new Z5;function J5(e){setTimeout(e,0)}var eL=typeof window>"u"||"Deno"in globalThis;function mr(){}function tL(e,t){return typeof e=="function"?e(t):e}function nL(e){return typeof e=="number"&&e>=0&&e!==1/0}function rL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bg(e,t){return typeof e=="function"?e(t):e}function aL(e,t){return typeof e=="function"?e(t):e}function YS(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==U0(l,t.options))return!1}else if(!bu(t.queryKey,l))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function VS(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(xu(t.options.mutationKey)!==xu(i))return!1}else if(!bu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function U0(e,t){return((t==null?void 0:t.queryKeyHashFn)||xu)(e)}function xu(e){return JSON.stringify(e,(t,n)=>Ug(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function bu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>bu(e[n],t[n])):!1}var iL=Object.prototype.hasOwnProperty;function hT(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=WS(e)&&WS(t);if(!r&&!(Ug(e)&&Ug(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),o=l.length,c=r?new Array(o):{};let u=0;for(let f=0;f<o;f++){const d=r?f:l[f],h=e[d],m=t[d];if(h===m){c[d]=h,(r?f<i:iL.call(e,d))&&u++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){c[d]=m;continue}const j=hT(h,m,n+1);c[d]=j,j===h&&u++}return i===o&&u===i?e:c}function WS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ug(e){if(!XS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!XS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function XS(e){return Object.prototype.toString.call(e)==="[object Object]"}function sL(e){return new Promise(t=>{Ig.setTimeout(t,e)})}function lL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?hT(e,t):t}function oL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function cL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var q0=Symbol();function pT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===q0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function uL(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var mT=(()=>{let e=()=>eL;return{isServer(){return e()},setIsServer(t){e=t}}})();function fL(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var dL=J5;function hL(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=dL;const i=o=>{t?e.push(o):a(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||l()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var nn=hL(),Ll,ni,zl,LA,pL=(LA=class extends om{constructor(){super();Oe(this,Ll,!0);Oe(this,ni);Oe(this,zl);he(this,zl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,ni)||this.setEventListener(q(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,ni))==null||t.call(this),he(this,ni,void 0))}setEventListener(t){var n;he(this,zl,t),(n=q(this,ni))==null||n.call(this),he(this,ni,t(this.setOnline.bind(this)))}setOnline(t){q(this,Ll)!==t&&(he(this,Ll,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return q(this,Ll)}},Ll=new WeakMap,ni=new WeakMap,zl=new WeakMap,LA),Th=new pL;function mL(e){return Math.min(1e3*2**e,3e4)}function yT(e){return(e??"online")==="online"?Th.isOnline():!0}var qg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function vT(e){let t=!1,n=0,r;const a=fL(),i=()=>a.status!=="pending",l=v=>{var p;if(!i()){const y=new qg(v);h(y),(p=e.onCancel)==null||p.call(e,y)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>dT.isFocused()&&(e.networkMode==="always"||Th.isOnline())&&e.canRun(),f=()=>yT(e.networkMode)&&e.canRun(),d=v=>{i()||(r==null||r(),a.resolve(v))},h=v=>{i()||(r==null||r(),a.reject(v))},m=()=>new Promise(v=>{var p;r=y=>{(i()||u())&&v(y)},(p=e.onPause)==null||p.call(e)}).then(()=>{var v;r=void 0,i()||(v=e.onContinue)==null||v.call(e)}),j=()=>{if(i())return;let v;const p=n===0?e.initialPromise:void 0;try{v=p??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(d).catch(y=>{var w;if(i())return;const g=e.retry??(mT.isServer()?0:3),b=e.retryDelay??mL,x=typeof b=="function"?b(n,y):b,N=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!N){h(y);return}n++,(w=e.onFail)==null||w.call(e,n,y),sL(x).then(()=>u()?void 0:m()).then(()=>{t?h(y):j()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?j():m().then(j),a)}}var cs,zA,gT=(zA=class{constructor(){Oe(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nL(this.gcTime)&&he(this,cs,Ig.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mT.isServer()?1/0:5*60*1e3))}clearGcTimeout(){q(this,cs)!==void 0&&(Ig.clearTimeout(q(this,cs)),he(this,cs,void 0))}},cs=new WeakMap,zA);function yL(e){return{onFetch:(t,n)=>{var f,d,h,m,j;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],l=((j=t.state.data)==null?void 0:j.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const p=b=>{uL(b,()=>t.signal,()=>v=!0)},y=pT(t.options,t.fetchOptions),g=async(b,x,N)=>{if(v)return Promise.reject(t.signal.reason);if(x==null&&b.pages.length)return Promise.resolve(b);const O=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:x,direction:N?"backward":"forward",meta:t.options.meta};return p($),$})(),A=await y(O),{maxPages:E}=t.options,M=N?cL:oL;return{pages:M(b.pages,A,E),pageParams:M(b.pageParams,x,E)}};if(a&&i.length){const b=a==="backward",x=b?vL:QS,N={pages:i,pageParams:l},w=x(r,N);o=await g(N,w,b)}else{const b=e??i.length;do{const x=c===0?l[0]??r.initialPageParam:QS(r,o);if(c>0&&x==null)break;o=await g(o,x),c++}while(c<b)}return o};t.options.persister?t.fetchFn=()=>{var v,p;return(p=(v=t.options).persister)==null?void 0:p.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function QS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vL(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Il,us,Bl,Kn,fs,$t,rf,ds,An,xT,oa,IA,gL=(IA=class extends gT{constructor(t){super();Oe(this,An);Oe(this,Il);Oe(this,us);Oe(this,Bl);Oe(this,Kn);Oe(this,fs);Oe(this,$t);Oe(this,rf);Oe(this,ds);he(this,ds,!1),he(this,rf,t.defaultOptions),this.setOptions(t.options),this.observers=[],he(this,fs,t.client),he(this,Kn,q(this,fs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,he(this,us,JS(this.options)),this.state=t.state??q(this,us),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return q(this,Il)}get promise(){var t;return(t=q(this,$t))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,rf),...t},t!=null&&t._type&&he(this,Il,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=JS(this.options);n.data!==void 0&&(this.setState(ZS(n.data,n.dataUpdatedAt)),he(this,us,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Kn).remove(this)}setData(t,n){const r=lL(this.state.data,t,this.options);return Ut(this,An,oa).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ut(this,An,oa).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=q(this,$t))==null?void 0:r.promise;return(a=q(this,$t))==null||a.cancel(t),n?n.then(mr).catch(mr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,us)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>aL(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===q0||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Bg(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!rL(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,$t))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,$t))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(this,Kn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(q(this,$t)&&(q(this,ds)||Ut(this,An,xT).call(this)?q(this,$t).cancel({revert:!0}):q(this,$t).cancelRetry()),this.scheduleGc()),q(this,Kn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ut(this,An,oa).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,h,m,j,v,p,y,g,b;if(this.state.fetchStatus!=="idle"&&((u=q(this,$t))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,$t))return q(this,$t).continueRetry(),q(this,$t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(N=>N.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,a=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(he(this,ds,!0),r.signal)})},i=()=>{const x=pT(this.options,n),w=(()=>{const O={client:q(this,fs),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return he(this,ds,!1),this.options.persister?this.options.persister(x,w,this):x(w)},o=(()=>{const x={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,fs),state:this.state,fetchFn:i};return a(x),x})(),c=q(this,Il)==="infinite"?yL(this.options.pages):this.options.behavior;c==null||c.onFetch(o,this),he(this,Bl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ut(this,An,oa).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),he(this,$t,vT({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:x=>{x instanceof qg&&x.revert&&this.setState({...q(this,Bl),fetchStatus:"idle"}),r.abort()},onFail:(x,N)=>{Ut(this,An,oa).call(this,{type:"failed",failureCount:x,error:N})},onPause:()=>{Ut(this,An,oa).call(this,{type:"pause"})},onContinue:()=>{Ut(this,An,oa).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const x=await q(this,$t).start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),(m=(h=q(this,Kn).config).onSuccess)==null||m.call(h,x,this),(v=(j=q(this,Kn).config).onSettled)==null||v.call(j,x,this.state.error,this),x}catch(x){if(x instanceof qg){if(x.silent)return q(this,$t).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw Ut(this,An,oa).call(this,{type:"error",error:x}),(y=(p=q(this,Kn).config).onError)==null||y.call(p,x,this),(b=(g=q(this,Kn).config).onSettled)==null||b.call(g,this.state.data,x,this),x}finally{this.scheduleGc()}}},Il=new WeakMap,us=new WeakMap,Bl=new WeakMap,Kn=new WeakMap,fs=new WeakMap,$t=new WeakMap,rf=new WeakMap,ds=new WeakMap,An=new WeakSet,xT=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},oa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...xL(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...ZS(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return he(this,Bl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,Kn).notify({query:this,type:"updated",action:t})})},IA);function xL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZS(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function JS(e){const 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 af,Dr,Wt,hs,Lr,Fa,BA,bL=(BA=class extends gT{constructor(t){super();Oe(this,Lr);Oe(this,af);Oe(this,Dr);Oe(this,Wt);Oe(this,hs);he(this,af,t.client),this.mutationId=t.mutationId,he(this,Wt,t.mutationCache),he(this,Dr,[]),this.state=t.state||jL(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,Dr).includes(t)||(q(this,Dr).push(t),this.clearGcTimeout(),q(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){he(this,Dr,q(this,Dr).filter(n=>n!==t)),this.scheduleGc(),q(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,Dr).length||(this.state.status==="pending"?this.scheduleGc():q(this,Wt).remove(this))}continue(){var t;return((t=q(this,hs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,c,u,f,d,h,m,j,v,p,y,g,b,x,N,w,O;const n=()=>{Ut(this,Lr,Fa).call(this,{type:"continue"})},r={client:q(this,af),meta:this.options.meta,mutationKey:this.options.mutationKey};he(this,hs,vT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,E)=>{Ut(this,Lr,Fa).call(this,{type:"failed",failureCount:A,error:E})},onPause:()=>{Ut(this,Lr,Fa).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,Wt).canRun(this)}));const a=this.state.status==="pending",i=!q(this,hs).canStart();try{if(a)n();else{Ut(this,Lr,Fa).call(this,{type:"pending",variables:t,isPaused:i}),q(this,Wt).config.onMutate&&await q(this,Wt).config.onMutate(t,this,r);const E=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t,r));E!==this.state.context&&Ut(this,Lr,Fa).call(this,{type:"pending",context:E,variables:t,isPaused:i})}const A=await q(this,hs).start();return await((u=(c=q(this,Wt).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,A,t,this.state.context,r)),await((m=(h=q(this,Wt).config).onSettled)==null?void 0:m.call(h,A,null,this.state.variables,this.state.context,this,r)),await((v=(j=this.options).onSettled)==null?void 0:v.call(j,A,null,t,this.state.context,r)),Ut(this,Lr,Fa).call(this,{type:"success",data:A}),A}catch(A){try{await((y=(p=q(this,Wt).config).onError)==null?void 0:y.call(p,A,t,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((b=(g=this.options).onError)==null?void 0:b.call(g,A,t,this.state.context,r))}catch(E){Promise.reject(E)}try{await((N=(x=q(this,Wt).config).onSettled)==null?void 0:N.call(x,void 0,A,this.state.variables,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((O=(w=this.options).onSettled)==null?void 0:O.call(w,void 0,A,t,this.state.context,r))}catch(E){Promise.reject(E)}throw Ut(this,Lr,Fa).call(this,{type:"error",error:A}),A}finally{q(this,Wt).runNext(this)}}},af=new WeakMap,Dr=new WeakMap,Wt=new WeakMap,hs=new WeakMap,Lr=new WeakSet,Fa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),nn.batch(()=>{q(this,Dr).forEach(r=>{r.onMutationUpdate(t)}),q(this,Wt).notify({mutation:this,type:"updated",action:t})})},BA);function jL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var da,yr,sf,UA,SL=(UA=class extends om{constructor(t={}){super();Oe(this,da);Oe(this,yr);Oe(this,sf);this.config=t,he(this,da,new Set),he(this,yr,new Map),he(this,sf,0)}build(t,n,r){const a=new bL({client:t,mutationCache:this,mutationId:++Bf(this,sf)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){q(this,da).add(t);const n=id(t);if(typeof n=="string"){const r=q(this,yr).get(n);r?r.push(t):q(this,yr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,da).delete(t)){const n=id(t);if(typeof n=="string"){const r=q(this,yr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&q(this,yr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=id(t);if(typeof n=="string"){const r=q(this,yr).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=id(t);if(typeof n=="string"){const a=(r=q(this,yr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nn.batch(()=>{q(this,da).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,da).clear(),q(this,yr).clear()})}getAll(){return Array.from(q(this,da))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>VS(n,r))}findAll(t={}){return this.getAll().filter(n=>VS(t,n))}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return nn.batch(()=>Promise.all(t.map(n=>n.continue().catch(mr))))}},da=new WeakMap,yr=new WeakMap,sf=new WeakMap,UA);function id(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zr,qA,wL=(qA=class extends om{constructor(t={}){super();Oe(this,zr);this.config=t,he(this,zr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??U0(a,n);let l=this.get(i);return l||(l=new gL({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){q(this,zr).has(t.queryHash)||(q(this,zr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=q(this,zr).get(t.queryHash);n&&(t.destroy(),n===t&&q(this,zr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,zr).get(t)}getAll(){return[...q(this,zr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>YS(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>YS(t,r)):n}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},zr=new WeakMap,qA),pt,ri,ai,Ul,ql,ii,Hl,Fl,HA,NL=(HA=class{constructor(e={}){Oe(this,pt);Oe(this,ri);Oe(this,ai);Oe(this,Ul);Oe(this,ql);Oe(this,ii);Oe(this,Hl);Oe(this,Fl);he(this,pt,e.queryCache||new wL),he(this,ri,e.mutationCache||new SL),he(this,ai,e.defaultOptions||{}),he(this,Ul,new Map),he(this,ql,new Map),he(this,ii,0)}mount(){Bf(this,ii)._++,q(this,ii)===1&&(he(this,Hl,dT.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,pt).onFocus())})),he(this,Fl,Th.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,pt).onOnline())})))}unmount(){var e,t;Bf(this,ii)._--,q(this,ii)===0&&((e=q(this,Hl))==null||e.call(this),he(this,Hl,void 0),(t=q(this,Fl))==null||t.call(this),he(this,Fl,void 0))}isFetching(e){return q(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,ri).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,pt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=q(this,pt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Bg(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return q(this,pt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=q(this,pt).get(r.queryHash),i=a==null?void 0:a.state.data,l=tL(t,i);if(l!==void 0)return q(this,pt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return nn.batch(()=>q(this,pt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,pt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=q(this,pt);nn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=q(this,pt);return nn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=nn.batch(()=>q(this,pt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(mr).catch(mr)}invalidateQueries(e,t={}){return nn.batch(()=>(q(this,pt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=nn.batch(()=>q(this,pt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(mr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(mr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=q(this,pt).build(this,t);return n.isStaleByTime(Bg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mr).catch(mr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mr).catch(mr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Th.isOnline()?q(this,ri).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,pt)}getMutationCache(){return q(this,ri)}getDefaultOptions(){return q(this,ai)}setDefaultOptions(e){he(this,ai,e)}setQueryDefaults(e,t){q(this,Ul).set(xu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,Ul).values()],n={};return t.forEach(r=>{bu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){q(this,ql).set(xu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,ql).values()],n={};return t.forEach(r=>{bu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,ai).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=U0(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===q0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,ai).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,pt).clear(),q(this,ri).clear()}},pt=new WeakMap,ri=new WeakMap,ai=new WeakMap,Ul=new WeakMap,ql=new WeakMap,ii=new WeakMap,Hl=new WeakMap,Fl=new WeakMap,HA),OL=S.createContext(void 0),AL=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(OL.Provider,{value:e,children:t}));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bT=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var EL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _L=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},c)=>S.createElement("svg",{ref:c,...EL,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:bT("lucide",a),...o},[...l.map(([u,f])=>S.createElement(u,f)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ee=(e,t)=>{const n=S.forwardRef(({className:r,...a},i)=>S.createElement(_L,{ref:i,iconNode:t,className:bT(`lucide-${CL(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gl=ee("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TL=ee("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kL=ee("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ML=ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jT=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ST=ee("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wT=ee("Barcode",[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sf=ee("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NT=ee("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PL=ee("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $L=ee("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OT=ee("CalendarRange",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AT=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CT=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wf=ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RL=ee("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kh=ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ET=ee("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const no=ee("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DL=ee("ClipboardPen",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",key:"1oijnt"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5",key:"cereej"}],["path",{d:"M4 13.5V6a2 2 0 0 1 2-2h2",key:"5ua5vh"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ew=ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H0=ee("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LL=ee("Contact",[["path",{d:"M17 18a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2",key:"1mghuy"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["circle",{cx:"12",cy:"10",r:"2",key:"1yojzk"}],["line",{x1:"8",x2:"8",y1:"2",y2:"4",key:"1ff9gb"}],["line",{x1:"16",x2:"16",y1:"2",y2:"4",key:"1ufoma"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zL=ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vr=ee("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IL=ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BL=ee("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UL=ee("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _T=ee("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xs=ee("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TT=ee("FileBadge",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"12ixgl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",key:"u0c8gj"}],["path",{d:"M7 16.5 8 22l-3-1-3 1 1-5.5",key:"5gm2nr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tw=ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ro=ee("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kT=ee("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qL=ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F0=ee("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HL=ee("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G0=ee("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MT=ee("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FL=ee("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PT=ee("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GL=ee("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KL=ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YL=ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nw=ee("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VL=ee("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const WL=ee("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $T=ee("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XL=ee("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rw=ee("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 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 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aw=ee("PackageOpen",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RT=ee("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 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 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DT=ee("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["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"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LT=ee("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QL=ee("PieChart",[["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}],["path",{d:"M22 12A10 10 0 0 0 12 2v10z",key:"1rfc4y"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hg=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZL=ee("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ot=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zT=ee("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JL=ee("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K0=ee("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IT=ee("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BT=ee("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cm=ee("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bs=ee("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UT=ee("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yo=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iw=ee("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qT=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e6=ee("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vo=ee("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t6=ee("ShieldHalf",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 22V2",key:"zs6s6o"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fg=ee("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zn=ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n6=ee("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HT=ee("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FT=ee("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sr=ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ao=ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Er=ee("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const um=ee("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"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r6=ee("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a6=ee("UsersRound",[["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"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GT=ee("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nf=ee("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KT=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sw={SUPERADMIN:4,MANAGER:3,WORKER:2,VIEWER:1},lw=["SUPERADMIN","MANAGER","WORKER","VIEWER"];function _i(){return(localStorage.getItem("mes_role")||"VIEWER").toUpperCase()}function _s(e,t=_i()){return(sw[t]||0)>=(sw[e.toUpperCase()]||99)}const Zt=(e=_i())=>_s("WORKER",e),ur=(e=_i())=>_s("MANAGER",e),i6=(e=_i())=>_s("SUPERADMIN",e),YT=S.createContext({theme:"dark",toggle:()=>{},setTheme:()=>{}}),ow="mes_theme";function s6(e){document.documentElement.setAttribute("data-theme",e)}function l6({children:e}){const[t,n]=S.useState(()=>localStorage.getItem(ow)==="light"?"light":"dark");S.useEffect(()=>{s6(t),localStorage.setItem(ow,t)},[t]);const r=i=>n(i),a=()=>n(i=>i==="dark"?"light":"dark");return s.jsx(YT.Provider,{value:{theme:t,toggle:a,setTheme:r},children:e})}function o6(){return S.useContext(YT)}function c6(){const{theme:e,toggle:t}=o6();return s.jsxs("button",{onClick:t,title:"테마 전환",style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",background:"none",border:"1px solid var(--uiws-border, #2d3448)",borderRadius:8,color:"var(--uiws-text-muted, #8892b0)",cursor:"pointer",fontSize:13,width:"100%"},children:[e==="dark"?s.jsx(n6,{size:16}):s.jsx(WL,{size:16}),e==="dark"?"라이트 모드":"다크 모드"]})}const u6=[{to:"/dashboard",label:"대시보드",icon:HL}],f6=[{to:"/jobs",label:"작업관리 ★",icon:Nf},{to:"/progress",label:"진행관리 ★",icon:gl},{to:"/workorders",label:"작업지시",icon:no},{to:"/production",label:"생산실적",icon:xs},{to:"/process-board",label:"공정진행",icon:H0},{to:"/oee",label:"설비 / OEE",icon:ro},{to:"/tracking",label:"LOT 추적",icon:$T},{to:"/plans",label:"생산계획",icon:OT}],d6=[{to:"/receiving",label:"입고",icon:RT},{to:"/shipping",label:"출하관리 ★",icon:um},{to:"/inventory",label:"재고",icon:Sf},{to:"/stocktake",label:"재고실사",icon:ET},{to:"/lotserial",label:"LOT / 시리얼",icon:wT}],h6=[{to:"/inspection",label:"검사",icon:bs},{to:"/spec",label:"검사기준",icon:BT},{to:"/ncr",label:"부적합 NCR",icon:Er},{to:"/capa",label:"시정조치 CAPA",icon:MT},{to:"/spc",label:"SPC 관리도",icon:G0},{to:"/certificate",label:"성적서",icon:TT}],p6=[{to:"/items",label:"품목",icon:DT},{to:"/bom",label:"BOM",icon:PT},{to:"/routing",label:"라우팅",icon:IT},{to:"/partners",label:"거래처",icon:NT,min:"MANAGER"},{to:"/warehouses",label:"창고/로케이션",icon:GT}],m6=[{to:"/analytics",label:"분석 / KPI",icon:ST},{to:"/ai-tools",label:"AI 도구",icon:zn},{to:"/ai-techniques",label:"AI 기법 설정",icon:Vr,min:"MANAGER"}],y6=[{to:"/uiws/worklog",label:"업무일지",icon:XL},{to:"/uiws/schedule",label:"일정",icon:$L},{to:"/uiws/message",label:"쪽지",icon:YL},{to:"/uiws/stats",label:"업무통계",icon:QL}],v6=[{to:"/uiws/system/roles",label:"권한 관리",icon:F0,min:"SUPERADMIN"},{to:"/uiws/system/role-menus",label:"역할-메뉴 권한",icon:t6,min:"SUPERADMIN"},{to:"/uiws/system/codes",label:"공통코드",icon:FL,min:"SUPERADMIN"},{to:"/uiws/system/menus",label:"메뉴 관리",icon:VL,min:"SUPERADMIN"},{to:"/uiws/system/depts",label:"부서 관리",icon:a6,min:"SUPERADMIN"},{to:"/uiws/system/companies",label:"거래처 관리",icon:LL,min:"SUPERADMIN"}],g6=[{to:"/admin/users",label:"사용자/권한",icon:Vo,min:"SUPERADMIN"},{to:"/admin/ai-platform",label:"AI 플랫폼 설정",icon:Vr,min:"SUPERADMIN"},{to:"/admin/audit",label:"감사 로그",icon:UT,min:"MANAGER"},{to:"/admin/settings",label:"시스템 설정",icon:qT,min:"MANAGER"}],x6=[{to:"/admin/mobile-app",label:"모바일 앱 설치",icon:Fg}],b6=({isActive:e})=>`flex items-center gap-3 px-5 py-1.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function $r({title:e,links:t,role:n}){const r=t.filter(a=>_s(a.min||"VIEWER",n));return r.length?s.jsxs(s.Fragment,{children:[e&&s.jsx("div",{className:"px-5 pt-3 pb-1 text-[10px] font-semibold tracking-wider text-slate-500 uppercase",children:e}),r.map(({to:a,label:i,icon:l})=>s.jsxs(uT,{to:a,className:b6,children:[s.jsx(l,{size:16}),i]},a))]}):null}function j6(){const[e,t]=S.useState(_i);S.useEffect(()=>{const a=()=>{const l=_i();t(o=>o===l?o:l)},i=window.setInterval(a,800);return window.addEventListener("storage",a),()=>{window.clearInterval(i),window.removeEventListener("storage",a)}},[]);const n=v6.filter(a=>_s(a.min||"VIEWER",e)),r=g6.filter(a=>_s(a.min||"VIEWER",e));return s.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[s.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[s.jsx(Vr,{className:"text-brand",size:24}),s.jsxs("div",{children:[s.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA MES"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"AI 제조실행시스템"})]})]}),s.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[s.jsx($r,{links:u6,role:e}),s.jsx($r,{title:"MES 제조실행",links:f6,role:e}),s.jsx($r,{title:"WMS 창고관리",links:d6,role:e}),s.jsx($r,{title:"QMS 품질관리",links:h6,role:e}),s.jsx($r,{title:"기준정보",links:p6,role:e}),s.jsx($r,{title:"공통",links:m6,role:e}),s.jsx($r,{title:"업무 (UIWS)",links:y6,role:e}),s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"모바일",links:x6,role:e})}),n.length>0&&s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"시스템관리(권한)",links:n,role:e})}),r.length>0&&s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"관리자",links:r,role:e})})]}),s.jsx("div",{className:"p-3 border-t border-edge",children:s.jsx(c6,{})}),s.jsx("div",{className:"px-4 pb-4 text-[11px] text-slate-500",children:"Ollama 온프레미스 · WMS·MES·QMS 통합"})]})}function VT(e,t){return function(){return e.apply(t,arguments)}}const{toString:S6}=Object.prototype,{getPrototypeOf:fm}=Object,{iterator:dm,toStringTag:WT}=Symbol,hm=(e=>t=>{const n=S6.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kr=e=>(e=e.toLowerCase(),t=>hm(t)===e),pm=e=>t=>typeof t===e,{isArray:Ts}=Array,io=pm("undefined");function Wo(e){return e!==null&&!io(e)&&e.constructor!==null&&!io(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const XT=kr("ArrayBuffer");function w6(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&XT(e.buffer),t}const N6=pm("string"),gn=pm("function"),QT=pm("number"),Of=e=>e!==null&&typeof e=="object",O6=e=>e===!0||e===!1,Yd=e=>{if(hm(e)!=="object")return!1;const t=fm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(WT in e)&&!(dm in e)},A6=e=>{if(!Of(e)||Wo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},C6=kr("Date"),E6=kr("File"),_6=e=>!!(e&&typeof e.uri<"u"),T6=e=>e&&typeof e.getParts<"u",k6=kr("Blob"),M6=kr("FileList"),P6=e=>Of(e)&&gn(e.pipe);function $6(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const cw=$6(),uw=typeof cw.FormData<"u"?cw.FormData:void 0,R6=e=>{if(!e)return!1;if(uw&&e instanceof uw)return!0;const t=fm(e);if(!t||t===Object.prototype||!gn(e.append))return!1;const n=hm(e);return n==="formdata"||n==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"},D6=kr("URLSearchParams"),[L6,z6,I6,B6]=["ReadableStream","Request","Response","Headers"].map(kr),U6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Af(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Ts(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Wo(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let o;for(r=0;r<l;r++)o=i[r],t.call(null,e[o],o,e)}}function ZT(e,t){if(Wo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,JT=e=>!io(e)&&e!==ns;function Gg(...e){const{caseless:t,skipUndefined:n}=JT(this)&&this||{},r={},a=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=t&&typeof l=="string"&&ZT(r,l)||l,c=Kg(r,o)?r[o]:void 0;Yd(c)&&Yd(i)?r[o]=Gg(c,i):Yd(i)?r[o]=Gg({},i):Ts(i)?r[o]=i.slice():(!n||!io(i))&&(r[o]=i)};for(let i=0,l=e.length;i<l;i++){const o=e[i];if(!o||Wo(o)||(Af(o,a),typeof o!="object"||Ts(o)))continue;const c=Object.getOwnPropertySymbols(o);for(let u=0;u<c.length;u++){const f=c[u];J6.call(o,f)&&a(o[f],f)}}return r}const q6=(e,t,n,{allOwnKeys:r}={})=>(Af(t,(a,i)=>{n&&gn(a)?Object.defineProperty(e,i,{__proto__:null,value:VT(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),H6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F6=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},G6=(e,t,n,r)=>{let a,i,l;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!r||r(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=n!==!1&&fm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},K6=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Y6=e=>{if(!e)return null;if(Ts(e))return e;let t=e.length;if(!QT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},V6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fm(Uint8Array)),W6=(e,t)=>{const r=(e&&e[dm]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},X6=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Q6=kr("HTMLFormElement"),Z6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Kg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:J6}=Object.prototype,ez=kr("RegExp"),ek=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Af(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},tz=e=>{ek(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(gn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nz=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Ts(e)?r(e):r(String(e).split(t)),n},rz=()=>{},az=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function iz(e){return!!(e&&gn(e.append)&&e[WT]==="FormData"&&e[dm])}const sz=e=>{const t=new WeakSet,n=r=>{if(Of(r)){if(t.has(r))return;if(Wo(r))return r;if(!("toJSON"in r)){t.add(r);const a=Ts(r)?[]:{};return Af(r,(i,l)=>{const o=n(i);!io(o)&&(a[l]=o)}),t.delete(r),a}}return r};return n(e)},lz=kr("AsyncFunction"),oz=e=>e&&(Of(e)||gn(e))&&gn(e.then)&&gn(e.catch),tk=((e,t)=>e?setImmediate:t?((n,r)=>(ns.addEventListener("message",({source:a,data:i})=>{a===ns&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(ns.postMessage)),cz=typeof queueMicrotask<"u"?queueMicrotask.bind(ns):typeof process<"u"&&process.nextTick||tk,uz=e=>e!=null&&gn(e[dm]),D={isArray:Ts,isArrayBuffer:XT,isBuffer:Wo,isFormData:R6,isArrayBufferView:w6,isString:N6,isNumber:QT,isBoolean:O6,isObject:Of,isPlainObject:Yd,isEmptyObject:A6,isReadableStream:L6,isRequest:z6,isResponse:I6,isHeaders:B6,isUndefined:io,isDate:C6,isFile:E6,isReactNativeBlob:_6,isReactNative:T6,isBlob:k6,isRegExp:ez,isFunction:gn,isStream:P6,isURLSearchParams:D6,isTypedArray:V6,isFileList:M6,forEach:Af,merge:Gg,extend:q6,trim:U6,stripBOM:H6,inherits:F6,toFlatObject:G6,kindOf:hm,kindOfTest:kr,endsWith:K6,toArray:Y6,forEachEntry:W6,matchAll:X6,isHTMLForm:Q6,hasOwnProperty:Kg,hasOwnProp:Kg,reduceDescriptors:ek,freezeMethods:tz,toObjectSet:nz,toCamelCase:Z6,noop:rz,toFiniteNumber:az,findKey:ZT,global:ns,isContextDefined:JT,isSpecCompliantForm:iz,toJSONObject:sz,isAsyncFn:lz,isThenable:oz,setImmediate:tk,asap:cz,isIterable:uz},fz=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dz=e=>{const t={};let n,r,a;return e&&e.split(`
`).forEach(function(l){a=l.indexOf(":"),n=l.substring(0,a).trim().toLowerCase(),r=l.substring(a+1).trim(),!(!n||t[n]&&fz[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function hz(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const pz=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),mz=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Y0(e,t){return D.isArray(e)?e.map(n=>Y0(n,t)):hz(String(e).replace(t,""))}const yz=e=>Y0(e,pz),vz=e=>Y0(e,mz);function nk(e){const t=Object.create(null);return D.forEach(e.toJSON(),(n,r)=>{t[r]=vz(n)}),t}const fw=Symbol("internals");function gc(e){return e&&String(e).trim().toLowerCase()}function Vd(e){return e===!1||e==null?e:D.isArray(e)?e.map(Vd):yz(String(e))}function gz(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const xz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ev(e,t,n,r,a){if(D.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function bz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function jz(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let on=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,c,u){const f=gc(c);if(!f)return;const d=D.findKey(a,f);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||c]=Vd(o))}const l=(o,c)=>D.forEach(o,(u,f)=>i(u,f,c));if(D.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(D.isString(t)&&(t=t.trim())&&!xz(t))l(dz(t),n);else if(D.isObject(t)&&D.isIterable(t)){let o={},c,u;for(const f of t){if(!D.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[u=f[0]]=(c=o[u])?D.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}l(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=gc(t),t){const r=D.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return gz(a);if(D.isFunction(n))return n.call(this,a,r);if(D.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=gc(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ev(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=gc(l),l){const o=D.findKey(r,l);o&&(!n||ev(r,r[o],o,n))&&(delete r[o],a=!0)}}return D.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ev(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return D.forEach(this,(a,i)=>{const l=D.findKey(r,i);if(l){n[l]=Vd(a),delete n[i];return}const o=t?bz(i):String(i).trim();o!==i&&delete n[i],n[o]=Vd(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[fw]=this[fw]={accessors:{}}).accessors,a=this.prototype;function i(l){const o=gc(l);r[o]||(jz(a,l),r[o]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}};on.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(on.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});D.freezeMethods(on);const Sz="[REDACTED ****]";function wz(e){if(D.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(D.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Nz(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||D.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof on&&(i=i.toJSON()),r.push(i);let l;if(D.isArray(i))l=[],i.forEach((o,c)=>{const u=a(o);D.isUndefined(u)||(l[c]=u)});else{if(!D.isPlainObject(i)&&wz(i))return r.pop(),i;l=Object.create(null);for(const[o,c]of Object.entries(i)){const u=n.has(o.toLowerCase())?Sz:a(c);D.isUndefined(u)||(l[o]=u)}}return r.pop(),l};return a(e)}let re=class rk extends Error{static from(t,n,r,a,i,l){const o=new rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),l&&Object.assign(o,l),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&D.hasOwnProp(t,"redact")?t.redact:void 0,r=D.isArray(n)&&n.length>0?Nz(t,n):D.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Oz=null;function Yg(e){return D.isPlainObject(e)||D.isArray(e)}function ak(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function tv(e,t,n){return e?e.concat(t).map(function(a,i){return a=ak(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function Az(e){return D.isArray(e)&&!e.some(Yg)}const Cz=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function mm(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!D.isUndefined(y[p])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,l=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,u=o&&D.isSpecCompliantForm(t);if(!D.isFunction(a))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(D.isDate(v))return v.toISOString();if(D.isBoolean(v))return v.toString();if(!u&&D.isBlob(v))throw new re("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(v)||D.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,p,y){let g=v;if(D.isReactNative(t)&&D.isReactNativeBlob(v))return t.append(tv(y,p,i),f(v)),!1;if(v&&!y&&typeof v=="object"){if(D.endsWith(p,"{}"))p=r?p:p.slice(0,-2),v=JSON.stringify(v);else if(D.isArray(v)&&Az(v)||(D.isFileList(v)||D.endsWith(p,"[]"))&&(g=D.toArray(v)))return p=ak(p),g.forEach(function(x,N){!(D.isUndefined(x)||x===null)&&t.append(l===!0?tv([p],N,i):l===null?p:p+"[]",f(x))}),!1}return Yg(v)?!0:(t.append(tv(y,p,i),f(v)),!1)}const h=[],m=Object.assign(Cz,{defaultVisitor:d,convertValue:f,isVisitable:Yg});function j(v,p,y=0){if(!D.isUndefined(v)){if(y>c)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+c,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(v)!==-1)throw new Error("Circular reference detected in "+p.join("."));h.push(v),D.forEach(v,function(b,x){(!(D.isUndefined(b)||b===null)&&a.call(t,b,D.isString(x)?x.trim():x,p,m))===!0&&j(b,p?p.concat(x):[x],y+1)}),h.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return j(e),t}function dw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function V0(e,t){this._pairs=[],e&&mm(e,this,t)}const ik=V0.prototype;ik.append=function(t,n){this._pairs.push([t,n])};ik.toString=function(t){const n=t?function(r){return t.call(this,r,dw)}:dw;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function Ez(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sk(e,t,n){if(!t)return e;const r=n&&n.encode||Ez,a=D.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let l;if(i?l=i(t,a):l=D.isURLSearchParams(t)?t.toString():new V0(t,a).toString(r),l){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class hw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(r){r!==null&&t(r)})}}const W0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},_z=typeof URLSearchParams<"u"?URLSearchParams:V0,Tz=typeof FormData<"u"?FormData:null,kz=typeof Blob<"u"?Blob:null,Mz={isBrowser:!0,classes:{URLSearchParams:_z,FormData:Tz,Blob:kz},protocols:["http","https","file","blob","url","data"]},X0=typeof window<"u"&&typeof document<"u",Vg=typeof navigator=="object"&&navigator||void 0,Pz=X0&&(!Vg||["ReactNative","NativeScript","NS"].indexOf(Vg.product)<0),$z=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rz=X0&&window.location.href||"http://localhost",Dz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:X0,hasStandardBrowserEnv:Pz,hasStandardBrowserWebWorkerEnv:$z,navigator:Vg,origin:Rz},Symbol.toStringTag,{value:"Module"})),Kt={...Dz,...Mz};function Lz(e,t){return mm(e,new Kt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Kt.isNode&&D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function zz(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Iz(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function lk(e){function t(n,r,a,i){let l=n[i++];if(l==="__proto__")return!0;const o=Number.isFinite(+l),c=i>=n.length;return l=!l&&D.isArray(a)?a.length:l,c?(D.hasOwnProp(a,l)?a[l]=D.isArray(a[l])?a[l].concat(r):[a[l],r]:a[l]=r,!o):((!D.hasOwnProp(a,l)||!D.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&D.isArray(a[l])&&(a[l]=Iz(a[l])),!o)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(r,a)=>{t(zz(r),a,n,0)}),n}return null}const Qs=(e,t)=>e!=null&&D.hasOwnProp(e,t)?e[t]:void 0;function Bz(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cf={transitional:W0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return a?JSON.stringify(lk(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const c=Qs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lz(t,c).toString();if((o=D.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Qs(this,"env"),f=u&&u.FormData;return mm(o?{"files[]":t}:t,f&&new f,c)}}return i||a?(n.setContentType("application/json",!1),Bz(t)):t}],transformResponse:[function(t){const n=Qs(this,"transitional")||Cf.transitional,r=n&&n.forcedJSONParsing,a=Qs(this,"responseType"),i=a==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Qs(this,"parseReviver"))}catch(c){if(o)throw c.name==="SyntaxError"?re.from(c,re.ERR_BAD_RESPONSE,this,null,Qs(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch","query"],e=>{Cf.headers[e]={}});function nv(e,t){const n=this||Cf,r=t||n,a=on.from(r.headers);let i=r.data;return D.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function ok(e){return!!(e&&e.__CANCEL__)}let Ef=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ck(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function Uz(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function qz(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];l||(l=u),n[a]=c,r[a]=u;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-l<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Hz(e,t){let n=0,r=1e3/t,a,i;const l=(u,f=Date.now())=>{n=f,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const f=Date.now(),d=f-n;d>=r?l(u,f):(a=u,i||(i=setTimeout(()=>{i=null,l(a)},r-d)))},()=>a&&l(a)]}const Mh=(e,t,n=3)=>{let r=0;const a=qz(50,250);return Hz(i=>{if(!i||typeof i.loaded!="number")return;const l=i.loaded,o=i.lengthComputable?i.total:void 0,c=o!=null?Math.min(l,o):l,u=Math.max(0,c-r),f=a(u);r=Math.max(r,c);const d={loaded:c,total:o,progress:o?c/o:void 0,bytes:u,rate:f||void 0,estimated:f&&o?(o-c)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},pw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mw=e=>(...t)=>D.asap(()=>e(...t)),Fz=Kt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Kt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Kt.origin),Kt.navigator&&/(msie|trident)/i.test(Kt.navigator.userAgent)):()=>!0,Gz=Kt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];D.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),D.isString(r)&&o.push(`path=${r}`),D.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),D.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),a=r.indexOf("=");if(a!==-1&&r.slice(0,a)===e)return decodeURIComponent(r.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kz(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yz(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function uk(e,t,n){let r=!Kz(t);return e&&(r||n===!1)?Yz(e,t):t}const yw=e=>e instanceof on?{...e}:e;function ks(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,f,d,h){return D.isPlainObject(u)&&D.isPlainObject(f)?D.merge.call({caseless:h},u,f):D.isPlainObject(f)?D.merge({},f):D.isArray(f)?f.slice():f}function a(u,f,d,h){if(D.isUndefined(f)){if(!D.isUndefined(u))return r(void 0,u,d,h)}else return r(u,f,d,h)}function i(u,f){if(!D.isUndefined(f))return r(void 0,f)}function l(u,f){if(D.isUndefined(f)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function o(u,f,d){if(D.hasOwnProp(t,d))return r(u,f);if(D.hasOwnProp(e,d))return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:o,headers:(u,f,d)=>a(yw(u),yw(f),d,!0)};return D.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=D.hasOwnProp(c,f)?c[f]:a,h=D.hasOwnProp(e,f)?e[f]:void 0,m=D.hasOwnProp(t,f)?t[f]:void 0,j=d(h,m,f);D.isUndefined(j)&&d!==o||(n[f]=j)}),n}const Vz=["content-type","content-length"];function Wz(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{Vz.includes(r.toLowerCase())&&e.set(r,a)})}const Xz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function fk(e){const t=ks({},e),n=h=>D.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let o=n("headers");const c=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=on.from(o),t.url=sk(uk(u,d,f),n("params"),n("paramsSerializer")),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?Xz(c.password):""))),D.isFormData(r)&&(Kt.hasStandardBrowserEnv||Kt.hasStandardBrowserWebWorkerEnv||D.isReactNative(r)?o.setContentType(void 0):D.isFunction(r.getHeaders)&&Wz(o,r.getHeaders(),n("formDataHeaderPolicy"))),Kt.hasStandardBrowserEnv&&(D.isFunction(a)&&(a=a(t)),a===!0||a==null&&Fz(t.url))){const m=i&&l&&Gz.read(l);m&&o.set(i,m)}return t}const Qz=typeof XMLHttpRequest<"u",Zz=Qz&&function(e){return new Promise(function(n,r){const a=fk(e);let i=a.data;const l=on.from(a.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:u}=a,f,d,h,m,j;function v(){m&&m(),j&&j(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout;function y(){if(!p)return;const b=on.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:e,request:p};ck(function(O){n(O),v()},function(O){r(O),v()},N),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.startsWith("file:"))||setTimeout(y)},p.onabort=function(){p&&(r(new re("Request aborted",re.ECONNABORTED,e,p)),v(),p=null)},p.onerror=function(x){const N=x&&x.message?x.message:"Network Error",w=new re(N,re.ERR_NETWORK,e,p);w.event=x||null,r(w),v(),p=null},p.ontimeout=function(){let x=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const N=a.transitional||W0;a.timeoutErrorMessage&&(x=a.timeoutErrorMessage),r(new re(x,N.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,p)),v(),p=null},i===void 0&&l.setContentType(null),"setRequestHeader"in p&&D.forEach(nk(l),function(x,N){p.setRequestHeader(N,x)}),D.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),o&&o!=="json"&&(p.responseType=a.responseType),u&&([h,j]=Mh(u,!0),p.addEventListener("progress",h)),c&&p.upload&&([d,m]=Mh(c),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(f=b=>{p&&(r(!b||b.type?new Ef(null,e,p):b),p.abort(),v(),p=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const g=Uz(a.url);if(g&&!Kt.protocols.includes(g)){r(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Jz=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(c){if(!r){r=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof re?u:new Ef(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>D.asap(l),o},eI=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},tI=async function*(e,t){for await(const n of nI(e))yield*eI(n,t)},nI=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},vw=(e,t,n,r)=>{const a=tI(e,t);let i=0,l,o=c=>{l||(l=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await a.next();if(u){o(),c.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw o(u),u}},cancel(c){return o(c),a.return()}},{highWaterMark:2})};function rI(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let l=r.length;const o=r.length;for(let m=0;m<o;m++)if(r.charCodeAt(m)===37&&m+2<o){const j=r.charCodeAt(m+1),v=r.charCodeAt(m+2);(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(l-=2,m+=2)}let c=0,u=o-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);u>=0&&(r.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(l/4)*3-(c||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let l=0,o=r.length;l<o;l++){const c=r.charCodeAt(l);if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&l+1<o){const u=r.charCodeAt(l+1);u>=56320&&u<=57343?(i+=4,l++):i+=3}else i+=3}return i}const Q0="1.17.0",gw=64*1024,{isFunction:sd}=D,aI=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),xw=e=>{if(!D.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},bw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},iI=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},sI=e=>{const t=D.global!==void 0&&D.global!==null?D.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=D.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:l}=e,o=a?sd(a):typeof fetch=="function",c=sd(i),u=sd(l);if(!o)return!1;const f=o&&sd(n),d=o&&(typeof r=="function"?(y=>g=>y.encode(g))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=c&&f&&bw(()=>{let y=!1;const g=new i(Kt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),b=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),y&&!b}),m=u&&f&&bw(()=>D.isReadableStream(new l("").body)),j={stream:m&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!j[y]&&(j[y]=(g,b)=>{let x=g&&g[y];if(x)return x.call(g);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,b)})});const v=async y=>{if(y==null)return 0;if(D.isBlob(y))return y.size;if(D.isSpecCompliantForm(y))return(await new i(Kt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(D.isArrayBufferView(y)||D.isArrayBuffer(y))return y.byteLength;if(D.isURLSearchParams(y)&&(y=y+""),D.isString(y))return(await d(y)).byteLength},p=async(y,g)=>{const b=D.toFiniteNumber(y.getContentLength());return b??v(g)};return async y=>{let{url:g,method:b,data:x,signal:N,cancelToken:w,timeout:O,onDownloadProgress:A,onUploadProgress:E,responseType:M,headers:$,withCredentials:k="same-origin",fetchOptions:I,maxContentLength:_,maxBodyLength:C}=fk(y);const P=D.isNumber(_)&&_>-1,z=D.isNumber(C)&&C>-1,B=ie=>D.hasOwnProp(y,ie)?y[ie]:void 0;let K=a||fetch;M=M?(M+"").toLowerCase():"text";let V=Jz([N,w&&w.toAbortSignal()],O),X=null;const Z=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ne;try{let ie;const je=B("auth");if(je){const W=je.username||"",G=je.password||"";ie={username:W,password:G}}if(iI(g)){const W=new URL(g,Kt.origin);if(!ie&&(W.username||W.password)){const G=xw(W.username),Re=xw(W.password);ie={username:G,password:Re}}(W.username||W.password)&&(W.username="",W.password="",g=W.href)}if(ie&&($.delete("authorization"),$.set("Authorization","Basic "+btoa(aI((ie.username||"")+":"+(ie.password||""))))),P&&typeof g=="string"&&g.startsWith("data:")&&rI(g)>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,X);if(z&&b!=="get"&&b!=="head"){const W=await p($,x);if(typeof W=="number"&&isFinite(W)&&W>C)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,X)}if(E&&h&&b!=="get"&&b!=="head"&&(ne=await p($,x))!==0){let W=new i(g,{method:"POST",body:x,duplex:"half"}),G;if(D.isFormData(x)&&(G=W.headers.get("content-type"))&&$.setContentType(G),W.body){const[Re,be]=pw(ne,Mh(mw(E)));x=vw(W.body,gw,Re,be)}}D.isString(k)||(k=k?"include":"omit");const ye=c&&"credentials"in i.prototype;if(D.isFormData(x)){const W=$.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&$.delete("content-type")}$.set("User-Agent","axios/"+Q0,!1);const ft={...I,signal:V,method:b.toUpperCase(),headers:nk($.normalize()),body:x,duplex:"half",credentials:ye?k:void 0};X=c&&new i(g,ft);let _e=await(c?K(X,I):K(g,ft));if(P){const W=D.toFiniteNumber(_e.headers.get("content-length"));if(W!=null&&W>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,X)}const J=m&&(M==="stream"||M==="response");if(m&&_e.body&&(A||P||J&&Z)){const W={};["status","statusText","headers"].forEach(jt=>{W[jt]=_e[jt]});const G=D.toFiniteNumber(_e.headers.get("content-length")),[Re,be]=A&&pw(G,Mh(mw(A),!0))||[];let dt=0;const vt=jt=>{if(P&&(dt=jt,dt>_))throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,X);Re&&Re(jt)};_e=new l(vw(_e.body,gw,vt,()=>{be&&be(),Z&&Z()}),W)}M=M||"text";let se=await j[D.findKey(j,M)||"text"](_e,y);if(P&&!m&&!J){let W;if(se!=null&&(typeof se.byteLength=="number"?W=se.byteLength:typeof se.size=="number"?W=se.size:typeof se=="string"&&(W=typeof r=="function"?new r().encode(se).byteLength:se.length)),typeof W=="number"&&W>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,X)}return!J&&Z&&Z(),await new Promise((W,G)=>{ck(W,G,{data:se,headers:on.from(_e.headers),status:_e.status,statusText:_e.statusText,config:y,request:X})})}catch(ie){if(Z&&Z(),V&&V.aborted&&V.reason instanceof re){const je=V.reason;throw je.config=y,X&&(je.request=X),ie!==je&&(je.cause=ie),je}throw ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,X,ie&&ie.response),{cause:ie.cause||ie}):re.from(ie,ie&&ie.code,y,X,ie&&ie.response)}}},lI=new Map,dk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,o=l,c,u,f=lI;for(;o--;)c=i[o],u=f.get(c),u===void 0&&f.set(c,u=o?new Map:sI(t)),f=u;return u};dk();const Z0={http:Oz,xhr:Zz,fetch:{get:dk}};D.forEach(Z0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const jw=e=>`- ${e}`,oI=e=>D.isFunction(e)||e===null||e===!1;function cI(e,t){e=D.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l<n;l++){r=e[l];let o;if(a=r,!oI(r)&&(a=Z0[(o=String(r)).toLowerCase()],a===void 0))throw new re(`Unknown adapter '${o}'`);if(a&&(D.isFunction(a)||(a=a.get(t))))break;i[o||"#"+l]=a}if(!a){const l=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=n?l.length>1?`since :
`+l.map(jw).join(`
`):" "+jw(l[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const hk={getAdapter:cI,adapters:Z0};function rv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ef(null,e)}function Sw(e){return rv(e),e.headers=on.from(e.headers),e.data=nv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hk.getAdapter(e.adapter||Cf.adapter,e)(e).then(function(r){rv(e),e.response=r;try{r.data=nv.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=on.from(r.headers),r},function(r){if(!ok(r)&&(rv(e),r&&r.response)){e.response=r.response;try{r.response.data=nv.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=on.from(r.response.headers)}return Promise.reject(r)})}const ym={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ym[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ww={};ym.transitional=function(t,n,r){function a(i,l){return"[Axios v"+Q0+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,o)=>{if(t===!1)throw new re(a(l," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!ww[l]&&(ww[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,o):!0}};ym.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function uI(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(l){const o=e[i],c=o===void 0||l(o,i,e);if(c!==!0)throw new re("option "+i+" must be "+c,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const Wd={assertOptions:uI,validators:ym},hn=Wd.validators;let js=class{constructor(t){this.defaults=t||{},this.interceptors={request:new hw,response:new hw}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const l=a.stack.indexOf(`
`);return l===-1?"":a.stack.slice(l+1)})();try{if(!r.stack)r.stack=i;else if(i){const l=i.indexOf(`
`),o=l===-1?-1:i.indexOf(`
`,l+1),c=o===-1?"":i.slice(o+1);String(r.stack).endsWith(c)||(r.stack+=`
`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ks(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Wd.assertOptions(r,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean),legacyInterceptorReqResOrdering:hn.transitional(hn.boolean),advertiseZstdAcceptEncoding:hn.transitional(hn.boolean)},!1),a!=null&&(D.isFunction(a)?n.paramsSerializer={serialize:a}:Wd.assertOptions(a,{encode:hn.function,serialize:hn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wd.assertOptions(n,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","query","common"],j=>{delete i[j]}),n.headers=on.concat(l,i);const o=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;const p=n.transitional||W0;p&&p.legacyInterceptorReqResOrdering?o.unshift(v.fulfilled,v.rejected):o.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let f,d=0,h;if(!c){const j=[Sw.bind(this),void 0];for(j.unshift(...o),j.push(...u),h=j.length,f=Promise.resolve(n);d<h;)f=f.then(j[d++],j[d++]);return f}h=o.length;let m=n;for(;d<h;){const j=o[d++],v=o[d++];try{m=j(m)}catch(p){v.call(this,p);break}}try{f=Sw.call(this,m)}catch(j){return Promise.reject(j)}for(d=0,h=u.length;d<h;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=ks(this.defaults,t);const n=uk(t.baseURL,t.url,t.allowAbsoluteUrls);return sk(n,t.params,t.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(t){js.prototype[t]=function(n,r){return this.request(ks(r||{},{method:t,url:n,data:(r||{}).data}))}});D.forEach(["post","put","patch","query"],function(t){function n(r){return function(i,l,o){return this.request(ks(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}js.prototype[t]=n(),t!=="query"&&(js.prototype[t+"Form"]=n(!0))});let fI=class pk{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(o=>{r.subscribe(o),i=o}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,o){r.reason||(r.reason=new Ef(i,l,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pk(function(a){t=a}),cancel:t}}};function dI(e){return function(n){return e.apply(null,n)}}function hI(e){return D.isObject(e)&&e.isAxiosError===!0}const Wg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Wg).forEach(([e,t])=>{Wg[t]=e});function mk(e){const t=new js(e),n=VT(js.prototype.request,t);return D.extend(n,js.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return mk(ks(e,a))},n}const bt=mk(Cf);bt.Axios=js;bt.CanceledError=Ef;bt.CancelToken=fI;bt.isCancel=ok;bt.VERSION=Q0;bt.toFormData=mm;bt.AxiosError=re;bt.Cancel=bt.CanceledError;bt.all=function(t){return Promise.all(t)};bt.spread=dI;bt.isAxiosError=hI;bt.mergeConfig=ks;bt.AxiosHeaders=on;bt.formToJSON=e=>lk(D.isHTMLForm(e)?new FormData(e):e);bt.getAdapter=hk.getAdapter;bt.HttpStatusCode=Wg;bt.default=bt;const{Axios:_ve,AxiosError:Tve,CanceledError:kve,isCancel:Mve,CancelToken:Pve,VERSION:$ve,all:Rve,Cancel:Dve,isAxiosError:Lve,spread:zve,toFormData:Ive,AxiosHeaders:Bve,HttpStatusCode:Uve,formToJSON:qve,getAdapter:Hve,mergeConfig:Fve,create:Gve}=bt,R=bt.create({baseURL:"http://localhost:8013"});R.interceptors.request.use(e=>{const t=localStorage.getItem("mes_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});R.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("mes_token"),location.pathname!=="/login"&&(location.href="/login")),Promise.reject(e)});const U=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),ct=e=>{const t=new URLSearchParams;Object.entries(e).forEach(([r,a])=>{a!=null&&a!==""&&t.set(r,String(a))});const n=t.toString();return n?`?${n}`:""},pI=(e,t)=>R.post("/api/mes/auth/login",{username:e,password:t}),J0=()=>R.get("/api/mes/auth/me"),mI=()=>R.post("/api/mes/auth/otp/setup"),yI=e=>R.post("/api/mes/auth/otp/confirm",{code:e}),vI=()=>R.post("/api/mes/auth/otp/disable"),gI=(e,t)=>R.post("/api/mes/auth/change-password",{currentPassword:e,newPassword:t}),xI=()=>U(R.get("/api/mes/dashboard/summary")),bI=()=>U(R.get("/api/mes/dashboard/workorder-status")),jI=()=>U(R.get("/api/mes/dashboard/shipping-status")),SI=()=>U(R.get("/api/mes/dashboard/equipment-status")),wI=(e={})=>U(R.get(`/api/mes/jobs${ct(e)}`)),NI=()=>U(R.get("/api/mes/jobs/board")),OI=()=>U(R.get("/api/mes/jobs/workload")),AI=e=>U(R.post("/api/mes/jobs",e)),CI=(e,t)=>U(R.put(`/api/mes/jobs/${e}`,t)),EI=(e,t)=>U(R.post(`/api/mes/jobs/${e}/assign`,t)),_I=(e,t)=>U(R.post(`/api/mes/jobs/${e}/transition`,{action:t})),TI=(e,t)=>U(R.post(`/api/mes/jobs/${e}/report`,{qty:t})),kI=e=>R.delete(`/api/mes/jobs/${e}`),yk=()=>U(R.get("/api/mes/progress/summary")),MI=(e="")=>U(R.get(`/api/mes/progress/workorders${e?`?status=${e}`:""}`)),PI=()=>U(R.get("/api/mes/progress/live")),$I=(e=30)=>U(R.get(`/api/mes/progress/plan-vs-actual?days=${e}`)),RI=()=>U(R.get("/api/mes/progress/delays")),DI=(e={})=>U(R.get(`/api/mes/shipping${ct(e)}`)),LI=()=>U(R.get("/api/mes/shipping/board")),zI=e=>U(R.get(`/api/mes/shipping/${e}`)),II=e=>U(R.post("/api/mes/shipping",e)),BI=(e,t)=>U(R.put(`/api/mes/shipping/${e}`,t)),UI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/pick`,{qty:t})),qI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/pack`,{qty:t})),HI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/inspect`,{result:t})),FI=e=>U(R.post(`/api/mes/shipping/${e}/ship`)),GI=e=>U(R.post(`/api/mes/shipping/${e}/cancel`)),vm=(e={})=>U(R.get(`/api/mes/workorders${ct(e)}`)),KI=()=>U(R.get("/api/mes/workorders/kanban")),YI=e=>U(R.post("/api/mes/workorders",e)),VI=(e,t)=>U(R.put(`/api/mes/workorders/${e}`,t)),WI=(e,t)=>U(R.post(`/api/mes/workorders/${e}/transition`,{action:t})),XI=e=>R.delete(`/api/mes/workorders/${e}`),QI=(e={})=>U(R.get(`/api/mes/production${ct(e)}`)),ZI=(e=14)=>U(R.get(`/api/mes/production/daily-output?days=${e}`)),JI=(e=30)=>U(R.get(`/api/mes/production/defect-pareto?days=${e}`)),e8=e=>U(R.post("/api/mes/production/report",e)),t8=e=>U(R.get(`/api/mes/process/workorder/${e}`)),n8=()=>U(R.get("/api/mes/process/running")),r8=(e,t)=>U(R.put(`/api/mes/process/${e}/status`,{status:t})),a8=(e={})=>U(R.get(`/api/mes/oee${ct(e)}`)),i8=e=>U(R.post("/api/mes/oee",e)),s8=(e=30)=>U(R.get(`/api/mes/oee/downtime-pareto?days=${e}`)),l8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/history`)),o8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/forward`)),c8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/backward`)),u8=(e={})=>U(R.get(`/api/mes/plans${ct(e)}`)),f8=e=>U(R.post("/api/mes/plans",e)),d8=(e,t)=>U(R.put(`/api/mes/plans/${e}`,t)),h8=(e,t)=>U(R.post(`/api/mes/plans/${e}/transition`,{action:t})),p8=e=>R.delete(`/api/mes/plans/${e}`),m8=(e={})=>U(R.get(`/api/mes/receiving${ct(e)}`)),y8=e=>U(R.post("/api/mes/receiving",e)),v8=(e,t)=>U(R.post(`/api/mes/receiving/${e}/accept`,{inspectionResult:t})),g8=(e,t)=>U(R.post(`/api/mes/receiving/${e}/reject`,{reason:t})),x8=(e={})=>U(R.get(`/api/mes/inventory${ct(e)}`)),b8=()=>U(R.get("/api/mes/inventory/below-safety")),j8=(e={})=>U(R.get(`/api/mes/inventory/txns${ct(e)}`)),S8=e=>U(R.post("/api/mes/inventory/transfer",e)),w8=(e={})=>U(R.get(`/api/mes/stocktake${ct(e)}`)),N8=e=>U(R.post("/api/mes/stocktake/count",e)),O8=e=>U(R.post(`/api/mes/stocktake/${e}/adjust`)),A8=(e={})=>U(R.get(`/api/mes/lotserial${ct(e)}`)),C8=(e=30)=>U(R.get(`/api/mes/lotserial/expiring?days=${e}`)),E8=e=>U(R.post("/api/mes/lotserial",e)),_8=(e,t)=>U(R.put(`/api/mes/lotserial/${e}/status`,{status:t})),T8=(e={})=>U(R.get(`/api/mes/inspections${ct(e)}`)),k8=(e=30)=>U(R.get(`/api/mes/inspections/pass-rate?days=${e}`)),M8=e=>U(R.post("/api/mes/inspections",e)),P8=(e,t)=>U(R.post(`/api/mes/inspections/${e}/judge`,t)),$8=(e,t)=>U(R.post(`/api/mes/inspections/${e}/result`,t)),R8=(e={})=>U(R.get(`/api/mes/specs${ct(e)}`)),D8=e=>U(R.post("/api/mes/specs",e)),L8=(e,t)=>U(R.put(`/api/mes/specs/${e}`,t)),z8=e=>R.delete(`/api/mes/specs/${e}`),I8=(e={})=>U(R.get(`/api/mes/ncr${ct(e)}`)),B8=()=>U(R.get("/api/mes/ncr/board")),U8=e=>U(R.post("/api/mes/ncr",e)),q8=(e,t)=>U(R.post(`/api/mes/ncr/${e}/disposition`,{disposition:t})),H8=(e,t)=>U(R.post(`/api/mes/ncr/${e}/transition`,{status:t})),F8=(e={})=>U(R.get(`/api/mes/capa${ct(e)}`)),G8=e=>U(R.post("/api/mes/capa",e)),K8=(e,t)=>U(R.put(`/api/mes/capa/${e}`,t)),Y8=(e,t)=>U(R.post(`/api/mes/capa/${e}/transition`,t)),V8=()=>U(R.get("/api/mes/spc/charts")),W8=(e={})=>U(R.get(`/api/mes/spc/samples${ct(e)}`)),X8=e=>U(R.get(`/api/mes/spc/chart${ct(e)}`)),Q8=e=>U(R.post("/api/mes/spc/samples",e)),Z8=(e={})=>U(R.get(`/api/mes/certificates${ct(e)}`)),J8=e=>U(R.get(`/api/mes/certificates/${e}`)),eB=e=>U(R.post("/api/mes/certificates",e)),Jt=(e={})=>U(R.get(`/api/mes/items${ct(e)}`)),tB=e=>U(R.post("/api/mes/items",e)),nB=(e,t)=>U(R.put(`/api/mes/items/${e}`,t)),rB=e=>R.delete(`/api/mes/items/${e}`),aB=(e={})=>U(R.get(`/api/mes/bom${ct(e)}`)),iB=()=>U(R.get("/api/mes/bom/all")),sB=e=>U(R.post("/api/mes/bom",e)),lB=(e,t)=>U(R.put(`/api/mes/bom/${e}`,t)),oB=e=>R.delete(`/api/mes/bom/${e}`),cB=(e="")=>U(R.get(`/api/mes/routings${e?`?itemCode=${encodeURIComponent(e)}`:""}`)),uB=e=>U(R.post("/api/mes/routings",e)),fB=(e,t)=>U(R.put(`/api/mes/routings/${e}`,t)),dB=e=>R.delete(`/api/mes/routings/${e}`),e1=(e={})=>U(R.get(`/api/mes/equipment${ct(e)}`)),hB=(e,t)=>U(R.put(`/api/mes/equipment/${e}/run-status`,{runStatus:t})),t1=(e={})=>U(R.get(`/api/mes/partners${ct(e)}`)),pB=e=>U(R.post("/api/mes/partners",e)),mB=(e,t)=>U(R.put(`/api/mes/partners/${e}`,t)),yB=e=>R.delete(`/api/mes/partners/${e}`),_f=()=>U(R.get("/api/mes/warehouses")),vB=e=>U(R.post("/api/mes/warehouses",e)),gB=(e,t)=>U(R.put(`/api/mes/warehouses/${e}`,t)),xB=e=>R.delete(`/api/mes/warehouses/${e}`),bB=e=>U(R.get(`/api/mes/warehouses/${encodeURIComponent(e)}/locations`)),jB=e=>U(R.post("/api/mes/warehouses/locations",e)),SB=e=>R.delete(`/api/mes/warehouses/locations/${e}`),vk=()=>U(R.get("/api/mes/members/workers")),wB=(e=30)=>U(R.get(`/api/mes/analytics/production-kpi?days=${e}`)),NB=(e=30)=>U(R.get(`/api/mes/analytics/quality-kpi?days=${e}`)),OB=()=>U(R.get("/api/mes/analytics/inventory-kpi")),gk=(e=14)=>U(R.get(`/api/mes/analytics/daily-production?days=${e}`)),AB=(e=30,t=10)=>U(R.get(`/api/mes/analytics/top-items?days=${e}&limit=${t}`)),xk=()=>U(R.get("/api/mes/ai/status")),CB=e=>U(R.post("/api/mes/ai/defect-root-cause",e)),EB=e=>U(R.post("/api/mes/ai/forecast",e)),_B=e=>U(R.post("/api/mes/ai/predictive-maintenance",e)),TB=e=>U(R.post("/api/mes/ai/spc-anomaly",e)),kB=e=>U(R.post("/api/mes/ai/parse-query",e)),MB=e=>U(R.post("/api/mes/ai/safety-stock",e)),PB=e=>U(R.post("/api/mes/ai/schedule-optimize",e)),$B=e=>U(R.post("/api/mes/rag/defect-analysis",e)),RB=e=>U(R.post("/api/mes/rag/predict-analysis",e)),DB=e=>U(R.post("/api/mes/rag/feedback",e)),LB=()=>U(R.get("/api/mes/rag/toggles")),zB=(e,t)=>U(R.put(`/api/mes/rag/toggles/${e}`,{value:t})),IB=e=>U(R.post("/api/ai/feedback",e)),BB=()=>R.get("/api/admin/users"),UB=e=>R.post("/api/admin/users",e),qB=(e,t)=>R.put(`/api/admin/users/${e}/role`,{role:t}),HB=(e,t)=>R.put(`/api/admin/users/${e}/active`,{active:t}),FB=(e,t)=>R.put(`/api/admin/users/${e}/password`,{password:t}),GB=e=>R.delete(`/api/admin/users/${e}`),KB=e=>R.post(`/api/admin/users/${e}/otp-reset`),YB=(e="",t="",n=200)=>R.get(`/api/admin/audit${ct({action:e,actor:t,limit:n})}`),VB=()=>R.get("/api/admin/settings"),WB=(e,t)=>R.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t});function XB(){const e=sm(),t=localStorage.getItem("mes_user")||"admin",n=localStorage.getItem("mes_role")||"",[r,a]=S.useState(null);S.useEffect(()=>{xk().then(l=>a(!!((l==null?void 0:l.ollamaAvailable)??(l==null?void 0:l.available)))).catch(()=>a(!1))},[]);const i=()=>{localStorage.removeItem("mes_token"),localStorage.removeItem("mes_role"),localStorage.removeItem("mes_user"),e("/login")};return s.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[s.jsx("div",{className:"text-sm text-slate-400",children:"AI 제조실행시스템 · WMS · MES · QMS · Ollama 온프레미스"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded-md border ${r?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${r?"bg-accent":"bg-slate-500"}`}),"AI ",r===null?"확인 중":r?"온라인":"폴백"]}),s.jsxs(jf,{to:"/mypage",className:"flex items-center gap-1.5 text-sm text-slate-300 hover:text-brand",title:"마이페이지",children:[s.jsx(RL,{size:18})," ",t,n&&s.jsxs("span",{className:"text-[11px] text-slate-500",children:["(",n,")"]})]}),s.jsxs("button",{onClick:i,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[s.jsx(KL,{size:16})," 로그아웃"]})]})]})}function QB(){const e=localStorage.getItem("mes_token");return S.useEffect(()=>{e&&J0().then(t=>{var r;const n=((r=t.data)==null?void 0:r.data)||{};n.role&&localStorage.setItem("mes_role",n.role),n.username&&localStorage.setItem("mes_user",n.username)}).catch(()=>{})},[e]),e?s.jsxs("div",{className:"flex h-screen bg-ink",children:[s.jsx(j6,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(XB,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsx(m5,{})})]})]}):s.jsx(lT,{to:"/login",replace:!0})}function Bn({min:e,children:t}){const[n,r]=S.useState(_i());return S.useEffect(()=>{const a=window.setInterval(()=>{const i=_i();r(l=>l===i?l:i)},500);return()=>window.clearInterval(a)},[]),_s(e,n)?s.jsx(s.Fragment,{children:t}):s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(e6,{size:48,className:"text-rose-400 mb-4"}),s.jsx("h2",{className:"text-lg font-bold mb-1",children:"접근 권한이 없습니다"}),s.jsxs("p",{className:"text-sm text-slate-400",children:["이 화면은 ",s.jsx("b",{className:"text-brand",children:e})," 이상 권한이 필요합니다. (현재: ",n,")"]})]})}const ZB=(e,t)=>R.post("/api/mes/auth/verify",{verifyToken:e,code:t}),JB=(e,t)=>R.post("/api/mes/auth/verify-otp",{verifyToken:e,code:t}),eU=e=>R.post("/api/mes/auth/signup",e),tU=e=>R.post("/api/mes/auth/find-id",e),nU=e=>R.post("/api/mes/auth/reset-password",e),rU=e=>R.post("/api/messages",e),aU=e=>R.get("/api/messages/sent",{params:e}),iU=e=>R.get(`/api/messages/sent/${e}`),sU=e=>R.get("/api/messages/received",{params:e}),lU=e=>R.get(`/api/messages/received/${e}`),oU=e=>R.get("/api/schedules",{params:e}),cU=e=>R.post("/api/schedules",e),uU=e=>R.get(`/api/schedules/${e}`),fU=e=>R.delete(`/api/schedules/${e}`),dU=e=>R.get("/api/worklogs",{params:e}),hU=e=>R.get("/api/worklogs/dashboard/progress",{params:e}),pU=e=>R.post("/api/worklogs",e),mU=e=>R.get(`/api/worklogs/${e}`),yU=e=>R.delete(`/api/worklogs/${e}`),vU=(e,t)=>R.post(`/api/worklogs/${e}/comments`,{cmtContent:t}),gU=e=>R.get("/api/stats/personal-work",{params:e}),xU=e=>R.get("/api/stats/company-work",{params:e}),bU=(e,t=0,n=100)=>R.get("/api/system/roles",{params:{...e?{keyword:e}:{},page:t,size:n}}),jU=e=>R.post("/api/system/roles",e),SU=(e,t)=>R.put(`/api/system/roles/${encodeURIComponent(e)}`,t),wU=e=>R.delete("/api/system/roles",{data:{ids:e}}),NU=(e=0,t=100)=>R.get("/api/system/role-menus",{params:{page:e,size:t}}),OU=e=>R.get(`/api/system/roles/${encodeURIComponent(e)}/menus`),AU=(e,t)=>R.put(`/api/system/roles/${encodeURIComponent(e)}/menus`,{menus:t}),CU=(e,t=0,n=100)=>R.get("/api/system/codes",{params:{...e?{keyword:e}:{},page:t,size:n}}),EU=e=>R.get(`/api/system/codes/${encodeURIComponent(e)}`),_U=e=>R.post("/api/system/codes",e),TU=(e,t)=>R.put(`/api/system/codes/${encodeURIComponent(e)}`,t),kU=e=>R.delete(`/api/system/codes/${encodeURIComponent(e)}`),MU=(e=0,t=200)=>R.get("/api/system/menus",{params:{page:e,size:t}}),PU=e=>R.get("/api/system/menus/search",{params:e?{keyword:e}:{}}),$U=e=>R.post("/api/system/menus",e),RU=(e,t)=>R.put(`/api/system/menus/${encodeURIComponent(e)}`,t),DU=e=>R.delete("/api/system/menus",{data:{ids:e}}),LU=(e,t=0,n=200)=>R.get("/api/system/depts",{params:{...e?{keyword:e}:{},page:t,size:n}}),zU=e=>R.post("/api/system/depts",e),IU=(e,t)=>R.put(`/api/system/depts/${encodeURIComponent(e)}`,t),BU=e=>R.delete(`/api/system/depts/${encodeURIComponent(e)}`),UU=(e,t=0,n=200)=>R.get("/api/system/companies",{params:{...e?{keyword:e}:{},page:t,size:n}}),qU=e=>R.post("/api/system/companies",e),HU=(e,t)=>R.put(`/api/system/companies/${encodeURIComponent(e)}`,t),FU=e=>R.delete("/api/system/companies",{data:{ids:e}});function GU(){const[e,t]=S.useState("admin"),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(!1),[c,u]=S.useState("login"),[f,d]=S.useState(""),[h,m]=S.useState("EMAIL"),[j,v]=S.useState(""),[p,y]=S.useState(""),[g,b]=S.useState(""),[x,N]=S.useState(""),w=sm(),O=h==="OTP"||h==="OTP_SETUP",A=h==="OTP_SETUP",[E,M]=S.useState(null),[$,k]=S.useState({username:"",password:"",displayName:"",email:""}),[I,_]=S.useState(!1),[C,P]=S.useState(""),[z,B]=S.useState(!1),K=ye=>{M(ye),k({username:"",password:"",displayName:"",email:""}),P(""),B(!1)},V=()=>{M(null),P(""),B(!1)},X=async ye=>{var ft,_e,J;ye.preventDefault(),_(!0),P(""),B(!1);try{let se;if(E==="signup"){se=await eU({username:$.username.trim(),password:$.password,displayName:$.displayName.trim()||void 0,email:$.email.trim()});const W=(ft=se.data)==null?void 0:ft.data;B(!(W!=null&&W.success)),P((W==null?void 0:W.message)||"처리되었습니다.")}else if(E==="find-id"){se=await tU({displayName:$.displayName.trim(),email:$.email.trim()});const W=(_e=se.data)==null?void 0:_e.data;W!=null&&W.found?(B(!1),P(`회원님의 아이디는 [${W.maskedUsername}] 입니다.`)):(B(!0),P("일치하는 계정을 찾을 수 없습니다. 이름과 이메일을 확인하세요."))}else if(E==="reset-password"){se=await nU({username:$.username.trim(),email:$.email.trim()});const W=(J=se.data)==null?void 0:J.data;B(!(W!=null&&W.success)),P((W==null?void 0:W.message)||"요청이 처리되었습니다.")}}catch{B(!0),P("요청 처리 중 오류가 발생했습니다. 잠시 후 다시 시도하세요.")}finally{_(!1)}},Z=E==="signup"?"회원가입(승인 대기)":E==="find-id"?"아이디 찾기":"비밀번호 초기화",ne=async ye=>{var ft;if(!ye)throw new Error("no token");localStorage.setItem("mes_token",ye);try{const J=((ft=(await J0()).data)==null?void 0:ft.data)||{};J.role&&localStorage.setItem("mes_role",J.role),J.username&&localStorage.setItem("mes_user",J.username)}catch{}w("/dashboard")},ie=async ye=>{var ft;ye.preventDefault(),i(""),o(!0);try{const J=((ft=(await pI(e,n)).data)==null?void 0:ft.data)||{};if(J.twofa==="true"){d(J.verifyToken),m(J.verifyMethod||"EMAIL"),v(J.maskedEmail||""),y(J.qrImage||""),b(J.secret||""),N(""),u("verify");return}await ne(J.token)}catch{i("로그인 실패 — 아이디/비밀번호를 확인하세요.")}finally{o(!1)}},je=async ye=>{var ft,_e;ye.preventDefault(),i(""),o(!0);try{const J=O?await JB(f,x.trim()):await ZB(f,x.trim());await ne((_e=(ft=J.data)==null?void 0:ft.data)==null?void 0:_e.token)}catch{i("인증 코드가 올바르지 않거나 만료되었습니다.")}finally{o(!1)}};return s.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-ink",children:[s.jsxs("form",{onSubmit:c==="login"?ie:je,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[s.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[s.jsx(Vr,{className:"text-brand",size:32}),s.jsx("span",{className:"text-xl font-bold",children:"GUARDiA MES"})]}),s.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:"AI 제조실행시스템 · WMS · MES · QMS"}),c==="login"?s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),s.jsx("input",{value:e,onChange:ye=>t(ye.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호"}),s.jsx("input",{type:"password",value:n,onChange:ye=>r(ye.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 justify-center mb-3",children:[s.jsx(Vo,{size:18,className:"text-brand"}),s.jsx("span",{className:"text-sm font-semibold",children:"2차 인증"})]}),O?A?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-center text-xs text-slate-400 mb-3",children:"최초 로그인입니다. 아래 QR을 Authenticator 앱(Google·Microsoft)으로 스캔해 등록한 뒤 6자리 코드를 입력하세요."}),p&&s.jsx("div",{className:"flex justify-center mb-3",children:s.jsx("img",{src:p,alt:"OTP QR",width:180,height:180,style:{background:"#fff",padding:8,borderRadius:8}})}),g&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"QR 스캔이 안 되면 수동 입력 키"}),s.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:g})]})]}):s.jsx("p",{className:"text-center text-xs text-slate-400 mb-4",children:"Authenticator 앱에 표시된 6자리 코드를 입력하세요."}):s.jsxs("p",{className:"text-center text-xs text-slate-400 mb-4",children:["이메일로 발송된 6자리 인증 코드를 입력하세요",j?` (${j})`:"","."]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"인증 코드"}),s.jsx("input",{value:x,onChange:ye=>N(ye.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,autoFocus:!0,placeholder:"000000",className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none tracking-[0.4em] text-center"})]}),a&&s.jsx("p",{className:"text-rose-400 text-xs mb-3",children:a}),s.jsx("button",{disabled:l||c==="verify"&&x.length!==6,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:l?"처리 중…":c==="login"?"로그인":A?"등록하고 로그인":"인증 확인"}),c==="verify"&&s.jsx("button",{type:"button",onClick:()=>{u("login"),N(""),i(""),y(""),b("")},className:"w-full mt-2 py-2 rounded-lg text-xs text-slate-400 hover:text-slate-200",children:"← 처음으로"}),c==="login"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-[11px] text-slate-400 mt-4",children:[s.jsx("button",{type:"button",onClick:()=>K("signup"),className:"hover:text-brand",children:"회원가입"}),s.jsx("span",{className:"text-slate-600",children:"|"}),s.jsx("button",{type:"button",onClick:()=>K("find-id"),className:"hover:text-brand",children:"아이디 찾기"}),s.jsx("span",{className:"text-slate-600",children:"|"}),s.jsx("button",{type:"button",onClick:()=>K("reset-password"),className:"hover:text-brand",children:"비밀번호 초기화"})]}),s.jsx("p",{className:"text-center text-[11px] text-slate-500 mt-3",children:"admin / manager / worker · admin123"})]})]}),E&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:V,children:s.jsxs("form",{onClick:ye=>ye.stopPropagation(),onSubmit:X,className:"w-[360px] bg-panel border border-edge rounded-2xl p-7",children:[s.jsxs("div",{className:"flex items-center justify-between mb-5",children:[s.jsx("span",{className:"text-base font-bold",children:Z}),s.jsx("button",{type:"button",onClick:V,className:"text-slate-400 hover:text-slate-200 text-lg leading-none",children:"×"})]}),(E==="signup"||E==="reset-password")&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),s.jsx("input",{value:$.username,onChange:ye=>k({...$,username:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),E==="signup"&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호 (4자 이상)"}),s.jsx("input",{type:"password",value:$.password,onChange:ye=>k({...$,password:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),(E==="signup"||E==="find-id")&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이름"}),s.jsx("input",{value:$.displayName,onChange:ye=>k({...$,displayName:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이메일"}),s.jsx("input",{type:"email",value:$.email,onChange:ye=>k({...$,email:ye.target.value}),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),C&&s.jsx("p",{className:`text-xs mb-3 ${z?"text-rose-400":"text-emerald-400"}`,children:C}),s.jsx("button",{disabled:I,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:I?"처리 중…":E==="signup"?"가입 신청":E==="find-id"?"아이디 찾기":"초기화 요청"}),E==="signup"&&s.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"가입 후 관리자 승인이 완료되어야 로그인할 수 있습니다."})]})})]})}const av=8;function ld(e,t){var n,r,a;return((n=e==null?void 0:e.response)==null?void 0:n.status)===403?"권한이 없습니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||t}function KU(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState("idle"),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(!1),[j,v]=S.useState(null),[p,y]=S.useState(""),[g,b]=S.useState(""),[x,N]=S.useState(""),[w,O]=S.useState(!1),[A,E]=S.useState(!1),[M,$]=S.useState(null),k=()=>J0().then(X=>{var ne;const Z=((ne=X.data)==null?void 0:ne.data)||{};t(Z.username||localStorage.getItem("mes_user")||""),typeof Z.otpEnabled=="boolean"?r(Z.otpEnabled):typeof Z.verifyMethod=="string"&&r(Z.verifyMethod==="OTP")}).catch(()=>{});S.useEffect(()=>{k()},[]);const I=async()=>{var X;v(null),m(!0);try{const ne=((X=(await mI()).data)==null?void 0:X.data)||{};o(ne.qrImage||""),u(ne.secret||""),d(""),i("setup")}catch(Z){v({ok:!1,text:ld(Z,"OTP 등록을 시작하지 못했습니다.")})}finally{m(!1)}},_=async()=>{v(null),m(!0);try{await yI(f),u(""),o(""),d(""),i("done"),r(!0),v({ok:!0,text:"2차 인증이 활성화되었습니다."})}catch(X){v({ok:!1,text:ld(X,"코드가 일치하지 않거나 만료되었습니다.")})}finally{m(!1)}},C=()=>{i("idle"),u(""),o(""),d(""),v(null)},P=async()=>{if(window.confirm("Authenticator 2차 인증을 해제하시겠습니까?")){v(null),m(!0);try{await vI(),i("idle"),u(""),o(""),r(!1),v({ok:!0,text:"2차 인증이 해제되었습니다."})}catch(X){v({ok:!1,text:ld(X,"OTP 해제에 실패했습니다.")})}finally{m(!1)}}},z=async()=>{if($(null),!p){$({ok:!1,text:"현재 비밀번호를 입력하세요."});return}if(g.length<av){$({ok:!1,text:`새 비밀번호는 최소 ${av}자 이상이어야 합니다.`});return}if(g!==x){$({ok:!1,text:"새 비밀번호가 일치하지 않습니다."});return}if(g===p){$({ok:!1,text:"새 비밀번호는 현재 비밀번호와 달라야 합니다."});return}E(!0);try{await gI(p,g),y(""),b(""),N(""),$({ok:!0,text:"비밀번호가 변경되었습니다."})}catch(X){$({ok:!1,text:ld(X,"비밀번호 변경에 실패했습니다.")})}finally{E(!1)}},B="w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",K=B+" tracking-[0.4em] text-center text-lg",V=({m:X})=>X?s.jsxs("div",{className:`flex items-center gap-2 text-sm rounded-lg px-3 py-2 mb-3 border ${X.ok?"bg-accent/10 border-accent/40 text-accent":"bg-rose-500/10 border-rose-500/40 text-rose-300"}`,children:[X.ok?s.jsx(wf,{size:16}):s.jsx(Er,{size:16}),X.text]}):null;return s.jsxs("div",{className:"max-w-2xl",children:[s.jsx("h1",{className:"text-xl font-bold mb-1",children:"마이페이지"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:e&&s.jsxs(s.Fragment,{children:["계정: ",s.jsx("span",{className:"text-slate-200",children:e})]})}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Vo,{size:18,className:"text-brand"}),s.jsx("h2",{className:"font-semibold",children:"2차 인증 — Authenticator(OTP)"})]}),s.jsxs("p",{className:"text-xs text-slate-400 mb-4",children:["Google·Microsoft Authenticator 앱으로 6자리 코드를 사용하는 2차 인증을 설정합니다.",n!==null&&s.jsxs("span",{className:"ml-2",children:["현재 상태:"," ",s.jsx("span",{className:n?"text-accent":"text-slate-300",children:n?"OTP 사용 중":"미설정"})]})]}),s.jsx(V,{m:j}),a==="idle"&&s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{onClick:I,disabled:h,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:[s.jsx(JL,{size:16})," ",h?"발급 중…":n?"OTP 재설정 시작":"OTP 등록 시작"]}),n&&s.jsx("button",{onClick:P,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})]}),a==="setup"&&s.jsxs("div",{children:[s.jsxs("ol",{className:"list-decimal list-inside text-sm text-slate-300 leading-7 mb-3",children:[s.jsx("li",{children:"Authenticator 앱에서 아래 QR을 스캔하세요."}),s.jsx("li",{children:"스캔이 안 되면 수동 키를 직접 입력하세요."}),s.jsx("li",{children:"앱에 표시된 6자리 코드를 입력해 확인하세요."})]}),l&&s.jsx("div",{className:"flex justify-center mb-3",children:s.jsx("img",{src:l,alt:"OTP QR",width:200,height:200,style:{background:"#fff",padding:8,borderRadius:8}})}),c&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"수동 입력 키"}),s.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:c})]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"앱에 표시된 6자리 코드"}),s.jsx("input",{value:f,onChange:X=>d(X.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"000000",className:K+" mb-3"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:_,disabled:h||f.length!==6,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:h?"확인 중…":"코드 확인 · 활성화"}),s.jsx("button",{onClick:C,disabled:h,className:"px-4 py-2 rounded-lg border border-edge text-sm text-slate-300 hover:bg-card/60",children:"취소"})]})]}),a==="done"&&s.jsx("div",{className:"flex flex-wrap gap-2",children:s.jsx("button",{onClick:P,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})})]}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(GL,{size:18,className:"text-brand"}),s.jsx("h2",{className:"font-semibold",children:"비밀번호 변경"})]}),s.jsx(V,{m:M}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"현재 비밀번호"}),s.jsx("input",{type:w?"text":"password",value:p,autoComplete:"current-password",onChange:X=>y(X.target.value),className:B})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-slate-400 mb-1",children:["새 비밀번호 (최소 ",av,"자)"]}),s.jsx("input",{type:w?"text":"password",value:g,autoComplete:"new-password",onChange:X=>b(X.target.value),className:B})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"새 비밀번호 확인"}),s.jsx("input",{type:w?"text":"password",value:x,autoComplete:"new-password",onChange:X=>N(X.target.value),className:B})]}),s.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-slate-400 cursor-pointer select-none",children:[s.jsx("button",{type:"button",onClick:()=>O(!w),className:"text-slate-400 hover:text-brand",children:w?s.jsx(UL,{size:15}):s.jsx(_T,{size:15})}),"비밀번호 표시"]}),s.jsx("button",{onClick:z,disabled:A,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:A?"변경 중…":"비밀번호 변경"})]})]})]})}function bk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=bk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pe(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=bk(e))&&(r&&(r+=" "),r+=t);return r}var YU=Array.isArray,jn=YU,VU=typeof Uf=="object"&&Uf&&Uf.Object===Object&&Uf,jk=VU,WU=jk,XU=typeof self=="object"&&self&&self.Object===Object&&self,QU=WU||XU||Function("return this")(),Jr=QU,ZU=Jr,JU=ZU.Symbol,Tf=JU,Nw=Tf,Sk=Object.prototype,e7=Sk.hasOwnProperty,t7=Sk.toString,xc=Nw?Nw.toStringTag:void 0;function n7(e){var t=e7.call(e,xc),n=e[xc];try{e[xc]=void 0;var r=!0}catch{}var a=t7.call(e);return r&&(t?e[xc]=n:delete e[xc]),a}var r7=n7,a7=Object.prototype,i7=a7.toString;function s7(e){return i7.call(e)}var l7=s7,Ow=Tf,o7=r7,c7=l7,u7="[object Null]",f7="[object Undefined]",Aw=Ow?Ow.toStringTag:void 0;function d7(e){return e==null?e===void 0?f7:u7:Aw&&Aw in Object(e)?o7(e):c7(e)}var Ra=d7;function h7(e){return e!=null&&typeof e=="object"}var Da=h7,p7=Ra,m7=Da,y7="[object Symbol]";function v7(e){return typeof e=="symbol"||m7(e)&&p7(e)==y7}var Xo=v7,g7=jn,x7=Xo,b7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j7=/^\w*$/;function S7(e,t){if(g7(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||x7(e)?!0:j7.test(e)||!b7.test(e)||t!=null&&e in Object(t)}var n1=S7;function w7(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ri=w7;const Qo=$e(Ri);var N7=Ra,O7=Ri,A7="[object AsyncFunction]",C7="[object Function]",E7="[object GeneratorFunction]",_7="[object Proxy]";function T7(e){if(!O7(e))return!1;var t=N7(e);return t==C7||t==E7||t==A7||t==_7}var r1=T7;const ce=$e(r1);var k7=Jr,M7=k7["__core-js_shared__"],P7=M7,iv=P7,Cw=function(){var e=/[^.]+$/.exec(iv&&iv.keys&&iv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $7(e){return!!Cw&&Cw in e}var R7=$7,D7=Function.prototype,L7=D7.toString;function z7(e){if(e!=null){try{return L7.call(e)}catch{}try{return e+""}catch{}}return""}var wk=z7,I7=r1,B7=R7,U7=Ri,q7=wk,H7=/[\\^$.*+?()[\]{}|]/g,F7=/^\[object .+?Constructor\]$/,G7=Function.prototype,K7=Object.prototype,Y7=G7.toString,V7=K7.hasOwnProperty,W7=RegExp("^"+Y7.call(V7).replace(H7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X7(e){if(!U7(e)||B7(e))return!1;var t=I7(e)?W7:F7;return t.test(q7(e))}var Q7=X7;function Z7(e,t){return e==null?void 0:e[t]}var J7=Z7,e9=Q7,t9=J7;function n9(e,t){var n=t9(e,t);return e9(n)?n:void 0}var qs=n9,r9=qs,a9=r9(Object,"create"),gm=a9,Ew=gm;function i9(){this.__data__=Ew?Ew(null):{},this.size=0}var s9=i9;function l9(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var o9=l9,c9=gm,u9="__lodash_hash_undefined__",f9=Object.prototype,d9=f9.hasOwnProperty;function h9(e){var t=this.__data__;if(c9){var n=t[e];return n===u9?void 0:n}return d9.call(t,e)?t[e]:void 0}var p9=h9,m9=gm,y9=Object.prototype,v9=y9.hasOwnProperty;function g9(e){var t=this.__data__;return m9?t[e]!==void 0:v9.call(t,e)}var x9=g9,b9=gm,j9="__lodash_hash_undefined__";function S9(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=b9&&t===void 0?j9:t,this}var w9=S9,N9=s9,O9=o9,A9=p9,C9=x9,E9=w9;function Zo(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])}}Zo.prototype.clear=N9;Zo.prototype.delete=O9;Zo.prototype.get=A9;Zo.prototype.has=C9;Zo.prototype.set=E9;var _9=Zo;function T9(){this.__data__=[],this.size=0}var k9=T9;function M9(e,t){return e===t||e!==e&&t!==t}var a1=M9,P9=a1;function $9(e,t){for(var n=e.length;n--;)if(P9(e[n][0],t))return n;return-1}var xm=$9,R9=xm,D9=Array.prototype,L9=D9.splice;function z9(e){var t=this.__data__,n=R9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():L9.call(t,n,1),--this.size,!0}var I9=z9,B9=xm;function U9(e){var t=this.__data__,n=B9(t,e);return n<0?void 0:t[n][1]}var q9=U9,H9=xm;function F9(e){return H9(this.__data__,e)>-1}var G9=F9,K9=xm;function Y9(e,t){var n=this.__data__,r=K9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var V9=Y9,W9=k9,X9=I9,Q9=q9,Z9=G9,J9=V9;function Jo(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])}}Jo.prototype.clear=W9;Jo.prototype.delete=X9;Jo.prototype.get=Q9;Jo.prototype.has=Z9;Jo.prototype.set=J9;var bm=Jo,eq=qs,tq=Jr,nq=eq(tq,"Map"),i1=nq,_w=_9,rq=bm,aq=i1;function iq(){this.size=0,this.__data__={hash:new _w,map:new(aq||rq),string:new _w}}var sq=iq;function lq(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var oq=lq,cq=oq;function uq(e,t){var n=e.__data__;return cq(t)?n[typeof t=="string"?"string":"hash"]:n.map}var jm=uq,fq=jm;function dq(e){var t=fq(this,e).delete(e);return this.size-=t?1:0,t}var hq=dq,pq=jm;function mq(e){return pq(this,e).get(e)}var yq=mq,vq=jm;function gq(e){return vq(this,e).has(e)}var xq=gq,bq=jm;function jq(e,t){var n=bq(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Sq=jq,wq=sq,Nq=hq,Oq=yq,Aq=xq,Cq=Sq;function ec(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])}}ec.prototype.clear=wq;ec.prototype.delete=Nq;ec.prototype.get=Oq;ec.prototype.has=Aq;ec.prototype.set=Cq;var s1=ec,Nk=s1,Eq="Expected a function";function l1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Eq);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var l=e.apply(this,r);return n.cache=i.set(a,l)||i,l};return n.cache=new(l1.Cache||Nk),n}l1.Cache=Nk;var Ok=l1;const _q=$e(Ok);var Tq=Ok,kq=500;function Mq(e){var t=Tq(e,function(r){return n.size===kq&&n.clear(),r}),n=t.cache;return t}var Pq=Mq,$q=Pq,Rq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dq=/\\(\\)?/g,Lq=$q(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rq,function(n,r,a,i){t.push(a?i.replace(Dq,"$1"):r||n)}),t}),zq=Lq;function Iq(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var o1=Iq,Tw=Tf,Bq=o1,Uq=jn,qq=Xo,kw=Tw?Tw.prototype:void 0,Mw=kw?kw.toString:void 0;function Ak(e){if(typeof e=="string")return e;if(Uq(e))return Bq(e,Ak)+"";if(qq(e))return Mw?Mw.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Hq=Ak,Fq=Hq;function Gq(e){return e==null?"":Fq(e)}var Ck=Gq,Kq=jn,Yq=n1,Vq=zq,Wq=Ck;function Xq(e,t){return Kq(e)?e:Yq(e,t)?[e]:Vq(Wq(e))}var Ek=Xq,Qq=Xo;function Zq(e){if(typeof e=="string"||Qq(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Sm=Zq,Jq=Ek,eH=Sm;function tH(e,t){t=Jq(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[eH(t[n++])];return n&&n==r?e:void 0}var c1=tH,nH=c1;function rH(e,t,n){var r=e==null?void 0:nH(e,t);return r===void 0?n:r}var _k=rH;const Rn=$e(_k);function aH(e){return e==null}var iH=aH;const oe=$e(iH);var sH=Ra,lH=jn,oH=Da,cH="[object String]";function uH(e){return typeof e=="string"||!lH(e)&&oH(e)&&sH(e)==cH}var fH=uH;const Ms=$e(fH);var Tk={exports:{}},ze={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var u1=Symbol.for("react.element"),f1=Symbol.for("react.portal"),wm=Symbol.for("react.fragment"),Nm=Symbol.for("react.strict_mode"),Om=Symbol.for("react.profiler"),Am=Symbol.for("react.provider"),Cm=Symbol.for("react.context"),dH=Symbol.for("react.server_context"),Em=Symbol.for("react.forward_ref"),_m=Symbol.for("react.suspense"),Tm=Symbol.for("react.suspense_list"),km=Symbol.for("react.memo"),Mm=Symbol.for("react.lazy"),hH=Symbol.for("react.offscreen"),kk;kk=Symbol.for("react.module.reference");function fr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case u1:switch(e=e.type,e){case wm:case Om:case Nm:case _m:case Tm:return e;default:switch(e=e&&e.$$typeof,e){case dH:case Cm:case Em:case Mm:case km:case Am:return e;default:return t}}case f1:return t}}}ze.ContextConsumer=Cm;ze.ContextProvider=Am;ze.Element=u1;ze.ForwardRef=Em;ze.Fragment=wm;ze.Lazy=Mm;ze.Memo=km;ze.Portal=f1;ze.Profiler=Om;ze.StrictMode=Nm;ze.Suspense=_m;ze.SuspenseList=Tm;ze.isAsyncMode=function(){return!1};ze.isConcurrentMode=function(){return!1};ze.isContextConsumer=function(e){return fr(e)===Cm};ze.isContextProvider=function(e){return fr(e)===Am};ze.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===u1};ze.isForwardRef=function(e){return fr(e)===Em};ze.isFragment=function(e){return fr(e)===wm};ze.isLazy=function(e){return fr(e)===Mm};ze.isMemo=function(e){return fr(e)===km};ze.isPortal=function(e){return fr(e)===f1};ze.isProfiler=function(e){return fr(e)===Om};ze.isStrictMode=function(e){return fr(e)===Nm};ze.isSuspense=function(e){return fr(e)===_m};ze.isSuspenseList=function(e){return fr(e)===Tm};ze.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wm||e===Om||e===Nm||e===_m||e===Tm||e===hH||typeof e=="object"&&e!==null&&(e.$$typeof===Mm||e.$$typeof===km||e.$$typeof===Am||e.$$typeof===Cm||e.$$typeof===Em||e.$$typeof===kk||e.getModuleId!==void 0)};ze.typeOf=fr;Tk.exports=ze;var pH=Tk.exports,mH=Ra,yH=Da,vH="[object Number]";function gH(e){return typeof e=="number"||yH(e)&&mH(e)==vH}var Mk=gH;const xH=$e(Mk);var bH=Mk;function jH(e){return bH(e)&&e!=+e}var SH=jH;const tc=$e(SH);var an=function(t){return t===0?0:t>0?1:-1},rs=function(t){return Ms(t)&&t.indexOf("%")===t.length-1},Q=function(t){return xH(t)&&!tc(t)},wH=function(t){return oe(t)},kt=function(t){return Q(t)||Ms(t)},NH=0,Di=function(t){var n=++NH;return"".concat(t||"").concat(n)},sn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Q(t)&&!Ms(t))return r;var i;if(rs(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return tc(i)&&(i=r),a&&i>n&&(i=n),i},Ja=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},OH=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},st=function(t,n){return Q(t)&&Q(n)?function(r){return t+r*(n-t)}:function(){return n}};function Ph(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Rn(r,t))===n})}var AH=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,a=0,i=0,l=0,o=1/0,c=-1/0,u=0,f=0,d=0;d<n;d++)u=t[d].cx||0,f=t[d].cy||0,r+=u,a+=f,i+=u*f,l+=u*u,o=Math.min(o,u),c=Math.max(c,u);var h=n*l!==r*r?(n*i-r*a)/(n*l-r*r):0;return{xmin:o,xmax:c,a:h,b:(a-h*r)/n}},CH=function(t,n){return Q(t)&&Q(n)?t-n:Ms(t)&&Ms(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Ml(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Xg(e){"@babel/helpers - typeof";return Xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xg(e)}var EH=["viewBox","children"],_H=["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"],Pw=["points","pathLength"],sv={svg:EH,polygon:Pw,polyline:Pw},d1=["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"],$h=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(S.isValidElement(t)&&(r=t.props),!Qo(r))return null;var a={};return Object.keys(r).forEach(function(i){d1.includes(i)&&(a[i]=n||function(l){return r[i](r,l)})}),a},TH=function(t,n,r){return function(a){return t(n,r,a),null}},Ti=function(t,n,r){if(!Qo(t)||Xg(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var l=t[i];d1.includes(i)&&typeof l=="function"&&(a||(a={}),a[i]=TH(l,n,r))}),a},kH=["children"],MH=["children"];function $w(e,t){if(e==null)return{};var n=PH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PH(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 Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}var Rw={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"},wa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Dw=null,lv=null,h1=function e(t){if(t===Dw&&Array.isArray(lv))return lv;var n=[];return S.Children.forEach(t,function(r){oe(r)||(pH.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),lv=n,Dw=t,n};function cn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return wa(a)}):r=[wa(t)],h1(e).forEach(function(a){var i=Rn(a,"type.displayName")||Rn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function On(e,t){var n=cn(e,t);return n&&n[0]}var Lw=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Q(r)||r<=0||!Q(a)||a<=0)},$H=["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"],RH=function(t){return t&&t.type&&Ms(t.type)&&$H.indexOf(t.type)>=0},Pk=function(t){return t&&Qg(t)==="object"&&"clipDot"in t},DH=function(t,n,r,a){var i,l=(i=sv==null?void 0:sv[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!ce(t)&&(a&&l.includes(n)||_H.includes(n))||r&&d1.includes(n)},ae=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!Qo(a))return null;var i={};return Object.keys(a).forEach(function(l){var o;DH((o=a)===null||o===void 0?void 0:o[l],l,n,r)&&(i[l]=a[l])}),i},Zg=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 zw(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],l=n[a];if(Array.isArray(i)||Array.isArray(l)){if(!e(i,l))return!1}else if(!zw(i,l))return!1}return!0},zw=function(t,n){if(oe(t)&&oe(n))return!0;if(!oe(t)&&!oe(n)){var r=t.props||{},a=r.children,i=$w(r,kH),l=n.props||{},o=l.children,c=$w(l,MH);return a&&o?Ml(i,c)&&Zg(a,o):!a&&!o?Ml(i,c):!1}return!1},Iw=function(t,n){var r=[],a={};return h1(t).forEach(function(i,l){if(RH(i))r.push(i);else if(i){var o=wa(i.type),c=n[o]||{},u=c.handler,f=c.once;if(u&&(!f||!a[o])){var d=u(i,o,l);r.push(d),a[o]=!0}}}),r},LH=function(t){var n=t&&t.type;return n&&Rw[n]?Rw[n]:null},zH=function(t,n){return h1(n).indexOf(t)},IH=["children","width","height","viewBox","className","style","title","desc"];function Jg(){return Jg=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},Jg.apply(this,arguments)}function BH(e,t){if(e==null)return{};var n=UH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UH(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 ex(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,o=e.title,c=e.desc,u=BH(e,IH),f=a||{width:n,height:r,x:0,y:0},d=pe("recharts-surface",i);return T.createElement("svg",Jg({},ae(u,!0,"svg"),{className:d,width:n,height:r,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),T.createElement("title",null,o),T.createElement("desc",null,c),t)}var qH=["children","className"];function tx(){return tx=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},tx.apply(this,arguments)}function HH(e,t){if(e==null)return{};var n=FH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FH(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 ge=T.forwardRef(function(e,t){var n=e.children,r=e.className,a=HH(e,qH),i=pe("recharts-layer",r);return T.createElement("g",tx({className:i},ae(a,!0),{ref:t}),n)}),wr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function GH(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i}var KH=GH,YH=KH;function VH(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:YH(e,t,n)}var WH=VH,XH="\\ud800-\\udfff",QH="\\u0300-\\u036f",ZH="\\ufe20-\\ufe2f",JH="\\u20d0-\\u20ff",eF=QH+ZH+JH,tF="\\ufe0e\\ufe0f",nF="\\u200d",rF=RegExp("["+nF+XH+eF+tF+"]");function aF(e){return rF.test(e)}var $k=aF;function iF(e){return e.split("")}var sF=iF,Rk="\\ud800-\\udfff",lF="\\u0300-\\u036f",oF="\\ufe20-\\ufe2f",cF="\\u20d0-\\u20ff",uF=lF+oF+cF,fF="\\ufe0e\\ufe0f",dF="["+Rk+"]",nx="["+uF+"]",rx="\\ud83c[\\udffb-\\udfff]",hF="(?:"+nx+"|"+rx+")",Dk="[^"+Rk+"]",Lk="(?:\\ud83c[\\udde6-\\uddff]){2}",zk="[\\ud800-\\udbff][\\udc00-\\udfff]",pF="\\u200d",Ik=hF+"?",Bk="["+fF+"]?",mF="(?:"+pF+"(?:"+[Dk,Lk,zk].join("|")+")"+Bk+Ik+")*",yF=Bk+Ik+mF,vF="(?:"+[Dk+nx+"?",nx,Lk,zk,dF].join("|")+")",gF=RegExp(rx+"(?="+rx+")|"+vF+yF,"g");function xF(e){return e.match(gF)||[]}var bF=xF,jF=sF,SF=$k,wF=bF;function NF(e){return SF(e)?wF(e):jF(e)}var OF=NF,AF=WH,CF=$k,EF=OF,_F=Ck;function TF(e){return function(t){t=_F(t);var n=CF(t)?EF(t):void 0,r=n?n[0]:t.charAt(0),a=n?AF(n,1).join(""):t.slice(1);return r[e]()+a}}var kF=TF,MF=kF,PF=MF("toUpperCase"),$F=PF;const Pm=$e($F);function Ke(e){return function(){return e}}const Uk=Math.cos,Rh=Math.sin,Mr=Math.sqrt,Dh=Math.PI,$m=2*Dh,ax=Math.PI,ix=2*ax,Zi=1e-6,RF=ix-Zi;function qk(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function DF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qk;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class LF{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qk:DF(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+l}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let l=this._x1,o=this._y1,c=r-t,u=a-n,f=l-t,d=o-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Zi)if(!(Math.abs(d*c-u*f)>Zi)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-l,j=a-o,v=c*c+u*u,p=m*m+j*j,y=Math.sqrt(v),g=Math.sqrt(h),b=i*Math.tan((ax-Math.acos((v+h-p)/(2*y*g)))/2),x=b/g,N=b/y;Math.abs(x-1)>Zi&&this._append`L${t+x*f},${n+x*d}`,this._append`A${i},${i},0,0,${+(d*m>f*j)},${this._x1=t+N*c},${this._y1=n+N*u}`}}arc(t,n,r,a,i,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),c=r*Math.sin(a),u=t+o,f=n+c,d=1^l,h=l?a-i:i-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Zi||Math.abs(this._y1-f)>Zi)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%ix+ix),h>RF?this._append`A${r},${r},0,1,${d},${t-o},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Zi&&this._append`A${r},${r},0,${+(h>=ax)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function p1(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new LF(t)}function m1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hk(e){this._context=e}Hk.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 Rm(e){return new Hk(e)}function Fk(e){return e[0]}function Gk(e){return e[1]}function Kk(e,t){var n=Ke(!0),r=null,a=Rm,i=null,l=p1(o);e=typeof e=="function"?e:e===void 0?Fk:Ke(e),t=typeof t=="function"?t:t===void 0?Gk:Ke(t);function o(c){var u,f=(c=m1(c)).length,d,h=!1,m;for(r==null&&(i=a(m=l())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ke(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ke(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ke(!!c),o):n},o.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),o):a},o.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),o):r},o}function od(e,t,n){var r=null,a=Ke(!0),i=null,l=Rm,o=null,c=p1(u);e=typeof e=="function"?e:e===void 0?Fk:Ke(+e),t=typeof t=="function"?t:Ke(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Gk:Ke(+n);function u(d){var h,m,j,v=(d=m1(d)).length,p,y=!1,g,b=new Array(v),x=new Array(v);for(i==null&&(o=l(g=c())),h=0;h<=v;++h){if(!(h<v&&a(p=d[h],h,d))===y)if(y=!y)m=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),j=h-1;j>=m;--j)o.point(b[j],x[j]);o.lineEnd(),o.areaEnd()}y&&(b[h]=+e(p,h,d),x[h]=+t(p,h,d),o.point(r?+r(p,h,d):b[h],n?+n(p,h,d):x[h]))}if(g)return o=null,g+""||null}function f(){return Kk().defined(a).curve(l).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ke(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ke(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Ke(!!d),u):a},u.curve=function(d){return arguments.length?(l=d,i!=null&&(o=l(i)),u):l},u.context=function(d){return arguments.length?(d==null?i=o=null:o=l(i=d),u):i},u}class Yk{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function zF(e){return new Yk(e,!0)}function IF(e){return new Yk(e,!1)}const y1={draw(e,t){const n=Mr(t/Dh);e.moveTo(n,0),e.arc(0,0,n,0,$m)}},BF={draw(e,t){const n=Mr(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()}},Vk=Mr(1/3),UF=Vk*2,qF={draw(e,t){const n=Mr(t/UF),r=n*Vk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},HF={draw(e,t){const n=Mr(t),r=-n/2;e.rect(r,r,n,n)}},FF=.8908130915292852,Wk=Rh(Dh/10)/Rh(7*Dh/10),GF=Rh($m/10)*Wk,KF=-Uk($m/10)*Wk,YF={draw(e,t){const n=Mr(t*FF),r=GF*n,a=KF*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=$m*i/5,o=Uk(l),c=Rh(l);e.lineTo(c*n,-o*n),e.lineTo(o*r-c*a,c*r+o*a)}e.closePath()}},ov=Mr(3),VF={draw(e,t){const n=-Mr(t/(ov*3));e.moveTo(0,n*2),e.lineTo(-ov*n,-n),e.lineTo(ov*n,-n),e.closePath()}},Un=-.5,qn=Mr(3)/2,sx=1/Mr(12),WF=(sx/2+1)*3,XF={draw(e,t){const n=Mr(t/WF),r=n/2,a=n*sx,i=r,l=n*sx+n,o=-i,c=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(o,c),e.lineTo(Un*r-qn*a,qn*r+Un*a),e.lineTo(Un*i-qn*l,qn*i+Un*l),e.lineTo(Un*o-qn*c,qn*o+Un*c),e.lineTo(Un*r+qn*a,Un*a-qn*r),e.lineTo(Un*i+qn*l,Un*l-qn*i),e.lineTo(Un*o+qn*c,Un*c-qn*o),e.closePath()}};function QF(e,t){let n=null,r=p1(a);e=typeof e=="function"?e:Ke(e||y1),t=typeof t=="function"?t:Ke(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ke(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Lh(){}function zh(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 Xk(e){this._context=e}Xk.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:zh(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:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ZF(e){return new Xk(e)}function Qk(e){this._context=e}Qk.prototype={areaStart:Lh,areaEnd:Lh,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:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JF(e){return new Qk(e)}function Zk(e){this._context=e}Zk.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:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eG(e){return new Zk(e)}function Jk(e){this._context=e}Jk.prototype={areaStart:Lh,areaEnd:Lh,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 tG(e){return new Jk(e)}function Bw(e){return e<0?-1:1}function Uw(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),o=(i*a+l*r)/(r+a);return(Bw(i)+Bw(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(o))||0}function qw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function cv(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,l-o*n,i,l)}function Ih(e){this._context=e}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cv(this,this._t0,qw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,cv(this,qw(this,n=Uw(this,e,t)),n);break;default:cv(this,this._t0,n=Uw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function e3(e){this._context=new t3(e)}(e3.prototype=Object.create(Ih.prototype)).point=function(e,t){Ih.prototype.point.call(this,t,e)};function t3(e){this._context=e}t3.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function nG(e){return new Ih(e)}function rG(e){return new e3(e)}function n3(e){this._context=e}n3.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=Hw(e),a=Hw(t),i=0,l=1;l<n;++i,++l)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Hw(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),l=new Array(n);for(a[0]=0,i[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function aG(e){return new n3(e)}function Dm(e,t){this._context=e,this._t=t}Dm.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 iG(e){return new Dm(e,.5)}function sG(e){return new Dm(e,0)}function lG(e){return new Dm(e,1)}function so(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,o=i.length;n<l;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function lx(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function oG(e,t){return e[t]}function cG(e){const t=[];return t.key=e,t}function uG(){var e=Ke([]),t=lx,n=so,r=oG;function a(i){var l=Array.from(e.apply(this,arguments),cG),o,c=l.length,u=-1,f;for(const d of i)for(o=0,++u;o<c;++o)(l[o][u]=[0,+r(d,l[o].key,u,i)]).data=d;for(o=0,f=m1(t(l));o<c;++o)l[f[o]].index=o;return n(l,f),l}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Ke(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?lx:typeof i=="function"?i:Ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??so,a):n},a}function fG(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,l;a<i;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}so(e,t)}}function dG(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var l=0,o=0;l<a;++l)o+=e[l][n][1]||0;r[n][1]+=r[n][0]=-o/2}so(e,t)}}function hG(e,t){if(!(!((l=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,l;r<i;++r){for(var o=0,c=0,u=0;o<l;++o){for(var f=e[t[o]],d=f[r][1]||0,h=f[r-1][1]||0,m=(d-h)/2,j=0;j<o;++j){var v=e[t[j]],p=v[r][1]||0,y=v[r-1][1]||0;m+=p-y}c+=d,u+=m*d}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,so(e,t)}}function ju(e){"@babel/helpers - typeof";return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(e)}var pG=["type","size","sizeType"];function ox(){return ox=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},ox.apply(this,arguments)}function Fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(n),!0).forEach(function(r){mG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mG(e,t,n){return t=yG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yG(e){var t=vG(e,"string");return ju(t)=="symbol"?t:t+""}function vG(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gG(e,t){if(e==null)return{};var n=xG(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xG(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 r3={symbolCircle:y1,symbolCross:BF,symbolDiamond:qF,symbolSquare:HF,symbolStar:YF,symbolTriangle:VF,symbolWye:XF},bG=Math.PI/180,jG=function(t){var n="symbol".concat(Pm(t));return r3[n]||y1},SG=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*bG;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},wG=function(t,n){r3["symbol".concat(Pm(t))]=n},Lm=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,o=l===void 0?"area":l,c=gG(t,pG),u=Gw(Gw({},c),{},{type:r,size:i,sizeType:o}),f=function(){var p=jG(r),y=QF().type(p).size(SG(i,o,r));return y()},d=u.className,h=u.cx,m=u.cy,j=ae(u,!0);return h===+h&&m===+m&&i===+i?T.createElement("path",ox({},j,{className:pe("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};Lm.registerSymbol=wG;function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(e)}function cx(){return cx=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},cx.apply(this,arguments)}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kw(Object(n),!0).forEach(function(r){Su(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AG(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,i3(r.key),r)}}function CG(e,t,n){return t&&AG(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EG(e,t,n){return t=Bh(t),_G(e,a3()?Reflect.construct(t,n||[],Bh(e).constructor):t.apply(e,n))}function _G(e,t){if(t&&(lo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TG(e)}function TG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a3=function(){return!!e})()}function Bh(e){return Bh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bh(e)}function kG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ux(e,t)}function Su(e,t,n){return t=i3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i3(e){var t=MG(e,"string");return lo(t)=="symbol"?t:t+""}function MG(e,t){if(lo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hn=32,v1=function(e){function t(){return OG(this,t),EG(this,t,arguments)}return kG(t,e),CG(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=Hn/2,l=Hn/6,o=Hn/3,c=r.inactive?a:r.color;if(r.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:Hn,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(2*o,",").concat(i,`
            H`).concat(Hn,"M").concat(2*o,",").concat(i,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return T.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Hn/8,"h").concat(Hn,"v").concat(Hn*3/4,"h").concat(-Hn,"z"),className:"recharts-legend-icon"});if(T.isValidElement(r.legendIcon)){var u=NG({},r);return delete u.legendIcon,T.cloneElement(r.legendIcon,u)}return T.createElement(Lm,{fill:c,cx:i,cy:i,size:Hn,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,l=a.iconSize,o=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:Hn,height:Hn},d={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,j){var v=m.formatter||c,p=pe(Su(Su({"recharts-legend-item":!0},"legend-item-".concat(j),!0),"inactive",m.inactive));if(m.type==="none")return null;var y=ce(m.value)?null:m.value;wr(!ce(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var g=m.inactive?u:m.color;return T.createElement("li",cx({className:p,style:d,key:"legend-item-".concat(j)},Ti(r.props,m,j)),T.createElement(ex,{width:l,height:l,viewBox:f,style:h},r.renderIcon(m)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},v?v(y,m,j):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,l=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(S.PureComponent);Su(v1,"displayName","Legend");Su(v1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var PG=bm;function $G(){this.__data__=new PG,this.size=0}var RG=$G;function DG(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var LG=DG;function zG(e){return this.__data__.get(e)}var IG=zG;function BG(e){return this.__data__.has(e)}var UG=BG,qG=bm,HG=i1,FG=s1,GG=200;function KG(e,t){var n=this.__data__;if(n instanceof qG){var r=n.__data__;if(!HG||r.length<GG-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new FG(r)}return n.set(e,t),this.size=n.size,this}var YG=KG,VG=bm,WG=RG,XG=LG,QG=IG,ZG=UG,JG=YG;function nc(e){var t=this.__data__=new VG(e);this.size=t.size}nc.prototype.clear=WG;nc.prototype.delete=XG;nc.prototype.get=QG;nc.prototype.has=ZG;nc.prototype.set=JG;var s3=nc,eK="__lodash_hash_undefined__";function tK(e){return this.__data__.set(e,eK),this}var nK=tK;function rK(e){return this.__data__.has(e)}var aK=rK,iK=s1,sK=nK,lK=aK;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new iK;++t<n;)this.add(e[t])}Uh.prototype.add=Uh.prototype.push=sK;Uh.prototype.has=lK;var l3=Uh;function oK(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var o3=oK;function cK(e,t){return e.has(t)}var c3=cK,uK=l3,fK=o3,dK=c3,hK=1,pK=2;function mK(e,t,n,r,a,i){var l=n&hK,o=e.length,c=t.length;if(o!=c&&!(l&&c>o))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=n&pK?new uK:void 0;for(i.set(e,t),i.set(t,e);++d<o;){var j=e[d],v=t[d];if(r)var p=l?r(v,j,d,t,e,i):r(j,v,d,e,t,i);if(p!==void 0){if(p)continue;h=!1;break}if(m){if(!fK(t,function(y,g){if(!dK(m,g)&&(j===y||a(j,y,n,r,i)))return m.push(g)})){h=!1;break}}else if(!(j===v||a(j,v,n,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var u3=mK,yK=Jr,vK=yK.Uint8Array,gK=vK;function xK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var bK=xK;function jK(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var g1=jK,Yw=Tf,Vw=gK,SK=a1,wK=u3,NK=bK,OK=g1,AK=1,CK=2,EK="[object Boolean]",_K="[object Date]",TK="[object Error]",kK="[object Map]",MK="[object Number]",PK="[object RegExp]",$K="[object Set]",RK="[object String]",DK="[object Symbol]",LK="[object ArrayBuffer]",zK="[object DataView]",Ww=Yw?Yw.prototype:void 0,uv=Ww?Ww.valueOf:void 0;function IK(e,t,n,r,a,i,l){switch(n){case zK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case LK:return!(e.byteLength!=t.byteLength||!i(new Vw(e),new Vw(t)));case EK:case _K:case MK:return SK(+e,+t);case TK:return e.name==t.name&&e.message==t.message;case PK:case RK:return e==t+"";case kK:var o=NK;case $K:var c=r&AK;if(o||(o=OK),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;r|=CK,l.set(e,t);var f=wK(o(e),o(t),r,a,i,l);return l.delete(e),f;case DK:if(uv)return uv.call(e)==uv.call(t)}return!1}var BK=IK;function UK(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var f3=UK,qK=f3,HK=jn;function FK(e,t,n){var r=t(e);return HK(e)?r:qK(r,n(e))}var GK=FK;function KK(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var l=e[n];t(l,n,e)&&(i[a++]=l)}return i}var YK=KK;function VK(){return[]}var WK=VK,XK=YK,QK=WK,ZK=Object.prototype,JK=ZK.propertyIsEnumerable,Xw=Object.getOwnPropertySymbols,eY=Xw?function(e){return e==null?[]:(e=Object(e),XK(Xw(e),function(t){return JK.call(e,t)}))}:QK,tY=eY;function nY(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var rY=nY,aY=Ra,iY=Da,sY="[object Arguments]";function lY(e){return iY(e)&&aY(e)==sY}var oY=lY,Qw=oY,cY=Da,d3=Object.prototype,uY=d3.hasOwnProperty,fY=d3.propertyIsEnumerable,dY=Qw(function(){return arguments}())?Qw:function(e){return cY(e)&&uY.call(e,"callee")&&!fY.call(e,"callee")},x1=dY,qh={exports:{}};function hY(){return!1}var pY=hY;qh.exports;(function(e,t){var n=Jr,r=pY,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===a,o=l?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(qh,qh.exports);var h3=qh.exports,mY=9007199254740991,yY=/^(?:0|[1-9]\d*)$/;function vY(e,t){var n=typeof e;return t=t??mY,!!t&&(n=="number"||n!="symbol"&&yY.test(e))&&e>-1&&e%1==0&&e<t}var b1=vY,gY=9007199254740991;function xY(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gY}var j1=xY,bY=Ra,jY=j1,SY=Da,wY="[object Arguments]",NY="[object Array]",OY="[object Boolean]",AY="[object Date]",CY="[object Error]",EY="[object Function]",_Y="[object Map]",TY="[object Number]",kY="[object Object]",MY="[object RegExp]",PY="[object Set]",$Y="[object String]",RY="[object WeakMap]",DY="[object ArrayBuffer]",LY="[object DataView]",zY="[object Float32Array]",IY="[object Float64Array]",BY="[object Int8Array]",UY="[object Int16Array]",qY="[object Int32Array]",HY="[object Uint8Array]",FY="[object Uint8ClampedArray]",GY="[object Uint16Array]",KY="[object Uint32Array]",Qe={};Qe[zY]=Qe[IY]=Qe[BY]=Qe[UY]=Qe[qY]=Qe[HY]=Qe[FY]=Qe[GY]=Qe[KY]=!0;Qe[wY]=Qe[NY]=Qe[DY]=Qe[OY]=Qe[LY]=Qe[AY]=Qe[CY]=Qe[EY]=Qe[_Y]=Qe[TY]=Qe[kY]=Qe[MY]=Qe[PY]=Qe[$Y]=Qe[RY]=!1;function YY(e){return SY(e)&&jY(e.length)&&!!Qe[bY(e)]}var VY=YY;function WY(e){return function(t){return e(t)}}var p3=WY,Hh={exports:{}};Hh.exports;(function(e,t){var n=jk,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,o=function(){try{var c=a&&a.require&&a.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=o})(Hh,Hh.exports);var XY=Hh.exports,QY=VY,ZY=p3,Zw=XY,Jw=Zw&&Zw.isTypedArray,JY=Jw?ZY(Jw):QY,m3=JY,eV=rY,tV=x1,nV=jn,rV=h3,aV=b1,iV=m3,sV=Object.prototype,lV=sV.hasOwnProperty;function oV(e,t){var n=nV(e),r=!n&&tV(e),a=!n&&!r&&rV(e),i=!n&&!r&&!a&&iV(e),l=n||r||a||i,o=l?eV(e.length,String):[],c=o.length;for(var u in e)(t||lV.call(e,u))&&!(l&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||aV(u,c)))&&o.push(u);return o}var cV=oV,uV=Object.prototype;function fV(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uV;return e===n}var dV=fV;function hV(e,t){return function(n){return e(t(n))}}var y3=hV,pV=y3,mV=pV(Object.keys,Object),yV=mV,vV=dV,gV=yV,xV=Object.prototype,bV=xV.hasOwnProperty;function jV(e){if(!vV(e))return gV(e);var t=[];for(var n in Object(e))bV.call(e,n)&&n!="constructor"&&t.push(n);return t}var SV=jV,wV=r1,NV=j1;function OV(e){return e!=null&&NV(e.length)&&!wV(e)}var kf=OV,AV=cV,CV=SV,EV=kf;function _V(e){return EV(e)?AV(e):CV(e)}var zm=_V,TV=GK,kV=tY,MV=zm;function PV(e){return TV(e,MV,kV)}var $V=PV,e2=$V,RV=1,DV=Object.prototype,LV=DV.hasOwnProperty;function zV(e,t,n,r,a,i){var l=n&RV,o=e2(e),c=o.length,u=e2(t),f=u.length;if(c!=f&&!l)return!1;for(var d=c;d--;){var h=o[d];if(!(l?h in t:LV.call(t,h)))return!1}var m=i.get(e),j=i.get(t);if(m&&j)return m==t&&j==e;var v=!0;i.set(e,t),i.set(t,e);for(var p=l;++d<c;){h=o[d];var y=e[h],g=t[h];if(r)var b=l?r(g,y,h,t,e,i):r(y,g,h,e,t,i);if(!(b===void 0?y===g||a(y,g,n,r,i):b)){v=!1;break}p||(p=h=="constructor")}if(v&&!p){var x=e.constructor,N=t.constructor;x!=N&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof N=="function"&&N instanceof N)&&(v=!1)}return i.delete(e),i.delete(t),v}var IV=zV,BV=qs,UV=Jr,qV=BV(UV,"DataView"),HV=qV,FV=qs,GV=Jr,KV=FV(GV,"Promise"),YV=KV,VV=qs,WV=Jr,XV=VV(WV,"Set"),v3=XV,QV=qs,ZV=Jr,JV=QV(ZV,"WeakMap"),eW=JV,fx=HV,dx=i1,hx=YV,px=v3,mx=eW,g3=Ra,rc=wk,t2="[object Map]",tW="[object Object]",n2="[object Promise]",r2="[object Set]",a2="[object WeakMap]",i2="[object DataView]",nW=rc(fx),rW=rc(dx),aW=rc(hx),iW=rc(px),sW=rc(mx),Ji=g3;(fx&&Ji(new fx(new ArrayBuffer(1)))!=i2||dx&&Ji(new dx)!=t2||hx&&Ji(hx.resolve())!=n2||px&&Ji(new px)!=r2||mx&&Ji(new mx)!=a2)&&(Ji=function(e){var t=g3(e),n=t==tW?e.constructor:void 0,r=n?rc(n):"";if(r)switch(r){case nW:return i2;case rW:return t2;case aW:return n2;case iW:return r2;case sW:return a2}return t});var lW=Ji,fv=s3,oW=u3,cW=BK,uW=IV,s2=lW,l2=jn,o2=h3,fW=m3,dW=1,c2="[object Arguments]",u2="[object Array]",cd="[object Object]",hW=Object.prototype,f2=hW.hasOwnProperty;function pW(e,t,n,r,a,i){var l=l2(e),o=l2(t),c=l?u2:s2(e),u=o?u2:s2(t);c=c==c2?cd:c,u=u==c2?cd:u;var f=c==cd,d=u==cd,h=c==u;if(h&&o2(e)){if(!o2(t))return!1;l=!0,f=!1}if(h&&!f)return i||(i=new fv),l||fW(e)?oW(e,t,n,r,a,i):cW(e,t,c,n,r,a,i);if(!(n&dW)){var m=f&&f2.call(e,"__wrapped__"),j=d&&f2.call(t,"__wrapped__");if(m||j){var v=m?e.value():e,p=j?t.value():t;return i||(i=new fv),a(v,p,n,r,i)}}return h?(i||(i=new fv),uW(e,t,n,r,a,i)):!1}var mW=pW,yW=mW,d2=Da;function x3(e,t,n,r,a){return e===t?!0:e==null||t==null||!d2(e)&&!d2(t)?e!==e&&t!==t:yW(e,t,n,r,x3,a)}var S1=x3,vW=s3,gW=S1,xW=1,bW=2;function jW(e,t,n,r){var a=n.length,i=a,l=!r;if(e==null)return!i;for(e=Object(e);a--;){var o=n[a];if(l&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=n[a];var c=o[0],u=e[c],f=o[1];if(l&&o[2]){if(u===void 0&&!(c in e))return!1}else{var d=new vW;if(r)var h=r(u,f,c,e,t,d);if(!(h===void 0?gW(f,u,xW|bW,r,d):h))return!1}}return!0}var SW=jW,wW=Ri;function NW(e){return e===e&&!wW(e)}var b3=NW,OW=b3,AW=zm;function CW(e){for(var t=AW(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,OW(a)]}return t}var EW=CW;function _W(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var j3=_W,TW=SW,kW=EW,MW=j3;function PW(e){var t=kW(e);return t.length==1&&t[0][2]?MW(t[0][0],t[0][1]):function(n){return n===e||TW(n,e,t)}}var $W=PW;function RW(e,t){return e!=null&&t in Object(e)}var DW=RW,LW=Ek,zW=x1,IW=jn,BW=b1,UW=j1,qW=Sm;function HW(e,t,n){t=LW(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var l=qW(t[r]);if(!(i=e!=null&&n(e,l)))break;e=e[l]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&UW(a)&&BW(l,a)&&(IW(e)||zW(e)))}var FW=HW,GW=DW,KW=FW;function YW(e,t){return e!=null&&KW(e,t,GW)}var VW=YW,WW=S1,XW=_k,QW=VW,ZW=n1,JW=b3,eX=j3,tX=Sm,nX=1,rX=2;function aX(e,t){return ZW(e)&&JW(t)?eX(tX(e),t):function(n){var r=XW(n,e);return r===void 0&&r===t?QW(n,e):WW(t,r,nX|rX)}}var iX=aX;function sX(e){return e}var ac=sX;function lX(e){return function(t){return t==null?void 0:t[e]}}var oX=lX,cX=c1;function uX(e){return function(t){return cX(t,e)}}var fX=uX,dX=oX,hX=fX,pX=n1,mX=Sm;function yX(e){return pX(e)?dX(mX(e)):hX(e)}var vX=yX,gX=$W,xX=iX,bX=ac,jX=jn,SX=vX;function wX(e){return typeof e=="function"?e:e==null?bX:typeof e=="object"?jX(e)?xX(e[0],e[1]):gX(e):SX(e)}var ea=wX;function NX(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var S3=NX;function OX(e){return e!==e}var AX=OX;function CX(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var EX=CX,_X=S3,TX=AX,kX=EX;function MX(e,t,n){return t===t?kX(e,t,n):_X(e,TX,n)}var PX=MX,$X=PX;function RX(e,t){var n=e==null?0:e.length;return!!n&&$X(e,t,0)>-1}var DX=RX;function LX(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var zX=LX;function IX(){}var BX=IX,dv=v3,UX=BX,qX=g1,HX=1/0,FX=dv&&1/qX(new dv([,-0]))[1]==HX?function(e){return new dv(e)}:UX,GX=FX,KX=l3,YX=DX,VX=zX,WX=c3,XX=GX,QX=g1,ZX=200;function JX(e,t,n){var r=-1,a=YX,i=e.length,l=!0,o=[],c=o;if(n)l=!1,a=VX;else if(i>=ZX){var u=t?null:XX(e);if(u)return QX(u);l=!1,a=WX,c=new KX}else c=t?[]:o;e:for(;++r<i;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,l&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),o.push(f)}else a(c,d,n)||(c!==o&&c.push(d),o.push(f))}return o}var eQ=JX,tQ=ea,nQ=eQ;function rQ(e,t){return e&&e.length?nQ(e,tQ(t)):[]}var aQ=rQ;const h2=$e(aQ);function w3(e,t,n){return t===!0?h2(e,n):ce(t)?h2(e,t):e}function oo(e){"@babel/helpers - typeof";return oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oo(e)}var iQ=["ref"];function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){Im(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m2(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,O3(r.key),r)}}function lQ(e,t,n){return t&&m2(e.prototype,t),n&&m2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oQ(e,t,n){return t=Fh(t),cQ(e,N3()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function cQ(e,t){if(t&&(oo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uQ(e)}function uQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N3=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function fQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yx(e,t)}function yx(e,t){return yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yx(e,t)}function Im(e,t,n){return t=O3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O3(e){var t=dQ(e,"string");return oo(t)=="symbol"?t:t+""}function dQ(e,t){if(oo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hQ(e,t){if(e==null)return{};var n=pQ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pQ(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 mQ(e){return e.value}function yQ(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var n=hQ(t,iQ);return T.createElement(v1,n)}var y2=1,tr=function(e){function t(){var n;sQ(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=oQ(this,t,[].concat(a)),Im(n,"lastBoundingBox",{width:-1,height:-1}),n}return fQ(t,e),lQ(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>y2||Math.abs(a.height-this.lastBoundingBox.height)>y2)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,o=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=l==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var j=this.getBBoxSnapshot();h={top:((f||0)-j.height)/2}}else h=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return sa(sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,o=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,d=sa(sa({position:"absolute",width:l||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return T.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},yQ(i,sa(sa({},this.props),{},{payload:w3(f,u,mQ)})))}}],[{key:"getWithHeight",value:function(r,a){var i=sa(sa({},this.defaultProps),r.props),l=i.layout;return l==="vertical"&&Q(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])}(S.PureComponent);Im(tr,"displayName","Legend");Im(tr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var v2=Tf,vQ=x1,gQ=jn,g2=v2?v2.isConcatSpreadable:void 0;function xQ(e){return gQ(e)||vQ(e)||!!(g2&&e&&e[g2])}var bQ=xQ,jQ=f3,SQ=bQ;function A3(e,t,n,r,a){var i=-1,l=e.length;for(n||(n=SQ),a||(a=[]);++i<l;){var o=e[i];t>0&&n(o)?t>1?A3(o,t-1,n,r,a):jQ(a,o):r||(a[a.length]=o)}return a}var C3=A3;function wQ(e){return function(t,n,r){for(var a=-1,i=Object(t),l=r(t),o=l.length;o--;){var c=l[e?o:++a];if(n(i[c],c,i)===!1)break}return t}}var NQ=wQ,OQ=NQ,AQ=OQ(),CQ=AQ,EQ=CQ,_Q=zm;function TQ(e,t){return e&&EQ(e,t,_Q)}var E3=TQ,kQ=kf;function MQ(e,t){return function(n,r){if(n==null)return n;if(!kQ(n))return e(n,r);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++i<a)&&r(l[i],i,l)!==!1;);return n}}var PQ=MQ,$Q=E3,RQ=PQ,DQ=RQ($Q),w1=DQ,LQ=w1,zQ=kf;function IQ(e,t){var n=-1,r=zQ(e)?Array(e.length):[];return LQ(e,function(a,i,l){r[++n]=t(a,i,l)}),r}var _3=IQ;function BQ(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var UQ=BQ,x2=Xo;function qQ(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=x2(e),l=t!==void 0,o=t===null,c=t===t,u=x2(t);if(!o&&!u&&!i&&e>t||i&&l&&c&&!o&&!u||r&&l&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||o&&n&&a||!l&&a||!c)return-1}return 0}var HQ=qQ,FQ=HQ;function GQ(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,l=a.length,o=n.length;++r<l;){var c=FQ(a[r],i[r]);if(c){if(r>=o)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var KQ=GQ,hv=o1,YQ=c1,VQ=ea,WQ=_3,XQ=UQ,QQ=p3,ZQ=KQ,JQ=ac,eZ=jn;function tZ(e,t,n){t.length?t=hv(t,function(i){return eZ(i)?function(l){return YQ(l,i.length===1?i[0]:i)}:i}):t=[JQ];var r=-1;t=hv(t,QQ(VQ));var a=WQ(e,function(i,l,o){var c=hv(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return XQ(a,function(i,l){return ZQ(i,l,n)})}var nZ=tZ;function rZ(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)}var aZ=rZ,iZ=aZ,b2=Math.max;function sZ(e,t,n){return t=b2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=b2(r.length-t,0),l=Array(i);++a<i;)l[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(l),iZ(e,this,o)}}var lZ=sZ;function oZ(e){return function(){return e}}var cZ=oZ,uZ=qs,fZ=function(){try{var e=uZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),T3=fZ,dZ=cZ,j2=T3,hZ=ac,pZ=j2?function(e,t){return j2(e,"toString",{configurable:!0,enumerable:!1,value:dZ(t),writable:!0})}:hZ,mZ=pZ,yZ=800,vZ=16,gZ=Date.now;function xZ(e){var t=0,n=0;return function(){var r=gZ(),a=vZ-(r-n);if(n=r,a>0){if(++t>=yZ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bZ=xZ,jZ=mZ,SZ=bZ,wZ=SZ(jZ),NZ=wZ,OZ=ac,AZ=lZ,CZ=NZ;function EZ(e,t){return CZ(AZ(e,t,OZ),e+"")}var _Z=EZ,TZ=a1,kZ=kf,MZ=b1,PZ=Ri;function $Z(e,t,n){if(!PZ(n))return!1;var r=typeof t;return(r=="number"?kZ(n)&&MZ(t,n.length):r=="string"&&t in n)?TZ(n[t],e):!1}var Bm=$Z,RZ=C3,DZ=nZ,LZ=_Z,S2=Bm,zZ=LZ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&S2(e,t[0],t[1])?t=[]:n>2&&S2(t[0],t[1],t[2])&&(t=[t[0]]),DZ(e,RZ(t,1),[])}),IZ=zZ;const N1=$e(IZ);function wu(e){"@babel/helpers - typeof";return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wu(e)}function vx(){return vx=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},vx.apply(this,arguments)}function BZ(e,t){return FZ(e)||HZ(e,t)||qZ(e,t)||UZ()}function UZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qZ(e,t){if(e){if(typeof e=="string")return w2(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 w2(e,t)}}function w2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function FZ(e){if(Array.isArray(e))return e}function N2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N2(Object(n),!0).forEach(function(r){GZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GZ(e,t,n){return t=KZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KZ(e){var t=YZ(e,"string");return wu(t)=="symbol"?t:t+""}function YZ(e,t){if(wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VZ(e){return Array.isArray(e)&&kt(e[0])&&kt(e[1])?e.join(" ~ "):e}var WZ=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,l=t.itemStyle,o=l===void 0?{}:l,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,m=t.wrapperClassName,j=t.labelClassName,v=t.label,p=t.labelFormatter,y=t.accessibilityLayer,g=y===void 0?!1:y,b=function(){if(f&&f.length){var k={padding:0,margin:0},I=(h?N1(f,h):f).map(function(_,C){if(_.type==="none")return null;var P=pv({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},o),z=_.formatter||d||VZ,B=_.value,K=_.name,V=B,X=K;if(z&&V!=null&&X!=null){var Z=z(B,K,_,C,f);if(Array.isArray(Z)){var ne=BZ(Z,2);V=ne[0],X=ne[1]}else V=Z}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(C),style:P},kt(X)?T.createElement("span",{className:"recharts-tooltip-item-name"},X):null,kt(X)?T.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,T.createElement("span",{className:"recharts-tooltip-item-value"},V),T.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:k},I)}return null},x=pv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),N=pv({margin:0},u),w=!oe(v),O=w?v:"",A=pe("recharts-default-tooltip",m),E=pe("recharts-tooltip-label",j);w&&p&&f!==void 0&&f!==null&&(O=p(v,f));var M=g?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",vx({className:A,style:x},M),T.createElement("p",{className:E,style:N},T.isValidElement(O)?O:"".concat(O)),b())};function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function ud(e,t,n){return t=XZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XZ(e){var t=QZ(e,"string");return Nu(t)=="symbol"?t:t+""}function QZ(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bc="recharts-tooltip-wrapper",ZZ={visibility:"hidden"};function JZ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return pe(bc,ud(ud(ud(ud({},"".concat(bc,"-right"),Q(n)&&t&&Q(t.x)&&n>=t.x),"".concat(bc,"-left"),Q(n)&&t&&Q(t.x)&&n<t.x),"".concat(bc,"-bottom"),Q(r)&&t&&Q(t.y)&&r>=t.y),"".concat(bc,"-top"),Q(r)&&t&&Q(t.y)&&r<t.y))}function O2(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,l=e.reverseDirection,o=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Q(i[r]))return i[r];var f=n[r]-o-a,d=n[r]+a;if(t[r])return l[r]?f:d;if(l[r]){var h=f,m=c[r];return h<m?Math.max(d,c[r]):Math.max(f,c[r])}var j=d+o,v=c[r]+u;return j>v?Math.max(f,c[r]):Math.max(d,c[r])}function eJ(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function tJ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,o=e.useTranslate3d,c=e.viewBox,u,f,d;return l.height>0&&l.width>0&&n?(f=O2({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),d=O2({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),u=eJ({translateX:f,translateY:d,useTranslate3d:o})):u=ZZ,{cssProperties:u,cssClasses:JZ({translateX:f,translateY:d,coordinate:n})}}function co(e){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(e)}function A2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function C2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A2(Object(n),!0).forEach(function(r){xx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rJ(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,M3(r.key),r)}}function aJ(e,t,n){return t&&rJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iJ(e,t,n){return t=Gh(t),sJ(e,k3()?Reflect.construct(t,n||[],Gh(e).constructor):t.apply(e,n))}function sJ(e,t){if(t&&(co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lJ(e)}function lJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k3=function(){return!!e})()}function Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gh(e)}function oJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gx(e,t)}function gx(e,t){return gx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},gx(e,t)}function xx(e,t,n){return t=M3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M3(e){var t=cJ(e,"string");return co(t)=="symbol"?t:t+""}function cJ(e,t){if(co(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E2=1,uJ=function(e){function t(){var n;nJ(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=iJ(this,t,[].concat(a)),xx(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),xx(n,"handleKeyDown",function(l){if(l.key==="Escape"){var o,c,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return oJ(t,e),aJ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>E2||Math.abs(r.height-this.state.lastBoundingBox.height)>E2)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,m=a.offset,j=a.position,v=a.reverseDirection,p=a.useTranslate3d,y=a.viewBox,g=a.wrapperStyle,b=tJ({allowEscapeViewBox:l,coordinate:f,offsetTopLeft:m,position:j,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:y}),x=b.cssClasses,N=b.cssProperties,w=C2(C2({transition:h&&i?"transform ".concat(o,"ms ").concat(c):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},g);return T.createElement("div",{tabIndex:-1,className:x,style:w,ref:function(A){r.wrapperNode=A}},u)}}])}(S.PureComponent),fJ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},La={isSsr:fJ()};function uo(e){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uo(e)}function _2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_2(Object(n),!0).forEach(function(r){O1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hJ(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,$3(r.key),r)}}function pJ(e,t,n){return t&&hJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mJ(e,t,n){return t=Kh(t),yJ(e,P3()?Reflect.construct(t,n||[],Kh(e).constructor):t.apply(e,n))}function yJ(e,t){if(t&&(uo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vJ(e)}function vJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P3=function(){return!!e})()}function Kh(e){return Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kh(e)}function gJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bx(e,t)}function bx(e,t){return bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bx(e,t)}function O1(e,t,n){return t=$3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $3(e){var t=xJ(e,"string");return uo(t)=="symbol"?t:t+""}function xJ(e,t){if(uo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function bJ(e){return e.dataKey}function jJ(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(WZ,t)}var tn=function(e){function t(){return dJ(this,t),mJ(this,t,arguments)}return gJ(t,e),pJ(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,d=a.filterNull,h=a.isAnimationActive,m=a.offset,j=a.payload,v=a.payloadUniqBy,p=a.position,y=a.reverseDirection,g=a.useTranslate3d,b=a.viewBox,x=a.wrapperStyle,N=j??[];d&&N.length&&(N=w3(j.filter(function(O){return O.value!=null&&(O.hide!==!0||r.props.includeHidden)}),v,bJ));var w=N.length>0;return T.createElement(uJ,{allowEscapeViewBox:l,animationDuration:o,animationEasing:c,isAnimationActive:h,active:i,coordinate:f,hasPayload:w,offset:m,position:p,reverseDirection:y,useTranslate3d:g,viewBox:b,wrapperStyle:x},jJ(u,T2(T2({},this.props),{},{payload:N})))}}])}(S.PureComponent);O1(tn,"displayName","Tooltip");O1(tn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!La.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 SJ=Jr,wJ=function(){return SJ.Date.now()},NJ=wJ,OJ=/\s/;function AJ(e){for(var t=e.length;t--&&OJ.test(e.charAt(t)););return t}var CJ=AJ,EJ=CJ,_J=/^\s+/;function TJ(e){return e&&e.slice(0,EJ(e)+1).replace(_J,"")}var kJ=TJ,MJ=kJ,k2=Ri,PJ=Xo,M2=NaN,$J=/^[-+]0x[0-9a-f]+$/i,RJ=/^0b[01]+$/i,DJ=/^0o[0-7]+$/i,LJ=parseInt;function zJ(e){if(typeof e=="number")return e;if(PJ(e))return M2;if(k2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=k2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=MJ(e);var n=RJ.test(e);return n||DJ.test(e)?LJ(e.slice(2),n?2:8):$J.test(e)?M2:+e}var R3=zJ,IJ=Ri,mv=NJ,P2=R3,BJ="Expected a function",UJ=Math.max,qJ=Math.min;function HJ(e,t,n){var r,a,i,l,o,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(BJ);t=P2(t)||0,IJ(n)&&(f=!!n.leading,d="maxWait"in n,i=d?UJ(P2(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(w){var O=r,A=a;return r=a=void 0,u=w,l=e.apply(A,O),l}function j(w){return u=w,o=setTimeout(y,t),f?m(w):l}function v(w){var O=w-c,A=w-u,E=t-O;return d?qJ(E,i-A):E}function p(w){var O=w-c,A=w-u;return c===void 0||O>=t||O<0||d&&A>=i}function y(){var w=mv();if(p(w))return g(w);o=setTimeout(y,v(w))}function g(w){return o=void 0,h&&r?m(w):(r=a=void 0,l)}function b(){o!==void 0&&clearTimeout(o),u=0,r=c=a=o=void 0}function x(){return o===void 0?l:g(mv())}function N(){var w=mv(),O=p(w);if(r=arguments,a=this,c=w,O){if(o===void 0)return j(c);if(d)return clearTimeout(o),o=setTimeout(y,t),m(c)}return o===void 0&&(o=setTimeout(y,t)),l}return N.cancel=b,N.flush=x,N}var FJ=HJ,GJ=FJ,KJ=Ri,YJ="Expected a function";function VJ(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(YJ);return KJ(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),GJ(e,t,{leading:r,maxWait:t,trailing:a})}var WJ=VJ;const D3=$e(WJ);function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){XJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XJ(e,t,n){return t=QJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QJ(e){var t=ZJ(e,"string");return Ou(t)=="symbol"?t:t+""}function ZJ(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JJ(e,t){return ree(e)||nee(e,t)||tee(e,t)||eee()}function eee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tee(e,t){if(e){if(typeof e=="string")return R2(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 R2(e,t)}}function R2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function ree(e){if(Array.isArray(e))return e}var xl=S.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,l=i===void 0?"100%":i,o=e.height,c=o===void 0?"100%":o,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,m=e.children,j=e.debounce,v=j===void 0?0:j,p=e.id,y=e.className,g=e.onResize,b=e.style,x=b===void 0?{}:b,N=S.useRef(null),w=S.useRef();w.current=g,S.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var O=S.useState({containerWidth:a.width,containerHeight:a.height}),A=JJ(O,2),E=A[0],M=A[1],$=S.useCallback(function(I,_){M(function(C){var P=Math.round(I),z=Math.round(_);return C.containerWidth===P&&C.containerHeight===z?C:{containerWidth:P,containerHeight:z}})},[]);S.useEffect(function(){var I=function(K){var V,X=K[0].contentRect,Z=X.width,ne=X.height;$(Z,ne),(V=w.current)===null||V===void 0||V.call(w,Z,ne)};v>0&&(I=D3(I,v,{trailing:!0,leading:!1}));var _=new ResizeObserver(I),C=N.current.getBoundingClientRect(),P=C.width,z=C.height;return $(P,z),_.observe(N.current),function(){_.disconnect()}},[$,v]);var k=S.useMemo(function(){var I=E.containerWidth,_=E.containerHeight;if(I<0||_<0)return null;wr(rs(l)||rs(c),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,l,c),wr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var C=rs(l)?I:l,P=rs(c)?_:c;n&&n>0&&(C?P=C/n:P&&(C=P*n),h&&P>h&&(P=h)),wr(C>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,C,P,l,c,f,d,n);var z=!Array.isArray(m)&&wa(m.type).endsWith("Chart");return T.Children.map(m,function(B){return T.isValidElement(B)?S.cloneElement(B,fd({width:C,height:P},z?{style:fd({height:"100%",width:"100%",maxHeight:P,maxWidth:C},B.props.style)}:{})):B})},[n,m,c,h,d,f,E,l]);return T.createElement("div",{id:p?"".concat(p):void 0,className:pe("recharts-responsive-container",y),style:fd(fd({},x),{},{width:l,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:N},k)}),Mf=function(t){return null};Mf.displayName="Cell";function Au(e){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}function D2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D2(Object(n),!0).forEach(function(r){aee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aee(e,t,n){return t=iee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iee(e){var t=see(e,"string");return Au(t)=="symbol"?t:t+""}function see(e,t){if(Au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zs={widthCache:{},cacheCount:0},lee=2e3,oee={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},L2="recharts_measurement_span";function cee(e){var t=jx({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Wc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||La.isSsr)return{width:0,height:0};var r=cee(n),a=JSON.stringify({text:t,copyStyle:r});if(Zs.widthCache[a])return Zs.widthCache[a];try{var i=document.getElementById(L2);i||(i=document.createElement("span"),i.setAttribute("id",L2),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=jx(jx({},oee),r);Object.assign(i.style,l),i.textContent="".concat(t);var o=i.getBoundingClientRect(),c={width:o.width,height:o.height};return Zs.widthCache[a]=c,++Zs.cacheCount>lee&&(Zs.cacheCount=0,Zs.widthCache={}),c}catch{return{width:0,height:0}}},uee=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function Yh(e,t){return pee(e)||hee(e,t)||dee(e,t)||fee()}function fee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dee(e,t){if(e){if(typeof e=="string")return z2(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 z2(e,t)}}function z2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function pee(e){if(Array.isArray(e))return e}function mee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I2(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,vee(r.key),r)}}function yee(e,t,n){return t&&I2(e.prototype,t),n&&I2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vee(e){var t=gee(e,"string");return Cu(t)=="symbol"?t:t+""}function gee(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,U2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xee=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bee=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,L3={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},jee=Object.keys(L3),bl="NaN";function See(e,t){return e*L3[t]}var dd=function(){function e(t,n){mee(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!xee.test(n)&&(this.num=NaN,this.unit=""),jee.includes(n)&&(this.num=See(t,n),this.unit="px")}return yee(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=bee.exec(n))!==null&&r!==void 0?r:[],i=Yh(a,3),l=i[1],o=i[2];return new e(parseFloat(l),o??"")}}])}();function z3(e){if(e.includes(bl))return bl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=B2.exec(t))!==null&&n!==void 0?n:[],a=Yh(r,4),i=a[1],l=a[2],o=a[3],c=dd.parse(i??""),u=dd.parse(o??""),f=l==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return bl;t=t.replace(B2,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=U2.exec(t))!==null&&d!==void 0?d:[],m=Yh(h,4),j=m[1],v=m[2],p=m[3],y=dd.parse(j??""),g=dd.parse(p??""),b=v==="+"?y.add(g):y.subtract(g);if(b.isNaN())return bl;t=t.replace(U2,b.toString())}return t}var q2=/\(([^()]*)\)/;function wee(e){for(var t=e;t.includes("(");){var n=q2.exec(t),r=Yh(n,2),a=r[1];t=t.replace(q2,z3(a))}return t}function Nee(e){var t=e.replace(/\s+/g,"");return t=wee(t),t=z3(t),t}function Oee(e){try{return Nee(e)}catch{return bl}}function yv(e){var t=Oee(e.slice(5,-1));return t===bl?"":t}var Aee=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Cee=["dx","dy","angle","className","breakAll"];function Sx(){return Sx=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},Sx.apply(this,arguments)}function H2(e,t){if(e==null)return{};var n=Eee(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(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 F2(e,t){return Mee(e)||kee(e,t)||Tee(e,t)||_ee()}function _ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tee(e,t){if(e){if(typeof e=="string")return G2(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 G2(e,t)}}function G2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Mee(e){if(Array.isArray(e))return e}var I3=/[ \f\n\r\t\v\u2028\u2029]+/,B3=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];oe(n)||(r?i=n.toString().split(""):i=n.toString().split(I3));var l=i.map(function(c){return{word:c,width:Wc(c,a).width}}),o=r?0:Wc(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:o}}catch{return null}},Pee=function(t,n,r,a,i){var l=t.maxLines,o=t.children,c=t.style,u=t.breakAll,f=Q(l),d=o,h=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return C.reduce(function(P,z){var B=z.word,K=z.width,V=P[P.length-1];if(V&&(a==null||i||V.width+K+r<Number(a)))V.words.push(B),V.width+=K+r;else{var X={words:[B],width:K};P.push(X)}return P},[])},m=h(n),j=function(C){return C.reduce(function(P,z){return P.width>z.width?P:z})};if(!f)return m;for(var v="…",p=function(C){var P=d.slice(0,C),z=B3({breakAll:u,style:c,children:P+v}).wordsWithComputedWidth,B=h(z),K=B.length>l||j(B).width>Number(a);return[K,B]},y=0,g=d.length-1,b=0,x;y<=g&&b<=d.length-1;){var N=Math.floor((y+g)/2),w=N-1,O=p(w),A=F2(O,2),E=A[0],M=A[1],$=p(N),k=F2($,1),I=k[0];if(!E&&!I&&(y=N+1),E&&I&&(g=N-1),!E&&I){x=M;break}b++}return x||m},K2=function(t){var n=oe(t)?[]:t.toString().split(I3);return[{words:n}]},$ee=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,o=t.maxLines;if((n||r)&&!La.isSsr){var c,u,f=B3({breakAll:l,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return K2(a);return Pee({breakAll:l,children:a,maxLines:o,style:i},c,u,n,r)}return K2(a)},Y2="#808080",Ps=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,o=l===void 0?"1em":l,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,j=t.verticalAnchor,v=j===void 0?"end":j,p=t.fill,y=p===void 0?Y2:p,g=H2(t,Aee),b=S.useMemo(function(){return $ee({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:d,style:g.style,width:g.width})},[g.breakAll,g.children,g.maxLines,d,g.style,g.width]),x=g.dx,N=g.dy,w=g.angle,O=g.className,A=g.breakAll,E=H2(g,Cee);if(!kt(r)||!kt(i))return null;var M=r+(Q(x)?x:0),$=i+(Q(N)?N:0),k;switch(v){case"start":k=yv("calc(".concat(u,")"));break;case"middle":k=yv("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:k=yv("calc(".concat(b.length-1," * -").concat(o,")"));break}var I=[];if(d){var _=b[0].width,C=g.width;I.push("scale(".concat((Q(C)?C/_:1)/_,")"))}return w&&I.push("rotate(".concat(w,", ").concat(M,", ").concat($,")")),I.length&&(E.transform=I.join(" ")),T.createElement("text",Sx({},ae(E,!0),{x:M,y:$,className:pe("recharts-text",O),textAnchor:m,fill:y.includes("url")?Y2:y}),b.map(function(P,z){var B=P.words.join(A?"":" ");return T.createElement("tspan",{x:M,dy:z===0?k:o,key:"".concat(B,"-").concat(z)},B)}))};function wi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ree(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function A1(e){let t,n,r;e.length!==2?(t=wi,n=(o,c)=>wi(e(o),c),r=(o,c)=>e(o)-c):(t=e===wi||e===Ree?e:Dee,n=e,r=e);function a(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<0?u=d+1:f=d}while(u<f)}return u}function i(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function l(o,c,u=0,f=o.length){const d=a(o,c,u,f-1);return d>u&&r(o[d-1],c)>-r(o[d],c)?d-1:d}return{left:a,center:l,right:i}}function Dee(){return 0}function U3(e){return e===null?NaN:+e}function*Lee(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const zee=A1(wi),Pf=zee.right;A1(U3).center;class V2 extends Map{constructor(t,n=Uee){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(W2(this,t))}has(t){return super.has(W2(this,t))}set(t,n){return super.set(Iee(this,t),n)}delete(t){return super.delete(Bee(this,t))}}function W2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Iee({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Bee({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Uee(e){return e!==null&&typeof e=="object"?e.valueOf():e}function qee(e=wi){if(e===wi)return q3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function q3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Hee=Math.sqrt(50),Fee=Math.sqrt(10),Gee=Math.sqrt(2);function Vh(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),l=i>=Hee?10:i>=Fee?5:i>=Gee?2:1;let o,c,u;return a<0?(u=Math.pow(10,-a)/l,o=Math.round(e*u),c=Math.round(t*u),o/u<e&&++o,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*l,o=Math.round(e/u),c=Math.round(t/u),o*u<e&&++o,c*u>t&&--c),c<o&&.5<=n&&n<2?Vh(e,t,n*2):[o,c,u]}function wx(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,l]=r?Vh(t,e,n):Vh(e,t,n);if(!(i>=a))return[];const o=i-a+1,c=new Array(o);if(r)if(l<0)for(let u=0;u<o;++u)c[u]=(i-u)/-l;else for(let u=0;u<o;++u)c[u]=(i-u)*l;else if(l<0)for(let u=0;u<o;++u)c[u]=(a+u)/-l;else for(let u=0;u<o;++u)c[u]=(a+u)*l;return c}function Nx(e,t,n){return t=+t,e=+e,n=+n,Vh(e,t,n)[2]}function Ox(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?Nx(t,e,n):Nx(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function X2(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Q2(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function H3(e,t,n=0,r=1/0,a){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(a=a===void 0?q3:qee(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/c+h)),j=Math.min(r,Math.floor(t+(c-u)*d/c+h));H3(e,t,m,j,a)}const i=e[t];let l=n,o=r;for(jc(e,n,t),a(e[r],i)>0&&jc(e,n,r);l<o;){for(jc(e,l,o),++l,--o;a(e[l],i)<0;)++l;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?jc(e,n,o):(++o,jc(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function jc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Kee(e,t,n){if(e=Float64Array.from(Lee(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Q2(e);if(t>=1)return X2(e);var r,a=(r-1)*t,i=Math.floor(a),l=X2(H3(e,i).subarray(0,i+1)),o=Q2(e.subarray(i+1));return l+(o-l)*(a-i)}}function Yee(e,t,n=U3){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,a=(r-1)*t,i=Math.floor(a),l=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return l+(o-l)*(a-i)}}function Vee(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function dr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function za(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ax=Symbol("implicit");function C1(){var e=new V2,t=[],n=[],r=Ax;function a(i){let l=e.get(i);if(l===void 0){if(r!==Ax)return r;e.set(i,l=t.push(i)-1)}return n[l%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new V2;for(const l of i)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return C1(t,n).unknown(r)},dr.apply(a,arguments),a}function Eu(){var e=C1().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,l,o=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,m=a<r,j=m?a:r,v=m?r:a;i=(v-j)/Math.max(1,h-c+u*2),o&&(i=Math.floor(i)),j+=(v-j-i*(h-c))*f,l=i*(1-c),o&&(j=Math.round(j),l=Math.round(l));var p=Vee(h).map(function(y){return j+i*y});return n(m?p.reverse():p)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,d()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,d()},e.bandwidth=function(){return l},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return Eu(t(),[r,a]).round(o).paddingInner(c).paddingOuter(u).align(f)},dr.apply(d(),arguments)}function F3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return F3(t())},e}function Xc(){return F3(Eu.apply(null,arguments).paddingInner(1))}function E1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function G3(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $f(){}var _u=.7,Wh=1/_u,Pl="\\s*([+-]?\\d+)\\s*",Tu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wee=/^#([0-9a-f]{3,8})$/,Xee=new RegExp(`^rgb\\(${Pl},${Pl},${Pl}\\)$`),Qee=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),Zee=new RegExp(`^rgba\\(${Pl},${Pl},${Pl},${Tu}\\)$`),Jee=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${Tu}\\)$`),ete=new RegExp(`^hsl\\(${Tu},${Kr},${Kr}\\)$`),tte=new RegExp(`^hsla\\(${Tu},${Kr},${Kr},${Tu}\\)$`),Z2={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};E1($f,ku,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:J2,formatHex:J2,formatHex8:nte,formatHsl:rte,formatRgb:eN,toString:eN});function J2(){return this.rgb().formatHex()}function nte(){return this.rgb().formatHex8()}function rte(){return K3(this).formatHsl()}function eN(){return this.rgb().formatRgb()}function ku(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Wee.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tN(t):n===3?new yn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hd(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=Xee.exec(e))?new yn(t[1],t[2],t[3],1):(t=Qee.exec(e))?new yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Zee.exec(e))?hd(t[1],t[2],t[3],t[4]):(t=Jee.exec(e))?hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ete.exec(e))?aN(t[1],t[2]/100,t[3]/100,1):(t=tte.exec(e))?aN(t[1],t[2]/100,t[3]/100,t[4]):Z2.hasOwnProperty(e)?tN(Z2[e]):e==="transparent"?new yn(NaN,NaN,NaN,0):null}function tN(e){return new yn(e>>16&255,e>>8&255,e&255,1)}function hd(e,t,n,r){return r<=0&&(e=t=n=NaN),new yn(e,t,n,r)}function ate(e){return e instanceof $f||(e=ku(e)),e?(e=e.rgb(),new yn(e.r,e.g,e.b,e.opacity)):new yn}function Cx(e,t,n,r){return arguments.length===1?ate(e):new yn(e,t,n,r??1)}function yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}E1(yn,Cx,G3($f,{brighter(e){return e=e==null?Wh:Math.pow(Wh,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yn(Ss(this.r),Ss(this.g),Ss(this.b),Xh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nN,formatHex:nN,formatHex8:ite,formatRgb:rN,toString:rN}));function nN(){return`#${as(this.r)}${as(this.g)}${as(this.b)}`}function ite(){return`#${as(this.r)}${as(this.g)}${as(this.b)}${as((isNaN(this.opacity)?1:this.opacity)*255)}`}function rN(){const e=Xh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ss(this.r)}, ${Ss(this.g)}, ${Ss(this.b)}${e===1?")":`, ${e})`}`}function Xh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ss(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function as(e){return e=Ss(e),(e<16?"0":"")+e.toString(16)}function aN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new br(e,t,n,r)}function K3(e){if(e instanceof br)return new br(e.h,e.s,e.l,e.opacity);if(e instanceof $f||(e=ku(e)),!e)return new br;if(e instanceof br)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),l=NaN,o=i-a,c=(i+a)/2;return o?(t===i?l=(n-r)/o+(n<r)*6:n===i?l=(r-t)/o+2:l=(t-n)/o+4,o/=c<.5?i+a:2-i-a,l*=60):o=c>0&&c<1?0:l,new br(l,o,c,e.opacity)}function ste(e,t,n,r){return arguments.length===1?K3(e):new br(e,t,n,r??1)}function br(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}E1(br,ste,G3($f,{brighter(e){return e=e==null?Wh:Math.pow(Wh,e),new br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new br(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,a=2*n-r;return new yn(vv(e>=240?e-240:e+120,a,r),vv(e,a,r),vv(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new br(iN(this.h),pd(this.s),pd(this.l),Xh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xh(this.opacity);return`${e===1?"hsl(":"hsla("}${iN(this.h)}, ${pd(this.s)*100}%, ${pd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iN(e){return e=(e||0)%360,e<0?e+360:e}function pd(e){return Math.max(0,Math.min(1,e||0))}function vv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _1=e=>()=>e;function lte(e,t){return function(n){return e+n*t}}function ote(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function cte(e){return(e=+e)==1?Y3:function(t,n){return n-t?ote(t,n,e):_1(isNaN(t)?n:t)}}function Y3(e,t){var n=t-e;return n?lte(e,n):_1(isNaN(e)?t:e)}const sN=function e(t){var n=cte(t);function r(a,i){var l=n((a=Cx(a)).r,(i=Cx(i)).r),o=n(a.g,i.g),c=n(a.b,i.b),u=Y3(a.opacity,i.opacity);return function(f){return a.r=l(f),a.g=o(f),a.b=c(f),a.opacity=u(f),a+""}}return r.gamma=e,r}(1);function ute(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function fte(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dte(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),l;for(l=0;l<r;++l)a[l]=ic(e[l],t[l]);for(;l<n;++l)i[l]=t[l];return function(o){for(l=0;l<r;++l)i[l]=a[l](o);return i}}function hte(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Qh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pte(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=ic(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var Ex=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gv=new RegExp(Ex.source,"g");function mte(e){return function(){return e}}function yte(e){return function(t){return e(t)+""}}function vte(e,t){var n=Ex.lastIndex=gv.lastIndex=0,r,a,i,l=-1,o=[],c=[];for(e=e+"",t=t+"";(r=Ex.exec(e))&&(a=gv.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[l]?o[l]+=i:o[++l]=i),(r=r[0])===(a=a[0])?o[l]?o[l]+=a:o[++l]=a:(o[++l]=null,c.push({i:l,x:Qh(r,a)})),n=gv.lastIndex;return n<t.length&&(i=t.slice(n),o[l]?o[l]+=i:o[++l]=i),o.length<2?c[0]?yte(c[0].x):mte(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)o[(d=c[f]).i]=d.x(u);return o.join("")})}function ic(e,t){var n=typeof t,r;return t==null||n==="boolean"?_1(t):(n==="number"?Qh:n==="string"?(r=ku(t))?(t=r,sN):vte:t instanceof ku?sN:t instanceof Date?hte:fte(t)?ute:Array.isArray(t)?dte:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?pte:Qh)(e,t)}function T1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function gte(e,t){t===void 0&&(t=e,e=ic);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(l){var o=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return i[o](l-o)}}function xte(e){return function(){return e}}function Zh(e){return+e}var lN=[0,1];function ln(e){return e}function _x(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:xte(isNaN(t)?NaN:.5)}function bte(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function jte(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a<r?(r=_x(a,r),i=n(l,i)):(r=_x(r,a),i=n(i,l)),function(o){return i(r(o))}}function Ste(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=_x(e[l],e[l+1]),i[l]=n(t[l],t[l+1]);return function(o){var c=Pf(e,o,1,r)-1;return i[c](a[c](o))}}function Rf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Um(){var e=lN,t=lN,n=ic,r,a,i,l=ln,o,c,u;function f(){var h=Math.min(e.length,t.length);return l!==ln&&(l=bte(e[0],e[h-1])),o=h>2?Ste:jte,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(c||(c=o(e.map(r),t,n)))(r(l(h)))}return d.invert=function(h){return l(a((u||(u=o(t,e.map(r),Qh)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Zh),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=T1,f()},d.clamp=function(h){return arguments.length?(l=h?!0:ln,f()):l!==ln},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,m){return r=h,a=m,f()}}function k1(){return Um()(ln,ln)}function wte(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jh(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 fo(e){return e=Jh(Math.abs(e)),e?e[1]:NaN}function Nte(e,t){return function(n,r){for(var a=n.length,i=[],l=0,o=e[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),i.push(n.substring(a-=o,a+o)),!((c+=o+1)>r));)o=e[l=(l+1)%e.length];return i.reverse().join(t)}}function Ote(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Ate=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=Ate.exec(e)))throw new Error("invalid format: "+e);var t;return new M1({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]})}Mu.prototype=M1.prototype;function M1(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+""}M1.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 Cte(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var ep;function Ete(e,t){var n=Jh(e,t);if(!n)return ep=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(ep=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Jh(e,Math.max(0,t+i-1))[0]}function oN(e,t){var n=Jh(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const cN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wte,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)=>oN(e*100,t),r:oN,s:Ete,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uN(e){return e}var fN=Array.prototype.map,dN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _te(e){var t=e.grouping===void 0||e.thousands===void 0?uN:Nte(fN.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?uN:Ote(fN.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d,h){d=Mu(d);var m=d.fill,j=d.align,v=d.sign,p=d.symbol,y=d.zero,g=d.width,b=d.comma,x=d.precision,N=d.trim,w=d.type;w==="n"?(b=!0,w="g"):cN[w]||(x===void 0&&(x=12),N=!0,w="g"),(y||m==="0"&&j==="=")&&(y=!0,m="0",j="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(p==="$"?n:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),A=(p==="$"?r:/[%p]/.test(w)?l:"")+(h&&h.suffix!==void 0?h.suffix:""),E=cN[w],M=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function $(k){var I=O,_=A,C,P,z;if(w==="c")_=E(k)+_,k="";else{k=+k;var B=k<0||1/k<0;if(k=isNaN(k)?c:E(Math.abs(k),x),N&&(k=Cte(k)),B&&+k==0&&v!=="+"&&(B=!1),I=(B?v==="("?v:o:v==="-"||v==="("?"":v)+I,_=(w==="s"&&!isNaN(k)&&ep!==void 0?dN[8+ep/3]:"")+_+(B&&v==="("?")":""),M){for(C=-1,P=k.length;++C<P;)if(z=k.charCodeAt(C),48>z||z>57){_=(z===46?a+k.slice(C+1):k.slice(C))+_,k=k.slice(0,C);break}}}b&&!y&&(k=t(k,1/0));var K=I.length+k.length+_.length,V=K<g?new Array(g-K+1).join(m):"";switch(b&&y&&(k=t(V+k,V.length?g-_.length:1/0),V=""),j){case"<":k=I+k+_+V;break;case"=":k=I+V+k+_;break;case"^":k=V.slice(0,K=V.length>>1)+I+k+_+V.slice(K);break;default:k=V+I+k+_;break}return i(k)}return $.toString=function(){return d+""},$}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(fo(h)/3)))*3,j=Math.pow(10,-m),v=u((d=Mu(d),d.type="f",d),{suffix:dN[8+m/3]});return function(p){return v(j*p)}}return{format:u,formatPrefix:f}}var md,P1,V3;Tte({thousands:",",grouping:[3],currency:["$",""]});function Tte(e){return md=_te(e),P1=md.format,V3=md.formatPrefix,md}function kte(e){return Math.max(0,-fo(Math.abs(e)))}function Mte(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fo(t)/3)))*3-fo(Math.abs(e)))}function Pte(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,fo(t)-fo(e))+1}function W3(e,t,n,r){var a=Ox(e,t,n),i;switch(r=Mu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Mte(a,l))&&(r.precision=i),V3(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Pte(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=kte(a))&&(r.precision=i-(r.type==="%")*2);break}}return P1(r)}function Li(e){var t=e.domain;return e.ticks=function(n){var r=t();return wx(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return W3(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,l=r[a],o=r[i],c,u,f=10;for(o<l&&(u=l,l=o,o=u,u=a,a=i,i=u);f-- >0;){if(u=Nx(l,o,n),u===c)return r[a]=l,r[i]=o,t(r);if(u>0)l=Math.floor(l/u)*u,o=Math.ceil(o/u)*u;else if(u<0)l=Math.ceil(l*u)/u,o=Math.floor(o*u)/u;else break;c=u}return e},e}function tp(){var e=k1();return e.copy=function(){return Rf(e,tp())},dr.apply(e,arguments),Li(e)}function X3(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Zh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return X3(e).unknown(t)},e=arguments.length?Array.from(e,Zh):[0,1],Li(n)}function Q3(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],l;return i<a&&(l=n,n=r,r=l,l=a,a=i,i=l),e[n]=t.floor(a),e[r]=t.ceil(i),e}function hN(e){return Math.log(e)}function pN(e){return Math.exp(e)}function $te(e){return-Math.log(-e)}function Rte(e){return-Math.exp(-e)}function Dte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Lte(e){return e===10?Dte:e===Math.E?Math.exp:t=>Math.pow(e,t)}function zte(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 mN(e){return(t,n)=>-e(-t,n)}function $1(e){const t=e(hN,pN),n=t.domain;let r=10,a,i;function l(){return a=zte(r),i=Lte(r),n()[0]<0?(a=mN(a),i=mN(i),e($te,Rte)):e(hN,pN),t}return t.base=function(o){return arguments.length?(r=+o,l()):r},t.domain=function(o){return arguments.length?(n(o),l()):n()},t.ticks=o=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=a(u),m=a(f),j,v;const p=o==null?10:+o;let y=[];if(!(r%1)&&m-h<p){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(j=1;j<r;++j)if(v=h<0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}}else for(;h<=m;++h)for(j=r-1;j>=1;--j)if(v=h>0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}y.length*2<p&&(y=wx(u,f,p))}else y=wx(h,m,Math.min(m-h,p)).map(i);return d?y.reverse():y},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Mu(c)).precision==null&&(c.trim=!0),c=P1(c)),o===1/0)return c;const u=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},t.nice=()=>n(Q3(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function Z3(){const e=$1(Um()).domain([1,10]);return e.copy=()=>Rf(e,Z3()).base(e.base()),dr.apply(e,arguments),e}function yN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function R1(e){var t=1,n=e(yN(t),vN(t));return n.constant=function(r){return arguments.length?e(yN(t=+r),vN(t)):t},Li(n)}function J3(){var e=R1(Um());return e.copy=function(){return Rf(e,J3()).constant(e.constant())},dr.apply(e,arguments)}function gN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ite(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bte(e){return e<0?-e*e:e*e}function D1(e){var t=e(ln,ln),n=1;function r(){return n===1?e(ln,ln):n===.5?e(Ite,Bte):e(gN(n),gN(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Li(t)}function L1(){var e=D1(Um());return e.copy=function(){return Rf(e,L1()).exponent(e.exponent())},dr.apply(e,arguments),e}function Ute(){return L1.apply(null,arguments).exponent(.5)}function xN(e){return Math.sign(e)*e*e}function qte(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eM(){var e=k1(),t=[0,1],n=!1,r;function a(i){var l=qte(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(xN(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Zh)).map(xN)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return eM(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},dr.apply(a,arguments),Li(a)}function tM(){var e=[],t=[],n=[],r;function a(){var l=0,o=Math.max(1,t.length);for(n=new Array(o-1);++l<o;)n[l-1]=Yee(e,l/o);return i}function i(l){return l==null||isNaN(l=+l)?r:t[Pf(n,l)]}return i.invertExtent=function(l){var o=t.indexOf(l);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let o of l)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(wi),a()},i.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return tM().domain(e).range(t).unknown(r)},dr.apply(i,arguments)}function nM(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function l(c){return c!=null&&c<=c?a[Pf(r,c,0,n)]:i}function o(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},l.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,o()):a.slice()},l.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},l.unknown=function(c){return arguments.length&&(i=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return nM().domain([e,t]).range(a).unknown(i)},dr.apply(Li(l),arguments)}function rM(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Pf(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var l=t.indexOf(i);return[e[l-1],e[l]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return rM().domain(e).range(t).unknown(n)},dr.apply(a,arguments)}const xv=new Date,bv=new Date;function Pt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const l=a(i),o=a.ceil(i);return i-l<o-i?l:o},a.offset=(i,l)=>(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,o)=>{const c=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<l)||!(o>0))return c;let u;do c.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<l);return c},a.filter=i=>Pt(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;t(l,-1),!i(l););else for(;--o>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(xv.setTime(+i),bv.setTime(+l),e(xv),e(bv),Math.floor(n(xv,bv))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?l=>r(l)%i===0:l=>a.count(0,l)%i===0):a)),a}const np=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);np.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):np);np.range;const va=1e3,nr=va*60,ga=nr*60,ka=ga*24,z1=ka*7,bN=ka*30,jv=ka*365,is=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*va)},(e,t)=>(t-e)/va,e=>e.getUTCSeconds());is.range;const I1=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*va)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getMinutes());I1.range;const B1=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCMinutes());B1.range;const U1=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*va-e.getMinutes()*nr)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getHours());U1.range;const q1=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getUTCHours());q1.range;const Df=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nr)/ka,e=>e.getDate()-1);Df.range;const qm=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ka,e=>e.getUTCDate()-1);qm.range;const aM=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ka,e=>Math.floor(e/ka));aM.range;function Hs(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*nr)/z1)}const Hm=Hs(0),rp=Hs(1),Hte=Hs(2),Fte=Hs(3),ho=Hs(4),Gte=Hs(5),Kte=Hs(6);Hm.range;rp.range;Hte.range;Fte.range;ho.range;Gte.range;Kte.range;function Fs(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/z1)}const Fm=Fs(0),ap=Fs(1),Yte=Fs(2),Vte=Fs(3),po=Fs(4),Wte=Fs(5),Xte=Fs(6);Fm.range;ap.range;Yte.range;Vte.range;po.range;Wte.range;Xte.range;const H1=Pt(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());H1.range;const F1=Pt(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());F1.range;const Ma=Pt(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());Ma.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)});Ma.range;const Pa=Pt(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());Pa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)});Pa.range;function iM(e,t,n,r,a,i){const l=[[is,1,va],[is,5,5*va],[is,15,15*va],[is,30,30*va],[i,1,nr],[i,5,5*nr],[i,15,15*nr],[i,30,30*nr],[a,1,ga],[a,3,3*ga],[a,6,6*ga],[a,12,12*ga],[r,1,ka],[r,2,2*ka],[n,1,z1],[t,1,bN],[t,3,3*bN],[e,1,jv]];function o(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),j=m?m.range(u,+f+1):[];return h?j.reverse():j}function c(u,f,d){const h=Math.abs(f-u)/d,m=A1(([,,p])=>p).right(l,h);if(m===l.length)return e.every(Ox(u/jv,f/jv,d));if(m===0)return np.every(Math.max(Ox(u,f,d),1));const[j,v]=l[h/l[m-1][2]<l[m][2]/h?m-1:m];return j.every(v)}return[o,c]}const[Qte,Zte]=iM(Pa,F1,Fm,aM,q1,B1),[Jte,ene]=iM(Ma,H1,Hm,Df,U1,I1);function Sv(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 wv(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 Sc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tne(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,l=e.shortDays,o=e.months,c=e.shortMonths,u=wc(a),f=Nc(a),d=wc(i),h=Nc(i),m=wc(l),j=Nc(l),v=wc(o),p=Nc(o),y=wc(c),g=Nc(c),b={a:z,A:B,b:K,B:V,c:null,d:AN,e:AN,f:Nne,g:$ne,G:Dne,H:jne,I:Sne,j:wne,L:sM,m:One,M:Ane,p:X,q:Z,Q:_N,s:TN,S:Cne,u:Ene,U:_ne,V:Tne,w:kne,W:Mne,x:null,X:null,y:Pne,Y:Rne,Z:Lne,"%":EN},x={a:ne,A:ie,b:je,B:ye,c:null,d:CN,e:CN,f:Une,g:Qne,G:Jne,H:zne,I:Ine,j:Bne,L:oM,m:qne,M:Hne,p:ft,q:_e,Q:_N,s:TN,S:Fne,u:Gne,U:Kne,V:Yne,w:Vne,W:Wne,x:null,X:null,y:Xne,Y:Zne,Z:ere,"%":EN},N={a:M,A:$,b:k,B:I,c:_,d:NN,e:NN,f:vne,g:wN,G:SN,H:ON,I:ON,j:hne,L:yne,m:dne,M:pne,p:E,q:fne,Q:xne,s:bne,S:mne,u:sne,U:lne,V:one,w:ine,W:cne,x:C,X:P,y:wN,Y:SN,Z:une,"%":gne};b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x);function w(J,se){return function(W){var G=[],Re=-1,be=0,dt=J.length,vt,jt,qa;for(W instanceof Date||(W=new Date(+W));++Re<dt;)J.charCodeAt(Re)===37&&(G.push(J.slice(be,Re)),(jt=jN[vt=J.charAt(++Re)])!=null?vt=J.charAt(++Re):jt=vt==="e"?" ":"0",(qa=se[vt])&&(vt=qa(W,jt)),G.push(vt),be=Re+1);return G.push(J.slice(be,Re)),G.join("")}}function O(J,se){return function(W){var G=Sc(1900,void 0,1),Re=A(G,J,W+="",0),be,dt;if(Re!=W.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(se&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(be=wv(Sc(G.y,0,1)),dt=be.getUTCDay(),be=dt>4||dt===0?ap.ceil(be):ap(be),be=qm.offset(be,(G.V-1)*7),G.y=be.getUTCFullYear(),G.m=be.getUTCMonth(),G.d=be.getUTCDate()+(G.w+6)%7):(be=Sv(Sc(G.y,0,1)),dt=be.getDay(),be=dt>4||dt===0?rp.ceil(be):rp(be),be=Df.offset(be,(G.V-1)*7),G.y=be.getFullYear(),G.m=be.getMonth(),G.d=be.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),dt="Z"in G?wv(Sc(G.y,0,1)).getUTCDay():Sv(Sc(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(dt+5)%7:G.w+G.U*7-(dt+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,wv(G)):Sv(G)}}function A(J,se,W,G){for(var Re=0,be=se.length,dt=W.length,vt,jt;Re<be;){if(G>=dt)return-1;if(vt=se.charCodeAt(Re++),vt===37){if(vt=se.charAt(Re++),jt=N[vt in jN?se.charAt(Re++):vt],!jt||(G=jt(J,W,G))<0)return-1}else if(vt!=W.charCodeAt(G++))return-1}return G}function E(J,se,W){var G=u.exec(se.slice(W));return G?(J.p=f.get(G[0].toLowerCase()),W+G[0].length):-1}function M(J,se,W){var G=m.exec(se.slice(W));return G?(J.w=j.get(G[0].toLowerCase()),W+G[0].length):-1}function $(J,se,W){var G=d.exec(se.slice(W));return G?(J.w=h.get(G[0].toLowerCase()),W+G[0].length):-1}function k(J,se,W){var G=y.exec(se.slice(W));return G?(J.m=g.get(G[0].toLowerCase()),W+G[0].length):-1}function I(J,se,W){var G=v.exec(se.slice(W));return G?(J.m=p.get(G[0].toLowerCase()),W+G[0].length):-1}function _(J,se,W){return A(J,t,se,W)}function C(J,se,W){return A(J,n,se,W)}function P(J,se,W){return A(J,r,se,W)}function z(J){return l[J.getDay()]}function B(J){return i[J.getDay()]}function K(J){return c[J.getMonth()]}function V(J){return o[J.getMonth()]}function X(J){return a[+(J.getHours()>=12)]}function Z(J){return 1+~~(J.getMonth()/3)}function ne(J){return l[J.getUTCDay()]}function ie(J){return i[J.getUTCDay()]}function je(J){return c[J.getUTCMonth()]}function ye(J){return o[J.getUTCMonth()]}function ft(J){return a[+(J.getUTCHours()>=12)]}function _e(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var se=w(J+="",b);return se.toString=function(){return J},se},parse:function(J){var se=O(J+="",!1);return se.toString=function(){return J},se},utcFormat:function(J){var se=w(J+="",x);return se.toString=function(){return J},se},utcParse:function(J){var se=O(J+="",!0);return se.toString=function(){return J},se}}}var jN={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,nne=/^%/,rne=/[\\^$*+?|[\]().{}]/g;function Te(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function ane(e){return e.replace(rne,"\\$&")}function wc(e){return new RegExp("^(?:"+e.map(ane).join("|")+")","i")}function Nc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function ine(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sne(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function one(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function cne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function SN(e,t,n){var r=Bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wN(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function une(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 fne(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function dne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function NN(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hne(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ON(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yne(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vne(e,t,n){var r=Bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function gne(e,t,n){var r=nne.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xne(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bne(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AN(e,t){return Te(e.getDate(),t,2)}function jne(e,t){return Te(e.getHours(),t,2)}function Sne(e,t){return Te(e.getHours()%12||12,t,2)}function wne(e,t){return Te(1+Df.count(Ma(e),e),t,3)}function sM(e,t){return Te(e.getMilliseconds(),t,3)}function Nne(e,t){return sM(e,t)+"000"}function One(e,t){return Te(e.getMonth()+1,t,2)}function Ane(e,t){return Te(e.getMinutes(),t,2)}function Cne(e,t){return Te(e.getSeconds(),t,2)}function Ene(e){var t=e.getDay();return t===0?7:t}function _ne(e,t){return Te(Hm.count(Ma(e)-1,e),t,2)}function lM(e){var t=e.getDay();return t>=4||t===0?ho(e):ho.ceil(e)}function Tne(e,t){return e=lM(e),Te(ho.count(Ma(e),e)+(Ma(e).getDay()===4),t,2)}function kne(e){return e.getDay()}function Mne(e,t){return Te(rp.count(Ma(e)-1,e),t,2)}function Pne(e,t){return Te(e.getFullYear()%100,t,2)}function $ne(e,t){return e=lM(e),Te(e.getFullYear()%100,t,2)}function Rne(e,t){return Te(e.getFullYear()%1e4,t,4)}function Dne(e,t){var n=e.getDay();return e=n>=4||n===0?ho(e):ho.ceil(e),Te(e.getFullYear()%1e4,t,4)}function Lne(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Te(t/60|0,"0",2)+Te(t%60,"0",2)}function CN(e,t){return Te(e.getUTCDate(),t,2)}function zne(e,t){return Te(e.getUTCHours(),t,2)}function Ine(e,t){return Te(e.getUTCHours()%12||12,t,2)}function Bne(e,t){return Te(1+qm.count(Pa(e),e),t,3)}function oM(e,t){return Te(e.getUTCMilliseconds(),t,3)}function Une(e,t){return oM(e,t)+"000"}function qne(e,t){return Te(e.getUTCMonth()+1,t,2)}function Hne(e,t){return Te(e.getUTCMinutes(),t,2)}function Fne(e,t){return Te(e.getUTCSeconds(),t,2)}function Gne(e){var t=e.getUTCDay();return t===0?7:t}function Kne(e,t){return Te(Fm.count(Pa(e)-1,e),t,2)}function cM(e){var t=e.getUTCDay();return t>=4||t===0?po(e):po.ceil(e)}function Yne(e,t){return e=cM(e),Te(po.count(Pa(e),e)+(Pa(e).getUTCDay()===4),t,2)}function Vne(e){return e.getUTCDay()}function Wne(e,t){return Te(ap.count(Pa(e)-1,e),t,2)}function Xne(e,t){return Te(e.getUTCFullYear()%100,t,2)}function Qne(e,t){return e=cM(e),Te(e.getUTCFullYear()%100,t,2)}function Zne(e,t){return Te(e.getUTCFullYear()%1e4,t,4)}function Jne(e,t){var n=e.getUTCDay();return e=n>=4||n===0?po(e):po.ceil(e),Te(e.getUTCFullYear()%1e4,t,4)}function ere(){return"+0000"}function EN(){return"%"}function _N(e){return+e}function TN(e){return Math.floor(+e/1e3)}var Js,uM,fM;tre({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 tre(e){return Js=tne(e),uM=Js.format,Js.parse,fM=Js.utcFormat,Js.utcParse,Js}function nre(e){return new Date(e)}function rre(e){return e instanceof Date?+e:+new Date(+e)}function G1(e,t,n,r,a,i,l,o,c,u){var f=k1(),d=f.invert,h=f.domain,m=u(".%L"),j=u(":%S"),v=u("%I:%M"),p=u("%I %p"),y=u("%a %d"),g=u("%b %d"),b=u("%B"),x=u("%Y");function N(w){return(c(w)<w?m:o(w)<w?j:l(w)<w?v:i(w)<w?p:r(w)<w?a(w)<w?y:g:n(w)<w?b:x)(w)}return f.invert=function(w){return new Date(d(w))},f.domain=function(w){return arguments.length?h(Array.from(w,rre)):h().map(nre)},f.ticks=function(w){var O=h();return e(O[0],O[O.length-1],w??10)},f.tickFormat=function(w,O){return O==null?N:u(O)},f.nice=function(w){var O=h();return(!w||typeof w.range!="function")&&(w=t(O[0],O[O.length-1],w??10)),w?h(Q3(O,w)):f},f.copy=function(){return Rf(f,G1(e,t,n,r,a,i,l,o,c,u))},f}function are(){return dr.apply(G1(Jte,ene,Ma,H1,Hm,Df,U1,I1,is,uM).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ire(){return dr.apply(G1(Qte,Zte,Pa,F1,Fm,qm,q1,B1,is,fM).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gm(){var e=0,t=1,n,r,a,i,l=ln,o=!1,c;function u(d){return d==null||isNaN(d=+d)?c:l(a===0?.5:(d=(i(d)-n)*a,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(l=d,u):l};function f(d){return function(h){var m,j;return arguments.length?([m,j]=h,l=d(m,j),u):[l(0),l(1)]}}return u.range=f(ic),u.rangeRound=f(T1),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,n=d(e),r=d(t),a=n===r?0:1/(r-n),u}}function zi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dM(){var e=Li(Gm()(ln));return e.copy=function(){return zi(e,dM())},za.apply(e,arguments)}function hM(){var e=$1(Gm()).domain([1,10]);return e.copy=function(){return zi(e,hM()).base(e.base())},za.apply(e,arguments)}function pM(){var e=R1(Gm());return e.copy=function(){return zi(e,pM()).constant(e.constant())},za.apply(e,arguments)}function K1(){var e=D1(Gm());return e.copy=function(){return zi(e,K1()).exponent(e.exponent())},za.apply(e,arguments)}function sre(){return K1.apply(null,arguments).exponent(.5)}function mM(){var e=[],t=ln;function n(r){if(r!=null&&!isNaN(r=+r))return t((Pf(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(wi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Kee(e,i/r))},n.copy=function(){return mM(t).domain(e)},za.apply(n,arguments)}function Km(){var e=0,t=.5,n=1,r=1,a,i,l,o,c,u=ln,f,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-i)*(r*v<r*i?o:c),u(d?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,a=f(e=+e),i=f(t=+t),l=f(n=+n),o=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(d=!!v,m):d},m.interpolator=function(v){return arguments.length?(u=v,m):u};function j(v){return function(p){var y,g,b;return arguments.length?([y,g,b]=p,u=gte(v,[y,g,b]),m):[u(0),u(.5),u(1)]}}return m.range=j(ic),m.rangeRound=j(T1),m.unknown=function(v){return arguments.length?(h=v,m):h},function(v){return f=v,a=v(e),i=v(t),l=v(n),o=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m}}function yM(){var e=Li(Km()(ln));return e.copy=function(){return zi(e,yM())},za.apply(e,arguments)}function vM(){var e=$1(Km()).domain([.1,1,10]);return e.copy=function(){return zi(e,vM()).base(e.base())},za.apply(e,arguments)}function gM(){var e=R1(Km());return e.copy=function(){return zi(e,gM()).constant(e.constant())},za.apply(e,arguments)}function Y1(){var e=D1(Km());return e.copy=function(){return zi(e,Y1()).exponent(e.exponent())},za.apply(e,arguments)}function lre(){return Y1.apply(null,arguments).exponent(.5)}const kN=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Eu,scaleDiverging:yM,scaleDivergingLog:vM,scaleDivergingPow:Y1,scaleDivergingSqrt:lre,scaleDivergingSymlog:gM,scaleIdentity:X3,scaleImplicit:Ax,scaleLinear:tp,scaleLog:Z3,scaleOrdinal:C1,scalePoint:Xc,scalePow:L1,scaleQuantile:tM,scaleQuantize:nM,scaleRadial:eM,scaleSequential:dM,scaleSequentialLog:hM,scaleSequentialPow:K1,scaleSequentialQuantile:mM,scaleSequentialSqrt:sre,scaleSequentialSymlog:pM,scaleSqrt:Ute,scaleSymlog:J3,scaleThreshold:rM,scaleTime:are,scaleUtc:ire,tickFormat:W3},Symbol.toStringTag,{value:"Module"}));var ore=Xo;function cre(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],l=t(i);if(l!=null&&(o===void 0?l===l&&!ore(l):n(l,o)))var o=l,c=i}return c}var Ym=cre;function ure(e,t){return e>t}var xM=ure,fre=Ym,dre=xM,hre=ac;function pre(e){return e&&e.length?fre(e,hre,dre):void 0}var mre=pre;const fi=$e(mre);function yre(e,t){return e<t}var bM=yre,vre=Ym,gre=bM,xre=ac;function bre(e){return e&&e.length?vre(e,xre,gre):void 0}var jre=bre;const Vm=$e(jre);var Sre=o1,wre=ea,Nre=_3,Ore=jn;function Are(e,t){var n=Ore(e)?Sre:Nre;return n(e,wre(t))}var Cre=Are,Ere=C3,_re=Cre;function Tre(e,t){return Ere(_re(e,t),1)}var kre=Tre;const Mre=$e(kre);var Pre=S1;function $re(e,t){return Pre(e,t)}var Rre=$re;const ki=$e(Rre);var sc=1e9,Dre={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W1,at=!0,lr="[DecimalError] ",ws=lr+"Invalid argument: ",V1=lr+"Exponent out of range: ",lc=Math.floor,es=Math.pow,Lre=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,_n,Rt=1e7,Ze=7,jM=9007199254740991,ip=lc(jM/Ze),te={};te.absoluteValue=te.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};te.comparedTo=te.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};te.decimalPlaces=te.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ze;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};te.dividedBy=te.div=function(e){return Na(this,new this.constructor(e))};te.dividedToIntegerBy=te.idiv=function(e){var t=this,n=t.constructor;return qe(Na(t,new n(e),0,1),n.precision)};te.equals=te.eq=function(e){return!this.cmp(e)};te.exponent=function(){return Ct(this)};te.greaterThan=te.gt=function(e){return this.cmp(e)>0};te.greaterThanOrEqualTo=te.gte=function(e){return this.cmp(e)>=0};te.isInteger=te.isint=function(){return this.e>this.d.length-2};te.isNegative=te.isneg=function(){return this.s<0};te.isPositive=te.ispos=function(){return this.s>0};te.isZero=function(){return this.s===0};te.lessThan=te.lt=function(e){return this.cmp(e)<0};te.lessThanOrEqualTo=te.lte=function(e){return this.cmp(e)<1};te.logarithm=te.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(_n))throw Error(lr+"NaN");if(n.s<1)throw Error(lr+(n.s?"NaN":"-Infinity"));return n.eq(_n)?new r(0):(at=!1,t=Na(Pu(n,i),Pu(e,i),i),at=!0,qe(t,a))};te.minus=te.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NM(t,e):SM(t,(e.s=-e.s,e))};te.modulo=te.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(lr+"NaN");return n.s?(at=!1,t=Na(n,e,0,1).times(e),at=!0,n.minus(t)):qe(new r(n),a)};te.naturalExponential=te.exp=function(){return wM(this)};te.naturalLogarithm=te.ln=function(){return Pu(this)};te.negated=te.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};te.plus=te.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SM(t,e):NM(t,(e.s=-e.s,e))};te.precision=te.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ws+e);if(t=Ct(a)+1,r=a.d.length-1,n=r*Ze+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};te.squareRoot=te.sqrt=function(){var e,t,n,r,a,i,l,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(lr+"NaN")}for(e=Ct(o),at=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=Hr(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=lc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=l=n+3;;)if(i=r,r=i.plus(Na(o,i,l+2)).times(.5),Hr(i.d).slice(0,l)===(t=Hr(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(qe(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;l+=4}return at=!0,qe(r,n)};te.times=te.mul=function(e){var t,n,r,a,i,l,o,c,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,c=h.length,u=m.length,c<u&&(i=h,h=m,m=i,l=c,c=u,u=l),i=[],l=c+u,r=l;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)o=i[a]+m[r]*h[a-r-1]+t,i[a--]=o%Rt|0,t=o/Rt|0;i[a]=(i[a]+t)%Rt|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,at?qe(e,d.precision):e};te.toDecimalPlaces=te.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Wr(e,0,sc),t===void 0?t=r.rounding:Wr(t,0,8),qe(n,e+Ct(n)+1,t))};te.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=$s(r,!0):(Wr(e,0,sc),t===void 0?t=a.rounding:Wr(t,0,8),r=qe(new a(r),e+1,t),n=$s(r,!0,e+1)),n};te.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?$s(a):(Wr(e,0,sc),t===void 0?t=i.rounding:Wr(t,0,8),r=qe(new i(a),e+Ct(a)+1,t),n=$s(r.abs(),!1,e+Ct(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};te.toInteger=te.toint=function(){var e=this,t=e.constructor;return qe(new t(e),Ct(e)+1,t.rounding)};te.toNumber=function(){return+this};te.toPower=te.pow=function(e){var t,n,r,a,i,l,o=this,c=o.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(_n);if(o=new c(o),!o.s){if(e.s<1)throw Error(lr+"Infinity");return o}if(o.eq(_n))return o;if(r=c.precision,e.eq(_n))return qe(o,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=o.s,l){if((n=f<0?-f:f)<=jM){for(a=new c(_n),t=Math.ceil(r/Ze+4),at=!1;n%2&&(a=a.times(o),PN(a.d,t)),n=lc(n/2),n!==0;)o=o.times(o),PN(o.d,t);return at=!0,e.s<0?new c(_n).div(a):qe(a,r)}}else if(i<0)throw Error(lr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,at=!1,a=e.times(Pu(o,r+u)),at=!0,a=wM(a),a.s=i,a};te.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=Ct(a),r=$s(a,n<=i.toExpNeg||n>=i.toExpPos)):(Wr(e,1,sc),t===void 0?t=i.rounding:Wr(t,0,8),a=qe(new i(a),e,t),n=Ct(a),r=$s(a,e<=n||n<=i.toExpNeg,e)),r};te.toSignificantDigits=te.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Wr(e,1,sc),t===void 0?t=r.rounding:Wr(t,0,8)),qe(new r(n),e,t)};te.toString=te.valueOf=te.val=te.toJSON=te[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ct(e),n=e.constructor;return $s(e,t<=n.toExpNeg||t>=n.toExpPos)};function SM(e,t){var n,r,a,i,l,o,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),at?qe(t,d):t;if(c=e.d,u=t.d,l=e.e,a=t.e,c=c.slice(),i=l-a,i){for(i<0?(r=c,i=-i,o=u.length):(r=u,a=l,o=c.length),l=Math.ceil(d/Ze),o=l>o?l+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=c.length,i=u.length,o-i<0&&(i=o,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Rt|0,c[i]%=Rt;for(n&&(c.unshift(n),++a),o=c.length;c[--o]==0;)c.pop();return t.d=c,t.e=a,at?qe(t,d):t}function Wr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ws+e)}function Hr(e){var t,n,r,a=e.length-1,i="",l=e[0];if(a>0){for(i+=l,t=1;t<a;t++)r=e[t]+"",n=Ze-r.length,n&&(i+=Va(n)),i+=r;l=e[t],r=l+"",n=Ze-r.length,n&&(i+=Va(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var Na=function(){function e(r,a){var i,l=0,o=r.length;for(r=r.slice();o--;)i=r[o]*a+l,r[o]=i%Rt|0,l=i/Rt|0;return l&&r.unshift(l),r}function t(r,a,i,l){var o,c;if(i!=l)c=i>l?1:-1;else for(o=c=0;o<i;o++)if(r[o]!=a[o]){c=r[o]>a[o]?1:-1;break}return c}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]<a[i]?1:0,r[i]=l*Rt+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,l){var o,c,u,f,d,h,m,j,v,p,y,g,b,x,N,w,O,A,E=r.constructor,M=r.s==a.s?1:-1,$=r.d,k=a.d;if(!r.s)return new E(r);if(!a.s)throw Error(lr+"Division by zero");for(c=r.e-a.e,O=k.length,N=$.length,m=new E(M),j=m.d=[],u=0;k[u]==($[u]||0);)++u;if(k[u]>($[u]||0)&&--c,i==null?g=i=E.precision:l?g=i+(Ct(r)-Ct(a))+1:g=i,g<0)return new E(0);if(g=g/Ze+2|0,u=0,O==1)for(f=0,k=k[0],g++;(u<N||f)&&g--;u++)b=f*Rt+($[u]||0),j[u]=b/k|0,f=b%k|0;else{for(f=Rt/(k[0]+1)|0,f>1&&(k=e(k,f),$=e($,f),O=k.length,N=$.length),x=O,v=$.slice(0,O),p=v.length;p<O;)v[p++]=0;A=k.slice(),A.unshift(0),w=k[0],k[1]>=Rt/2&&++w;do f=0,o=t(k,v,O,p),o<0?(y=v[0],O!=p&&(y=y*Rt+(v[1]||0)),f=y/w|0,f>1?(f>=Rt&&(f=Rt-1),d=e(k,f),h=d.length,p=v.length,o=t(d,v,h,p),o==1&&(f--,n(d,O<h?A:k,h))):(f==0&&(o=f=1),d=k.slice()),h=d.length,h<p&&d.unshift(0),n(v,d,p),o==-1&&(p=v.length,o=t(k,v,O,p),o<1&&(f++,n(v,O<p?A:k,p))),p=v.length):o===0&&(f++,v=[0]),j[u++]=f,o&&v[0]?v[p++]=$[x]||0:(v=[$[x]],p=1);while((x++<N||v[0]!==void 0)&&g--)}return j[0]||j.shift(),m.e=c,qe(m,l?i+Ct(m)+1:i)}}();function wM(e,t){var n,r,a,i,l,o,c=0,u=0,f=e.constructor,d=f.precision;if(Ct(e)>16)throw Error(V1+Ct(e));if(!e.s)return new f(_n);for(at=!1,o=d,l=new f(.03125);e.abs().gte(.1);)e=e.times(l),u+=5;for(r=Math.log(es(2,u))/Math.LN10*2+5|0,o+=r,n=a=i=new f(_n),f.precision=o;;){if(a=qe(a.times(e),o),n=n.times(++c),l=i.plus(Na(a,n,o)),Hr(l.d).slice(0,o)===Hr(i.d).slice(0,o)){for(;u--;)i=qe(i.times(i),o);return f.precision=d,t==null?(at=!0,qe(i,d)):i}i=l}}function Ct(e){for(var t=e.e*Ze,n=e.d[0];n>=10;n/=10)t++;return t}function Nv(e,t,n){if(t>e.LN10.sd())throw at=!0,n&&(e.precision=n),Error(lr+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function Va(e){for(var t="";e--;)t+="0";return t}function Pu(e,t){var n,r,a,i,l,o,c,u,f,d=1,h=10,m=e,j=m.d,v=m.constructor,p=v.precision;if(m.s<1)throw Error(lr+(m.s?"NaN":"-Infinity"));if(m.eq(_n))return new v(0);if(t==null?(at=!1,u=p):u=t,m.eq(10))return t==null&&(at=!0),Nv(v,u);if(u+=h,v.precision=u,n=Hr(j),r=n.charAt(0),i=Ct(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Hr(m.d),r=n.charAt(0),d++;i=Ct(m),r>1?(m=new v("0."+n),i++):m=new v(r+"."+n.slice(1))}else return c=Nv(v,u+2,p).times(i+""),m=Pu(new v(r+"."+n.slice(1)),u-h).plus(c),v.precision=p,t==null?(at=!0,qe(m,p)):m;for(o=l=m=Na(m.minus(_n),m.plus(_n),u),f=qe(m.times(m),u),a=3;;){if(l=qe(l.times(f),u),c=o.plus(Na(l,new v(a),u)),Hr(c.d).slice(0,u)===Hr(o.d).slice(0,u))return o=o.times(2),i!==0&&(o=o.plus(Nv(v,u+2,p).times(i+""))),o=Na(o,new v(d),u),v.precision=p,t==null?(at=!0,qe(o,p)):o;o=c,a+=2}}function MN(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=lc(n/Ze),e.d=[],r=(n+1)%Ze,n<0&&(r+=Ze),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Ze;r<a;)e.d.push(+t.slice(r,r+=Ze));t=t.slice(r),r=Ze-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),at&&(e.e>ip||e.e<-ip))throw Error(V1+n)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,n){var r,a,i,l,o,c,u,f,d=e.d;for(l=1,i=d[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Ze,a=t,u=d[f=0];else{if(f=Math.ceil((r+1)/Ze),i=d.length,f>=i)return e;for(u=i=d[f],l=1;i>=10;i/=10)l++;r%=Ze,a=r-Ze+l}if(n!==void 0&&(i=es(10,l-a-1),o=u/i%10|0,c=t<0||d[f+1]!==void 0||u%i,c=n<4?(o||c)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||c||n==6&&(r>0?a>0?u/es(10,l-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(i=Ct(e),d.length=1,t=t-i-1,d[0]=es(10,(Ze-t%Ze)%Ze),e.e=lc(-t/Ze)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=es(10,Ze-r),d[f]=a>0?(u/es(10,l-a)%es(10,a)|0)*i:0),c)for(;;)if(f==0){(d[0]+=i)==Rt&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Rt)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(at&&(e.e>ip||e.e<-ip))throw Error(V1+Ct(e));return e}function NM(e,t){var n,r,a,i,l,o,c,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),at?qe(t,m):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),l=u-r,l){for(f=l<0,f?(n=c,l=-l,o=d.length):(n=d,r=u,o=c.length),a=Math.max(Math.ceil(m/Ze),o)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=c.length,o=d.length,f=a<o,f&&(o=a),a=0;a<o;a++)if(c[a]!=d[a]){f=c[a]<d[a];break}l=0}for(f&&(n=c,c=d,d=n,t.s=-t.s),o=c.length,a=d.length-o;a>0;--a)c[o++]=0;for(a=d.length;a>l;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=Rt-1;--c[i],c[a]+=Rt}c[a]-=d[a]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,at?qe(t,m):t):new h(0)}function $s(e,t,n){var r,a=Ct(e),i=Hr(e.d),l=i.length;return t?(n&&(r=n-l)>0?i=i.charAt(0)+"."+i.slice(1)+Va(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Va(-a-1)+i,n&&(r=n-l)>0&&(i+=Va(r))):a>=l?(i+=Va(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+Va(r))):((r=a+1)<l&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(i+="."),i+=Va(r))),e.s<0?"-"+i:i}function PN(e,t){if(e.length>t)return e.length=t,!0}function OM(e){var t,n,r;function a(i){var l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,i instanceof a){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ws+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return MN(l,i.toString())}else if(typeof i!="string")throw Error(ws+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,Lre.test(i))MN(l,i);else throw Error(ws+i)}if(a.prototype=te,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=OM,a.config=a.set=zre,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 a.config(e),a}function zre(e){if(!e||typeof e!="object")throw Error(lr+"Object expected");var t,n,r,a=["precision",1,sc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(lc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(ws+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ws+n+": "+r);return this}var W1=OM(Dre);_n=new W1(1);const Be=W1;function Ire(e){return Hre(e)||qre(e)||Ure(e)||Bre()}function Bre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ure(e,t){if(e){if(typeof e=="string")return Tx(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 Tx(e,t)}}function qre(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Hre(e){if(Array.isArray(e))return Tx(e)}function Tx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fre=function(t){return t},AM={},CM=function(t){return t===AM},$N=function(t){return function n(){return arguments.length===0||arguments.length===1&&CM(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Gre=function e(t,n){return t===1?n:$N(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var l=a.filter(function(o){return o!==AM}).length;return l>=t?n.apply(void 0,a):e(t-l,$N(function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var f=a.map(function(d){return CM(d)?c.shift():d});return n.apply(void 0,Ire(f).concat(c))}))})},Wm=function(t){return Gre(t.length,t)},kx=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},Kre=Wm(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Yre=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Fre;var a=n.reverse(),i=a[0],l=a.slice(1);return function(){return l.reduce(function(o,c){return c(o)},i.apply(void 0,arguments))}},Mx=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},EM=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];return n&&i.every(function(o,c){return o===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function Vre(e){var t;return e===0?t=1:t=Math.floor(new Be(e).abs().log(10).toNumber())+1,t}function Wre(e,t,n){for(var r=new Be(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var Xre=Wm(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),Qre=Wm(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Zre=Wm(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Xm={rangeStep:Wre,getDigitCount:Vre,interpolateNumber:Xre,uninterpolateNumber:Qre,uninterpolateTruncation:Zre};function Px(e){return tae(e)||eae(e)||_M(e)||Jre()}function Jre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eae(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tae(e){if(Array.isArray(e))return $x(e)}function $u(e,t){return aae(e)||rae(e,t)||_M(e,t)||nae()}function nae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _M(e,t){if(e){if(typeof e=="string")return $x(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 $x(e,t)}}function $x(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rae(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var l=e[Symbol.iterator](),o;!(r=(o=l.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function aae(e){if(Array.isArray(e))return e}function TM(e){var t=$u(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function kM(e,t,n){if(e.lte(0))return new Be(0);var r=Xm.getDigitCount(e.toNumber()),a=new Be(10).pow(r),i=e.div(a),l=r!==1?.05:.1,o=new Be(Math.ceil(i.div(l).toNumber())).add(n).mul(l),c=o.mul(a);return t?c:new Be(Math.ceil(c))}function iae(e,t,n){var r=1,a=new Be(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Be(10).pow(Xm.getDigitCount(e)-1),a=new Be(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Be(Math.floor(e)))}else e===0?a=new Be(Math.floor((t-1)/2)):n||(a=new Be(Math.floor(e)));var l=Math.floor((t-1)/2),o=Yre(Kre(function(c){return a.add(new Be(c-l).mul(r)).toNumber()}),kx);return o(0,t)}function MM(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var i=kM(new Be(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Be(0):(l=new Be(e).add(t).div(2),l=l.sub(new Be(l).mod(i)));var o=Math.ceil(l.sub(e).div(i).toNumber()),c=Math.ceil(new Be(t).sub(l).div(i).toNumber()),u=o+c+1;return u>n?MM(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,o=t>0?o:o+(n-u)),{step:i,tickMin:l.sub(new Be(o).mul(i)),tickMax:l.add(new Be(c).mul(i))})}function sae(e){var t=$u(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),o=TM([n,r]),c=$u(o,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(Px(kx(0,a-1).map(function(){return 1/0}))):[].concat(Px(kx(0,a-1).map(function(){return-1/0})),[f]);return n>r?Mx(d):d}if(u===f)return iae(u,a,i);var h=MM(u,f,l,i),m=h.step,j=h.tickMin,v=h.tickMax,p=Xm.rangeStep(j,v.add(new Be(.1).mul(m)),m);return n>r?Mx(p):p}function lae(e,t){var n=$u(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=TM([r,a]),o=$u(l,2),c=o[0],u=o[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var f=Math.max(t,2),d=kM(new Be(u).sub(c).div(f-1),i,0),h=[].concat(Px(Xm.rangeStep(new Be(c),new Be(u).sub(new Be(.99).mul(d)),d)),[u]);return r>a?Mx(h):h}var oae=EM(sae),cae=EM(lae),uae="Invariant failed";function Rs(e,t){throw new Error(uae)}var fae=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function sp(){return sp=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},sp.apply(this,arguments)}function dae(e,t){return yae(e)||mae(e,t)||pae(e,t)||hae()}function hae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pae(e,t){if(e){if(typeof e=="string")return RN(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 RN(e,t)}}function RN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function yae(e){if(Array.isArray(e))return e}function vae(e,t){if(e==null)return{};var n=gae(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gae(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 xae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bae(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,RM(r.key),r)}}function jae(e,t,n){return t&&bae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sae(e,t,n){return t=lp(t),wae(e,PM()?Reflect.construct(t,n||[],lp(e).constructor):t.apply(e,n))}function wae(e,t){if(t&&(mo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nae(e)}function Nae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PM=function(){return!!e})()}function lp(e){return lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lp(e)}function Oae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rx(e,t)}function Rx(e,t){return Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Rx(e,t)}function $M(e,t,n){return t=RM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RM(e){var t=Aae(e,"string");return mo(t)=="symbol"?t:t+""}function Aae(e,t){if(mo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oc=function(e){function t(){return xae(this,t),Sae(this,t,arguments)}return Oae(t,e),jae(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,l=r.width,o=r.dataKey,c=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,h=vae(r,fae),m=ae(h,!1);this.props.direction==="x"&&f.type!=="number"&&Rs();var j=c.map(function(v){var p=u(v,o),y=p.x,g=p.y,b=p.value,x=p.errorVal;if(!x)return null;var N=[],w,O;if(Array.isArray(x)){var A=dae(x,2);w=A[0],O=A[1]}else w=O=x;if(i==="vertical"){var E=f.scale,M=g+a,$=M+l,k=M-l,I=E(b-w),_=E(b+O);N.push({x1:_,y1:$,x2:_,y2:k}),N.push({x1:I,y1:M,x2:_,y2:M}),N.push({x1:I,y1:$,x2:I,y2:k})}else if(i==="horizontal"){var C=d.scale,P=y+a,z=P-l,B=P+l,K=C(b-w),V=C(b+O);N.push({x1:z,y1:V,x2:B,y2:V}),N.push({x1:P,y1:K,x2:P,y2:V}),N.push({x1:z,y1:K,x2:B,y2:K})}return T.createElement(ge,sp({className:"recharts-errorBar",key:"bar-".concat(N.map(function(X){return"".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))},m),N.map(function(X){return T.createElement("line",sp({},X,{key:"line-".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))}))});return T.createElement(ge,{className:"recharts-errorBars"},j)}}])}(T.Component);$M(oc,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});$M(oc,"displayName","ErrorBar");function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){Cae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cae(e,t,n){return t=Eae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eae(e){var t=_ae(e,"string");return Ru(t)=="symbol"?t:t+""}function _ae(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DM=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,l=On(n,tr);if(!l)return null;var o=tr.defaultProps,c=o!==void 0?Gi(Gi({},o),l.props):{},u;return l.props&&l.props.payload?u=l.props&&l.props.payload:i==="children"?u=(r||[]).reduce(function(f,d){var h=d.item,m=d.props,j=m.sectors||m.data||[];return f.concat(j.map(function(v){return{type:l.props.iconType||h.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(r||[]).map(function(f){var d=f.item,h=d.type.defaultProps,m=h!==void 0?Gi(Gi({},h),d.props):{},j=m.dataKey,v=m.name,p=m.legendType,y=m.hide;return{inactive:y,dataKey:j,type:c.iconType||p||"square",color:X1(d),value:v||j,payload:m}}),Gi(Gi(Gi({},c),tr.getWithHeight(l,a)),{},{payload:u,item:l})};function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function LN(e){return Pae(e)||Mae(e)||kae(e)||Tae()}function Tae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kae(e,t){if(e){if(typeof e=="string")return Dx(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 Dx(e,t)}}function Mae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pae(e){if(Array.isArray(e))return Dx(e)}function Dx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zN(Object(n),!0).forEach(function(r){$l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $l(e,t,n){return t=$ae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ae(e){var t=Rae(e,"string");return Du(t)=="symbol"?t:t+""}function Rae(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function et(e,t,n){return oe(e)||oe(t)?n:kt(t)?Rn(e,t,n):ce(t)?t(e):n}function Qc(e,t,n,r){var a=Mre(e,function(o){return et(o,t)});if(n==="number"){var i=a.filter(function(o){return Q(o)||parseFloat(o)});return i.length?[Vm(i),fi(i)]:[1/0,-1/0]}var l=r?a.filter(function(o){return!oe(o)}):a;return l.map(function(o){return kt(o)||o instanceof Date?o:""})}var Dae=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<o;u++){var f=u>0?a[u-1].coordinate:a[o-1].coordinate,d=a[u].coordinate,h=u>=o-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(an(d-f)!==an(h-d)){var j=[];if(an(h-d)===an(c[1]-c[0])){m=h;var v=d+c[1]-c[0];j[0]=Math.min(v,(v+f)/2),j[1]=Math.max(v,(v+f)/2)}else{m=f;var p=h+c[1]-c[0];j[0]=Math.min(d,(p+d)/2),j[1]=Math.max(d,(p+d)/2)}var y=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>y[0]&&t<=y[1]||t>=j[0]&&t<=j[1]){l=a[u].index;break}}else{var g=Math.min(f,h),b=Math.max(f,h);if(t>(g+d)/2&&t<=(b+d)/2){l=a[u].index;break}}}else for(var x=0;x<o;x++)if(x===0&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x>0&&x<o-1&&t>(r[x].coordinate+r[x-1].coordinate)/2&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x===o-1&&t>(r[x].coordinate+r[x-1].coordinate)/2){l=r[x].index;break}return l},X1=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,l=i.stroke,o=i.fill,c;switch(a){case"Line":c=l;break;case"Area":case"Radar":c=l&&l!=="none"?l:o;break;default:c=o;break}return c},Lae=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},o=Object.keys(i),c=0,u=o.length;c<u;c++)for(var f=i[o[c]].stackGroups,d=Object.keys(f),h=0,m=d.length;h<m;h++){var j=f[d[h]],v=j.items,p=j.cateAxisId,y=v.filter(function(O){return wa(O.type).indexOf("Bar")>=0});if(y&&y.length){var g=y[0].type.defaultProps,b=g!==void 0?mt(mt({},g),y[0].props):y[0].props,x=b.barSize,N=b[p];l[N]||(l[N]=[]);var w=oe(x)?n:x;l[N].push({item:y[0],stackList:y.slice(1),barSize:oe(w)?void 0:sn(w,r,0)})}}return l},zae=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,o=t.maxBarSize,c=l.length;if(c<1)return null;var u=sn(n,a,0,!0),f,d=[];if(l[0].barSize===+l[0].barSize){var h=!1,m=a/c,j=l.reduce(function(x,N){return x+N.barSize||0},0);j+=(c-1)*u,j>=a&&(j-=(c-1)*u,u=0),j>=a&&m>0&&(h=!0,m*=.9,j=c*m);var v=(a-j)/2>>0,p={offset:v-u,size:0};f=l.reduce(function(x,N){var w={item:N.item,position:{offset:p.offset+p.size+u,size:h?m:N.barSize}},O=[].concat(LN(x),[w]);return p=O[O.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(A){O.push({item:A,position:p})}),O},d)}else{var y=sn(r,a,0,!0);a-2*y-(c-1)*u<=0&&(u=0);var g=(a-2*y-(c-1)*u)/c;g>1&&(g>>=0);var b=o===+o?Math.min(g,o):g;f=l.reduce(function(x,N,w){var O=[].concat(LN(x),[{item:N.item,position:{offset:y+(g+u)*w+(g-b)/2,size:b}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(A){O.push({item:A,position:O[O.length-1].position})}),O},d)}return f},Iae=function(t,n,r,a){var i=r.children,l=r.width,o=r.margin,c=l-(o.left||0)-(o.right||0),u=DM({children:i,legendWidth:c});if(u){var f=a||{},d=f.width,h=f.height,m=u.align,j=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&j==="middle")&&m!=="center"&&Q(t[m]))return mt(mt({},t),{},$l({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&j!=="middle"&&Q(t[j]))return mt(mt({},t),{},$l({},j,t[j]+(h||0)))}return t},Bae=function(t,n,r){return oe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},LM=function(t,n,r,a,i){var l=n.props.children,o=cn(l,oc).filter(function(u){return Bae(a,i,u.props.direction)});if(o&&o.length){var c=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=et(f,r);if(oe(d))return u;var h=Array.isArray(d)?[Vm(d),fi(d)]:[d,d],m=c.reduce(function(j,v){var p=et(f,v,0),y=h[0]-Math.abs(Array.isArray(p)?p[0]:p),g=h[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(y,j[0]),Math.max(g,j[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Uae=function(t,n,r,a,i){var l=n.map(function(o){return LM(t,o,r,i,a)}).filter(function(o){return!oe(o)});return l&&l.length?l.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},zM=function(t,n,r,a,i){var l=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&LM(t,c,u,a)||Qc(t,u,r,i)});if(r==="number")return l.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var o={};return l.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)o[u[f]]||(o[u[f]]=!0,c.push(u[f]));return c},[])},IM=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},BM=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,l,o=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(l=!0),c.coordinate});return i||o.push(n),l||o.push(r),o},xa=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,l=t.type,o=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?an(o[0]-o[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:a(h)+u,value:d,offset:u}});return f.filter(function(d){return!tc(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:a(d)+u,value:d,index:h,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,h){return{coordinate:a(d)+u,value:i?i[d]:d,index:h,offset:u}})},Ov=new WeakMap,yd=function(t,n){if(typeof n!="function")return t;Ov.has(t)||Ov.set(t,new WeakMap);var r=Ov.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},UM=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,o=t.axisType;if(a==="auto")return l==="radial"&&o==="radiusAxis"?{scale:Eu(),realScaleType:"band"}:l==="radial"&&o==="angleAxis"?{scale:tp(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Xc(),realScaleType:"point"}:i==="category"?{scale:Eu(),realScaleType:"band"}:{scale:tp(),realScaleType:"linear"};if(Ms(a)){var c="scale".concat(Pm(a));return{scale:(kN[c]||Xc)(),realScaleType:kN[c]?c:"point"}}return ce(a)?{scale:a}:{scale:Xc(),realScaleType:"point"}},IN=1e-4,qM=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-IN,l=Math.max(a[0],a[1])+IN,o=t(n[0]),c=t(n[r-1]);(o<i||o>l||c<i||c>l)&&t.domain([n[0],n[r-1]])}},qae=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},Hae=function(t,n){if(!n||n.length!==2||!Q(n[0])||!Q(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!Q(t[0])||t[0]<r)&&(i[0]=r),(!Q(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},Fae=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0,o=0;o<n;++o){var c=tc(t[o][r][1])?t[o][r][0]:t[o][r][1];c>=0?(t[o][r][0]=i,t[o][r][1]=i+c,i=t[o][r][1]):(t[o][r][0]=l,t[o][r][1]=l+c,l=t[o][r][1])}},Gae=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0;l<n;++l){var o=tc(t[l][r][1])?t[l][r][0]:t[l][r][1];o>=0?(t[l][r][0]=i,t[l][r][1]=i+o,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},Kae={sign:Fae,expand:fG,none:so,silhouette:dG,wiggle:hG,positive:Gae},Yae=function(t,n,r){var a=n.map(function(o){return o.props.dataKey}),i=Kae[r],l=uG().keys(a).value(function(o,c){return+et(o,c,0)}).order(lx).offset(i);return l(t)},Vae=function(t,n,r,a,i,l){if(!t)return null;var o=l?n.reverse():n,c={},u=o.reduce(function(d,h){var m,j=(m=h.type)!==null&&m!==void 0&&m.defaultProps?mt(mt({},h.type.defaultProps),h.props):h.props,v=j.stackId,p=j.hide;if(p)return d;var y=j[r],g=d[y]||{hasStack:!1,stackGroups:{}};if(kt(v)){var b=g.stackGroups[v]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(h),g.hasStack=!0,g.stackGroups[v]=b}else g.stackGroups[Di("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[h]};return mt(mt({},d),{},$l({},y,g))},c),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var j={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,p){var y=m.stackGroups[p];return mt(mt({},v),{},$l({},p,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:Yae(t,y.items,i)}))},j)}return mt(mt({},d),{},$l({},h,m))},f)},HM=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,o=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=oae(u,i,o);return t.domain([Vm(f),fi(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),h=cae(d,i,o);return{niceTicks:h}}return null};function yo(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!oe(a[t.dataKey])){var o=Ph(n,"value",a[t.dataKey]);if(o)return o.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=et(a,oe(l)?t.dataKey:l);return oe(c)?null:t.scale(c)}var BN=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+a:null;var c=et(l,n.dataKey,n.domain[o]);return oe(c)?null:n.scale(c)-i/2+a},Wae=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},Xae=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(kt(i)){var l=n[i];if(l){var o=l.items.indexOf(t);return o>=0?l.stackedData[o]:null}}return null},Qae=function(t){return t.reduce(function(n,r){return[Vm(r.concat([n[0]]).filter(Q)),fi(r.concat([n[1]]).filter(Q))]},[1/0,-1/0])},FM=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],o=l.stackedData,c=o.reduce(function(u,f){var d=Qae(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},UN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lx=function(t,n,r){if(ce(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Q(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(UN.test(t[0])){var i=+UN.exec(t[0])[1];a[0]=n[0]-i}else ce(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Q(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(qN.test(t[1])){var l=+qN.exec(t[1])[1];a[1]=n[1]+l}else ce(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},op=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=N1(n,function(d){return d.coordinate}),l=1/0,o=1,c=i.length;o<c;o++){var u=i[o],f=i[o-1];l=Math.min((u.coordinate||0)-(f.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},HN=function(t,n,r){return!t||!t.length||ki(t,Rn(r,"type.defaultProps.domain"))?n:t},GM=function(t,n){var r=t.type.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,l=r.unit,o=r.formatter,c=r.tooltipType,u=r.chartType,f=r.hide;return mt(mt({},ae(t,!1)),{},{dataKey:a,unit:l,formatter:o,name:i||a,color:X1(t),value:et(n,a),type:c,payload:n,chartType:u,hide:f})};function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function FN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FN(Object(n),!0).forEach(function(r){KM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KM(e,t,n){return t=Zae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zae(e){var t=Jae(e,"string");return Lu(t)=="symbol"?t:t+""}function Jae(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eie(e,t){return aie(e)||rie(e,t)||nie(e,t)||tie()}function tie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nie(e,t){if(e){if(typeof e=="string")return GN(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 GN(e,t)}}function GN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function aie(e){if(Array.isArray(e))return e}var cp=Math.PI/180,iie=function(t){return t*180/Math.PI},Ve=function(t,n,r,a){return{x:t+Math.cos(-cp*a)*r,y:n+Math.sin(-cp*a)*r}},YM=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},sie=function(t,n,r,a,i){var l=t.width,o=t.height,c=t.startAngle,u=t.endAngle,f=sn(t.cx,l,l/2),d=sn(t.cy,o,o/2),h=YM(l,o,r),m=sn(t.innerRadius,h,0),j=sn(t.outerRadius,h,h*.8),v=Object.keys(n);return v.reduce(function(p,y){var g=n[y],b=g.domain,x=g.reversed,N;if(oe(g.range))a==="angleAxis"?N=[c,u]:a==="radiusAxis"&&(N=[m,j]),x&&(N=[N[1],N[0]]);else{N=g.range;var w=N,O=eie(w,2);c=O[0],u=O[1]}var A=UM(g,i),E=A.realScaleType,M=A.scale;M.domain(b).range(N),qM(M);var $=HM(M,ca(ca({},g),{},{realScaleType:E})),k=ca(ca(ca({},g),$),{},{range:N,radius:j,realScaleType:E,scale:M,cx:f,cy:d,innerRadius:m,outerRadius:j,startAngle:c,endAngle:u});return ca(ca({},p),{},KM({},y,k))},{})},lie=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-l,2))},oie=function(t,n){var r=t.x,a=t.y,i=n.cx,l=n.cy,o=lie({x:r,y:a},{x:i,y:l});if(o<=0)return{radius:o};var c=(r-i)/o,u=Math.acos(c);return a>l&&(u=2*Math.PI-u),{radius:o,angle:iie(u),angleInRadian:u}},cie=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),l=Math.min(a,i);return{startAngle:n-l*360,endAngle:r-l*360}},uie=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),o=Math.min(i,l);return t+o*360},KN=function(t,n){var r=t.x,a=t.y,i=oie({x:r,y:a},n),l=i.radius,o=i.angle,c=n.innerRadius,u=n.outerRadius;if(l<c||l>u)return!1;if(l===0)return!0;var f=cie(n),d=f.startAngle,h=f.endAngle,m=o,j;if(d<=h){for(;m>h;)m-=360;for(;m<d;)m+=360;j=m>=d&&m<=h}else{for(;m>d;)m-=360;for(;m<h;)m+=360;j=m>=h&&m<=d}return j?ca(ca({},n),{},{radius:l,angle:uie(m,n)}):null},VM=function(t){return!S.isValidElement(t)&&!ce(t)&&typeof t!="boolean"?t.className:""};function zu(e){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}var fie=["offset"];function die(e){return yie(e)||mie(e)||pie(e)||hie()}function hie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pie(e,t){if(e){if(typeof e=="string")return zx(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 zx(e,t)}}function mie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yie(e){if(Array.isArray(e))return zx(e)}function zx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vie(e,t){if(e==null)return{};var n=gie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gie(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 YN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YN(Object(n),!0).forEach(function(r){xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xie(e,t,n){return t=bie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bie(e){var t=jie(e,"string");return zu(t)=="symbol"?t:t+""}function jie(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iu(){return Iu=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},Iu.apply(this,arguments)}var Sie=function(t){var n=t.value,r=t.formatter,a=oe(t.children)?n:t.children;return ce(r)?r(a):a},wie=function(t,n){var r=an(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Nie=function(t,n,r){var a=t.position,i=t.viewBox,l=t.offset,o=t.className,c=i,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,m=c.startAngle,j=c.endAngle,v=c.clockWise,p=(d+h)/2,y=wie(m,j),g=y>=0?1:-1,b,x;a==="insideStart"?(b=m+g*l,x=v):a==="insideEnd"?(b=j-g*l,x=!v):a==="end"&&(b=j+g*l,x=v),x=y<=0?x:!x;var N=Ve(u,f,p,b),w=Ve(u,f,p,b+(x?1:-1)*359),O="M".concat(N.x,",").concat(N.y,`
    A`).concat(p,",").concat(p,",0,1,").concat(x?0:1,`,
    `).concat(w.x,",").concat(w.y),A=oe(t.id)?Di("recharts-radial-line-"):t.id;return T.createElement("text",Iu({},r,{dominantBaseline:"central",className:pe("recharts-radial-bar-label",o)}),T.createElement("defs",null,T.createElement("path",{id:A,d:O})),T.createElement("textPath",{xlinkHref:"#".concat(A)},n))},Oie=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,o=i.cy,c=i.innerRadius,u=i.outerRadius,f=i.startAngle,d=i.endAngle,h=(f+d)/2;if(a==="outside"){var m=Ve(l,o,u+r,h),j=m.x,v=m.y;return{x:j,y:v,textAnchor:j>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"end"};var p=(c+u)/2,y=Ve(l,o,p,h),g=y.x,b=y.y;return{x:g,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Aie=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,o=l.x,c=l.y,u=l.width,f=l.height,d=f>=0?1:-1,h=d*a,m=d>0?"end":"start",j=d>0?"start":"end",v=u>=0?1:-1,p=v*a,y=v>0?"end":"start",g=v>0?"start":"end";if(i==="top"){var b={x:o+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:m};return _t(_t({},b),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var x={x:o+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:j};return _t(_t({},x),r?{height:Math.max(r.y+r.height-(c+f),0),width:u}:{})}if(i==="left"){var N={x:o-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"};return _t(_t({},N),r?{width:Math.max(N.x-r.x,0),height:f}:{})}if(i==="right"){var w={x:o+u+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"};return _t(_t({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var O=r?{width:u,height:f}:{};return i==="insideLeft"?_t({x:o+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideRight"?_t({x:o+u-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"},O):i==="insideTop"?_t({x:o+u/2,y:c+h,textAnchor:"middle",verticalAnchor:j},O):i==="insideBottom"?_t({x:o+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:m},O):i==="insideTopLeft"?_t({x:o+p,y:c+h,textAnchor:g,verticalAnchor:j},O):i==="insideTopRight"?_t({x:o+u-p,y:c+h,textAnchor:y,verticalAnchor:j},O):i==="insideBottomLeft"?_t({x:o+p,y:c+f-h,textAnchor:g,verticalAnchor:m},O):i==="insideBottomRight"?_t({x:o+u-p,y:c+f-h,textAnchor:y,verticalAnchor:m},O):Qo(i)&&(Q(i.x)||rs(i.x))&&(Q(i.y)||rs(i.y))?_t({x:o+sn(i.x,u),y:c+sn(i.y,f),textAnchor:"end",verticalAnchor:"end"},O):_t({x:o+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},Cie=function(t){return"cx"in t&&Q(t.cx)};function zt(e){var t=e.offset,n=t===void 0?5:t,r=vie(e,fie),a=_t({offset:n},r),i=a.viewBox,l=a.position,o=a.value,c=a.children,u=a.content,f=a.className,d=f===void 0?"":f,h=a.textBreakAll;if(!i||oe(o)&&oe(c)&&!S.isValidElement(u)&&!ce(u))return null;if(S.isValidElement(u))return S.cloneElement(u,a);var m;if(ce(u)){if(m=S.createElement(u,a),S.isValidElement(m))return m}else m=Sie(a);var j=Cie(i),v=ae(a,!0);if(j&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Nie(a,m,v);var p=j?Oie(a):Aie(a);return T.createElement(Ps,Iu({className:pe("recharts-label",d)},v,p,{breakAll:h}),m)}zt.displayName="Label";var WM=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,o=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,j=t.left,v=t.width,p=t.height,y=t.clockWise,g=t.labelViewBox;if(g)return g;if(Q(v)&&Q(p)){if(Q(d)&&Q(h))return{x:d,y:h,width:v,height:p};if(Q(m)&&Q(j))return{x:m,y:j,width:v,height:p}}return Q(d)&&Q(h)?{x:d,y:h,width:0,height:0}:Q(n)&&Q(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:u||0,outerRadius:f||c||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},Eie=function(t,n){return t?t===!0?T.createElement(zt,{key:"label-implicit",viewBox:n}):kt(t)?T.createElement(zt,{key:"label-implicit",viewBox:n,value:t}):S.isValidElement(t)?t.type===zt?S.cloneElement(t,{key:"label-implicit",viewBox:n}):T.createElement(zt,{key:"label-implicit",content:t,viewBox:n}):ce(t)?T.createElement(zt,{key:"label-implicit",content:t,viewBox:n}):Qo(t)?T.createElement(zt,Iu({viewBox:n},t,{key:"label-implicit"})):null:null},_ie=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=WM(t),l=cn(a,zt).map(function(c,u){return S.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return l;var o=Eie(t.label,n||i);return[o].concat(die(l))};zt.parseViewBox=WM;zt.renderCallByParent=_ie;function Tie(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var kie=Tie;const Mie=$e(kie);function Bu(e){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}var Pie=["valueAccessor"],$ie=["data","dataKey","clockWise","id","textBreakAll"];function Rie(e){return Iie(e)||zie(e)||Lie(e)||Die()}function Die(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lie(e,t){if(e){if(typeof e=="string")return Ix(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 Ix(e,t)}}function zie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Iie(e){if(Array.isArray(e))return Ix(e)}function Ix(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function up(){return up=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},up.apply(this,arguments)}function VN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function WN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VN(Object(n),!0).forEach(function(r){Bie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bie(e,t,n){return t=Uie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uie(e){var t=qie(e,"string");return Bu(t)=="symbol"?t:t+""}function qie(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XN(e,t){if(e==null)return{};var n=Hie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hie(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 Fie=function(t){return Array.isArray(t.value)?Mie(t.value):t.value};function Nr(e){var t=e.valueAccessor,n=t===void 0?Fie:t,r=XN(e,Pie),a=r.data,i=r.dataKey,l=r.clockWise,o=r.id,c=r.textBreakAll,u=XN(r,$ie);return!a||!a.length?null:T.createElement(ge,{className:"recharts-label-list"},a.map(function(f,d){var h=oe(i)?n(f,d):et(f&&f.payload,i),m=oe(o)?{}:{id:"".concat(o,"-").concat(d)};return T.createElement(zt,up({},ae(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:zt.parseViewBox(oe(l)?f:WN(WN({},f),{},{clockWise:l})),key:"label-".concat(d),index:d}))}))}Nr.displayName="LabelList";function Gie(e,t){return e?e===!0?T.createElement(Nr,{key:"labelList-implicit",data:t}):T.isValidElement(e)||ce(e)?T.createElement(Nr,{key:"labelList-implicit",data:t,content:e}):Qo(e)?T.createElement(Nr,up({data:t},e,{key:"labelList-implicit"})):null:null}function Kie(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,a=cn(r,Nr).map(function(l,o){return S.cloneElement(l,{data:t,key:"labelList-".concat(o)})});if(!n)return a;var i=Gie(e.label,t);return[i].concat(Rie(a))}Nr.renderCallByParent=Kie;function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function Bx(){return Bx=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},Bx.apply(this,arguments)}function QN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ZN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QN(Object(n),!0).forEach(function(r){Yie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yie(e,t,n){return t=Vie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vie(e){var t=Wie(e,"string");return Uu(t)=="symbol"?t:t+""}function Wie(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xie=function(t,n){var r=an(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},vd=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,l=t.sign,o=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(o?1:-1)+a,d=Math.asin(c/f)/cp,h=u?i:i+l*d,m=Ve(n,r,f,h),j=Ve(n,r,a,h),v=u?i-l*d:i,p=Ve(n,r,f*Math.cos(d*cp),v);return{center:m,circleTangency:j,lineTangency:p,theta:d}},XM=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.startAngle,o=t.endAngle,c=Xie(l,o),u=l+c,f=Ve(n,r,i,l),d=Ve(n,r,i,u),h="M ".concat(f.x,",").concat(f.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(c)>180),",").concat(+(l>u),`,
    `).concat(d.x,",").concat(d.y,`
  `);if(a>0){var m=Ve(n,r,a,l),j=Ve(n,r,a,u);h+="L ".concat(j.x,",").concat(j.y,`
            A `).concat(a,",").concat(a,`,0,
            `).concat(+(Math.abs(c)>180),",").concat(+(l<=u),`,
            `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},Qie=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,o=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=an(f-u),h=vd({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:l,cornerIsExternal:c}),m=h.circleTangency,j=h.lineTangency,v=h.theta,p=vd({cx:n,cy:r,radius:i,angle:f,sign:-d,cornerRadius:l,cornerIsExternal:c}),y=p.circleTangency,g=p.lineTangency,b=p.theta,x=c?Math.abs(u-f):Math.abs(u-f)-v-b;if(x<0)return o?"M ".concat(j.x,",").concat(j.y,`
        a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
        a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
      `):XM({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:f});var N="M ".concat(j.x,",").concat(j.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(x>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(g.x,",").concat(g.y,`
  `);if(a>0){var w=vd({cx:n,cy:r,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),O=w.circleTangency,A=w.lineTangency,E=w.theta,M=vd({cx:n,cy:r,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),$=M.circleTangency,k=M.lineTangency,I=M.theta,_=c?Math.abs(u-f):Math.abs(u-f)-E-I;if(_<0&&l===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat(k.x,",").concat(k.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,`
      A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else N+="L".concat(n,",").concat(r,"Z");return N},Zie={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},QM=function(t){var n=ZN(ZN({},Zie),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,o=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(l<i||f===d)return null;var m=pe("recharts-sector",h),j=l-i,v=sn(o,j,0,!0),p;return v>0&&Math.abs(f-d)<360?p=Qie({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(v,j/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):p=XM({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:f,endAngle:d}),T.createElement("path",Bx({},ae(n,!0),{className:m,d:p,role:"img"}))};function qu(e){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(e)}function Ux(){return Ux=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},Ux.apply(this,arguments)}function JN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JN(Object(n),!0).forEach(function(r){Jie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jie(e,t,n){return t=ese(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ese(e){var t=tse(e,"string");return qu(t)=="symbol"?t:t+""}function tse(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tO={curveBasisClosed:JF,curveBasisOpen:eG,curveBasis:ZF,curveBumpX:zF,curveBumpY:IF,curveLinearClosed:tG,curveLinear:Rm,curveMonotoneX:nG,curveMonotoneY:rG,curveNatural:aG,curveStep:iG,curveStepAfter:lG,curveStepBefore:sG},gd=function(t){return t.x===+t.x&&t.y===+t.y},Oc=function(t){return t.x},Ac=function(t){return t.y},nse=function(t,n){if(ce(t))return t;var r="curve".concat(Pm(t));return(r==="curveMonotone"||r==="curveBump")&&n?tO["".concat(r).concat(n==="vertical"?"Y":"X")]:tO[r]||Rm},rse=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,l=t.baseLine,o=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=nse(r,o),d=u?i.filter(function(v){return gd(v)}):i,h;if(Array.isArray(l)){var m=u?l.filter(function(v){return gd(v)}):l,j=d.map(function(v,p){return eO(eO({},v),{},{base:m[p]})});return o==="vertical"?h=od().y(Ac).x1(Oc).x0(function(v){return v.base.x}):h=od().x(Oc).y1(Ac).y0(function(v){return v.base.y}),h.defined(gd).curve(f),h(j)}return o==="vertical"&&Q(l)?h=od().y(Ac).x1(Oc).x0(l):Q(l)?h=od().x(Oc).y1(Ac).y0(l):h=Kk().x(Oc).y(Ac),h.defined(gd).curve(f),h(d)},Ni=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?rse(t):a;return S.createElement("path",Ux({},ae(t,!1),$h(t),{className:pe("recharts-curve",n),d:l,ref:i}))},ZM={exports:{}},ase="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ise=ase,sse=ise;function JM(){}function eP(){}eP.resetWarningCache=JM;var lse=function(){function e(r,a,i,l,o,c){if(c!==sse){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={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:eP,resetWarningCache:JM};return n.PropTypes=n,n};ZM.exports=lse();var ose=ZM.exports;const Pe=$e(ose),{getOwnPropertyNames:cse,getOwnPropertySymbols:use}=Object,{hasOwnProperty:fse}=Object.prototype;function Av(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function xd(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:i}=a,l=i.get(n),o=i.get(r);if(l&&o)return l===r&&o===n;i.set(n,r),i.set(r,n);const c=e(n,r,a);return i.delete(n),i.delete(r),c}}function dse(e){return e!=null?e[Symbol.toStringTag]:void 0}function nO(e){return cse(e).concat(use(e))}const hse=Object.hasOwn||((e,t)=>fse.call(e,t));function Gs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const pse="__v",mse="__o",yse="_owner",{getOwnPropertyDescriptor:rO,keys:aO}=Object;function vse(e,t){return e.byteLength===t.byteLength&&fp(new Uint8Array(e),new Uint8Array(t))}function gse(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 xse(e,t){return e.byteLength===t.byteLength&&fp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bse(e,t){return Gs(e.getTime(),t.getTime())}function jse(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Sse(e,t){return e===t}function iO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.entries();let l,o,c=0;for(;(l=i.next())&&!l.done;){const u=t.entries();let f=!1,d=0;for(;(o=u.next())&&!o.done;){if(a[d]){d++;continue}const h=l.value,m=o.value;if(n.equals(h[0],m[0],c,d,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){f=a[d]=!0;break}d++}if(!f)return!1;c++}return!0}const wse=Gs;function Nse(e,t,n){const r=aO(e);let a=r.length;if(aO(t).length!==a)return!1;for(;a-- >0;)if(!tP(e,t,n,r[a]))return!1;return!0}function Cc(e,t,n){const r=nO(e);let a=r.length;if(nO(t).length!==a)return!1;let i,l,o;for(;a-- >0;)if(i=r[a],!tP(e,t,n,i)||(l=rO(e,i),o=rO(t,i),(l||o)&&(!l||!o||l.configurable!==o.configurable||l.enumerable!==o.enumerable||l.writable!==o.writable)))return!1;return!0}function Ose(e,t){return Gs(e.valueOf(),t.valueOf())}function Ase(e,t){return e.source===t.source&&e.flags===t.flags}function sO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.values();let l,o;for(;(l=i.next())&&!l.done;){const c=t.values();let u=!1,f=0;for(;(o=c.next())&&!o.done;){if(!a[f]&&n.equals(l.value,o.value,l.value,o.value,e,t,n)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function fp(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 Cse(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 tP(e,t,n,r){return(r===yse||r===mse||r===pse)&&(e.$$typeof||t.$$typeof)?!0:hse(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Ese="[object ArrayBuffer]",_se="[object Arguments]",Tse="[object Boolean]",kse="[object DataView]",Mse="[object Date]",Pse="[object Error]",$se="[object Map]",Rse="[object Number]",Dse="[object Object]",Lse="[object RegExp]",zse="[object Set]",Ise="[object String]",Bse={"[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},Use="[object URL]",qse=Object.prototype.toString;function Hse({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:l,areNumbersEqual:o,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:m,unknownTagComparators:j}){return function(p,y,g){if(p===y)return!0;if(p==null||y==null)return!1;const b=typeof p;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(p,y,g):b==="function"?i(p,y,g):!1;const x=p.constructor;if(x!==y.constructor)return!1;if(x===Object)return c(p,y,g);if(Array.isArray(p))return t(p,y,g);if(x===Date)return r(p,y,g);if(x===RegExp)return f(p,y,g);if(x===Map)return l(p,y,g);if(x===Set)return d(p,y,g);const N=qse.call(p);if(N===Mse)return r(p,y,g);if(N===Lse)return f(p,y,g);if(N===$se)return l(p,y,g);if(N===zse)return d(p,y,g);if(N===Dse)return typeof p.then!="function"&&typeof y.then!="function"&&c(p,y,g);if(N===Use)return m(p,y,g);if(N===Pse)return a(p,y,g);if(N===_se)return c(p,y,g);if(Bse[N])return h(p,y,g);if(N===Ese)return e(p,y,g);if(N===kse)return n(p,y,g);if(N===Tse||N===Rse||N===Ise)return u(p,y,g);if(j){let w=j[N];if(!w){const O=dse(p);O&&(w=j[O])}if(w)return w(p,y,g)}return!1}}function Fse({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:vse,areArraysEqual:n?Cc:gse,areDataViewsEqual:xse,areDatesEqual:bse,areErrorsEqual:jse,areFunctionsEqual:Sse,areMapsEqual:n?Av(iO,Cc):iO,areNumbersEqual:wse,areObjectsEqual:n?Cc:Nse,arePrimitiveWrappersEqual:Ose,areRegExpsEqual:Ase,areSetsEqual:n?Av(sO,Cc):sO,areTypedArraysEqual:n?Av(fp,Cc):fp,areUrlsEqual:Cse,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=xd(r.areArraysEqual),i=xd(r.areMapsEqual),l=xd(r.areObjectsEqual),o=xd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:l,areSetsEqual:o})}return r}function Gse(e){return function(t,n,r,a,i,l,o){return e(t,n,o)}}function Kse({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(o,c){const{cache:u=e?new WeakMap:void 0,meta:f}=n();return t(o,c,{cache:u,equals:r,meta:f,strict:a})};if(e)return function(o,c){return t(o,c,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(o,c){return t(o,c,i)}}const Yse=Ii();Ii({strict:!0});Ii({circular:!0});Ii({circular:!0,strict:!0});Ii({createInternalComparator:()=>Gs});Ii({strict:!0,createInternalComparator:()=>Gs});Ii({circular:!0,createInternalComparator:()=>Gs});Ii({circular:!0,createInternalComparator:()=>Gs,strict:!0});function Ii(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=Fse(e),l=Hse(i),o=n?n(l):Gse(l);return Kse({circular:t,comparator:l,createState:r,equals:o,strict:a})}function Vse(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):Vse(a)};requestAnimationFrame(r)}function qx(e){"@babel/helpers - typeof";return qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qx(e)}function Wse(e){return Jse(e)||Zse(e)||Qse(e)||Xse()}function Xse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qse(e,t){if(e){if(typeof e=="string")return oO(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 oO(e,t)}}function oO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jse(e){if(Array.isArray(e))return e}function ele(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var l=i,o=Wse(l),c=o[0],u=o.slice(1);if(typeof c=="number"){lO(a.bind(null,u),c);return}a(c),lO(a.bind(null,u));return}qx(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function cO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cO(Object(n),!0).forEach(function(r){nP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nP(e,t,n){return t=tle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tle(e){var t=nle(e,"string");return Hu(t)==="symbol"?t:String(t)}function nle(e,t){if(Hu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rle=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},ale=function(t){return t},ile=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Zc=function(t,n){return Object.keys(n).reduce(function(r,a){return uO(uO({},r),{},nP({},a,t(a,n[a])))},{})},fO=function(t,n,r){return t.map(function(a){return"".concat(ile(a)," ").concat(n,"ms ").concat(r)}).join(",")};function sle(e,t){return cle(e)||ole(e,t)||rP(e,t)||lle()}function lle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ole(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function cle(e){if(Array.isArray(e))return e}function ule(e){return hle(e)||dle(e)||rP(e)||fle()}function fle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rP(e,t){if(e){if(typeof e=="string")return Hx(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 Hx(e,t)}}function dle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hle(e){if(Array.isArray(e))return Hx(e)}function Hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dp=1e-4,aP=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},iP=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},dO=function(t,n){return function(r){var a=aP(t,n);return iP(a,r)}},ple=function(t,n){return function(r){var a=aP(t,n),i=[].concat(ule(a.map(function(l,o){return l*o}).slice(1)),[0]);return iP(i,r)}},hO=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],l=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,l=1,o=1;break;case"ease":a=.25,i=.1,l=.25,o=1;break;case"ease-in":a=.42,i=0,l=1,o=1;break;case"ease-out":a=.42,i=0,l=.58,o=1;break;case"ease-in-out":a=0,i=0,l=.58,o=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=sle(u,4);a=f[0],i=f[1],l=f[2],o=f[3]}}}var d=dO(a,l),h=dO(i,o),m=ple(a,l),j=function(y){return y>1?1:y<0?0:y},v=function(y){for(var g=y>1?1:y,b=g,x=0;x<8;++x){var N=d(b)-g,w=m(b);if(Math.abs(N-g)<dp||w<dp)return h(b);b=j(b-N/w)}return h(b)};return v.isStepper=!1,v},mle=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,l=t.dt,o=l===void 0?17:l,c=function(f,d,h){var m=-(f-d)*r,j=h*i,v=h+(m-j)*o/1e3,p=h*o/1e3+f;return Math.abs(p-d)<dp&&Math.abs(v)<dp?[d,0]:[p,v]};return c.isStepper=!0,c.dt=o,c},yle=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return hO(a);case"spring":return mle();default:if(a.split("(")[0]==="cubic-bezier")return hO(a)}return typeof a=="function"?a:null};function Fu(e){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}function pO(e){return xle(e)||gle(e)||sP(e)||vle()}function vle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xle(e){if(Array.isArray(e))return Gx(e)}function mO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(n),!0).forEach(function(r){Fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fx(e,t,n){return t=ble(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ble(e){var t=jle(e,"string");return Fu(t)==="symbol"?t:String(t)}function jle(e,t){if(Fu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sle(e,t){return Ole(e)||Nle(e,t)||sP(e,t)||wle()}function wle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sP(e,t){if(e){if(typeof e=="string")return Gx(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 Gx(e,t)}}function Gx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Ole(e){if(Array.isArray(e))return e}var hp=function(t,n,r){return t+(n-t)*r},Kx=function(t){var n=t.from,r=t.to;return n!==r},Ale=function e(t,n,r){var a=Zc(function(i,l){if(Kx(l)){var o=t(l.from,l.to,l.velocity),c=Sle(o,2),u=c[0],f=c[1];return qt(qt({},l),{},{from:u,velocity:f})}return l},n);return r<1?Zc(function(i,l){return Kx(l)?qt(qt({},l),{},{velocity:hp(l.velocity,a[i].velocity,r),from:hp(l.from,a[i].from,r)}):l},n):e(t,a,r-1)};const Cle=function(e,t,n,r,a){var i=rle(e,t),l=i.reduce(function(p,y){return qt(qt({},p),{},Fx({},y,[e[y],t[y]]))},{}),o=i.reduce(function(p,y){return qt(qt({},p),{},Fx({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return Zc(function(y,g){return g.from},o)},m=function(){return!Object.values(o).filter(Kx).length},j=function(y){u||(u=y);var g=y-u,b=g/n.dt;o=Ale(n,o,b),a(qt(qt(qt({},e),t),h())),u=y,m()||(c=requestAnimationFrame(d))},v=function(y){f||(f=y);var g=(y-f)/r,b=Zc(function(N,w){return hp.apply(void 0,pO(w).concat([n(g)]))},l);if(a(qt(qt(qt({},e),t),b)),g<1)c=requestAnimationFrame(d);else{var x=Zc(function(N,w){return hp.apply(void 0,pO(w).concat([n(1)]))},l);a(qt(qt(qt({},e),t),x))}};return d=n.isStepper?j:v,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}var Ele=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function _le(e,t){if(e==null)return{};var n=Tle(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tle(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Cv(e){return $le(e)||Ple(e)||Mle(e)||kle()}function kle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mle(e,t){if(e){if(typeof e=="string")return Yx(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 Yx(e,t)}}function Ple(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $le(e){if(Array.isArray(e))return Yx(e)}function Yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yO(Object(n),!0).forEach(function(r){$c(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $c(e,t,n){return t=lP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dle(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,lP(r.key),r)}}function Lle(e,t,n){return t&&Dle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lP(e){var t=zle(e,"string");return vo(t)==="symbol"?t:String(t)}function zle(e,t){if(vo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ile(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vx(e,t)}function Vx(e,t){return Vx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Vx(e,t)}function Ble(e){var t=Ule();return function(){var r=pp(e),a;if(t){var i=pp(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return Wx(this,a)}}function Wx(e,t){if(t&&(vo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xx(e)}function Xx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ule(){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 pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pp(e)}var or=function(e){Ile(n,e);var t=Ble(n);function n(r,a){var i;Rle(this,n),i=t.call(this,r,a);var l=i.props,o=l.isActive,c=l.attributeName,u=l.from,f=l.to,d=l.steps,h=l.children,m=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Xx(i)),i.changeStyle=i.changeStyle.bind(Xx(i)),!o||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:f}),Wx(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},Wx(i);i.state={style:c?$c({},c,u):u}}else i.state={style:{}};return i}return Lle(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,l=a.canBegin;this.mounted=!0,!(!i||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,l=i.isActive,o=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,f=i.to,d=i.from,h=this.state.style;if(o){if(!l){var m={style:c?$c({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(m);return}if(!(Yse(a.to,f)&&a.canBegin&&a.isActive)){var j=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=j||u?d:a.to;if(this.state&&h){var p={style:c?$c({},c,v):v};(c&&h[c]!==v||!c&&h!==v)&&this.setState(p)}this.runAnimation(pr(pr({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,l=a.from,o=a.to,c=a.duration,u=a.easing,f=a.begin,d=a.onAnimationEnd,h=a.onAnimationStart,m=Cle(l,o,yle(u),c,this.changeStyle),j=function(){i.stopJSAnimation=m()};this.manager.start([h,f,j,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,o=a.begin,c=a.onAnimationStart,u=l[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(v,p,y){if(y===0)return v;var g=p.duration,b=p.easing,x=b===void 0?"ease":b,N=p.style,w=p.properties,O=p.onAnimationEnd,A=y>0?l[y-1]:p,E=w||Object.keys(N);if(typeof x=="function"||x==="spring")return[].concat(Cv(v),[i.runJSAnimation.bind(i,{from:A.style,to:N,duration:g,easing:x}),g]);var M=fO(E,g,x),$=pr(pr(pr({},A.style),N),{},{transition:M});return[].concat(Cv(v),[$,g,O]).filter(ale)};return this.manager.start([c].concat(Cv(l.reduce(m,[f,Math.max(h,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=ele());var i=a.begin,l=a.duration,o=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,h=a.steps,m=a.children,j=this.manager;if(this.unSubscribe=j.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var v=o?$c({},o,c):c,p=fO(Object.keys(v),l,u);j.start([f,i,pr(pr({},v),{},{transition:p}),l,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=_le(a,Ele),u=S.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!o||u===0||l<=0)return i;var d=function(m){var j=m.props,v=j.style,p=v===void 0?{}:v,y=j.className,g=S.cloneElement(m,pr(pr({},c),{},{style:pr(pr({},p),f),className:y}));return g};return u===1?d(S.Children.only(i)):T.createElement("div",null,S.Children.map(i,function(h){return d(h)}))}}]),n}(S.PureComponent);or.displayName="Animate";or.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};or.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function mp(){return mp=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},mp.apply(this,arguments)}function qle(e,t){return Kle(e)||Gle(e,t)||Fle(e,t)||Hle()}function Hle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fle(e,t){if(e){if(typeof e=="string")return vO(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 vO(e,t)}}function vO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Kle(e){if(Array.isArray(e))return e}function gO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gO(Object(n),!0).forEach(function(r){Yle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yle(e,t,n){return t=Vle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vle(e){var t=Wle(e,"string");return Gu(t)=="symbol"?t:t+""}function Wle(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bO=function(t,n,r,a,i){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),o=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,f;if(l>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,m=4;h<m;h++)d[h]=i[h]>l?l:i[h];f="M".concat(t,",").concat(n+o*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),f+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
        `).concat(t+r,",").concat(n+o*d[1])),f+="L ".concat(t+r,",").concat(n+a-o*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
        `).concat(t+r-c*d[2],",").concat(n+a)),f+="L ".concat(t+c*d[3],",").concat(n+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
        `).concat(t,",").concat(n+a-o*d[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var j=Math.min(l,i);f="M ".concat(t,",").concat(n+o*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+c*j,",").concat(n,`
            L `).concat(t+r-c*j,",").concat(n,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r,",").concat(n+o*j,`
            L `).concat(t+r,",").concat(n+a-o*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r-c*j,",").concat(n+a,`
            L `).concat(t+c*j,",").concat(n+a,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t,",").concat(n+a-o*j," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return f},Xle=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,o=n.width,c=n.height;if(Math.abs(o)>0&&Math.abs(c)>0){var u=Math.min(i,i+o),f=Math.max(i,i+o),d=Math.min(l,l+c),h=Math.max(l,l+c);return r>=u&&r<=f&&a>=d&&a<=h}return!1},Qle={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Q1=function(t){var n=xO(xO({},Qle),t),r=S.useRef(),a=S.useState(-1),i=qle(a,2),l=i[0],o=i[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&o(x)}catch{}},[]);var c=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isAnimationActive,g=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var b=pe("recharts-rectangle",m);return g?T.createElement(or,{canBegin:l>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:v,animationEasing:j,isActive:g},function(x){var N=x.width,w=x.height,O=x.x,A=x.y;return T.createElement(or,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:y,easing:j},T.createElement("path",mp({},ae(n,!0),{className:b,d:bO(O,A,N,w,h),ref:r})))}):T.createElement("path",mp({},ae(n,!0),{className:b,d:bO(c,u,f,d,h)}))},Zle=["points","className","baseLinePoints","connectNulls"];function jl(){return jl=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},jl.apply(this,arguments)}function Jle(e,t){if(e==null)return{};var n=eoe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jO(e){return aoe(e)||roe(e)||noe(e)||toe()}function toe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function noe(e,t){if(e){if(typeof e=="string")return Qx(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 Qx(e,t)}}function roe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aoe(e){if(Array.isArray(e))return Qx(e)}function Qx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SO=function(t){return t&&t.x===+t.x&&t.y===+t.y},ioe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){SO(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),SO(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Jc=function(t,n){var r=ioe(t);n&&(r=[r.reduce(function(i,l){return[].concat(jO(i),jO(l))},[])]);var a=r.map(function(i){return i.reduce(function(l,o,c){return"".concat(l).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},soe=function(t,n,r){var a=Jc(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Jc(n.reverse(),r).slice(1))},loe=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,l=Jle(t,Zle);if(!n||!n.length)return null;var o=pe("recharts-polygon",r);if(a&&a.length){var c=l.stroke&&l.stroke!=="none",u=soe(n,a,i);return T.createElement("g",{className:o},T.createElement("path",jl({},ae(l,!0),{fill:u.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:u})),c?T.createElement("path",jl({},ae(l,!0),{fill:"none",d:Jc(n,i)})):null,c?T.createElement("path",jl({},ae(l,!0),{fill:"none",d:Jc(a,i)})):null)}var f=Jc(n,i);return T.createElement("path",jl({},ae(l,!0),{fill:f.slice(-1)==="Z"?l.fill:"none",className:o,d:f}))};function Zx(){return Zx=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},Zx.apply(this,arguments)}var Lf=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,l=pe("recharts-dot",i);return n===+n&&r===+r&&a===+a?S.createElement("circle",Zx({},ae(t,!1),$h(t),{className:l,cx:n,cy:r,r:a})):null};function Ku(e){"@babel/helpers - typeof";return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}var ooe=["x","y","top","left","width","height","className"];function Jx(){return Jx=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},Jx.apply(this,arguments)}function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function coe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wO(Object(n),!0).forEach(function(r){uoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uoe(e,t,n){return t=foe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function foe(e){var t=doe(e,"string");return Ku(t)=="symbol"?t:t+""}function doe(e,t){if(Ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hoe(e,t){if(e==null)return{};var n=poe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function poe(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 moe=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},yoe=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,o=l===void 0?0:l,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,j=t.className,v=hoe(t,ooe),p=coe({x:r,y:i,top:o,left:u,width:d,height:m},v);return!Q(r)||!Q(i)||!Q(d)||!Q(m)||!Q(o)||!Q(u)?null:T.createElement("path",Jx({},ae(p,!0),{className:pe("recharts-cross",j),d:moe(r,i,d,m,o,u)}))},voe=Ym,goe=xM,xoe=ea;function boe(e,t){return e&&e.length?voe(e,xoe(t),goe):void 0}var joe=boe;const Soe=$e(joe);var woe=Ym,Noe=ea,Ooe=bM;function Aoe(e,t){return e&&e.length?woe(e,Noe(t),Ooe):void 0}var Coe=Aoe;const Eoe=$e(Coe);var _oe=["cx","cy","angle","ticks","axisLine"],Toe=["ticks","tick","angle","tickFormatter","stroke"];function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}function eu(){return eu=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},eu.apply(this,arguments)}function NO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NO(Object(n),!0).forEach(function(r){Qm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OO(e,t){if(e==null)return{};var n=koe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function koe(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 Moe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AO(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,cP(r.key),r)}}function Poe(e,t,n){return t&&AO(e.prototype,t),n&&AO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $oe(e,t,n){return t=yp(t),Roe(e,oP()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function Roe(e,t){if(t&&(go(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Doe(e)}function Doe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oP=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yp(e)}function Loe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eb(e,t)}function eb(e,t){return eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},eb(e,t)}function Qm(e,t,n){return t=cP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cP(e){var t=zoe(e,"string");return go(t)=="symbol"?t:t+""}function zoe(e,t){if(go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(go(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zm=function(e){function t(){return Moe(this,t),$oe(this,t,arguments)}return Loe(t,e),Poe(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,l=i.angle,o=i.cx,c=i.cy;return Ve(o,c,a,l)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,o=r.ticks,c=Soe(o,function(f){return f.coordinate||0}),u=Eoe(o,function(f){return f.coordinate||0});return{cx:a,cy:i,startAngle:l,endAngle:l,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,o=r.ticks,c=r.axisLine,u=OO(r,_oe),f=o.reduce(function(j,v){return[Math.min(j[0],v.coordinate),Math.max(j[1],v.coordinate)]},[1/0,-1/0]),d=Ve(a,i,f[0],l),h=Ve(a,i,f[1],l),m=Ki(Ki(Ki({},ae(u,!1)),{},{fill:"none"},ae(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return T.createElement("line",eu({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,o=a.angle,c=a.tickFormatter,u=a.stroke,f=OO(a,Toe),d=this.getTickTextAnchor(),h=ae(f,!1),m=ae(l,!1),j=i.map(function(v,p){var y=r.getTickValueCoord(v),g=Ki(Ki(Ki(Ki({textAnchor:d,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},m),{},{index:p},y),{},{payload:v});return T.createElement(ge,eu({className:pe("recharts-polar-radius-axis-tick",VM(l)),key:"tick-".concat(v.coordinate)},Ti(r.props,v,p)),t.renderTickItem(l,g,c?c(v.value,p):v.value))});return T.createElement(ge,{className:"recharts-polar-radius-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,l=r.tick;return!a||!a.length?null:T.createElement(ge,{className:pe("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),l&&this.renderTicks(),zt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):ce(r)?l=r(a):l=T.createElement(Ps,eu({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),l}}])}(S.PureComponent);Qm(Zm,"displayName","PolarRadiusAxis");Qm(Zm,"axisType","radiusAxis");Qm(Zm,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function xo(e){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(e)}function ts(){return ts=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},ts.apply(this,arguments)}function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CO(Object(n),!0).forEach(function(r){Jm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ioe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EO(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,fP(r.key),r)}}function Boe(e,t,n){return t&&EO(e.prototype,t),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uoe(e,t,n){return t=vp(t),qoe(e,uP()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function qoe(e,t){if(t&&(xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hoe(e)}function Hoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uP=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function Foe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tb(e,t)}function tb(e,t){return tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},tb(e,t)}function Jm(e,t,n){return t=fP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(e){var t=Goe(e,"string");return xo(t)=="symbol"?t:t+""}function Goe(e,t){if(xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Koe=Math.PI/180,_O=1e-5,ey=function(e){function t(){return Ioe(this,t),Uoe(this,t,arguments)}return Foe(t,e),Boe(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,l=a.cy,o=a.radius,c=a.orientation,u=a.tickSize,f=u||8,d=Ve(i,l,o,r.coordinate),h=Ve(i,l,o+(c==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*Koe),l;return i>_O?l=a==="outer"?"start":"end":i<-_O?l=a==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.radius,o=r.axisLine,c=r.axisLineType,u=Yi(Yi({},ae(this.props,!1)),{},{fill:"none"},ae(o,!1));if(c==="circle")return T.createElement(Lf,ts({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:l}));var f=this.props.ticks,d=f.map(function(h){return Ve(a,i,l,h.coordinate)});return T.createElement(loe,ts({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,o=a.tickLine,c=a.tickFormatter,u=a.stroke,f=ae(this.props,!1),d=ae(l,!1),h=Yi(Yi({},f),{},{fill:"none"},ae(o,!1)),m=i.map(function(j,v){var p=r.getTickLineCoord(j),y=r.getTickTextAnchor(j),g=Yi(Yi(Yi({textAnchor:y},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:j,x:p.x2,y:p.y2});return T.createElement(ge,ts({className:pe("recharts-polar-angle-axis-tick",VM(l)),key:"tick-".concat(j.coordinate)},Ti(r.props,j,v)),o&&T.createElement("line",ts({className:"recharts-polar-angle-axis-tick-line"},h,p)),l&&t.renderTickItem(l,g,c?c(j.value,v):j.value))});return T.createElement(ge,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,l=r.axisLine;return i<=0||!a||!a.length?null:T.createElement(ge,{className:pe("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):ce(r)?l=r(a):l=T.createElement(Ps,ts({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),l}}])}(S.PureComponent);Jm(ey,"displayName","PolarAngleAxis");Jm(ey,"axisType","angleAxis");Jm(ey,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Yoe=y3,Voe=Yoe(Object.getPrototypeOf,Object),Woe=Voe,Xoe=Ra,Qoe=Woe,Zoe=Da,Joe="[object Object]",ece=Function.prototype,tce=Object.prototype,dP=ece.toString,nce=tce.hasOwnProperty,rce=dP.call(Object);function ace(e){if(!Zoe(e)||Xoe(e)!=Joe)return!1;var t=Qoe(e);if(t===null)return!0;var n=nce.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&dP.call(n)==rce}var ice=ace;const sce=$e(ice);var lce=Ra,oce=Da,cce="[object Boolean]";function uce(e){return e===!0||e===!1||oce(e)&&lce(e)==cce}var fce=uce;const dce=$e(fce);function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gp.apply(this,arguments)}function hce(e,t){return vce(e)||yce(e,t)||mce(e,t)||pce()}function pce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mce(e,t){if(e){if(typeof e=="string")return TO(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 TO(e,t)}}function TO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function vce(e){if(Array.isArray(e))return e}function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function MO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kO(Object(n),!0).forEach(function(r){gce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gce(e,t,n){return t=xce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xce(e){var t=bce(e,"string");return Yu(t)=="symbol"?t:t+""}function bce(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PO=function(t,n,r,a,i){var l=r-a,o;return o="M ".concat(t,",").concat(n),o+="L ".concat(t+r,",").concat(n),o+="L ".concat(t+r-l/2,",").concat(n+i),o+="L ".concat(t+r-l/2-a,",").concat(n+i),o+="L ".concat(t,",").concat(n," Z"),o},jce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Sce=function(t){var n=MO(MO({},jce),t),r=S.useRef(),a=S.useState(-1),i=hce(a,2),l=i[0],o=i[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&o(b)}catch{}},[]);var c=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,h=n.height,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var g=pe("recharts-trapezoid",m);return y?T.createElement(or,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:v,animationEasing:j,isActive:y},function(b){var x=b.upperWidth,N=b.lowerWidth,w=b.height,O=b.x,A=b.y;return T.createElement(or,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:j},T.createElement("path",gp({},ae(n,!0),{className:g,d:PO(O,A,x,N,w),ref:r})))}):T.createElement("g",null,T.createElement("path",gp({},ae(n,!0),{className:g,d:PO(c,u,f,d,h)})))},wce=["option","shapeType","propTransformer","activeClassName","isActive"];function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function Nce(e,t){if(e==null)return{};var n=Oce(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oce(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 $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$O(Object(n),!0).forEach(function(r){Ace(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$O(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ace(e,t,n){return t=Cce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cce(e){var t=Ece(e,"string");return Vu(t)=="symbol"?t:t+""}function Ece(e,t){if(Vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ce(e,t){return xp(xp({},t),e)}function Tce(e,t){return e==="symbols"}function RO(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return T.createElement(Q1,n);case"trapezoid":return T.createElement(Sce,n);case"sector":return T.createElement(QM,n);case"symbols":if(Tce(t))return T.createElement(Lm,n);break;default:return null}}function kce(e){return S.isValidElement(e)?e.props:e}function bp(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?_ce:r,i=e.activeClassName,l=i===void 0?"recharts-active-shape":i,o=e.isActive,c=Nce(e,wce),u;if(S.isValidElement(t))u=S.cloneElement(t,xp(xp({},c),kce(t)));else if(ce(t))u=t(c);else if(sce(t)&&!dce(t)){var f=a(t,c);u=T.createElement(RO,{shapeType:n,elementProps:f})}else{var d=c;u=T.createElement(RO,{shapeType:n,elementProps:d})}return o?T.createElement(ge,{className:l},u):u}function ty(e,t){return t!=null&&"trapezoids"in e.props}function ny(e,t){return t!=null&&"sectors"in e.props}function Wu(e,t){return t!=null&&"points"in e.props}function Mce(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function Pce(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function $ce(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function Rce(e,t){var n;return ty(e,t)?n=Mce:ny(e,t)?n=Pce:Wu(e,t)&&(n=$ce),n}function Dce(e,t){var n;return ty(e,t)?n="trapezoids":ny(e,t)?n="sectors":Wu(e,t)&&(n="points"),n}function Lce(e,t){if(ty(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ny(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Wu(e,t)?t.payload:{}}function zce(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Dce(n,t),i=Lce(n,t),l=r.filter(function(c,u){var f=ki(i,c),d=n.props[a].filter(function(j){var v=Rce(n,t);return v(j,t)}),h=n.props[a].indexOf(d[d.length-1]),m=u===h;return f&&m}),o=r.indexOf(l[l.length-1]);return o}var Xd;function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}function Sl(){return Sl=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},Sl.apply(this,arguments)}function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DO(Object(n),!0).forEach(function(r){er(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ice(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LO(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,pP(r.key),r)}}function Bce(e,t,n){return t&&LO(e.prototype,t),n&&LO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uce(e,t,n){return t=jp(t),qce(e,hP()?Reflect.construct(t,n||[],jp(e).constructor):t.apply(e,n))}function qce(e,t){if(t&&(bo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hce(e)}function Hce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hP=function(){return!!e})()}function jp(e){return jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jp(e)}function Fce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nb(e,t)}function nb(e,t){return nb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},nb(e,t)}function er(e,t,n){return t=pP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pP(e){var t=Gce(e,"string");return bo(t)=="symbol"?t:t+""}function Gce(e,t){if(bo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ia=function(e){function t(n){var r;return Ice(this,t),r=Uce(this,t,[n]),er(r,"pieRef",null),er(r,"sectorRefs",[]),er(r,"id",Di("recharts-pie-")),er(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ce(a)&&a()}),er(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ce(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Fce(t,e),Bce(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.label,o=i.labelLine,c=i.dataKey,u=i.valueKey,f=ae(this.props,!1),d=ae(l,!1),h=ae(o,!1),m=l&&l.offsetRadius||20,j=r.map(function(v,p){var y=(v.startAngle+v.endAngle)/2,g=Ve(v.cx,v.cy,v.outerRadius+m,y),b=Ge(Ge(Ge(Ge({},f),v),{},{stroke:"none"},d),{},{index:p,textAnchor:t.getTextAnchor(g.x,v.cx)},g),x=Ge(Ge(Ge(Ge({},f),v),{},{fill:"none",stroke:v.fill},h),{},{index:p,points:[Ve(v.cx,v.cy,v.outerRadius,y),g]}),N=c;return oe(c)&&oe(u)?N="value":oe(c)&&(N=u),T.createElement(ge,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},o&&t.renderLabelLineItem(o,x,"line"),t.renderLabelItem(l,b,et(v,N)))});return T.createElement(ge,{className:"recharts-pie-labels"},j)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,l=i.activeShape,o=i.blendStroke,c=i.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=a.isActiveIndex(f),h=c&&a.hasActiveIndex()?c:null,m=d?l:h,j=Ge(Ge({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return T.createElement(ge,Sl({ref:function(p){p&&!a.sectorRefs.includes(p)&&a.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},Ti(a.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),T.createElement(bp,Sl({option:m,isActive:d,shapeType:"sector"},j)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,l=a.isAnimationActive,o=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state,h=d.prevSectors,m=d.prevIsAnimationActive;return T.createElement(or,{begin:o,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(j){var v=j.t,p=[],y=i&&i[0],g=y.startAngle;return i.forEach(function(b,x){var N=h&&h[x],w=x>0?Rn(b,"paddingAngle",0):0;if(N){var O=st(N.endAngle-N.startAngle,b.endAngle-b.startAngle),A=Ge(Ge({},b),{},{startAngle:g+w,endAngle:g+O(v)+w});p.push(A),g=A.endAngle}else{var E=b.endAngle,M=b.startAngle,$=st(0,E-M),k=$(v),I=Ge(Ge({},b),{},{startAngle:g+w,endAngle:g+k+w});p.push(I),g=I.endAngle}}),T.createElement(ge,null,r.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var l=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"ArrowRight":{var o=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,l=this.state.prevSectors;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,l=a.sectors,o=a.className,c=a.label,u=a.cx,f=a.cy,d=a.innerRadius,h=a.outerRadius,m=a.isAnimationActive,j=this.state.isAnimationFinished;if(i||!l||!l.length||!Q(u)||!Q(f)||!Q(d)||!Q(h))return null;var v=pe("recharts-pie",o);return T.createElement(ge,{tabIndex:this.props.rootTabIndex,className:v,ref:function(y){r.pieRef=y}},this.renderSectors(),c&&this.renderLabels(l),zt.renderCallByParent(this.props,null,!1),(!m||j)&&Nr.renderCallByParent(this.props,l,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);if(ce(r))return r(a);var l=pe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return T.createElement(Ni,Sl({},a,{key:i,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);var l=i;if(ce(r)&&(l=r(a),T.isValidElement(l)))return l;var o=pe("recharts-pie-label-text",typeof r!="boolean"&&!ce(r)?r.className:"");return T.createElement(Ps,Sl({},a,{alignmentBaseline:"middle",className:o}),l)}}])}(S.PureComponent);Xd=Ia;er(Ia,"displayName","Pie");er(Ia,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!La.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});er(Ia,"parseDeltaAngle",function(e,t){var n=an(t-e),r=Math.min(Math.abs(t-e),360);return n*r});er(Ia,"getRealPieData",function(e){var t=e.data,n=e.children,r=ae(e,!1),a=cn(n,Mf);return t&&t.length?t.map(function(i,l){return Ge(Ge(Ge({payload:i},r),i),a&&a[l]&&a[l].props)}):a&&a.length?a.map(function(i){return Ge(Ge({},r),i.props)}):[]});er(Ia,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,l=YM(a,i),o=r+sn(e.cx,a,a/2),c=n+sn(e.cy,i,i/2),u=sn(e.innerRadius,l,0),f=sn(e.outerRadius,l,l*.8),d=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:o,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}});er(Ia,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Ge(Ge({},t.type.defaultProps),t.props):t.props,a=Xd.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,l=r.startAngle,o=r.endAngle,c=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,h=r.tooltipType,m=Math.abs(r.minAngle),j=Xd.parseCoordinateOfPie(r,n),v=Xd.parseDeltaAngle(l,o),p=Math.abs(v),y=u;oe(u)&&oe(d)?(wr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y="value"):oe(u)&&(wr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y=d);var g=a.filter(function(A){return et(A,y,0)!==0}).length,b=(p>=360?g:g-1)*c,x=p-g*m-b,N=a.reduce(function(A,E){var M=et(E,y,0);return A+(Q(M)?M:0)},0),w;if(N>0){var O;w=a.map(function(A,E){var M=et(A,y,0),$=et(A,f,E),k=(Q(M)?M:0)/N,I;E?I=O.endAngle+an(v)*c*(M!==0?1:0):I=l;var _=I+an(v)*((M!==0?m:0)+k*x),C=(I+_)/2,P=(j.innerRadius+j.outerRadius)/2,z=[{name:$,value:M,payload:A,dataKey:y,type:h}],B=Ve(j.cx,j.cy,P,C);return O=Ge(Ge(Ge({percent:k,cornerRadius:i,name:$,tooltipPayload:z,midAngle:C,middleRadius:P,tooltipPosition:B},A),j),{},{value:et(A,y),startAngle:I,endAngle:_,payload:A,paddingAngle:an(v)*c}),O})}return Ge(Ge({},j),{},{sectors:w,data:a})});var Kce=Math.ceil,Yce=Math.max;function Vce(e,t,n,r){for(var a=-1,i=Yce(Kce((t-e)/(n||1)),0),l=Array(i);i--;)l[r?i:++a]=e,e+=n;return l}var Wce=Vce,Xce=R3,zO=1/0,Qce=17976931348623157e292;function Zce(e){if(!e)return e===0?e:0;if(e=Xce(e),e===zO||e===-zO){var t=e<0?-1:1;return t*Qce}return e===e?e:0}var mP=Zce,Jce=Wce,eue=Bm,Ev=mP;function tue(e){return function(t,n,r){return r&&typeof r!="number"&&eue(t,n,r)&&(n=r=void 0),t=Ev(t),n===void 0?(n=t,t=0):n=Ev(n),r=r===void 0?t<n?1:-1:Ev(r),Jce(t,n,r,e)}}var nue=tue,rue=nue,aue=rue(),iue=aue;const Sp=$e(iue);function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function IO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function BO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IO(Object(n),!0).forEach(function(r){yP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yP(e,t,n){return t=sue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sue(e){var t=lue(e,"string");return Xu(t)=="symbol"?t:t+""}function lue(e,t){if(Xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oue=["Webkit","Moz","O","ms"],cue=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=oue.reduce(function(i,l){return BO(BO({},i),{},yP({},l+r,n))},{});return a[t]=n,a};function jo(e){"@babel/helpers - typeof";return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(e)}function wp(){return wp=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},wp.apply(this,arguments)}function UO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){wn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(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,gP(r.key),r)}}function fue(e,t,n){return t&&qO(e.prototype,t),n&&qO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function due(e,t,n){return t=Np(t),hue(e,vP()?Reflect.construct(t,n||[],Np(e).constructor):t.apply(e,n))}function hue(e,t){if(t&&(jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pue(e)}function pue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vP=function(){return!!e})()}function Np(e){return Np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Np(e)}function mue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rb(e,t)}function rb(e,t){return rb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},rb(e,t)}function wn(e,t,n){return t=gP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gP(e){var t=yue(e,"string");return jo(t)=="symbol"?t:t+""}function yue(e,t){if(jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vue=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,l=t.width,o=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Xc().domain(Sp(0,c)).range([i,i+l-o]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:f}},HO=function(t){return t.changedTouches&&!!t.changedTouches.length},So=function(e){function t(n){var r;return uue(this,t),r=due(this,t,[n]),wn(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),wn(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),wn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,o=a.startIndex;l==null||l({endIndex:i,startIndex:o})}),r.detachDragEndListener()}),wn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),wn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),wn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),wn(r,"handleSlideDragStart",function(a){var i=HO(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return mue(t,e),fue(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,l=this.state.scaleValues,o=this.props,c=o.gap,u=o.data,f=u.length-1,d=Math.min(a,i),h=Math.max(a,i),m=t.getIndexInRange(l,d),j=t.getIndexInRange(l,h);return{startIndex:m-m%c,endIndex:j===f?f:j-j%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,o=a.dataKey,c=et(i[r],o,r);return ce(l)?l(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,i=a.slideMoveStartX,l=a.startX,o=a.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,m=c.endIndex,j=c.onChange,v=r.pageX-i;v>0?v=Math.min(v,u+f-d-o,u+f-d-l):v<0&&(v=Math.max(v,u-l,u-o));var p=this.getIndex({startX:l+v,endX:o+v});(p.startIndex!==h||p.endIndex!==m)&&j&&j(p),this.setState({startX:l+v,endX:o+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=HO(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,l=a.movingTravellerId,o=a.endX,c=a.startX,u=this.state[l],f=this.props,d=f.x,h=f.width,m=f.travellerWidth,j=f.onChange,v=f.gap,p=f.data,y={startX:this.state.startX,endX:this.state.endX},g=r.pageX-i;g>0?g=Math.min(g,d+h-m-u):g<0&&(g=Math.max(g,d-u)),y[l]=u+g;var b=this.getIndex(y),x=b.startIndex,N=b.endIndex,w=function(){var A=p.length-1;return l==="startX"&&(o>c?x%v===0:N%v===0)||o<c&&N===A||l==="endX"&&(o>c?N%v===0:x%v===0)||o>c&&N===A};this.setState(wn(wn({},l,u+g),"brushMoveStartX",r.pageX),function(){j&&w()&&j(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,o=l.scaleValues,c=l.startX,u=l.endX,f=this.state[a],d=o.indexOf(f);if(d!==-1){var h=d+r;if(!(h===-1||h>=o.length)){var m=o[h];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(wn({},a,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.fill,u=r.stroke;return T.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:l,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.data,u=r.children,f=r.padding,d=S.Children.only(u);return d?T.cloneElement(d,{x:a,y:i,width:l,height:o,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,o=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,m=c.ariaLabel,j=c.data,v=c.startIndex,p=c.endIndex,y=Math.max(r,this.props.x),g=_v(_v({},ae(this.props,!1)),{},{x:y,y:u,width:f,height:d}),b=m||"Min value: ".concat((i=j[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=j[p])===null||l===void 0?void 0:l.name);return T.createElement(ge,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),o.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,g))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,o=i.height,c=i.stroke,u=i.travellerWidth,f=Math.min(r,a)+u,d=Math.max(Math.abs(a-r)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:l,width:d,height:o})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,o=r.height,c=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,h=f.endX,m=5,j={pointerEvents:"none",fill:u};return T.createElement(ge,{className:"recharts-brush-texts"},T.createElement(Ps,wp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:l+o/2},j),this.getTextOfTick(a)),T.createElement(Ps,wp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+m,y:l+o/2},j),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,o=r.x,c=r.y,u=r.width,f=r.height,d=r.alwaysShowText,h=this.state,m=h.startX,j=h.endX,v=h.isTextActive,p=h.isSlideMoving,y=h.isTravellerMoving,g=h.isTravellerFocused;if(!a||!a.length||!Q(o)||!Q(c)||!Q(u)||!Q(f)||u<=0||f<=0)return null;var b=pe("recharts-brush",i),x=T.Children.count(l)===1,N=cue("userSelect","none");return T.createElement(ge,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),x&&this.renderPanorama(),this.renderSlide(m,j),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(j,"endX"),(v||p||y||g||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,o=r.height,c=r.stroke,u=Math.floor(i+o/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:l,height:o,fill:c,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+l-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+l-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return T.isValidElement(r)?i=T.cloneElement(r,a):ce(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,o=r.x,c=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return _v({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:l},i&&i.length?vue({data:i,width:l,x:o,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||o!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([o,o+l-c]);var h=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,o=i-1;o-l>1;){var c=Math.floor((l+o)/2);r[c]>a?o=c:l=c}return a>=r[o]?o:l}}])}(S.PureComponent);wn(So,"displayName","Brush");wn(So,"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 gue=w1;function xue(e,t){var n;return gue(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var bue=xue,jue=o3,Sue=ea,wue=bue,Nue=jn,Oue=Bm;function Aue(e,t,n){var r=Nue(e)?jue:wue;return n&&Oue(e,t,n)&&(t=void 0),r(e,Sue(t))}var Cue=Aue;const Eue=$e(Cue);var Yr=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},FO=T3;function _ue(e,t,n){t=="__proto__"&&FO?FO(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Tue=_ue,kue=Tue,Mue=E3,Pue=ea;function $ue(e,t){var n={};return t=Pue(t),Mue(e,function(r,a,i){kue(n,a,t(r,a,i))}),n}var Rue=$ue;const Due=$e(Rue);function Lue(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var zue=Lue,Iue=w1;function Bue(e,t){var n=!0;return Iue(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var Uue=Bue,que=zue,Hue=Uue,Fue=ea,Gue=jn,Kue=Bm;function Yue(e,t,n){var r=Gue(e)?que:Hue;return n&&Kue(e,t,n)&&(t=void 0),r(e,Fue(t))}var Vue=Yue;const xP=$e(Vue);var Wue=["x","y"];function Qu(e){"@babel/helpers - typeof";return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function ab(){return ab=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},ab.apply(this,arguments)}function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ec(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(n),!0).forEach(function(r){Xue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xue(e,t,n){return t=Que(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Que(e){var t=Zue(e,"string");return Qu(t)=="symbol"?t:t+""}function Zue(e,t){if(Qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jue(e,t){if(e==null)return{};var n=efe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function efe(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 tfe(e,t){var n=e.x,r=e.y,a=Jue(e,Wue),i="".concat(n),l=parseInt(i,10),o="".concat(r),c=parseInt(o,10),u="".concat(t.height||a.height),f=parseInt(u,10),d="".concat(t.width||a.width),h=parseInt(d,10);return Ec(Ec(Ec(Ec(Ec({},t),a),l?{x:l}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function KO(e){return T.createElement(bp,ab({shapeType:"rectangle",propTransformer:tfe,activeClassName:"recharts-active-bar"},e))}var nfe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=Q(r)||wH(r);return i?t(r,a):(i||Rs(),n)}},rfe=["value","background"],bP;function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function afe(e,t){if(e==null)return{};var n=ife(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ife(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Op.apply(this,arguments)}function YO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YO(Object(n),!0).forEach(function(r){di(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VO(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,SP(r.key),r)}}function lfe(e,t,n){return t&&VO(e.prototype,t),n&&VO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ofe(e,t,n){return t=Ap(t),cfe(e,jP()?Reflect.construct(t,n||[],Ap(e).constructor):t.apply(e,n))}function cfe(e,t){if(t&&(wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ufe(e)}function ufe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jP=function(){return!!e})()}function Ap(e){return Ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ap(e)}function ffe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ib(e,t)}function ib(e,t){return ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ib(e,t)}function di(e,t,n){return t=SP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SP(e){var t=dfe(e,"string");return wo(t)=="symbol"?t:t+""}function dfe(e,t){if(wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bi=function(e){function t(){var n;sfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ofe(this,t,[].concat(a)),di(n,"state",{isAnimationFinished:!1}),di(n,"id",Di("recharts-bar-")),di(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),di(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return ffe(t,e),lfe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,l=i.shape,o=i.dataKey,c=i.activeIndex,u=i.activeBar,f=ae(this.props,!1);return r&&r.map(function(d,h){var m=h===c,j=m?u:l,v=St(St(St({},f),d),{},{isActive:m,option:j,index:h,dataKey:o,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(ge,Op({className:"recharts-bar-rectangle"},Ti(a.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),T.createElement(KO,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,l=a.layout,o=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,d=a.animationId,h=this.state.prevData;return T.createElement(or,{begin:c,duration:u,isActive:o,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var j=m.t,v=i.map(function(p,y){var g=h&&h[y];if(g){var b=st(g.x,p.x),x=st(g.y,p.y),N=st(g.width,p.width),w=st(g.height,p.height);return St(St({},p),{},{x:b(j),y:x(j),width:N(j),height:w(j)})}if(l==="horizontal"){var O=st(0,p.height),A=O(j);return St(St({},p),{},{y:p.y+p.height-A,height:A})}var E=st(0,p.width),M=E(j);return St(St({},p),{},{width:M})});return T.createElement(ge,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,l=this.state.prevData;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,l=a.dataKey,o=a.activeIndex,c=ae(this.props.background,!1);return i.map(function(u,f){u.value;var d=u.background,h=afe(u,rfe);if(!d)return null;var m=St(St(St(St(St({},h),{},{fill:"#eee"},d),c),Ti(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:f,className:"recharts-bar-background-rectangle"});return T.createElement(KO,Op({key:"background-bar-".concat(f),option:r.props.background,isActive:f===o},m))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.data,o=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=cn(f,oc);if(!d)return null;var h=u==="vertical"?l[0].height/2:l[0].width/2,m=function(p,y){var g=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:g,errorVal:et(p,y)}},j={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(ge,j,d.map(function(v){return T.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:l,xAxis:o,yAxis:c,layout:u,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,l=r.className,o=r.xAxis,c=r.yAxis,u=r.left,f=r.top,d=r.width,h=r.height,m=r.isAnimationActive,j=r.background,v=r.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=pe("recharts-bar",l),g=o&&o.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,N=oe(v)?this.id:v;return T.createElement(ge,{className:y},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(N)},T.createElement("rect",{x:g?u:u-d/2,y:b?f:f-h/2,width:g?d:d*2,height:b?h:h*2}))):null,T.createElement(ge,{className:"recharts-bar-rectangles",clipPath:x?"url(#clipPath-".concat(N,")"):null},j?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(x,N),(!m||p)&&Nr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(S.PureComponent);bP=Bi;di(Bi,"displayName","Bar");di(Bi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});di(Bi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,l=e.yAxis,o=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=qae(r,n);if(!m)return null;var j=t.layout,v=n.type.defaultProps,p=v!==void 0?St(St({},v),n.props):n.props,y=p.dataKey,g=p.children,b=p.minPointSize,x=j==="horizontal"?l:i,N=u?x.scale.domain():null,w=Wae({numericAxis:x}),O=cn(g,Mf),A=d.map(function(E,M){var $,k,I,_,C,P;u?$=Hae(u[f+M],N):($=et(E,y),Array.isArray($)||($=[w,$]));var z=nfe(b,bP.defaultProps.minPointSize)($[1],M);if(j==="horizontal"){var B,K=[l.scale($[0]),l.scale($[1])],V=K[0],X=K[1];k=BN({axis:i,ticks:o,bandSize:a,offset:m.offset,entry:E,index:M}),I=(B=X??V)!==null&&B!==void 0?B:void 0,_=m.size;var Z=V-X;if(C=Number.isNaN(Z)?0:Z,P={x:k,y:l.y,width:_,height:l.height},Math.abs(z)>0&&Math.abs(C)<Math.abs(z)){var ne=an(C||z)*(Math.abs(z)-Math.abs(C));I-=ne,C+=ne}}else{var ie=[i.scale($[0]),i.scale($[1])],je=ie[0],ye=ie[1];if(k=je,I=BN({axis:l,ticks:c,bandSize:a,offset:m.offset,entry:E,index:M}),_=ye-je,C=m.size,P={x:i.x,y:I,width:i.width,height:C},Math.abs(z)>0&&Math.abs(_)<Math.abs(z)){var ft=an(_||z)*(Math.abs(z)-Math.abs(_));_+=ft}}return St(St(St({},E),{},{x:k,y:I,width:_,height:C,value:u?$:$[1],payload:E,background:P},O&&O[M]&&O[M].props),{},{tooltipPayload:[GM(n,E)],tooltipPosition:{x:k+_/2,y:I+C/2}})});return St({data:A,layout:j},h)});function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function hfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WO(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,wP(r.key),r)}}function pfe(e,t,n){return t&&WO(e.prototype,t),n&&WO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(r){ry(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ry(e,t,n){return t=wP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wP(e){var t=mfe(e,"string");return Zu(t)=="symbol"?t:t+""}function mfe(e,t){if(Zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ay=function(t,n,r,a,i){var l=t.width,o=t.height,c=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},h=!!On(u,Bi);return f.reduce(function(m,j){var v=n[j],p=v.orientation,y=v.domain,g=v.padding,b=g===void 0?{}:g,x=v.mirror,N=v.reversed,w="".concat(p).concat(x?"Mirror":""),O,A,E,M,$;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var k=y[1]-y[0],I=1/0,_=v.categoricalDomain.sort(CH);if(_.forEach(function(ie,je){je>0&&(I=Math.min((ie||0)-(_[je-1]||0),I))}),Number.isFinite(I)){var C=I/k,P=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(O=C*P/2),v.padding==="no-gap"){var z=sn(t.barCategoryGap,C*P),B=C*P/2;O=B-z-(B-z)/P*z}}}a==="xAxis"?A=[r.left+(b.left||0)+(O||0),r.left+r.width-(b.right||0)-(O||0)]:a==="yAxis"?A=c==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(O||0),r.top+r.height-(b.bottom||0)-(O||0)]:A=v.range,N&&(A=[A[1],A[0]]);var K=UM(v,i,h),V=K.scale,X=K.realScaleType;V.domain(y).range(A),qM(V);var Z=HM(V,gr(gr({},v),{},{realScaleType:X}));a==="xAxis"?($=p==="top"&&!x||p==="bottom"&&x,E=r.left,M=d[w]-$*v.height):a==="yAxis"&&($=p==="left"&&!x||p==="right"&&x,E=d[w]-$*v.width,M=r.top);var ne=gr(gr(gr({},v),Z),{},{realScaleType:X,x:E,y:M,scale:V,width:a==="xAxis"?r.width:v.width,height:a==="yAxis"?r.height:v.height});return ne.bandSize=op(ne,Z),!v.hide&&a==="xAxis"?d[w]+=($?-1:1)*ne.height:v.hide||(d[w]+=($?-1:1)*ne.width),gr(gr({},m),{},ry({},j,ne))},{})},NP=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return{x:Math.min(r,i),y:Math.min(a,l),width:Math.abs(i-r),height:Math.abs(l-a)}},yfe=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return NP({x:n,y:r},{x:a,y:i})},OP=function(){function e(t){hfe(this,e),this.scale=t}return pfe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();ry(OP,"EPS",1e-4);var Z1=function(t){var n=Object.keys(t).reduce(function(r,a){return gr(gr({},r),{},ry({},a,OP.create(t[a])))},{});return gr(gr({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,o=i.position;return Due(a,function(c,u){return n[u].apply(c,{bandAware:l,position:o})})},isInRange:function(a){return xP(a,function(i,l){return n[l].isInRange(i)})}})};function vfe(e){return(e%180+180)%180}var gfe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=vfe(a),l=i*Math.PI/180,o=Math.atan(r/n),c=l>o&&l<Math.PI-o?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},xfe=ea,bfe=kf,jfe=zm;function Sfe(e){return function(t,n,r){var a=Object(t);if(!bfe(t)){var i=xfe(n);t=jfe(t),n=function(o){return i(a[o],o,a)}}var l=e(t,n,r);return l>-1?a[i?t[l]:l]:void 0}}var wfe=Sfe,Nfe=mP;function Ofe(e){var t=Nfe(e),n=t%1;return t===t?n?t-n:t:0}var Afe=Ofe,Cfe=S3,Efe=ea,_fe=Afe,Tfe=Math.max;function kfe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:_fe(n);return a<0&&(a=Tfe(r+a,0)),Cfe(e,Efe(t),a)}var Mfe=kfe,Pfe=wfe,$fe=Mfe,Rfe=Pfe($fe),Dfe=Rfe;const Lfe=$e(Dfe);var zfe=_q(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("")}),J1=S.createContext(void 0),ej=S.createContext(void 0),AP=S.createContext(void 0),CP=S.createContext({}),EP=S.createContext(void 0),_P=S.createContext(0),TP=S.createContext(0),QO=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,o=t.children,c=t.width,u=t.height,f=zfe(i);return T.createElement(J1.Provider,{value:r},T.createElement(ej.Provider,{value:a},T.createElement(CP.Provider,{value:i},T.createElement(AP.Provider,{value:f},T.createElement(EP.Provider,{value:l},T.createElement(_P.Provider,{value:u},T.createElement(TP.Provider,{value:c},o)))))))},Ife=function(){return S.useContext(EP)},kP=function(t){var n=S.useContext(J1);n==null&&Rs();var r=n[t];return r==null&&Rs(),r},Bfe=function(){var t=S.useContext(J1);return Ja(t)},Ufe=function(){var t=S.useContext(ej),n=Lfe(t,function(r){return xP(r.domain,Number.isFinite)});return n||Ja(t)},MP=function(t){var n=S.useContext(ej);n==null&&Rs();var r=n[t];return r==null&&Rs(),r},qfe=function(){var t=S.useContext(AP);return t},Hfe=function(){return S.useContext(CP)},tj=function(){return S.useContext(TP)},nj=function(){return S.useContext(_P)};function No(e){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(e)}function Ffe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gfe(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,$P(r.key),r)}}function Kfe(e,t,n){return t&&Gfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yfe(e,t,n){return t=Cp(t),Vfe(e,PP()?Reflect.construct(t,n||[],Cp(e).constructor):t.apply(e,n))}function Vfe(e,t){if(t&&(No(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wfe(e)}function Wfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PP=function(){return!!e})()}function Cp(e){return Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cp(e)}function Xfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sb(e,t)}function sb(e,t){return sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},sb(e,t)}function ZO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function JO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZO(Object(n),!0).forEach(function(r){rj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rj(e,t,n){return t=$P(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $P(e){var t=Qfe(e,"string");return No(t)=="symbol"?t:t+""}function Qfe(e,t){if(No(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(No(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Zfe(e,t){return nde(e)||tde(e,t)||ede(e,t)||Jfe()}function Jfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ede(e,t){if(e){if(typeof e=="string")return eA(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 eA(e,t)}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function nde(e){if(Array.isArray(e))return e}function lb(){return lb=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},lb.apply(this,arguments)}var rde=function(t,n){var r;return T.isValidElement(t)?r=T.cloneElement(t,n):ce(t)?r=t(n):r=T.createElement("line",lb({},n,{className:"recharts-reference-line-line"})),r},ade=function(t,n,r,a,i,l,o,c,u){var f=i.x,d=i.y,h=i.width,m=i.height;if(r){var j=u.y,v=t.y.apply(j,{position:l});if(Yr(u,"discard")&&!t.y.isInRange(v))return null;var p=[{x:f+h,y:v},{x:f,y:v}];return c==="left"?p.reverse():p}if(n){var y=u.x,g=t.x.apply(y,{position:l});if(Yr(u,"discard")&&!t.x.isInRange(g))return null;var b=[{x:g,y:d+m},{x:g,y:d}];return o==="top"?b.reverse():b}if(a){var x=u.segment,N=x.map(function(w){return t.apply(w,{position:l})});return Yr(u,"discard")&&Eue(N,function(w){return!t.isInRange(w)})?null:N}return null};function ide(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,l=e.shape,o=e.className,c=e.alwaysShow,u=Ife(),f=kP(a),d=MP(i),h=qfe();if(!u||!h)return null;wr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Z1({x:f.scale,y:d.scale}),j=kt(t),v=kt(n),p=r&&r.length===2,y=ade(m,j,v,p,h,e.position,f.orientation,d.orientation,e);if(!y)return null;var g=Zfe(y,2),b=g[0],x=b.x,N=b.y,w=g[1],O=w.x,A=w.y,E=Yr(e,"hidden")?"url(#".concat(u,")"):void 0,M=JO(JO({clipPath:E},ae(e,!0)),{},{x1:x,y1:N,x2:O,y2:A});return T.createElement(ge,{className:pe("recharts-reference-line",o)},rde(l,M),zt.renderCallByParent(e,yfe({x1:x,y1:N,x2:O,y2:A})))}var fa=function(e){function t(){return Ffe(this,t),Yfe(this,t,arguments)}return Xfe(t,e),Kfe(t,[{key:"render",value:function(){return T.createElement(ide,this.props)}}])}(T.Component);rj(fa,"displayName","ReferenceLine");rj(fa,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function ob(){return ob=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},ob.apply(this,arguments)}function Oo(e){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(e)}function tA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(n),!0).forEach(function(r){iy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lde(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,DP(r.key),r)}}function ode(e,t,n){return t&&lde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cde(e,t,n){return t=Ep(t),ude(e,RP()?Reflect.construct(t,n||[],Ep(e).constructor):t.apply(e,n))}function ude(e,t){if(t&&(Oo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fde(e)}function fde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RP=function(){return!!e})()}function Ep(e){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ep(e)}function dde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cb(e,t)}function cb(e,t){return cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},cb(e,t)}function iy(e,t,n){return t=DP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DP(e){var t=hde(e,"string");return Oo(t)=="symbol"?t:t+""}function hde(e,t){if(Oo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pde=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,l=Z1({x:a.scale,y:i.scale}),o=l.apply({x:n,y:r},{bandAware:!0});return Yr(t,"discard")&&!l.isInRange(o)?null:o},sy=function(e){function t(){return sde(this,t),cde(this,t,arguments)}return dde(t,e),ode(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,l=r.r,o=r.alwaysShow,c=r.clipPathId,u=kt(a),f=kt(i);if(wr(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=pde(this.props);if(!d)return null;var h=d.x,m=d.y,j=this.props,v=j.shape,p=j.className,y=Yr(this.props,"hidden")?"url(#".concat(c,")"):void 0,g=nA(nA({clipPath:y},ae(this.props,!0)),{},{cx:h,cy:m});return T.createElement(ge,{className:pe("recharts-reference-dot",p)},t.renderDot(v,g),zt.renderCallByParent(this.props,{x:h-l,y:m-l,width:2*l,height:2*l}))}}])}(T.Component);iy(sy,"displayName","ReferenceDot");iy(sy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});iy(sy,"renderDot",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):ce(e)?n=e(t):n=T.createElement(Lf,ob({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function ub(){return ub=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},ub.apply(this,arguments)}function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}function rA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rA(Object(n),!0).forEach(function(r){ly(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yde(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,zP(r.key),r)}}function vde(e,t,n){return t&&yde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gde(e,t,n){return t=_p(t),xde(e,LP()?Reflect.construct(t,n||[],_p(e).constructor):t.apply(e,n))}function xde(e,t){if(t&&(Ao(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bde(e)}function bde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LP=function(){return!!e})()}function _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_p(e)}function jde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fb(e,t)}function fb(e,t){return fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},fb(e,t)}function ly(e,t,n){return t=zP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zP(e){var t=Sde(e,"string");return Ao(t)=="symbol"?t:t+""}function Sde(e,t){if(Ao(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ao(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wde=function(t,n,r,a,i){var l=i.x1,o=i.x2,c=i.y1,u=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var h=Z1({x:f.scale,y:d.scale}),m={x:t?h.x.apply(l,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},j={x:n?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Yr(i,"discard")&&(!h.isInRange(m)||!h.isInRange(j))?null:NP(m,j)},oy=function(e){function t(){return mde(this,t),gde(this,t,arguments)}return jde(t,e),vde(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,l=r.y1,o=r.y2,c=r.className,u=r.alwaysShow,f=r.clipPathId;wr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=kt(a),h=kt(i),m=kt(l),j=kt(o),v=this.props.shape;if(!d&&!h&&!m&&!j&&!v)return null;var p=wde(d,h,m,j,this.props);if(!p&&!v)return null;var y=Yr(this.props,"hidden")?"url(#".concat(f,")"):void 0;return T.createElement(ge,{className:pe("recharts-reference-area",c)},t.renderRect(v,aA(aA({clipPath:y},ae(this.props,!0)),p)),zt.renderCallByParent(this.props,p))}}])}(T.Component);ly(oy,"displayName","ReferenceArea");ly(oy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ly(oy,"renderRect",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):ce(e)?n=e(t):n=T.createElement(Q1,ub({},t,{className:"recharts-reference-area-rect"})),n});function IP(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Nde(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return gfe(r,n)}function Ode(e,t,n){var r=n==="width",a=e.x,i=e.y,l=e.width,o=e.height;return t===1?{start:r?a:i,end:r?a+l:i+o}:{start:r?a+l:i+o,end:r?a:i}}function Tp(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function Ade(e,t){return IP(e,t+1)}function Cde(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,o=t.end,c=0,u=1,f=l,d=function(){var j=r==null?void 0:r[c];if(j===void 0)return{v:IP(r,u)};var v=c,p,y=function(){return p===void 0&&(p=n(j,v)),p},g=j.coordinate,b=c===0||Tp(e,g,y,f,o);b||(c=0,f=l,u+=1),b&&(f=g+e*(y()/2+a),c+=u)},h;u<=i.length;)if(h=d(),h)return h.v;return[]}function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function iA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(n),!0).forEach(function(r){Ede(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ede(e,t,n){return t=_de(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _de(e){var t=Tde(e,"string");return Ju(t)=="symbol"?t:t+""}function Tde(e,t){if(Ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kde(e,t,n,r,a){for(var i=(r||[]).slice(),l=i.length,o=t.start,c=t.end,u=function(h){var m=i[h],j,v=function(){return j===void 0&&(j=n(m,h)),j};if(h===l-1){var p=e*(m.coordinate+e*v()/2-c);i[h]=m=Xt(Xt({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate})}else i[h]=m=Xt(Xt({},m),{},{tickCoord:m.coordinate});var y=Tp(e,m.tickCoord,v,o,c);y&&(c=m.tickCoord-e*(v()/2+a),i[h]=Xt(Xt({},m),{},{isShow:!0}))},f=l-1;f>=0;f--)u(f);return i}function Mde(e,t,n,r,a,i){var l=(r||[]).slice(),o=l.length,c=t.start,u=t.end;if(i){var f=r[o-1],d=n(f,o-1),h=e*(f.coordinate+e*d/2-u);l[o-1]=f=Xt(Xt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=Tp(e,f.tickCoord,function(){return d},c,u);m&&(u=f.tickCoord-e*(d/2+a),l[o-1]=Xt(Xt({},f),{},{isShow:!0}))}for(var j=i?o-1:o,v=function(g){var b=l[g],x,N=function(){return x===void 0&&(x=n(b,g)),x};if(g===0){var w=e*(b.coordinate-e*N()/2-c);l[g]=b=Xt(Xt({},b),{},{tickCoord:w<0?b.coordinate-w*e:b.coordinate})}else l[g]=b=Xt(Xt({},b),{},{tickCoord:b.coordinate});var O=Tp(e,b.tickCoord,N,c,u);O&&(c=b.tickCoord+e*(N()/2+a),l[g]=Xt(Xt({},b),{},{isShow:!0}))},p=0;p<j;p++)v(p);return l}function aj(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,l=e.minTickGap,o=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!r)return[];if(Q(c)||La.isSsr)return Ade(a,typeof c=="number"&&Q(c)?c:0);var h=[],m=o==="top"||o==="bottom"?"width":"height",j=f&&m==="width"?Wc(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(b,x){var N=ce(u)?u(b.value,x):b.value;return m==="width"?Nde(Wc(N,{fontSize:t,letterSpacing:n}),j,d):Wc(N,{fontSize:t,letterSpacing:n})[m]},p=a.length>=2?an(a[1].coordinate-a[0].coordinate):1,y=Ode(i,p,m);return c==="equidistantPreserveStart"?Cde(p,y,v,a,l):(c==="preserveStart"||c==="preserveStartEnd"?h=Mde(p,y,v,a,l,c==="preserveStartEnd"):h=kde(p,y,v,a,l),h.filter(function(g){return g.isShow}))}var Pde=["viewBox"],$de=["viewBox"],Rde=["ticks"];function Co(e){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(e)}function wl(){return wl=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},wl.apply(this,arguments)}function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(n),!0).forEach(function(r){ij(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tv(e,t){if(e==null)return{};var n=Dde(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dde(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 Lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lA(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,UP(r.key),r)}}function zde(e,t,n){return t&&lA(e.prototype,t),n&&lA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ide(e,t,n){return t=kp(t),Bde(e,BP()?Reflect.construct(t,n||[],kp(e).constructor):t.apply(e,n))}function Bde(e,t){if(t&&(Co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ude(e)}function Ude(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BP=function(){return!!e})()}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kp(e)}function qde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&db(e,t)}function db(e,t){return db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},db(e,t)}function ij(e,t,n){return t=UP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UP(e){var t=Hde(e,"string");return Co(t)=="symbol"?t:t+""}function Hde(e,t){if(Co(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cc=function(e){function t(n){var r;return Lde(this,t),r=Ide(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return qde(t,e),zde(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,l=Tv(r,Pde),o=this.props,c=o.viewBox,u=Tv(o,$de);return!Ml(i,c)||!Ml(l,u)||!Ml(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,l=a.y,o=a.width,c=a.height,u=a.orientation,f=a.tickSize,d=a.mirror,h=a.tickMargin,m,j,v,p,y,g,b=d?-1:1,x=r.tickSize||f,N=Q(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=j=r.coordinate,p=l+ +!d*c,v=p-b*x,g=v-b*h,y=N;break;case"left":v=p=r.coordinate,j=i+ +!d*o,m=j-b*x,y=m-b*h,g=N;break;case"right":v=p=r.coordinate,j=i+ +d*o,m=j+b*x,y=m+b*h,g=N;break;default:m=j=r.coordinate,p=l+ +d*c,v=p+b*x,g=v+b*h,y=N;break}return{line:{x1:m,y1:v,x2:j,y2:p},tick:{x:y,y:g}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l;switch(a){case"left":l=i?"start":"end";break;case"right":l=i?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=i?"start":"end";break;default:l=i?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.orientation,u=r.mirror,f=r.axisLine,d=Et(Et(Et({},ae(this.props,!1)),ae(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=Et(Et({},d),{},{x1:a,y1:i+h*o,x2:a+l,y2:i+h*o})}else{var m=+(c==="left"&&!u||c==="right"&&u);d=Et(Et({},d),{},{x1:a+m*l,y1:i,x2:a+m*l,y2:i+o})}return T.createElement("line",wl({},d,{className:pe("recharts-cartesian-axis-line",Rn(f,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var l=this,o=this.props,c=o.tickLine,u=o.stroke,f=o.tick,d=o.tickFormatter,h=o.unit,m=aj(Et(Et({},this.props),{},{ticks:r}),a,i),j=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=ae(this.props,!1),y=ae(f,!1),g=Et(Et({},p),{},{fill:"none"},ae(c,!1)),b=m.map(function(x,N){var w=l.getTickLineCoord(x),O=w.line,A=w.tick,E=Et(Et(Et(Et({textAnchor:j,verticalAnchor:v},p),{},{stroke:"none",fill:u},y),A),{},{index:N,payload:x,visibleTicksCount:m.length,tickFormatter:d});return T.createElement(ge,wl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(x.value,"-").concat(x.coordinate,"-").concat(x.tickCoord)},Ti(l.props,x,N)),c&&T.createElement("line",wl({},g,O,{className:pe("recharts-cartesian-axis-tick-line",Rn(c,"className"))})),f&&t.renderTickItem(f,E,"".concat(ce(d)?d(x.value,N):x.value).concat(h||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,l=a.width,o=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var d=this.props,h=d.ticks,m=Tv(d,Rde),j=h;return ce(c)&&(j=h&&h.length>0?c(this.props):c(m)),l<=0||o<=0||!j||!j.length?null:T.createElement(ge,{className:pe("recharts-cartesian-axis",u),ref:function(p){r.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(j,this.state.fontSize,this.state.letterSpacing),zt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,o=pe(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(r)?l=T.cloneElement(r,Et(Et({},a),{},{className:o})):ce(r)?l=r(Et(Et({},a),{},{className:o})):l=T.createElement(Ps,wl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])}(S.Component);ij(cc,"displayName","CartesianAxis");ij(cc,"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 Fde=["x1","y1","x2","y2","key"],Gde=["offset"];function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(n),!0).forEach(function(r){Kde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kde(e,t,n){return t=Yde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yde(e){var t=Vde(e,"string");return Ds(t)=="symbol"?t:t+""}function Vde(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ss.apply(this,arguments)}function cA(e,t){if(e==null)return{};var n=Wde(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Xde=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,l=t.width,o=t.height,c=t.ry;return T.createElement("rect",{x:a,y:i,ry:c,width:l,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function qP(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(ce(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,o=t.key,c=cA(t,Fde),u=ae(c,!1);u.offset;var f=cA(u,Gde);n=T.createElement("line",ss({},f,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:o}))}return n}function Qde(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,c){var u=Qt(Qt({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(c),index:c});return qP(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Zde(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,c){var u=Qt(Qt({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(c),index:c});return qP(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Jde(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,o=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=o.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?a+l-h:f[m+1]-h;if(v<=0)return null;var p=m%t.length;return T.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:v,width:i,stroke:"none",fill:t[p],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function ehe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,o=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?i+o-h:f[m+1]-h;if(v<=0)return null;var p=m%r.length;return T.createElement("rect",{key:"react-".concat(m),x:h,y:l,width:v,height:c,stroke:"none",fill:r[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var the=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return BM(aj(Qt(Qt(Qt({},cc.defaultProps),r),{},{ticks:xa(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},nhe=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return BM(aj(Qt(Qt(Qt({},cc.defaultProps),r),{},{ticks:xa(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},el={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Rl(e){var t,n,r,a,i,l,o=tj(),c=nj(),u=Hfe(),f=Qt(Qt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:el.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:el.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:el.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:el.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:el.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:el.verticalFill,x:Q(e.x)?e.x:u.left,y:Q(e.y)?e.y:u.top,width:Q(e.width)?e.width:u.width,height:Q(e.height)?e.height:u.height}),d=f.x,h=f.y,m=f.width,j=f.height,v=f.syncWithTicks,p=f.horizontalValues,y=f.verticalValues,g=Bfe(),b=Ufe();if(!Q(m)||m<=0||!Q(j)||j<=0||!Q(d)||d!==+d||!Q(h)||h!==+h)return null;var x=f.verticalCoordinatesGenerator||the,N=f.horizontalCoordinatesGenerator||nhe,w=f.horizontalPoints,O=f.verticalPoints;if((!w||!w.length)&&ce(N)){var A=p&&p.length,E=N({yAxis:b?Qt(Qt({},b),{},{ticks:A?p:b.ticks}):void 0,width:o,height:c,offset:u},A?!0:v);wr(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ds(E),"]")),Array.isArray(E)&&(w=E)}if((!O||!O.length)&&ce(x)){var M=y&&y.length,$=x({xAxis:g?Qt(Qt({},g),{},{ticks:M?y:g.ticks}):void 0,width:o,height:c,offset:u},M?!0:v);wr(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ds($),"]")),Array.isArray($)&&(O=$)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(Xde,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),T.createElement(Qde,ss({},f,{offset:u,horizontalPoints:w,xAxis:g,yAxis:b})),T.createElement(Zde,ss({},f,{offset:u,verticalPoints:O,xAxis:g,yAxis:b})),T.createElement(Jde,ss({},f,{horizontalPoints:w})),T.createElement(ehe,ss({},f,{verticalPoints:O})))}Rl.displayName="CartesianGrid";var rhe=["type","layout","connectNulls","ref"],ahe=["key"];function Eo(e){"@babel/helpers - typeof";return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}function uA(e,t){if(e==null)return{};var n=ihe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ihe(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 tu(){return tu=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},tu.apply(this,arguments)}function fA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fA(Object(n),!0).forEach(function(r){xr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tl(e){return che(e)||ohe(e)||lhe(e)||she()}function she(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lhe(e,t){if(e){if(typeof e=="string")return hb(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 hb(e,t)}}function ohe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function che(e){if(Array.isArray(e))return hb(e)}function hb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dA(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,FP(r.key),r)}}function fhe(e,t,n){return t&&dA(e.prototype,t),n&&dA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dhe(e,t,n){return t=Mp(t),hhe(e,HP()?Reflect.construct(t,n||[],Mp(e).constructor):t.apply(e,n))}function hhe(e,t){if(t&&(Eo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return phe(e)}function phe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HP=function(){return!!e})()}function Mp(e){return Mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mp(e)}function mhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pb(e,t)}function pb(e,t){return pb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},pb(e,t)}function xr(e,t,n){return t=FP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FP(e){var t=yhe(e,"string");return Eo(t)=="symbol"?t:t+""}function yhe(e,t){if(Eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mi=function(e){function t(){var n;uhe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=dhe(this,t,[].concat(a)),xr(n,"state",{isAnimationFinished:!0,totalLength:0}),xr(n,"generateSimpleStrokeDasharray",function(l,o){return"".concat(o,"px ").concat(l-o,"px")}),xr(n,"getStrokeDasharray",function(l,o,c){var u=c.reduce(function(y,g){return y+g});if(!u)return n.generateSimpleStrokeDasharray(o,l);for(var f=Math.floor(l/u),d=l%u,h=o-l,m=[],j=0,v=0;j<c.length;v+=c[j],++j)if(v+c[j]>d){m=[].concat(tl(c.slice(0,j)),[d-v]);break}var p=m.length%2===0?[0,h]:[h];return[].concat(tl(t.repeat(c,f)),tl(m),p).map(function(y){return"".concat(y,"px")}).join(", ")}),xr(n,"id",Di("recharts-line-")),xr(n,"pathRef",function(l){n.mainCurve=l}),xr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),xr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return mhe(t,e),fhe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.points,o=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=cn(f,oc);if(!d)return null;var h=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:et(v.payload,p)}},m={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(ge,m,d.map(function(j){return T.cloneElement(j,{key:"bar-".concat(j.props.dataKey),data:l,xAxis:o,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.dot,u=o.points,f=o.dataKey,d=ae(this.props,!1),h=ae(c,!0),m=u.map(function(v,p){var y=Sn(Sn(Sn({key:"dot-".concat(p),r:3},d),h),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:u});return t.renderDotItem(c,y)}),j={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(ge,tu({className:"recharts-line-dots",key:"dots"},j),m)}},{key:"renderCurveStatically",value:function(r,a,i,l){var o=this.props,c=o.type,u=o.layout,f=o.connectNulls;o.ref;var d=uA(o,rhe),h=Sn(Sn(Sn({},ae(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},l),{},{type:c,layout:u,connectNulls:f});return T.createElement(Ni,tu({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,l=this.props,o=l.points,c=l.strokeDasharray,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=l.animateNewValues,v=l.width,p=l.height,y=this.state,g=y.prevPoints,b=y.totalLength;return T.createElement(or,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var N=x.t;if(g){var w=g.length/o.length,O=o.map(function(k,I){var _=Math.floor(I*w);if(g[_]){var C=g[_],P=st(C.x,k.x),z=st(C.y,k.y);return Sn(Sn({},k),{},{x:P(N),y:z(N)})}if(j){var B=st(v*2,k.x),K=st(p/2,k.y);return Sn(Sn({},k),{},{x:B(N),y:K(N)})}return Sn(Sn({},k),{},{x:k.x,y:k.y})});return i.renderCurveStatically(O,r,a)}var A=st(0,b),E=A(N),M;if(c){var $="".concat(c).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});M=i.getStrokeDasharray(E,b,$)}else M=i.generateSimpleStrokeDasharray(b,E);return i.renderCurveStatically(o,r,a,{strokeDasharray:M})})}},{key:"renderCurve",value:function(r,a){var i=this.props,l=i.points,o=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return o&&l&&l.length&&(!u&&f>0||!ki(u,l))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(l,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,o=a.points,c=a.className,u=a.xAxis,f=a.yAxis,d=a.top,h=a.left,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,g=o.length===1,b=pe("recharts-line",c),x=u&&u.allowDataOverflow,N=f&&f.allowDataOverflow,w=x||N,O=oe(p)?this.id:p,A=(r=ae(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=A.r,M=E===void 0?3:E,$=A.strokeWidth,k=$===void 0?2:$,I=Pk(l)?l:{},_=I.clipDot,C=_===void 0?!0:_,P=M*2+k;return T.createElement(ge,{className:b},x||N?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(O)},T.createElement("rect",{x:x?h:h-m/2,y:N?d:d-j/2,width:x?m:m*2,height:N?j:j*2})),!C&&T.createElement("clipPath",{id:"clipPath-dots-".concat(O)},T.createElement("rect",{x:h-P/2,y:d-P/2,width:m+P,height:j+P}))):null,!g&&this.renderCurve(w,O),this.renderErrorBar(w,O),(g||l)&&this.renderDots(w,C,O),(!v||y)&&Nr.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(tl(r),[0]):r,l=[],o=0;o<a;++o)l=[].concat(tl(l),tl(i));return l}},{key:"renderDotItem",value:function(r,a){var i;if(T.isValidElement(r))i=T.cloneElement(r,a);else if(ce(r))i=r(a);else{var l=a.key,o=uA(a,ahe),c=pe("recharts-line-dot",typeof r!="boolean"?r.className:"");i=T.createElement(Lf,tu({key:l},o,{className:c}))}return i}}])}(S.PureComponent);xr(Mi,"displayName","Line");xr(Mi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!La.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});xr(Mi,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,l=e.dataKey,o=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,m){var j=et(h,l);return f==="horizontal"?{x:yo({axis:n,ticks:a,bandSize:o,entry:h,index:m}),y:oe(j)?null:r.scale(j),value:j,payload:h}:{x:oe(j)?null:n.scale(j),y:yo({axis:r,ticks:i,bandSize:o,entry:h,index:m}),value:j,payload:h}});return Sn({points:d,layout:f},u)});var vhe=["layout","type","stroke","connectNulls","isRange","ref"],ghe=["key"],GP;function _o(e){"@babel/helpers - typeof";return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(e)}function KP(e,t){if(e==null)return{};var n=xhe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xhe(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 ls(){return ls=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},ls.apply(this,arguments)}function hA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hA(Object(n),!0).forEach(function(r){Fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bhe(e,t){if(!(e instanceof t))throw new 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,VP(r.key),r)}}function jhe(e,t,n){return t&&pA(e.prototype,t),n&&pA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function She(e,t,n){return t=Pp(t),whe(e,YP()?Reflect.construct(t,n||[],Pp(e).constructor):t.apply(e,n))}function whe(e,t){if(t&&(_o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nhe(e)}function Nhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YP=function(){return!!e})()}function Pp(e){return Pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pp(e)}function Ohe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mb(e,t)}function mb(e,t){return mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},mb(e,t)}function Fr(e,t,n){return t=VP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VP(e){var t=Ahe(e,"string");return _o(t)=="symbol"?t:t+""}function Ahe(e,t){if(_o(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_o(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ba=function(e){function t(){var n;bhe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=She(this,t,[].concat(a)),Fr(n,"state",{isAnimationFinished:!0}),Fr(n,"id",Di("recharts-area-")),Fr(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),ce(l)&&l()}),Fr(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),ce(l)&&l()}),n}return Ohe(t,e),jhe(t,[{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(l&&!o)return null;var c=this.props,u=c.dot,f=c.points,d=c.dataKey,h=ae(this.props,!1),m=ae(u,!0),j=f.map(function(p,y){var g=Ga(Ga(Ga({key:"dot-".concat(y),r:3},h),m),{},{index:y,cx:p.x,cy:p.y,dataKey:d,value:p.value,payload:p.payload,points:f});return t.renderDotItem(u,g)}),v={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(ge,ls({className:"recharts-area-dots"},v),j)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,o=a.strokeWidth,c=l[0].x,u=l[l.length-1].x,f=r*Math.abs(c-u),d=fi(l.map(function(h){return h.y||0}));return Q(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fi(i.map(function(h){return h.y||0})),d)),Q(d)?T.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(d+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,o=a.strokeWidth,c=l[0].y,u=l[l.length-1].y,f=r*Math.abs(c-u),d=fi(l.map(function(h){return h.x||0}));return Q(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fi(i.map(function(h){return h.x||0})),d)),Q(d)?T.createElement("rect",{x:0,y:c<u?c:c-f,width:d+(o?parseInt("".concat(o),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,i,l){var o=this.props,c=o.layout,u=o.type,f=o.stroke,d=o.connectNulls,h=o.isRange;o.ref;var m=KP(o,vhe);return T.createElement(ge,{clipPath:i?"url(#clipPath-".concat(l,")"):null},T.createElement(Ni,ls({},ae(m,!0),{points:r,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&T.createElement(Ni,ls({},ae(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:r})),f!=="none"&&h&&T.createElement(Ni,ls({},ae(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var i=this,l=this.props,o=l.points,c=l.baseLine,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=this.state,v=j.prevPoints,p=j.prevBaseLine;return T.createElement(or,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var g=y.t;if(v){var b=v.length/o.length,x=o.map(function(A,E){var M=Math.floor(E*b);if(v[M]){var $=v[M],k=st($.x,A.x),I=st($.y,A.y);return Ga(Ga({},A),{},{x:k(g),y:I(g)})}return A}),N;if(Q(c)&&typeof c=="number"){var w=st(p,c);N=w(g)}else if(oe(c)||tc(c)){var O=st(p,0);N=O(g)}else N=c.map(function(A,E){var M=Math.floor(E*b);if(p[M]){var $=p[M],k=st($.x,A.x),I=st($.y,A.y);return Ga(Ga({},A),{},{x:k(g),y:I(g)})}return A});return i.renderAreaStatically(x,N,r,a)}return T.createElement(ge,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(g))),T.createElement(ge,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(o,c,r,a)))})}},{key:"renderArea",value:function(r,a){var i=this.props,l=i.points,o=i.baseLine,c=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,h=u.totalLength;return c&&l&&l.length&&(!f&&h>0||!ki(f,l)||!ki(d,o))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,o,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,o=a.points,c=a.className,u=a.top,f=a.left,d=a.xAxis,h=a.yAxis,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,g=o.length===1,b=pe("recharts-area",c),x=d&&d.allowDataOverflow,N=h&&h.allowDataOverflow,w=x||N,O=oe(p)?this.id:p,A=(r=ae(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=A.r,M=E===void 0?3:E,$=A.strokeWidth,k=$===void 0?2:$,I=Pk(l)?l:{},_=I.clipDot,C=_===void 0?!0:_,P=M*2+k;return T.createElement(ge,{className:b},x||N?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(O)},T.createElement("rect",{x:x?f:f-m/2,y:N?u:u-j/2,width:x?m:m*2,height:N?j:j*2})),!C&&T.createElement("clipPath",{id:"clipPath-dots-".concat(O)},T.createElement("rect",{x:f-P/2,y:u-P/2,width:m+P,height:j+P}))):null,g?null:this.renderArea(w,O),(l||g)&&this.renderDots(w,C,O),(!v||y)&&Nr.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(S.PureComponent);GP=Ba;Fr(Ba,"displayName","Area");Fr(Ba,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Fr(Ba,"getBaseValue",function(e,t,n,r){var a=e.layout,i=e.baseValue,l=t.props.baseValue,o=l??i;if(Q(o)&&typeof o=="number")return o;var c=a==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return o==="dataMin"?d:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]});Fr(Ba,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,o=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=t.layout,j=u&&u.length,v=GP.getBaseValue(t,n,r,a),p=m==="horizontal",y=!1,g=d.map(function(x,N){var w;j?w=u[f+N]:(w=et(x,c),Array.isArray(w)?y=!0:w=[v,w]);var O=w[1]==null||j&&et(x,c)==null;return p?{x:yo({axis:r,ticks:i,bandSize:o,entry:x,index:N}),y:O?null:a.scale(w[1]),value:w,payload:x}:{x:O?null:r.scale(w[1]),y:yo({axis:a,ticks:l,bandSize:o,entry:x,index:N}),value:w,payload:x}}),b;return j||y?b=g.map(function(x){var N=Array.isArray(x.value)?x.value[0]:null;return p?{x:x.x,y:N!=null&&x.y!=null?a.scale(N):null}:{x:N!=null?r.scale(N):null,y:x.y}}):b=p?a.scale(v):r.scale(v),Ga({points:g,baseLine:b,layout:m,isRange:y},h)});Fr(Ba,"renderDotItem",function(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(ce(e))n=e(t);else{var r=pe("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=KP(t,ghe);n=T.createElement(Lf,ls({},i,{key:a,className:r}))}return n});function To(e){"@babel/helpers - typeof";return To=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},To(e)}function Che(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ehe(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,QP(r.key),r)}}function _he(e,t,n){return t&&Ehe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function The(e,t,n){return t=$p(t),khe(e,WP()?Reflect.construct(t,n||[],$p(e).constructor):t.apply(e,n))}function khe(e,t){if(t&&(To(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mhe(e)}function Mhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WP=function(){return!!e})()}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$p(e)}function Phe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yb(e,t)}function yb(e,t){return yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yb(e,t)}function XP(e,t,n){return t=QP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QP(e){var t=$he(e,"string");return To(t)=="symbol"?t:t+""}function $he(e,t){if(To(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(To(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=function(e){function t(){return Che(this,t),The(this,t,arguments)}return Phe(t,e),_he(t,[{key:"render",value:function(){return null}}])}(S.Component);XP(cy,"displayName","ZAxis");XP(cy,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var Rhe=["option","isActive"];function nu(){return nu=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},nu.apply(this,arguments)}function Dhe(e,t){if(e==null)return{};var n=Lhe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lhe(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 zhe(e){var t=e.option,n=e.isActive,r=Dhe(e,Rhe);return typeof t=="string"?S.createElement(bp,nu({option:S.createElement(Lm,nu({type:t},r)),isActive:n,shapeType:"symbols"},r)):S.createElement(bp,nu({option:t,isActive:n,shapeType:"symbols"},r))}function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function ru(){return ru=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},ru.apply(this,arguments)}function mA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mA(Object(n),!0).forEach(function(r){hi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ihe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yA(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,JP(r.key),r)}}function Bhe(e,t,n){return t&&yA(e.prototype,t),n&&yA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uhe(e,t,n){return t=Rp(t),qhe(e,ZP()?Reflect.construct(t,n||[],Rp(e).constructor):t.apply(e,n))}function qhe(e,t){if(t&&(ko(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hhe(e)}function Hhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZP=function(){return!!e})()}function Rp(e){return Rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rp(e)}function Fhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vb(e,t)}function vb(e,t){return vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},vb(e,t)}function hi(e,t,n){return t=JP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JP(e){var t=Ghe(e,"string");return ko(t)=="symbol"?t:t+""}function Ghe(e,t){if(ko(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ko(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uy=function(e){function t(){var n;Ihe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Uhe(this,t,[].concat(a)),hi(n,"state",{isAnimationFinished:!1}),hi(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),hi(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),hi(n,"id",Di("recharts-scatter-")),n}return Fhe(t,e),Bhe(t,[{key:"renderSymbolsStatically",value:function(r){var a=this,i=this.props,l=i.shape,o=i.activeShape,c=i.activeIndex,u=ae(this.props,!1);return r.map(function(f,d){var h=c===d,m=h?o:l,j=Gn(Gn({},u),f);return T.createElement(ge,ru({className:"recharts-scatter-symbol",key:"symbol-".concat(f==null?void 0:f.cx,"-").concat(f==null?void 0:f.cy,"-").concat(f==null?void 0:f.size,"-").concat(d)},Ti(a.props,f,d),{role:"img"}),T.createElement(zhe,ru({option:m,isActive:h,key:"symbol-".concat(d)},j)))})}},{key:"renderSymbolsWithAnimation",value:function(){var r=this,a=this.props,i=a.points,l=a.isAnimationActive,o=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state.prevPoints;return T.createElement(or,{begin:o,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,j=i.map(function(v,p){var y=d&&d[p];if(y){var g=st(y.cx,v.cx),b=st(y.cy,v.cy),x=st(y.size,v.size);return Gn(Gn({},v),{},{cx:g(m),cy:b(m),size:x(m)})}var N=st(0,v.size);return Gn(Gn({},v),{},{size:N(m)})});return T.createElement(ge,null,r.renderSymbolsStatically(j))})}},{key:"renderSymbols",value:function(){var r=this.props,a=r.points,i=r.isAnimationActive,l=this.state.prevPoints;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var r=this.props.isAnimationActive;if(r&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,l=a.xAxis,o=a.yAxis,c=a.children,u=cn(c,oc);return u?u.map(function(f,d){var h=f.props,m=h.direction,j=h.dataKey;return T.cloneElement(f,{key:"".concat(m,"-").concat(j,"-").concat(i[d]),data:i,xAxis:l,yAxis:o,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(p,y){return{x:p.cx,y:p.cy,value:m==="x"?+p.node.x:+p.node.y,errorVal:et(p,y)}}})}):null}},{key:"renderLine",value:function(){var r=this.props,a=r.points,i=r.line,l=r.lineType,o=r.lineJointType,c=ae(this.props,!1),u=ae(i,!1),f,d;if(l==="joint")f=a.map(function(b){return{x:b.cx,y:b.cy}});else if(l==="fitting"){var h=AH(a),m=h.xmin,j=h.xmax,v=h.a,p=h.b,y=function(x){return v*x+p};f=[{x:m,y:y(m)},{x:j,y:y(j)}]}var g=Gn(Gn(Gn({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:f});return T.isValidElement(i)?d=T.cloneElement(i,g):ce(i)?d=i(g):d=T.createElement(Ni,ru({},g,{type:o})),T.createElement(ge,{className:"recharts-scatter-line",key:"recharts-scatter-line"},d)}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.points,l=r.line,o=r.className,c=r.xAxis,u=r.yAxis,f=r.left,d=r.top,h=r.width,m=r.height,j=r.id,v=r.isAnimationActive;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=pe("recharts-scatter",o),g=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,x=g||b,N=oe(j)?this.id:j;return T.createElement(ge,{className:y,clipPath:x?"url(#clipPath-".concat(N,")"):null},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(N)},T.createElement("rect",{x:g?f:f-h/2,y:b?d:d-m/2,width:g?h:h*2,height:b?m:m*2}))):null,l&&this.renderLine(),this.renderErrorBar(),T.createElement(ge,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||p)&&Nr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}}])}(S.PureComponent);hi(uy,"displayName","Scatter");hi(uy,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});hi(uy,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,a=e.item,i=e.displayedData,l=e.xAxisTicks,o=e.yAxisTicks,c=e.offset,u=a.props.tooltipType,f=cn(a.props.children,Mf),d=oe(t.dataKey)?a.props.dataKey:t.dataKey,h=oe(n.dataKey)?a.props.dataKey:n.dataKey,m=r&&r.dataKey,j=r?r.range:cy.defaultProps.range,v=j&&j[0],p=t.scale.bandwidth?t.scale.bandwidth():0,y=n.scale.bandwidth?n.scale.bandwidth():0,g=i.map(function(b,x){var N=et(b,d),w=et(b,h),O=!oe(m)&&et(b,m)||"-",A=[{name:oe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:N,payload:b,dataKey:d,type:u},{name:oe(n.dataKey)?a.props.name:n.name||n.dataKey,unit:n.unit||"",value:w,payload:b,dataKey:h,type:u}];O!=="-"&&A.push({name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:b,dataKey:m,type:u});var E=yo({axis:t,ticks:l,bandSize:p,entry:b,index:x,dataKey:d}),M=yo({axis:n,ticks:o,bandSize:y,entry:b,index:x,dataKey:h}),$=O!=="-"?r.scale(O):v,k=Math.sqrt(Math.max($,0)/Math.PI);return Gn(Gn({},b),{},{cx:E,cy:M,x:E-k,y:M-k,xAxis:t,yAxis:n,zAxis:r,width:2*k,height:2*k,size:$,node:{x:N,y:w,z:O},tooltipPayload:A,tooltipPosition:{x:E,y:M},payload:b},f&&f[x]&&f[x].props)});return Gn({points:g},c)});function Mo(e){"@babel/helpers - typeof";return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(e)}function Khe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yhe(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,n$(r.key),r)}}function Vhe(e,t,n){return t&&Yhe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Whe(e,t,n){return t=Dp(t),Xhe(e,e$()?Reflect.construct(t,n||[],Dp(e).constructor):t.apply(e,n))}function Xhe(e,t){if(t&&(Mo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qhe(e)}function Qhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e$=function(){return!!e})()}function Dp(e){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dp(e)}function Zhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gb(e,t)}function gb(e,t){return gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},gb(e,t)}function t$(e,t,n){return t=n$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n$(e){var t=Jhe(e,"string");return Mo(t)=="symbol"?t:t+""}function Jhe(e,t){if(Mo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xb(){return xb=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},xb.apply(this,arguments)}function epe(e){var t=e.xAxisId,n=tj(),r=nj(),a=kP(t);return a==null?null:S.createElement(cc,xb({},a,{className:pe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return xa(l,!0)}}))}var Or=function(e){function t(){return Khe(this,t),Whe(this,t,arguments)}return Zhe(t,e),Vhe(t,[{key:"render",value:function(){return S.createElement(epe,this.props)}}])}(S.Component);t$(Or,"displayName","XAxis");t$(Or,"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 Po(e){"@babel/helpers - typeof";return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Po(e)}function tpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function npe(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,i$(r.key),r)}}function rpe(e,t,n){return t&&npe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ape(e,t,n){return t=Lp(t),ipe(e,r$()?Reflect.construct(t,n||[],Lp(e).constructor):t.apply(e,n))}function ipe(e,t){if(t&&(Po(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return spe(e)}function spe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r$=function(){return!!e})()}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lp(e)}function lpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bb(e,t)}function bb(e,t){return bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bb(e,t)}function a$(e,t,n){return t=i$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i$(e){var t=ope(e,"string");return Po(t)=="symbol"?t:t+""}function ope(e,t){if(Po(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Po(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function jb(){return jb=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},jb.apply(this,arguments)}var cpe=function(t){var n=t.yAxisId,r=tj(),a=nj(),i=MP(n);return i==null?null:S.createElement(cc,jb({},i,{className:pe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(o){return xa(o,!0)}}))},Ar=function(e){function t(){return tpe(this,t),ape(this,t,arguments)}return lpe(t,e),rpe(t,[{key:"render",value:function(){return S.createElement(cpe,this.props)}}])}(S.Component);a$(Ar,"displayName","YAxis");a$(Ar,"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 vA(e){return hpe(e)||dpe(e)||fpe(e)||upe()}function upe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fpe(e,t){if(e){if(typeof e=="string")return Sb(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 Sb(e,t)}}function dpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hpe(e){if(Array.isArray(e))return Sb(e)}function Sb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wb=function(t,n,r,a,i){var l=cn(t,fa),o=cn(t,sy),c=[].concat(vA(l),vA(o)),u=cn(t,oy),f="".concat(a,"Id"),d=a[0],h=n;if(c.length&&(h=c.reduce(function(v,p){if(p.props[f]===r&&Yr(p.props,"extendDomain")&&Q(p.props[d])){var y=p.props[d];return[Math.min(v[0],y),Math.max(v[1],y)]}return v},h)),u.length){var m="".concat(d,"1"),j="".concat(d,"2");h=u.reduce(function(v,p){if(p.props[f]===r&&Yr(p.props,"extendDomain")&&Q(p.props[m])&&Q(p.props[j])){var y=p.props[m],g=p.props[j];return[Math.min(v[0],y,g),Math.max(v[1],y,g)]}return v},h)}return i&&i.length&&(h=i.reduce(function(v,p){return Q(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},h)),h},s$={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function i(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new a(f,d||c,h),j=n?n+u:u;return c._events[j]?c._events[j].fn?c._events[j]=[c._events[j],m]:c._events[j].push(m):(c._events[j]=m,c._eventsCount++),c}function l(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},o.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,m=d.length,j=new Array(m);h<m;h++)j[h]=d[h].fn;return j},o.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},o.prototype.emit=function(u,f,d,h,m,j){var v=n?n+u:u;if(!this._events[v])return!1;var p=this._events[v],y=arguments.length,g,b;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),y){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,d),!0;case 4:return p.fn.call(p.context,f,d,h),!0;case 5:return p.fn.call(p.context,f,d,h,m),!0;case 6:return p.fn.call(p.context,f,d,h,m,j),!0}for(b=1,g=new Array(y-1);b<y;b++)g[b-1]=arguments[b];p.fn.apply(p.context,g)}else{var x=p.length,N;for(b=0;b<x;b++)switch(p[b].once&&this.removeListener(u,p[b].fn,void 0,!0),y){case 1:p[b].fn.call(p[b].context);break;case 2:p[b].fn.call(p[b].context,f);break;case 3:p[b].fn.call(p[b].context,f,d);break;case 4:p[b].fn.call(p[b].context,f,d,h);break;default:if(!g)for(N=1,g=new Array(y-1);N<y;N++)g[N-1]=arguments[N];p[b].fn.apply(p[b].context,g)}}return!0},o.prototype.on=function(u,f,d){return i(this,u,f,d,!1)},o.prototype.once=function(u,f,d){return i(this,u,f,d,!0)},o.prototype.removeListener=function(u,f,d,h){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return l(this,m),this;var j=this._events[m];if(j.fn)j.fn===f&&(!h||j.once)&&(!d||j.context===d)&&l(this,m);else{for(var v=0,p=[],y=j.length;v<y;v++)(j[v].fn!==f||h&&!j[v].once||d&&j[v].context!==d)&&p.push(j[v]);p.length?this._events[m]=p.length===1?p[0]:p:l(this,m)}return this},o.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&l(this,f)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(s$);var ppe=s$.exports;const mpe=$e(ppe);var kv=new mpe,Mv="recharts.syncMouseEvents";function ef(e){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function ype(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vpe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l$(r.key),r)}}function gpe(e,t,n){return t&&vpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pv(e,t,n){return t=l$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l$(e){var t=xpe(e,"string");return ef(t)=="symbol"?t:t+""}function xpe(e,t){if(ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bpe=function(){function e(){ype(this,e),Pv(this,"activeIndex",0),Pv(this,"coordinateList",[]),Pv(this,"layout","horizontal")}return gpe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,l=n.container,o=l===void 0?null:l,c=n.layout,u=c===void 0?null:c,f=n.offset,d=f===void 0?null:f,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,l=a.y,o=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=i+c+u,h=l+this.offset.top+o/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function jpe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&Q(r)&&Q(a))return!0}return!1}function Spe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function o$(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,l=Ve(t,n,r,a),o=Ve(t,n,r,i);return{points:[l,o],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function wpe(e,t,n){var r,a,i,l;if(e==="horizontal")r=t.x,i=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=Ve(o,c,u,d),m=Ve(o,c,f,d);r=h.x,a=h.y,i=m.x,l=m.y}else return o$(t);return[{x:r,y:a},{x:i,y:l}]}function tf(e){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){Npe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Npe(e,t,n){return t=Ope(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ope(e){var t=Ape(e,"string");return tf(t)=="symbol"?t:t+""}function Ape(e,t){if(tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cpe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,l=e.activeCoordinate,o=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!l||h!=="ScatterChart"&&a!=="axis")return null;var j,v=Ni;if(h==="ScatterChart")j=l,v=yoe;else if(h==="BarChart")j=Spe(d,l,c,f),v=Q1;else if(d==="radial"){var p=o$(l),y=p.cx,g=p.cy,b=p.radius,x=p.startAngle,N=p.endAngle;j={cx:y,cy:g,startAngle:x,endAngle:N,innerRadius:b,outerRadius:b},v=QM}else j={points:wpe(d,l,c)},v=Ni;var w=bd(bd(bd(bd({stroke:"#ccc",pointerEvents:"none"},c),j),ae(m,!1)),{},{payload:o,payloadIndex:u,className:pe("recharts-tooltip-cursor",m.className)});return S.isValidElement(m)?S.cloneElement(m,w):S.createElement(v,w)}var Epe=["item"],_pe=["children","className","width","height","style","compact","title","desc"];function $o(e){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$o(e)}function Nl(){return Nl=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},Nl.apply(this,arguments)}function xA(e,t){return Mpe(e)||kpe(e,t)||u$(e,t)||Tpe()}function Tpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kpe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Mpe(e){if(Array.isArray(e))return e}function bA(e,t){if(e==null)return{};var n=Ppe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ppe(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 $pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rpe(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,f$(r.key),r)}}function Dpe(e,t,n){return t&&Rpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lpe(e,t,n){return t=zp(t),zpe(e,c$()?Reflect.construct(t,n||[],zp(e).constructor):t.apply(e,n))}function zpe(e,t){if(t&&($o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ipe(e)}function Ipe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c$=function(){return!!e})()}function zp(e){return zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zp(e)}function Bpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nb(e,t)}function Nb(e,t){return Nb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Nb(e,t)}function Ro(e){return Hpe(e)||qpe(e)||u$(e)||Upe()}function Upe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u$(e,t){if(e){if(typeof e=="string")return Ob(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 Ob(e,t)}}function qpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hpe(e){if(Array.isArray(e))return Ob(e)}function Ob(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(r){ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ue(e,t,n){return t=f$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f$(e){var t=Fpe(e,"string");return $o(t)=="symbol"?t:t+""}function Fpe(e,t){if($o(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($o(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gpe={xAxis:["bottom","top"],yAxis:["left","right"]},Kpe={width:"100%",height:"100%"},d$={x:0,y:0};function jd(e){return e}var Ype=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Vpe=function(t,n,r,a){var i=n.find(function(f){return f&&f.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var l=i.coordinate,o=a.radius;return H(H(H({},a),Ve(a.cx,a.cy,o,l)),{},{angle:l,radius:o})}var c=i.coordinate,u=a.angle;return H(H(H({},a),Ve(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return d$},fy=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,l=(r??[]).reduce(function(o,c){var u=c.props.data;return u&&u.length?[].concat(Ro(o),Ro(u)):o},[]);return l.length>0?l:t&&t.length&&Q(a)&&Q(i)?t.slice(a,i+1):[]};function h$(e){return e==="number"?[0,"auto"]:void 0}var Ab=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,o=fy(n,t);return r<0||!i||!i.length||r>=o.length?null:i.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(l.dataKey&&!l.allowDuplicatedCategory){var m=d===void 0?o:d;h=Ph(m,l.dataKey,a)}else h=d&&d[r]||o[r];return h?[].concat(Ro(c),[GM(u,h)]):c},[])},SA=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=Ype(i,r),o=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=Dae(l,o,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=Ab(t,n,f,d),m=Vpe(r,o,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},Wpe=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=IM(f,i);return r.reduce(function(j,v){var p,y=v.type.defaultProps!==void 0?H(H({},v.type.defaultProps),v.props):v.props,g=y.type,b=y.dataKey,x=y.allowDataOverflow,N=y.allowDuplicatedCategory,w=y.scale,O=y.ticks,A=y.includeHidden,E=y[l];if(j[E])return j;var M=fy(t.data,{graphicalItems:a.filter(function(Z){var ne,ie=l in Z.props?Z.props[l]:(ne=Z.type.defaultProps)===null||ne===void 0?void 0:ne[l];return ie===E}),dataStartIndex:c,dataEndIndex:u}),$=M.length,k,I,_;jpe(y.domain,x,g)&&(k=Lx(y.domain,null,x),m&&(g==="number"||w!=="auto")&&(_=Qc(M,b,"category")));var C=h$(g);if(!k||k.length===0){var P,z=(P=y.domain)!==null&&P!==void 0?P:C;if(b){if(k=Qc(M,b,g),g==="category"&&m){var B=OH(k);N&&B?(I=k,k=Sp(0,$)):N||(k=HN(z,k,v).reduce(function(Z,ne){return Z.indexOf(ne)>=0?Z:[].concat(Ro(Z),[ne])},[]))}else if(g==="category")N?k=k.filter(function(Z){return Z!==""&&!oe(Z)}):k=HN(z,k,v).reduce(function(Z,ne){return Z.indexOf(ne)>=0||ne===""||oe(ne)?Z:[].concat(Ro(Z),[ne])},[]);else if(g==="number"){var K=Uae(M,a.filter(function(Z){var ne,ie,je=l in Z.props?Z.props[l]:(ne=Z.type.defaultProps)===null||ne===void 0?void 0:ne[l],ye="hide"in Z.props?Z.props.hide:(ie=Z.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return je===E&&(A||!ye)}),b,i,f);K&&(k=K)}m&&(g==="number"||w!=="auto")&&(_=Qc(M,b,"category"))}else m?k=Sp(0,$):o&&o[E]&&o[E].hasStack&&g==="number"?k=h==="expand"?[0,1]:FM(o[E].stackGroups,c,u):k=zM(M,a.filter(function(Z){var ne=l in Z.props?Z.props[l]:Z.type.defaultProps[l],ie="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return ne===E&&(A||!ie)}),g,f,!0);if(g==="number")k=wb(d,k,E,i,O),z&&(k=Lx(z,k,x));else if(g==="category"&&z){var V=z,X=k.every(function(Z){return V.indexOf(Z)>=0});X&&(k=V)}}return H(H({},j),{},ue({},E,H(H({},y),{},{axisType:i,domain:k,categoricalDomain:_,duplicateDomain:I,originalDomain:(p=y.domain)!==null&&p!==void 0?p:C,isCategorical:m,layout:f})))},{})},Xpe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=fy(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=h.length,j=IM(f,i),v=-1;return r.reduce(function(p,y){var g=y.type.defaultProps!==void 0?H(H({},y.type.defaultProps),y.props):y.props,b=g[l],x=h$("number");if(!p[b]){v++;var N;return j?N=Sp(0,m):o&&o[b]&&o[b].hasStack?(N=FM(o[b].stackGroups,c,u),N=wb(d,N,b,i)):(N=Lx(x,zM(h,r.filter(function(w){var O,A,E=l in w.props?w.props[l]:(O=w.type.defaultProps)===null||O===void 0?void 0:O[l],M="hide"in w.props?w.props.hide:(A=w.type.defaultProps)===null||A===void 0?void 0:A.hide;return E===b&&!M}),"number",f),a.defaultProps.allowDataOverflow),N=wb(d,N,b,i)),H(H({},p),{},ue({},b,H(H({axisType:i},a.defaultProps),{},{hide:!0,orientation:Rn(Gpe,"".concat(i,".").concat(v%2),null),domain:N,originalDomain:x,isCategorical:j,layout:f})))}return p},{})},Qpe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(a,"Id"),h=cn(f,i),m={};return h&&h.length?m=Wpe(t,{axes:h,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u}):l&&l.length&&(m=Xpe(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u})),m},Zpe=function(t){var n=Ja(t),r=xa(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:N1(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:op(n,r)}},wA=function(t){var n=t.children,r=t.defaultShowTooltip,a=On(n,So),i=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Jpe=function(t){return!t||!t.length?!1:t.some(function(n){var r=wa(n&&n.type);return r&&r.indexOf("Bar")>=0})},NA=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},eme=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,o=t.yAxisMap,c=o===void 0?{}:o,u=r.width,f=r.height,d=r.children,h=r.margin||{},m=On(d,So),j=On(d,tr),v=Object.keys(c).reduce(function(N,w){var O=c[w],A=O.orientation;return!O.mirror&&!O.hide?H(H({},N),{},ue({},A,N[A]+O.width)):N},{left:h.left||0,right:h.right||0}),p=Object.keys(l).reduce(function(N,w){var O=l[w],A=O.orientation;return!O.mirror&&!O.hide?H(H({},N),{},ue({},A,Rn(N,"".concat(A))+O.height)):N},{top:h.top||0,bottom:h.bottom||0}),y=H(H({},p),v),g=y.bottom;m&&(y.bottom+=m.props.height||So.defaultProps.height),j&&n&&(y=Iae(y,a,r,n));var b=u-y.left-y.right,x=f-y.top-y.bottom;return H(H({brushBottom:g},y),{},{width:Math.max(b,0),height:Math.max(x,0)})},tme=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},zf=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,o=l===void 0?["axis"]:l,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,g){var b=g.graphicalItems,x=g.stackGroups,N=g.offset,w=g.updateId,O=g.dataStartIndex,A=g.dataEndIndex,E=y.barSize,M=y.layout,$=y.barGap,k=y.barCategoryGap,I=y.maxBarSize,_=NA(M),C=_.numericAxisName,P=_.cateAxisName,z=Jpe(b),B=[];return b.forEach(function(K,V){var X=fy(y.data,{graphicalItems:[K],dataStartIndex:O,dataEndIndex:A}),Z=K.type.defaultProps!==void 0?H(H({},K.type.defaultProps),K.props):K.props,ne=Z.dataKey,ie=Z.maxBarSize,je=Z["".concat(C,"Id")],ye=Z["".concat(P,"Id")],ft={},_e=c.reduce(function(qi,Hi){var dy=g["".concat(Hi.axisType,"Map")],cj=Z["".concat(Hi.axisType,"Id")];dy&&dy[cj]||Hi.axisType==="zAxis"||Rs();var uj=dy[cj];return H(H({},qi),{},ue(ue({},Hi.axisType,uj),"".concat(Hi.axisType,"Ticks"),xa(uj)))},ft),J=_e[P],se=_e["".concat(P,"Ticks")],W=x&&x[je]&&x[je].hasStack&&Xae(K,x[je].stackGroups),G=wa(K.type).indexOf("Bar")>=0,Re=op(J,se),be=[],dt=z&&Lae({barSize:E,stackGroups:x,totalSize:tme(_e,P)});if(G){var vt,jt,qa=oe(ie)?I:ie,Vs=(vt=(jt=op(J,se,!0))!==null&&jt!==void 0?jt:qa)!==null&&vt!==void 0?vt:0;be=zae({barGap:$,barCategoryGap:k,bandSize:Vs!==Re?Vs:Re,sizeList:dt[ye],maxBarSize:qa}),Vs!==Re&&(be=be.map(function(qi){return H(H({},qi),{},{position:H(H({},qi.position),{},{offset:qi.position.offset-Vs/2})})}))}var If=K&&K.type&&K.type.getComposedData;If&&B.push({props:H(H({},If(H(H({},_e),{},{displayedData:X,props:y,dataKey:ne,item:K,bandSize:Re,barPosition:be,offset:N,stackedData:W,layout:M,dataStartIndex:O,dataEndIndex:A}))),{},ue(ue(ue({key:K.key||"item-".concat(V)},C,_e[C]),P,_e[P]),"animationId",w)),childIndex:zH(K,y.children),item:K})}),B},m=function(y,g){var b=y.props,x=y.dataStartIndex,N=y.dataEndIndex,w=y.updateId;if(!Lw({props:b}))return null;var O=b.children,A=b.layout,E=b.stackOffset,M=b.data,$=b.reverseStackOrder,k=NA(A),I=k.numericAxisName,_=k.cateAxisName,C=cn(O,r),P=Vae(M,C,"".concat(I,"Id"),"".concat(_,"Id"),E,$),z=c.reduce(function(Z,ne){var ie="".concat(ne.axisType,"Map");return H(H({},Z),{},ue({},ie,Qpe(b,H(H({},ne),{},{graphicalItems:C,stackGroups:ne.axisType===I&&P,dataStartIndex:x,dataEndIndex:N}))))},{}),B=eme(H(H({},z),{},{props:b,graphicalItems:C}),g==null?void 0:g.legendBBox);Object.keys(z).forEach(function(Z){z[Z]=f(b,z[Z],B,Z.replace("Map",""),n)});var K=z["".concat(_,"Map")],V=Zpe(K),X=h(b,H(H({},z),{},{dataStartIndex:x,dataEndIndex:N,updateId:w,graphicalItems:C,stackGroups:P,offset:B}));return H(H({formattedGraphicalItems:X,graphicalItems:C,offset:B,stackGroups:P},V),z)},j=function(p){function y(g){var b,x,N;return $pe(this,y),N=Lpe(this,y,[g]),ue(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(N,"accessibilityManager",new bpe),ue(N,"handleLegendBBoxUpdate",function(w){if(w){var O=N.state,A=O.dataStartIndex,E=O.dataEndIndex,M=O.updateId;N.setState(H({legendBBox:w},m({props:N.props,dataStartIndex:A,dataEndIndex:E,updateId:M},H(H({},N.state),{},{legendBBox:w}))))}}),ue(N,"handleReceiveSyncEvent",function(w,O,A){if(N.props.syncId===w){if(A===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(O)}}),ue(N,"handleBrushChange",function(w){var O=w.startIndex,A=w.endIndex;if(O!==N.state.dataStartIndex||A!==N.state.dataEndIndex){var E=N.state.updateId;N.setState(function(){return H({dataStartIndex:O,dataEndIndex:A},m({props:N.props,dataStartIndex:O,dataEndIndex:A,updateId:E},N.state))}),N.triggerSyncEvent({dataStartIndex:O,dataEndIndex:A})}}),ue(N,"handleMouseEnter",function(w){var O=N.getMouseInfo(w);if(O){var A=H(H({},O),{},{isTooltipActive:!0});N.setState(A),N.triggerSyncEvent(A);var E=N.props.onMouseEnter;ce(E)&&E(A,w)}}),ue(N,"triggeredAfterMouseMove",function(w){var O=N.getMouseInfo(w),A=O?H(H({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(A),N.triggerSyncEvent(A);var E=N.props.onMouseMove;ce(E)&&E(A,w)}),ue(N,"handleItemMouseEnter",function(w){N.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ue(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),ue(N,"handleMouseMove",function(w){w.persist(),N.throttleTriggeredAfterMouseMove(w)}),ue(N,"handleMouseLeave",function(w){N.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};N.setState(O),N.triggerSyncEvent(O);var A=N.props.onMouseLeave;ce(A)&&A(O,w)}),ue(N,"handleOuterEvent",function(w){var O=LH(w),A=Rn(N.props,"".concat(O));if(O&&ce(A)){var E,M;/.*touch.*/i.test(O)?M=N.getMouseInfo(w.changedTouches[0]):M=N.getMouseInfo(w),A((E=M)!==null&&E!==void 0?E:{},w)}}),ue(N,"handleClick",function(w){var O=N.getMouseInfo(w);if(O){var A=H(H({},O),{},{isTooltipActive:!0});N.setState(A),N.triggerSyncEvent(A);var E=N.props.onClick;ce(E)&&E(A,w)}}),ue(N,"handleMouseDown",function(w){var O=N.props.onMouseDown;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleMouseUp",function(w){var O=N.props.onMouseUp;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ue(N,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.handleMouseDown(w.changedTouches[0])}),ue(N,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.handleMouseUp(w.changedTouches[0])}),ue(N,"handleDoubleClick",function(w){var O=N.props.onDoubleClick;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleContextMenu",function(w){var O=N.props.onContextMenu;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"triggerSyncEvent",function(w){N.props.syncId!==void 0&&kv.emit(Mv,N.props.syncId,w,N.eventEmitterSymbol)}),ue(N,"applySyncEvent",function(w){var O=N.props,A=O.layout,E=O.syncMethod,M=N.state.updateId,$=w.dataStartIndex,k=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)N.setState(H({dataStartIndex:$,dataEndIndex:k},m({props:N.props,dataStartIndex:$,dataEndIndex:k,updateId:M},N.state)));else if(w.activeTooltipIndex!==void 0){var I=w.chartX,_=w.chartY,C=w.activeTooltipIndex,P=N.state,z=P.offset,B=P.tooltipTicks;if(!z)return;if(typeof E=="function")C=E(B,w);else if(E==="value"){C=-1;for(var K=0;K<B.length;K++)if(B[K].value===w.activeLabel){C=K;break}}var V=H(H({},z),{},{x:z.left,y:z.top}),X=Math.min(I,V.x+V.width),Z=Math.min(_,V.y+V.height),ne=B[C]&&B[C].value,ie=Ab(N.state,N.props.data,C),je=B[C]?{x:A==="horizontal"?B[C].coordinate:X,y:A==="horizontal"?Z:B[C].coordinate}:d$;N.setState(H(H({},w),{},{activeLabel:ne,activeCoordinate:je,activePayload:ie,activeTooltipIndex:C}))}else N.setState(w)}),ue(N,"renderCursor",function(w){var O,A=N.state,E=A.isTooltipActive,M=A.activeCoordinate,$=A.activePayload,k=A.offset,I=A.activeTooltipIndex,_=A.tooltipAxisBandSize,C=N.getTooltipEventType(),P=(O=w.props.active)!==null&&O!==void 0?O:E,z=N.props.layout,B=w.key||"_recharts-cursor";return T.createElement(Cpe,{key:B,activeCoordinate:M,activePayload:$,activeTooltipIndex:I,chartName:n,element:w,isActive:P,layout:z,offset:k,tooltipAxisBandSize:_,tooltipEventType:C})}),ue(N,"renderPolarAxis",function(w,O,A){var E=Rn(w,"type.axisType"),M=Rn(N.state,"".concat(E,"Map")),$=w.type.defaultProps,k=$!==void 0?H(H({},$),w.props):w.props,I=M&&M[k["".concat(E,"Id")]];return S.cloneElement(w,H(H({},I),{},{className:pe(E,I.className),key:w.key||"".concat(O,"-").concat(A),ticks:xa(I,!0)}))}),ue(N,"renderPolarGrid",function(w){var O=w.props,A=O.radialLines,E=O.polarAngles,M=O.polarRadius,$=N.state,k=$.radiusAxisMap,I=$.angleAxisMap,_=Ja(k),C=Ja(I),P=C.cx,z=C.cy,B=C.innerRadius,K=C.outerRadius;return S.cloneElement(w,{polarAngles:Array.isArray(E)?E:xa(C,!0).map(function(V){return V.coordinate}),polarRadius:Array.isArray(M)?M:xa(_,!0).map(function(V){return V.coordinate}),cx:P,cy:z,innerRadius:B,outerRadius:K,key:w.key||"polar-grid",radialLines:A})}),ue(N,"renderLegend",function(){var w=N.state.formattedGraphicalItems,O=N.props,A=O.children,E=O.width,M=O.height,$=N.props.margin||{},k=E-($.left||0)-($.right||0),I=DM({children:A,formattedGraphicalItems:w,legendWidth:k,legendContent:u});if(!I)return null;var _=I.item,C=bA(I,Epe);return S.cloneElement(_,H(H({},C),{},{chartWidth:E,chartHeight:M,margin:$,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),ue(N,"renderTooltip",function(){var w,O=N.props,A=O.children,E=O.accessibilityLayer,M=On(A,tn);if(!M)return null;var $=N.state,k=$.isTooltipActive,I=$.activeCoordinate,_=$.activePayload,C=$.activeLabel,P=$.offset,z=(w=M.props.active)!==null&&w!==void 0?w:k;return S.cloneElement(M,{viewBox:H(H({},P),{},{x:P.left,y:P.top}),active:z,label:C,payload:z?_:[],coordinate:I,accessibilityLayer:E})}),ue(N,"renderBrush",function(w){var O=N.props,A=O.margin,E=O.data,M=N.state,$=M.offset,k=M.dataStartIndex,I=M.dataEndIndex,_=M.updateId;return S.cloneElement(w,{key:w.key||"_recharts-brush",onChange:yd(N.handleBrushChange,w.props.onChange),data:E,x:Q(w.props.x)?w.props.x:$.left,y:Q(w.props.y)?w.props.y:$.top+$.height+$.brushBottom-(A.bottom||0),width:Q(w.props.width)?w.props.width:$.width,startIndex:k,endIndex:I,updateId:"brush-".concat(_)})}),ue(N,"renderReferenceElement",function(w,O,A){if(!w)return null;var E=N,M=E.clipPathId,$=N.state,k=$.xAxisMap,I=$.yAxisMap,_=$.offset,C=w.type.defaultProps||{},P=w.props,z=P.xAxisId,B=z===void 0?C.xAxisId:z,K=P.yAxisId,V=K===void 0?C.yAxisId:K;return S.cloneElement(w,{key:w.key||"".concat(O,"-").concat(A),xAxis:k[B],yAxis:I[V],viewBox:{x:_.left,y:_.top,width:_.width,height:_.height},clipPathId:M})}),ue(N,"renderActivePoints",function(w){var O=w.item,A=w.activePoint,E=w.basePoint,M=w.childIndex,$=w.isRange,k=[],I=O.props.key,_=O.item.type.defaultProps!==void 0?H(H({},O.item.type.defaultProps),O.item.props):O.item.props,C=_.activeDot,P=_.dataKey,z=H(H({index:M,dataKey:P,cx:A.x,cy:A.y,r:4,fill:X1(O.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},ae(C,!1)),$h(C));return k.push(y.renderActiveDot(C,z,"".concat(I,"-activePoint-").concat(M))),E?k.push(y.renderActiveDot(C,H(H({},z),{},{cx:E.x,cy:E.y}),"".concat(I,"-basePoint-").concat(M))):$&&k.push(null),k}),ue(N,"renderGraphicChild",function(w,O,A){var E=N.filterFormatItem(w,O,A);if(!E)return null;var M=N.getTooltipEventType(),$=N.state,k=$.isTooltipActive,I=$.tooltipAxis,_=$.activeTooltipIndex,C=$.activeLabel,P=N.props.children,z=On(P,tn),B=E.props,K=B.points,V=B.isRange,X=B.baseLine,Z=E.item.type.defaultProps!==void 0?H(H({},E.item.type.defaultProps),E.item.props):E.item.props,ne=Z.activeDot,ie=Z.hide,je=Z.activeBar,ye=Z.activeShape,ft=!!(!ie&&k&&z&&(ne||je||ye)),_e={};M!=="axis"&&z&&z.props.trigger==="click"?_e={onClick:yd(N.handleItemMouseEnter,w.props.onClick)}:M!=="axis"&&(_e={onMouseLeave:yd(N.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:yd(N.handleItemMouseEnter,w.props.onMouseEnter)});var J=S.cloneElement(w,H(H({},E.props),_e));function se(Hi){return typeof I.dataKey=="function"?I.dataKey(Hi.payload):null}if(ft)if(_>=0){var W,G;if(I.dataKey&&!I.allowDuplicatedCategory){var Re=typeof I.dataKey=="function"?se:"payload.".concat(I.dataKey.toString());W=Ph(K,Re,C),G=V&&X&&Ph(X,Re,C)}else W=K==null?void 0:K[_],G=V&&X&&X[_];if(ye||je){var be=w.props.activeIndex!==void 0?w.props.activeIndex:_;return[S.cloneElement(w,H(H(H({},E.props),_e),{},{activeIndex:be})),null,null]}if(!oe(W))return[J].concat(Ro(N.renderActivePoints({item:E,activePoint:W,basePoint:G,childIndex:_,isRange:V})))}else{var dt,vt=(dt=N.getItemByXY(N.state.activeCoordinate))!==null&&dt!==void 0?dt:{graphicalItem:J},jt=vt.graphicalItem,qa=jt.item,Vs=qa===void 0?w:qa,If=jt.childIndex,qi=H(H(H({},E.props),_e),{},{activeIndex:If});return[S.cloneElement(Vs,qi),null,null]}return V?[J,null,null]:[J,null]}),ue(N,"renderCustomized",function(w,O,A){return S.cloneElement(w,H(H({key:"recharts-customized-".concat(A)},N.props),N.state))}),ue(N,"renderMap",{CartesianGrid:{handler:jd,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:jd},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:jd},YAxis:{handler:jd},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((b=g.id)!==null&&b!==void 0?b:Di("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=D3(N.triggeredAfterMouseMove,(x=g.throttleDelay)!==null&&x!==void 0?x:1e3/60),N.state={},N}return Bpe(y,p),Dpe(y,[{key:"componentDidMount",value:function(){var b,x;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,x=b.children,N=b.data,w=b.height,O=b.layout,A=On(x,tn);if(A){var E=A.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,$=Ab(this.state,N,E,M),k=this.state.tooltipTicks[E].coordinate,I=(this.state.offset.top+w)/2,_=O==="horizontal",C=_?{x:k,y:I}:{y:k,x:I},P=this.state.formattedGraphicalItems.find(function(B){var K=B.item;return K.type.name==="Scatter"});P&&(C=H(H({},C),P.props.points[E].tooltipPosition),$=P.props.points[E].tooltipPayload);var z={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:M,activePayload:$,activeCoordinate:C};this.setState(z),this.renderCursor(A),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,x){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==x.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var N,w;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(b){Zg([On(b.children,tn)],[On(this.props.children,tn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=On(this.props.children,tn);if(b&&typeof b.props.shared=="boolean"){var x=b.props.shared?"axis":"item";return o.indexOf(x)>=0?x:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var x=this.container,N=x.getBoundingClientRect(),w=uee(N),O={chartX:Math.round(b.pageX-w.left),chartY:Math.round(b.pageY-w.top)},A=N.width/x.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,A);if(!E)return null;var M=this.state,$=M.xAxisMap,k=M.yAxisMap,I=this.getTooltipEventType(),_=SA(this.state,this.props.data,this.props.layout,E);if(I!=="axis"&&$&&k){var C=Ja($).scale,P=Ja(k).scale,z=C&&C.invert?C.invert(O.chartX):null,B=P&&P.invert?P.invert(O.chartY):null;return H(H({},O),{},{xValue:z,yValue:B},_)}return _?H(H({},O),_):null}},{key:"inRange",value:function(b,x){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,O=b/N,A=x/N;if(w==="horizontal"||w==="vertical"){var E=this.state.offset,M=O>=E.left&&O<=E.left+E.width&&A>=E.top&&A<=E.top+E.height;return M?{x:O,y:A}:null}var $=this.state,k=$.angleAxisMap,I=$.radiusAxisMap;if(k&&I){var _=Ja(k);return KN({x:O,y:A},_)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,x=this.getTooltipEventType(),N=On(b,tn),w={};N&&x==="axis"&&(N.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=$h(this.props,this.handleOuterEvent);return H(H({},O),w)}},{key:"addListener",value:function(){kv.on(Mv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){kv.removeListener(Mv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,x,N){for(var w=this.state.formattedGraphicalItems,O=0,A=w.length;O<A;O++){var E=w[O];if(E.item===b||E.props.key===b.key||x===wa(E.item.type)&&N===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,x=this.state.offset,N=x.left,w=x.top,O=x.height,A=x.width;return T.createElement("defs",null,T.createElement("clipPath",{id:b},T.createElement("rect",{x:N,y:w,height:O,width:A})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(x,N){var w=xA(N,2),O=w[0],A=w[1];return H(H({},x),{},ue({},O,A.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(x,N){var w=xA(N,2),O=w[0],A=w[1];return H(H({},x),{},ue({},O,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var x;return(x=this.state.xAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getYScaleByAxisId",value:function(b){var x;return(x=this.state.yAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getItemByXY",value:function(b){var x=this.state,N=x.formattedGraphicalItems,w=x.activeItem;if(N&&N.length)for(var O=0,A=N.length;O<A;O++){var E=N[O],M=E.props,$=E.item,k=$.type.defaultProps!==void 0?H(H({},$.type.defaultProps),$.props):$.props,I=wa($.type);if(I==="Bar"){var _=(M.data||[]).find(function(B){return Xle(b,B)});if(_)return{graphicalItem:E,payload:_}}else if(I==="RadialBar"){var C=(M.data||[]).find(function(B){return KN(b,B)});if(C)return{graphicalItem:E,payload:C}}else if(ty(E,w)||ny(E,w)||Wu(E,w)){var P=zce({graphicalItem:E,activeTooltipItem:w,itemData:k.data}),z=k.activeIndex===void 0?P:k.activeIndex;return{graphicalItem:H(H({},E),{},{childIndex:z}),payload:Wu(E,w)?k.data[P]:E.props.data[P]}}}return null}},{key:"render",value:function(){var b=this;if(!Lw(this))return null;var x=this.props,N=x.children,w=x.className,O=x.width,A=x.height,E=x.style,M=x.compact,$=x.title,k=x.desc,I=bA(x,_pe),_=ae(I,!1);if(M)return T.createElement(QO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(ex,Nl({},_,{width:O,height:A,title:$,desc:k}),this.renderClipPath(),Iw(N,this.renderMap)));if(this.props.accessibilityLayer){var C,P;_.tabIndex=(C=this.props.tabIndex)!==null&&C!==void 0?C:0,_.role=(P=this.props.role)!==null&&P!==void 0?P:"application",_.onKeyDown=function(B){b.accessibilityManager.keyboardEvent(B)},_.onFocus=function(){b.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return T.createElement(QO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",Nl({className:pe("recharts-wrapper",w),style:H({position:"relative",cursor:"default",width:O,height:A},E)},z,{ref:function(K){b.container=K}}),T.createElement(ex,Nl({},_,{width:O,height:A,title:$,desc:k,style:Kpe}),this.renderClipPath(),Iw(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);ue(j,"displayName",n),ue(j,"defaultProps",H({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ue(j,"getDerivedStateFromProps",function(p,y){var g=p.dataKey,b=p.data,x=p.children,N=p.width,w=p.height,O=p.layout,A=p.stackOffset,E=p.margin,M=y.dataStartIndex,$=y.dataEndIndex;if(y.updateId===void 0){var k=wA(p);return H(H(H({},k),{},{updateId:0},m(H(H({props:p},k),{},{updateId:0}),y)),{},{prevDataKey:g,prevData:b,prevWidth:N,prevHeight:w,prevLayout:O,prevStackOffset:A,prevMargin:E,prevChildren:x})}if(g!==y.prevDataKey||b!==y.prevData||N!==y.prevWidth||w!==y.prevHeight||O!==y.prevLayout||A!==y.prevStackOffset||!Ml(E,y.prevMargin)){var I=wA(p),_={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},C=H(H({},SA(y,b,O)),{},{updateId:y.updateId+1}),P=H(H(H({},I),_),C);return H(H(H({},P),m(H({props:p},P),y)),{},{prevDataKey:g,prevData:b,prevWidth:N,prevHeight:w,prevLayout:O,prevStackOffset:A,prevMargin:E,prevChildren:x})}if(!Zg(x,y.prevChildren)){var z,B,K,V,X=On(x,So),Z=X&&(z=(B=X.props)===null||B===void 0?void 0:B.startIndex)!==null&&z!==void 0?z:M,ne=X&&(K=(V=X.props)===null||V===void 0?void 0:V.endIndex)!==null&&K!==void 0?K:$,ie=Z!==M||ne!==$,je=!oe(b),ye=je&&!ie?y.updateId:y.updateId+1;return H(H({updateId:ye},m(H(H({props:p},y),{},{updateId:ye,dataStartIndex:Z,dataEndIndex:ne}),y)),{},{prevChildren:x,dataStartIndex:Z,dataEndIndex:ne})}return null}),ue(j,"renderActiveDot",function(p,y,g){var b;return S.isValidElement(p)?b=S.cloneElement(p,y):ce(p)?b=p(y):b=T.createElement(Lf,y),T.createElement(ge,{className:"recharts-active-dot",key:g},b)});var v=S.forwardRef(function(y,g){return T.createElement(j,Nl({},y,{ref:g}))});return v.displayName=j.displayName,v},nme=zf({chartName:"LineChart",GraphicalChild:Mi,axisComponents:[{axisType:"xAxis",AxisComp:Or},{axisType:"yAxis",AxisComp:Ar}],formatAxisMap:ay}),rme=zf({chartName:"BarChart",GraphicalChild:Bi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Or},{axisType:"yAxis",AxisComp:Ar}],formatAxisMap:ay}),ame=zf({chartName:"PieChart",GraphicalChild:Ia,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ey},{axisType:"radiusAxis",AxisComp:Zm}],formatAxisMap:sie,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),ime=zf({chartName:"AreaChart",GraphicalChild:Ba,axisComponents:[{axisType:"xAxis",AxisComp:Or},{axisType:"yAxis",AxisComp:Ar}],formatAxisMap:ay}),OA=zf({chartName:"ComposedChart",GraphicalChild:[Mi,Ba,Bi,uy],axisComponents:[{axisType:"xAxis",AxisComp:Or},{axisType:"yAxis",AxisComp:Ar},{axisType:"zAxis",AxisComp:cy}],formatAxisMap:ay});const Rr=["#00a0c8","#3ddc97","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899"],nl={fontSize:11,fill:"#94a3b8"},Sd={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"};function sme(e){const t=e.labels||[],n=e.series||[];return t.map((r,a)=>{const i={name:r};return n.forEach(l=>{var o;i[l.name]=((o=l.data)==null?void 0:o[a])??0}),i})}function jr({type:e="BAR",data:t,height:n=240}){const r=t||{},a=r.series||[],i=sme(r);if(!i.length)return s.jsx("div",{className:"flex items-center justify-center text-slate-500 text-sm",style:{height:n},children:"데이터 없음"});const l=(e||"BAR").toUpperCase();if(l==="PIE"){const o=a[0],c=(r.labels||[]).map((u,f)=>{var d;return{name:u,value:((d=o==null?void 0:o.data)==null?void 0:d[f])??0}});return s.jsx(xl,{width:"100%",height:n,children:s.jsxs(ame,{children:[s.jsx(Ia,{data:c,dataKey:"value",nameKey:"name",outerRadius:n/2.8,innerRadius:n/5,children:c.map((u,f)=>s.jsx(Mf,{fill:Rr[f%Rr.length]},f))}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}})]})})}return l==="LINE"?s.jsx(xl,{width:"100%",height:n,children:s.jsxs(nme,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Or,{dataKey:"name",tick:nl}),s.jsx(Ar,{tick:nl}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Mi,{type:"monotone",dataKey:o.name,stroke:Rr[c%Rr.length],strokeWidth:2,dot:!1},o.name))]})}):l==="AREA"?s.jsx(xl,{width:"100%",height:n,children:s.jsxs(ime,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Or,{dataKey:"name",tick:nl}),s.jsx(Ar,{tick:nl}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Ba,{type:"monotone",dataKey:o.name,stroke:Rr[c%Rr.length],fill:Rr[c%Rr.length],fillOpacity:.18,strokeWidth:2},o.name))]})}):s.jsx(xl,{width:"100%",height:n,children:s.jsxs(rme,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Or,{dataKey:"name",tick:nl}),s.jsx(Ar,{tick:nl}),s.jsx(tn,{contentStyle:Sd,cursor:{fill:"#26304a55"}}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Bi,{dataKey:o.name,fill:Rr[c%Rr.length],radius:[3,3,0,0]},o.name))]})})}function ut({title:e,subtitle:t,actions:n}){return s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:e}),t&&s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:t})]}),n&&s.jsx("div",{className:"flex items-center gap-2",children:n})]})}function L({label:e,children:t,hint:n}){return s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e}),t,n&&s.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:n})]})}function We({title:e,onClose:t,children:n,wide:r}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:t,children:s.jsxs("div",{className:`bg-panel border border-edge rounded-2xl p-6 ${r?"w-[760px]":"w-[480px]"} max-h-[90vh] overflow-auto`,onClick:a=>a.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-bold",children:e}),s.jsx("button",{onClick:t,className:"text-slate-400 hover:text-slate-200",children:s.jsx(KT,{size:18})})]}),n]})})}function Y({children:e,onClick:t,variant:n="primary",size:r="md",disabled:a,title:i,type:l}){const o="inline-flex items-center gap-1.5 rounded-lg font-semibold transition-colors disabled:opacity-50",c=r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-2 text-sm",u=n==="primary"?"bg-brand text-ink hover:bg-brand/90":n==="danger"?"bg-rose-500/90 text-white hover:bg-rose-500":"bg-card border border-edge text-slate-300 hover:border-brand";return s.jsx("button",{type:l||"button",onClick:t,disabled:a,title:i,className:`${o} ${c} ${u}`,children:e})}function Fe({msg:e="데이터가 없습니다.",colSpan:t}){return t?s.jsx("tr",{children:s.jsx("td",{colSpan:t,className:"py-6 text-center text-slate-500 text-sm",children:e})}):s.jsx("div",{className:"py-8 text-center text-slate-500 text-sm bg-card border border-edge rounded-xl",children:e})}function xe({title:e,icon:t,children:n,className:r=""}){return s.jsxs("div",{className:`bg-card border border-edge rounded-xl p-4 ${r}`,children:[e&&s.jsxs("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-1.5",children:[t,e]}),n]})}function Ir({label:e,value:t,icon:n,color:r="text-brand",unit:a}){return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[n," ",e]}),s.jsxs("div",{className:`text-2xl font-bold mt-2 ${r}`,children:[typeof t=="number"?t.toLocaleString():t,a&&s.jsx("span",{className:"text-sm font-normal text-slate-500 ml-1",children:a})]})]})}function sj(e,t=[]){if(e==null)return t;if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return t}}function lj(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return""}}function AA(e){if(!e)return"-";if(e.includes("@")){const[t,n]=e.split("@");return`${t.slice(0,2)}***@${n}`}return e.length>4?e.slice(0,3)+"****"+e.slice(-2):"***"}const CA={CREATED:"bg-slate-500/15 text-slate-400 border-slate-500/30",RELEASED:"bg-sky-500/15 text-sky-400 border-sky-500/30",INPROGRESS:"bg-amber-500/15 text-amber-400 border-amber-500/30",DONE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CLOSED:"bg-slate-600/15 text-slate-500 border-slate-600/30",CANCELLED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ASSIGNED:"bg-slate-500/15 text-slate-400 border-slate-500/30",STARTED:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-orange-500/15 text-orange-400 border-orange-500/30",ORDERED:"bg-slate-500/15 text-slate-400 border-slate-500/30",PICKING:"bg-sky-500/15 text-sky-400 border-sky-500/30",PACKING:"bg-violet-500/15 text-violet-400 border-violet-500/30",INSPECTED:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",SHIPPED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",WAIT:"bg-slate-500/15 text-slate-400 border-slate-500/30",RUNNING:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RUN:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",IDLE:"bg-amber-500/15 text-amber-400 border-amber-500/30",DOWN:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAINT:"bg-orange-500/15 text-orange-400 border-orange-500/30",REQUESTED:"bg-slate-500/15 text-slate-400 border-slate-500/30",INSPECTING:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACCEPTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",COUNTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",ADJUSTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONSUMED:"bg-slate-600/15 text-slate-500 border-slate-600/30",EXPIRED:"bg-rose-500/15 text-rose-400 border-rose-500/30",PASS:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",FAIL:"bg-rose-500/15 text-rose-400 border-rose-500/30",OPEN:"bg-rose-500/15 text-rose-400 border-rose-500/30",REVIEW:"bg-amber-500/15 text-amber-400 border-amber-500/30",DISPOSITIONED:"bg-sky-500/15 text-sky-400 border-sky-500/30",VERIFY:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",CRITICAL:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAJOR:"bg-orange-500/15 text-orange-400 border-orange-500/30",MINOR:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",INACTIVE:"bg-slate-500/15 text-slate-400 border-slate-500/30",DELAYED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ON_TIME:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"};function lt({status:e}){const t=(e||"").toUpperCase(),n=CA[t]||CA.CREATED;return s.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${n}`,children:e||"-"})}const lme=[{key:"activeWorkorders",alt:["inprogressWorkorders","activeWo"],label:"진행 작업지시",icon:no,color:"text-brand"},{key:"todayOutput",alt:["todayProduction","dailyOutput"],label:"금일 생산량",icon:xs,color:"text-emerald-400"},{key:"oeePercent",alt:["oee","avgOee"],label:"평균 OEE",icon:ro,color:"text-accent",pct:!0},{key:"openNcr",alt:["ncrOpen","defectCount"],label:"미처리 부적합",icon:Er,color:"text-rose-400"},{key:"belowSafety",alt:["lowStock","safetyAlert"],label:"안전재고 미달",icon:Sf,color:"text-amber-400"},{key:"pendingShipping",alt:["openShipping","shippingCount"],label:"출하 대기",icon:um,color:"text-sky-400"},{key:"runningProcesses",alt:["running","activeProcesses"],label:"가동 공정",icon:gl,color:"text-violet-400"},{key:"equipmentDown",alt:["downEquipment","downCount"],label:"설비 비가동",icon:ro,color:"text-orange-400"}];function wd(e,t,n=[]){if(!e)return 0;for(const r of[t,...n])if(e[r]!=null)return Number(e[r])||0;return 0}function Nd(e,t){if(!e)return;if(e.labels&&e.series)return e;const n=Object.entries(e).filter(([,r])=>typeof r=="number");if(n.length)return{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}}function ome(){const[e,t]=S.useState({}),[n,r]=S.useState(null),[a,i]=S.useState(null),[l,o]=S.useState(null),[c,u]=S.useState(null),[f,d]=S.useState({}),h=()=>{xI().then(v=>t(v||{})).catch(()=>{}),yk().then(v=>d(v||{})).catch(()=>{}),bI().then(r).catch(()=>{}),jI().then(i).catch(()=>{}),SI().then(o).catch(()=>{}),gk(14).then(u).catch(()=>{})};S.useEffect(()=>{h();const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[]);const m={...f,...e},j=wd(f,"avg_progress_rate",["avgProgressRate","avgRate"]);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:"제조 실시간 대시보드"}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · OEE · 재고 · 품질 통합 모니터링 (15초 자동 갱신)"})]}),s.jsxs(jf,{to:"/ai-tools",className:"flex items-center gap-1.5 text-sm text-brand hover:underline",children:[s.jsx(zn,{size:16})," AI 도구 ",s.jsx(jT,{size:14})]})]}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:lme.map(({key:v,alt:p,label:y,icon:g,color:b,pct:x})=>{const N=wd(m,v,p);return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[s.jsx(g,{size:13})," ",y]}),s.jsxs("div",{className:`text-2xl font-bold mt-2 ${b}`,children:[N.toLocaleString(),x?"%":""]})]},v)})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),className:"lg:col-span-2",children:s.jsx(jr,{type:"AREA",data:Nd(c,"생산량")})}),s.jsx(xe,{title:"평균 진척률",icon:s.jsx(wf,{size:15}),children:s.jsxs("div",{className:"flex flex-col items-center justify-center h-[240px]",children:[s.jsxs("div",{className:"text-5xl font-bold text-accent",children:[j.toFixed(1),"%"]}),s.jsxs("div",{className:"text-sm text-slate-400 mt-3",children:["진행 ",wd(f,"inprogress_workorders",["inprogressWorkorders"])," · 지연 ",s.jsx("span",{className:"text-rose-400",children:wd(f,"delayed_workorders",["delayedWorkorders"])})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(xe,{title:"작업지시 상태",icon:s.jsx(no,{size:15}),children:s.jsx(jr,{type:"PIE",data:Nd(n,"작업지시"),height:200})}),s.jsx(xe,{title:"출하 상태",icon:s.jsx(um,{size:15}),children:s.jsx(jr,{type:"BAR",data:Nd(a,"출하"),height:200})}),s.jsx(xe,{title:"설비 가동 현황",icon:s.jsx(ro,{size:15}),children:Array.isArray(l)?s.jsxs("div",{className:"space-y-1.5 max-h-[200px] overflow-auto",children:[l.slice(0,8).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 pb-1",children:[s.jsx("span",{className:"text-slate-300",children:v.equipmentName||v.equipmentCode||`설비 ${p+1}`}),s.jsx(lt,{status:v.runStatus||v.status})]},p)),l.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"설비 데이터 없음"})]}):s.jsx(jr,{type:"PIE",data:Nd(l,"설비"),height:200})})]})]})}const cme=["","ASSIGNED","STARTED","PAUSED","DONE","CANCELLED"],ume={workorderId:"",opSeq:1,processCode:"",workerId:"",equipmentCode:"",assignedQty:0,plannedStart:"",plannedEnd:"",remark:""};function fme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState([]),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState(null),[j,v]=S.useState([]),[p,y]=S.useState([]),[g,b]=S.useState([]),x=Zt(),N=ur(),w=()=>{wI({status:l,woNo:c}).then(C=>t(C||[])).catch(()=>t([])),NI().then(r).catch(()=>{}),OI().then(C=>i(Array.isArray(C)?C:[])).catch(()=>{})};S.useEffect(()=>{w()},[l]),S.useEffect(()=>{vk().then(C=>v(C||[])).catch(()=>{}),e1().then(C=>y(C||[])).catch(()=>{}),vm().then(C=>b(C||[])).catch(()=>{})},[]);const O=()=>d({...ume,_new:!0}),A=async()=>{const{_new:C,id:P,...z}=f;C?await AI(z):await CI(P,z),d(null),w()},E=async C=>{window.confirm("삭제하시겠습니까?")&&(await kI(C),w())},M=async(C,P)=>{await _I(C,P),w()},$=async C=>{const P=window.prompt(`'${C.jobNo}' 완료 수량 (현재 ${C.doneQty}/${C.assignedQty})`,String(C.assignedQty-C.doneQty));P!=null&&(await TI(C.id,Number(P)),w())},k=async()=>{await EI(h.id,{workerId:h.workerId||void 0,equipmentCode:h.equipmentCode||void 0}),m(null),w()},I=[{key:"ASSIGNED",label:"배정"},{key:"STARTED",label:"진행"},{key:"PAUSED",label:"일시정지"},{key:"DONE",label:"완료"}],_=C=>(n==null?void 0:n[C])??(n==null?void 0:n[C.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"작업관리 ★",subtitle:"작업/작업자/설비 배정 · 작업 할당 · 진행 상태 전이 · 작업 이력",actions:x&&s.jsxs(Y,{onClick:O,children:[s.jsx(ot,{size:16})," 작업 생성"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:I.map(C=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:C.label}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:_(C.key).toLocaleString()})]},C.key))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-5 mb-5",children:[s.jsxs("div",{className:"lg:col-span-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[s.jsx("select",{className:"inp w-36",value:l,onChange:C=>o(C.target.value),children:cme.map(C=>s.jsx("option",{value:C,children:C||"전체 상태"},C))}),s.jsx("input",{value:c,onChange:C=>u(C.target.value),onKeyDown:C=>C.key==="Enter"&&w(),placeholder:"작업지시번호",className:"inp w-44"}),s.jsx(Y,{variant:"ghost",onClick:w,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업번호"}),s.jsx("th",{className:"text-left",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"공정"}),s.jsx("th",{className:"text-left",children:"작업자"}),s.jsx("th",{className:"text-left",children:"설비"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(C=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(Nf,{size:14,className:"text-brand"}),C.jobNo]}),s.jsxs("td",{className:"text-slate-400 text-xs",children:[C.woNo,s.jsx("div",{className:"text-slate-500",children:C.itemName||C.itemCode})]}),s.jsx("td",{className:"text-slate-300 text-xs",children:C.processName||C.processCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:C.workerId||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:C.equipmentCode||"-"}),s.jsxs("td",{className:"text-right text-slate-300",children:[C.doneQty,"/",C.assignedQty]}),s.jsx("td",{children:s.jsx(lt,{status:C.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[x&&C.status==="ASSIGNED"&&s.jsx("button",{onClick:()=>M(C.id,"START"),title:"시작",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(Hg,{size:15})}),x&&C.status==="STARTED"&&s.jsx("button",{onClick:()=>M(C.id,"PAUSE"),title:"일시정지",className:"text-amber-400 hover:text-amber-300",children:s.jsx(LT,{size:15})}),x&&C.status==="PAUSED"&&s.jsx("button",{onClick:()=>M(C.id,"RESUME"),title:"재개",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(Hg,{size:15})}),x&&(C.status==="STARTED"||C.status==="PAUSED")&&s.jsx("button",{onClick:()=>$(C),title:"실적 보고",className:"text-sky-400 hover:text-sky-300",children:s.jsx(DL,{size:15})}),x&&(C.status==="STARTED"||C.status==="PAUSED")&&s.jsx("button",{onClick:()=>M(C.id,"DONE"),title:"완료",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(wf,{size:15})}),x&&C.status!=="DONE"&&C.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>m({id:C.id,workerId:C.workerId||"",equipmentCode:C.equipmentCode||""}),title:"배정",className:"text-slate-400 hover:text-brand",children:s.jsx(r6,{size:15})}),x&&C.status!=="DONE"&&C.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>M(C.id,"CANCEL"),title:"취소",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})}),N&&(C.status==="ASSIGNED"||C.status==="CANCELLED")&&s.jsx("button",{onClick:()=>E(C.id),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:15})})]})})]},C.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"작업이 없습니다."})]})]})})]}),s.jsx(xe,{title:"작업자별 부하",children:s.jsxs("div",{className:"space-y-2 max-h-[420px] overflow-auto",children:[a.map((C,P)=>s.jsxs("div",{className:"bg-panel border border-edge rounded p-2.5",children:[s.jsx("div",{className:"text-sm font-medium",children:C.workerName||C.displayName||C.workerId}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:["진행 ",C.activeJobs??C.inprogressJobs??0,"건 · 잔여 ",Number(C.remainingQty??C.remaining??0).toLocaleString()]})]},P)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"부하 데이터 없음"})]})})]}),f&&s.jsxs(We,{title:f._new?"작업 생성":"작업 수정",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업지시",children:s.jsxs("select",{className:"inp",value:f.workorderId,onChange:C=>d({...f,workorderId:C.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),g.map(C=>s.jsxs("option",{value:C.id,children:[C.woNo," · ",C.itemName||C.itemCode]},C.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정순서 (opSeq)",children:s.jsx("input",{type:"number",className:"inp",value:f.opSeq,onChange:C=>d({...f,opSeq:Number(C.target.value)})})}),s.jsx(L,{label:"공정코드",children:s.jsx("input",{className:"inp",value:f.processCode,onChange:C=>d({...f,processCode:C.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:f.workerId,onChange:C=>d({...f,workerId:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),j.map(C=>s.jsx("option",{value:C.id,children:C.displayName||C.username},C.id))]})}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:f.equipmentCode,onChange:C=>d({...f,equipmentCode:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),p.map(C=>s.jsx("option",{value:C.equipmentCode,children:C.equipmentName||C.equipmentCode},C.id))]})})]}),s.jsx(L,{label:"배정 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.assignedQty,onChange:C=>d({...f,assignedQty:Number(C.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 시작",children:s.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedStart,onChange:C=>d({...f,plannedStart:C.target.value})})}),s.jsx(L,{label:"계획 종료",children:s.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedEnd,onChange:C=>d({...f,plannedEnd:C.target.value})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:f.remark,onChange:C=>d({...f,remark:C.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(Y,{onClick:A,children:"저장"})]})]}),h&&s.jsxs(We,{title:"작업자/설비 배정",onClose:()=>m(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:h.workerId,onChange:C=>m({...h,workerId:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),j.map(C=>s.jsx("option",{value:C.id,children:C.displayName||C.username},C.id))]})}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:h.equipmentCode,onChange:C=>m({...h,equipmentCode:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),p.map(C=>s.jsx("option",{value:C.equipmentCode,children:C.equipmentName||C.equipmentCode},C.id))]})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>m(null),children:"취소"}),s.jsx(Y,{onClick:k,children:"배정"})]})]})]})}function dme(e){return Math.max(0,Math.min(100,Number(e)||0))}function hme({rate:e,delayed:t}){const n=t?"bg-rose-500":e>=100?"bg-emerald-500":"bg-brand";return s.jsx("div",{className:"w-full bg-ink rounded-full h-2 overflow-hidden",children:s.jsx("div",{className:`h-full ${n} transition-all`,style:{width:`${dme(e)}%`}})})}function pme(){const[e,t]=S.useState({}),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState({workorders:[],jobs:[]}),[f,d]=S.useState(""),h=()=>{yk().then(v=>t(v||{})).catch(()=>{}),MI(f).then(v=>r(Array.isArray(v)?v:[])).catch(()=>r([])),PI().then(v=>i(Array.isArray(v)?v:[])).catch(()=>i([])),$I(30).then(o).catch(()=>{}),RI().then(v=>u(v||{workorders:[],jobs:[]})).catch(()=>{})};S.useEffect(()=>{h()},[f]),S.useEffect(()=>{const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[f]);const m=(v,...p)=>{for(const y of[v,...p])if((e==null?void 0:e[y])!=null)return Number(e[y])||0;return 0},j=(()=>{if(l){if(l.labels&&l.series)return l;if(Array.isArray(l))return{labels:l.map(v=>v.itemName||v.itemCode),series:[{name:"계획",data:l.map(v=>Number(v.planQty??v.plannedQty??0))},{name:"실적",data:l.map(v=>Number(v.actualQty??v.producedQty??0))}]}}})();return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(gl,{className:"text-brand",size:20})," 진행관리 ★"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"진척률 · 계획대비실적 · 실시간 생산현황 · 지연 알림 (15초 자동 갱신)"})]}),s.jsxs("button",{onClick:h,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[s.jsx(K0,{size:15})," 새로고침"]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-3 mb-6",children:[s.jsx(Ir,{label:"진행 작업지시",value:m("active_workorders","activeWorkorders"),icon:s.jsx(no,{size:13})}),s.jsx(Ir,{label:"가공 중",value:m("inprogress_workorders","inprogressWorkorders"),icon:s.jsx(gl,{size:13}),color:"text-amber-400"}),s.jsx(Ir,{label:"지연",value:m("delayed_workorders","delayedWorkorders"),icon:s.jsx(Er,{size:13}),color:"text-rose-400"}),s.jsx(Ir,{label:"가동 공정",value:m("running_processes","runningProcesses"),icon:s.jsx(ro,{size:13}),color:"text-emerald-400"}),s.jsx(Ir,{label:"활성 작업",value:m("active_jobs","activeJobs"),icon:s.jsx(ao,{size:13}),color:"text-sky-400"}),s.jsx(Ir,{label:"평균 진척률",value:m("avg_progress_rate","avgProgressRate").toFixed(1),unit:"%",icon:s.jsx(gl,{size:13}),color:"text-accent"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[s.jsxs(xe,{title:"작업지시별 진척률",icon:s.jsx(no,{size:15}),className:"lg:col-span-2",children:[s.jsx("div",{className:"flex items-center gap-2 mb-3",children:s.jsx("select",{className:"inp w-40",value:f,onChange:v=>d(v.target.value),children:["","RELEASED","INPROGRESS","DONE"].map(v=>s.jsx("option",{value:v,children:v||"전체 상태"},v))})}),s.jsxs("div",{className:"space-y-2.5 max-h-[360px] overflow-auto",children:[n.map((v,p)=>{const y=Number(v.progressRate??v.progress_rate??0),g=!!(v.delayed??v.isDelayed);return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsxs("span",{className:"text-sm font-medium",children:[v.woNo," ",s.jsx("span",{className:"text-slate-400 text-xs ml-1",children:v.itemName||v.itemCode})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[g&&s.jsx(lt,{status:"DELAYED"}),s.jsxs("span",{className:`text-sm font-bold ${g?"text-rose-400":y>=100?"text-emerald-400":"text-brand"}`,children:[y.toFixed(0),"%"]})]})]}),s.jsx(hme,{rate:y,delayed:g}),s.jsxs("div",{className:"text-[11px] text-slate-500 mt-1",children:["실적 ",Number(v.producedQty??v.actualQty??0).toLocaleString()," / 계획 ",Number(v.planQty??v.plannedQty??0).toLocaleString()]})]},v.id??p)}),n.length===0&&s.jsx(Fe,{msg:"진행 중 작업지시가 없습니다."})]})]}),s.jsx(xe,{title:"실시간 가동 공정",icon:s.jsx(gl,{size:15}),children:s.jsxs("div",{className:"space-y-2 max-h-[400px] overflow-auto",children:[a.map((v,p)=>s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium",children:v.processName||v.processCode}),s.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"RUNNING"]})]}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[v.woNo," · ",v.equipmentCode||"설비 미지정"]})]},v.id??p)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-6 text-center",children:"가동 중 공정 없음"})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx(xe,{title:"품목별 계획 대비 실적 (30일)",icon:s.jsx(ao,{size:15}),children:s.jsx(jr,{type:"BAR",data:j})}),s.jsx(xe,{title:"지연 알림",icon:s.jsx(ew,{size:15}),children:s.jsxs("div",{className:"space-y-1.5 max-h-[280px] overflow-auto",children:[(c.workorders||[]).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between bg-rose-500/5 border border-rose-500/20 rounded p-2 text-sm",children:[s.jsxs("span",{children:[s.jsx(Er,{size:13,className:"inline text-rose-400 mr-1.5"}),v.woNo," · ",v.itemName||v.itemCode]}),s.jsx("span",{className:"text-rose-400 text-xs",children:"작업지시 지연"})]},`wo${p}`)),(c.jobs||[]).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[s.jsxs("span",{children:[s.jsx(ew,{size:13,className:"inline text-amber-400 mr-1.5"}),v.jobNo," · ",v.processName||v.processCode]}),s.jsx("span",{className:"text-amber-400 text-xs",children:"작업 지연"})]},`job${p}`)),(c.workorders||[]).length===0&&(c.jobs||[]).length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"지연 항목이 없습니다."})]})})]})]})}const mme=["","CREATED","RELEASED","INPROGRESS","DONE","CLOSED","CANCELLED"],yme=["CREATED","RELEASED","INPROGRESS","DONE","CLOSED"],vme={itemCode:"",planQty:0,dueDate:"",priority:"NORMAL",remark:""},EA={CREATED:[{action:"RELEASE",label:"확정",manager:!0},{action:"CANCEL",label:"취소",manager:!0}],RELEASED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소",manager:!0}],INPROGRESS:[{action:"COMPLETE",label:"완료"}],DONE:[{action:"CLOSE",label:"마감",manager:!0}]};function gme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState("table"),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState([]),j=Zt(),v=ur(),p=()=>{vm({status:l,keyword:c}).then(w=>t(w||[])).catch(()=>t([])),KI().then(r).catch(()=>{})};S.useEffect(()=>{p()},[l]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(w=>m(w||[])).catch(()=>{})},[]);const y=()=>d({...vme,_new:!0}),g=async()=>{const{_new:w,id:O,...A}=f;w?await YI(A):await VI(O,A),d(null),p()},b=async w=>{window.confirm("삭제하시겠습니까?")&&(await XI(w),p())},x=async(w,O)=>{await WI(w,O),p()},N=w=>n?n[w]||n[w.toLowerCase()]||[]:e.filter(O=>O.status===w);return s.jsxs("div",{children:[s.jsx(ut,{title:"작업지시",subtitle:"생산 작업지시 발행 · 상태 전이 · 칸반",actions:s.jsxs(s.Fragment,{children:[s.jsxs(Y,{variant:"ghost",onClick:()=>i(a==="table"?"kanban":"table"),children:[s.jsx(H0,{size:15})," ",a==="table"?"칸반":"테이블"]}),j&&s.jsxs(Y,{onClick:y,children:[s.jsx(ot,{size:16})," 작업지시"]})]})}),a==="table"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:l,onChange:w=>o(w.target.value),children:mme.map(w=>s.jsx("option",{value:w,children:w||"전체 상태"},w))}),s.jsx("input",{value:c,onChange:w=>u(w.target.value),onKeyDown:w=>w.key==="Enter"&&p(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:p,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"계획수량"}),s.jsx("th",{className:"text-left",children:"납기"}),s.jsx("th",{className:"text-left",children:"우선순위"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(w=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(no,{size:14,className:"text-brand"}),w.woNo]}),s.jsx("td",{className:"text-slate-300 text-xs",children:w.itemName||w.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(w.planQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:w.dueDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:w.priority||"NORMAL"}),s.jsx("td",{children:s.jsx(lt,{status:w.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[j&&(EA[w.status]||[]).filter(O=>!O.manager||v).map(O=>s.jsx("button",{onClick:()=>x(w.id,O.action),className:"text-xs text-brand hover:underline",children:O.label},O.action)),j&&w.status==="CREATED"&&s.jsx("button",{onClick:()=>d({...w,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),v&&s.jsx("button",{onClick:()=>b(w.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},w.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"작업지시가 없습니다."})]})]})})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-5 gap-3",children:yme.map(w=>s.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[s.jsx(lt,{status:w}),s.jsx("span",{className:"text-xs text-slate-500",children:N(w).length})]}),s.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[N(w).map(O=>s.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1",children:[s.jsx(CT,{size:12,className:"text-brand"}),O.woNo]}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:O.itemName||O.itemCode}),s.jsxs("div",{className:"text-[11px] text-slate-500 mt-0.5",children:["계획 ",Number(O.planQty||0).toLocaleString()," · 납기 ",O.dueDate||"-"]}),j&&s.jsx("div",{className:"flex gap-1.5 mt-2",children:(EA[O.status]||[]).filter(A=>!A.manager||v).map(A=>s.jsx("button",{onClick:()=>x(O.id,A.action),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30",children:A.label},A.action))})]},O.id)),N(w).length===0&&s.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},w))}),f&&s.jsxs(We,{title:f._new?"작업지시 발행":"작업지시 편집",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목(제품)",children:s.jsxs("select",{className:"inp",value:f.itemCode,onChange:w=>d({...f,itemCode:w.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(w=>s.jsxs("option",{value:w.itemCode,children:[w.itemName," (",w.itemCode,")"]},w.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.planQty,onChange:w=>d({...f,planQty:Number(w.target.value)})})}),s.jsx(L,{label:"납기",children:s.jsx("input",{type:"date",className:"inp",value:f.dueDate||"",onChange:w=>d({...f,dueDate:w.target.value})})})]}),s.jsx(L,{label:"우선순위",children:s.jsx("select",{className:"inp",value:f.priority,onChange:w=>d({...f,priority:w.target.value}),children:["LOW","NORMAL","HIGH","URGENT"].map(w=>s.jsx("option",{children:w},w))})}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:f.remark||"",onChange:w=>d({...f,remark:w.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(Y,{onClick:g,children:"저장"})]})]})]})}const xme={woNo:"",itemCode:"",goodQty:0,defectQty:0,lotNo:"",workerId:"",remark:""};function _A(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.defectCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.count??r.qty??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function bme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),[h,m]=S.useState([]),[j,v]=S.useState([]),p=Zt(),y=()=>{QI({woNo:l,limit:100}).then(x=>t(x||[])).catch(()=>t([])),ZI(14).then(r).catch(()=>{}),JI(30).then(i).catch(()=>{})};S.useEffect(()=>{y()},[]),S.useEffect(()=>{vm({status:"INPROGRESS"}).then(x=>d(x||[])).catch(()=>{}),Jt().then(x=>m(x||[])).catch(()=>{}),vk().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>u({...xme}),b=async()=>{await e8(c),u(null),y()};return s.jsxs("div",{children:[s.jsx(ut,{title:"생산실적",subtitle:"생산실적 보고 · LOT 생성 · 자재 투입 / 산출 입고",actions:p&&s.jsxs(Y,{onClick:g,children:[s.jsx(ot,{size:16})," 실적 보고"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),children:s.jsx(jr,{type:"AREA",data:_A(n,"생산량")})}),s.jsx(xe,{title:"불량 파레토 (30일)",children:s.jsx(jr,{type:"BAR",data:_A(a,"불량수")})})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("input",{value:l,onChange:x=>o(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"작업지시번호",className:"inp w-44"}),s.jsx(Y,{variant:"ghost",onClick:y,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"양품"}),s.jsx("th",{className:"text-right",children:"불량"}),s.jsx("th",{className:"text-left",children:"작업자"}),s.jsx("th",{className:"text-left",children:"일시"})]})}),s.jsxs("tbody",{children:[e.map(x=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:x.woNo}),s.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),s.jsx("td",{className:"text-right text-emerald-400",children:Number(x.goodQty||0).toLocaleString()}),s.jsx("td",{className:"text-right text-rose-400",children:Number(x.defectQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.workerId||"-"}),s.jsx("td",{className:"text-slate-500 text-xs",children:x.createdAt?new Date(x.createdAt).toLocaleString("ko-KR"):"-"})]},x.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"생산실적이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"생산실적 보고",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업지시",children:s.jsxs("select",{className:"inp",value:c.woNo,onChange:x=>{const N=f.find(w=>w.woNo===x.target.value);u({...c,woNo:x.target.value,itemCode:(N==null?void 0:N.itemCode)||c.itemCode})},children:[s.jsx("option",{value:"",children:"선택"}),f.map(x=>s.jsxs("option",{value:x.woNo,children:[x.woNo," · ",x.itemName||x.itemCode]},x.id))]})}),s.jsx(L,{label:"품목코드",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"양품 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.goodQty,onChange:x=>u({...c,goodQty:Number(x.target.value)})})}),s.jsx(L,{label:"불량 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.defectQty,onChange:x=>u({...c,defectQty:Number(x.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT (미입력 시 자동)",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:c.workerId,onChange:x=>u({...c,workerId:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.id,children:x.displayName||x.username},x.id))]})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:x=>u({...c,remark:x.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:b,children:"보고"})]})]})]})}const jme=[{key:"WAIT",label:"대기"},{key:"RUNNING",label:"가동"},{key:"DONE",label:"완료"}];function Sme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),l=Zt(),o=()=>n8().then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])),c=()=>{n?t8(Number(n)).then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])):o()};S.useEffect(()=>{o()},[]),S.useEffect(()=>{vm().then(h=>i(h||[])).catch(()=>{});const d=window.setInterval(()=>{n||o()},15e3);return()=>window.clearInterval(d)},[n]);const u=async(d,h)=>{await r8(d,h),c()},f=d=>e.filter(h=>(h.status||"WAIT").toUpperCase()===d);return s.jsxs("div",{children:[s.jsx(ut,{title:"공정진행 칸반",subtitle:"공정 실시간 진행 상태 (작업지시 미선택 시 전체 가동 공정 · 15초 갱신)",actions:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:d=>r(d.target.value),children:[s.jsx("option",{value:"",children:"전체 가동 공정"}),a.map(d=>s.jsxs("option",{value:d.id,children:[d.woNo," · ",d.itemName||d.itemCode]},d.id))]}),s.jsxs(Y,{variant:"ghost",onClick:c,children:[s.jsx(Yo,{size:15})," 조회"]})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:jme.map(d=>s.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[s.jsx(lt,{status:d.key}),s.jsx("span",{className:"text-xs text-slate-500",children:f(d.key).length})]}),s.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[f(d.key).map(h=>s.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[s.jsx(H0,{size:13,className:"text-brand"}),h.processName||h.processCode]}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[h.woNo||""," · 순서 ",h.opSeq??"-"," · ",h.equipmentCode||"설비 미지정"]}),l&&s.jsxs("div",{className:"flex gap-1.5 mt-2",children:[d.key==="WAIT"&&s.jsxs("button",{onClick:()=>u(h.id,"RUNNING"),className:"text-[11px] px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1",children:[s.jsx(Hg,{size:10})," 가동"]}),d.key==="RUNNING"&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>u(h.id,"WAIT"),className:"text-[11px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-400 border border-amber-500/30 flex items-center gap-1",children:[s.jsx(LT,{size:10})," 대기"]}),s.jsxs("button",{onClick:()=>u(h.id,"DONE"),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30 flex items-center gap-1",children:[s.jsx(wf,{size:10})," 완료"]})]})]})]},h.id)),f(d.key).length===0&&s.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},d.key))}),e.length===0&&s.jsx("div",{className:"mt-4",children:s.jsx(Fe,{msg:"가동 중 공정이 없습니다. 작업지시를 선택해 공정을 조회하세요."})})]})}const wme={equipmentCode:"",plannedTime:480,runTime:0,idealCycleTime:1,totalCount:0,goodCount:0,recordDate:""},Nme=["RUN","IDLE","DOWN","MAINT"];function Ome(e,t){if(e){if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(n=>n.label||n.code||n.downtimeCode||n.name),series:[{name:t,data:e.map(n=>Number(n.value??n.minutes??n.count??0))}]}}}function Ame(e){const t=e.oeePercent??(e.oee!=null?e.oee*100:null);return t!=null?Number(t).toFixed(1):"-"}function Cme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(null),f=Zt(),d=ur(),h=()=>{a8({equipmentCode:l,limit:50}).then(p=>t(p||[])).catch(()=>t([])),e1().then(p=>r(p||[])).catch(()=>{}),s8(30).then(i).catch(()=>{})};S.useEffect(()=>{h()},[]);const m=()=>u({...wme}),j=async()=>{await i8(c),u(null),h()},v=async(p,y)=>{await hB(p,y),h()};return s.jsxs("div",{children:[s.jsx(ut,{title:"설비 / OEE",subtitle:"가동률 × 성능 × 품질 = OEE · 비가동 코드 분석",actions:f&&s.jsxs(Y,{onClick:m,children:[s.jsx(ot,{size:16})," OEE 기록"]})}),s.jsx(xe,{title:"설비 가동 현황",icon:s.jsx(Nf,{size:15}),className:"mb-5",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[n.map(p=>s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-sm font-medium",children:p.equipmentName||p.equipmentCode}),s.jsx(lt,{status:p.runStatus||p.status})]}),d&&s.jsx("select",{className:"inp text-xs",value:p.runStatus||"IDLE",onChange:y=>v(p.id,y.target.value),children:Nme.map(y=>s.jsx("option",{value:y,children:y},y))})]},p.id)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-sm col-span-4 text-center py-4",children:"설비가 없습니다."})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[s.jsx(xe,{title:"비가동 파레토 (30일)",icon:s.jsx(zT,{size:15}),children:s.jsx(jr,{type:"BAR",data:Ome(a,"비가동(분)")})}),s.jsx(xe,{title:"OEE 추이",icon:s.jsx(ro,{size:15}),children:s.jsx(jr,{type:"LINE",data:{labels:e.slice(0,12).reverse().map(p=>p.recordDate||p.equipmentCode),series:[{name:"OEE%",data:e.slice(0,12).reverse().map(p=>Number(p.oeePercent??(p.oee!=null?p.oee*100:0)))}]}})})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-52",value:l,onChange:p=>o(p.target.value),children:[s.jsx("option",{value:"",children:"전체 설비"}),n.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]}),s.jsx(Y,{variant:"ghost",onClick:h,children:"조회"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"설비"}),s.jsx("th",{className:"text-left",children:"일자"}),s.jsx("th",{className:"text-right",children:"가동률"}),s.jsx("th",{className:"text-right",children:"성능"}),s.jsx("th",{className:"text-right",children:"품질"}),s.jsx("th",{className:"text-right px-4",children:"OEE"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:p.equipmentCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.recordDate||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.availability!=null?(p.availability*100).toFixed(0)+"%":"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.performance!=null?(p.performance*100).toFixed(0)+"%":"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.quality!=null?(p.quality*100).toFixed(0)+"%":"-"}),s.jsxs("td",{className:"text-right px-4 font-bold text-accent",children:[Ame(p),"%"]})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"OEE 기록이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"OEE 기록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:c.equipmentCode,onChange:p=>u({...c,equipmentCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),n.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})}),s.jsx(L,{label:"기록 일자",children:s.jsx("input",{type:"date",className:"inp",value:c.recordDate,onChange:p=>u({...c,recordDate:p.target.value})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 가동시간(분)",children:s.jsx("input",{type:"number",className:"inp",value:c.plannedTime,onChange:p=>u({...c,plannedTime:Number(p.target.value)})})}),s.jsx(L,{label:"실제 가동시간(분)",children:s.jsx("input",{type:"number",className:"inp",value:c.runTime,onChange:p=>u({...c,runTime:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"이상 사이클(분)",children:s.jsx("input",{type:"number",step:"0.01",className:"inp",value:c.idealCycleTime,onChange:p=>u({...c,idealCycleTime:Number(p.target.value)})})}),s.jsx(L,{label:"총 생산수",children:s.jsx("input",{type:"number",className:"inp",value:c.totalCount,onChange:p=>u({...c,totalCount:Number(p.target.value)})})}),s.jsx(L,{label:"양품수",children:s.jsx("input",{type:"number",className:"inp",value:c.goodCount,onChange:p=>u({...c,goodCount:Number(p.target.value)})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:j,children:"저장"})]})]})]})}function Eme(){const[e,t]=S.useState(""),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState([]),[c,u]=S.useState(!1),f=async()=>{e.trim()&&(u(!0),l8(e).then(h=>r(d(h))).catch(()=>r([])),o8(e).then(h=>i(d(h))).catch(()=>i([])),c8(e).then(h=>o(d(h))).catch(()=>o([])))},d=h=>Array.isArray(h)?h:(h==null?void 0:h.nodes)||(h==null?void 0:h.items)||(h?[h]:[]);return s.jsxs("div",{children:[s.jsx(ut,{title:"LOT 추적",subtitle:"LOT/시리얼 정·역추적 (Genealogy) — 이력 · 정추적(소비처) · 역추적(투입원)"}),s.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[s.jsx("input",{value:e,onChange:h=>t(h.target.value),onKeyDown:h=>h.key==="Enter"&&f(),placeholder:"LOT 번호 입력 (예: LOT-20260614-001)",className:"inp w-80"}),s.jsxs(Y,{onClick:f,children:[s.jsx(Yo,{size:15})," 추적"]})]}),c?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(xe,{title:"이력 (History)",icon:s.jsx(kT,{size:15}),children:s.jsx($v,{rows:n,kind:"history"})}),s.jsx(xe,{title:"정추적 → 소비 작업지시",icon:s.jsx(jT,{size:15,className:"text-emerald-400"}),children:s.jsx($v,{rows:a,kind:"forward"})}),s.jsx(xe,{title:"역추적 ← 투입 LOT",icon:s.jsx(ML,{size:15,className:"text-sky-400"}),children:s.jsx($v,{rows:l,kind:"backward"})})]}):s.jsx(Fe,{msg:"LOT 번호를 입력하고 추적을 실행하세요."})]})}function $v({rows:e,kind:t}){return e.length?s.jsx("div",{className:"space-y-2 max-h-[460px] overflow-auto",children:e.map((n,r)=>s.jsxs("div",{className:"relative pl-4 border-l-2 border-edge",children:[s.jsx("span",{className:"absolute -left-[5px] top-1.5 w-2 h-2 rounded-full bg-brand"}),s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[s.jsx($T,{size:12,className:"text-brand"}),n.lotNo||n.woNo||n.itemName||n.itemCode||n.event||`노드 ${r+1}`]}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[n.itemName||n.itemCode,n.woNo,n.eventType||n.txnType||n.refType,n.qty!=null?`${n.qty}`:null].filter(Boolean).join(" · ")||(t==="history"?"이력":"관계")}),n.createdAt&&s.jsx("div",{className:"text-[10px] text-slate-500 mt-0.5",children:new Date(n.createdAt).toLocaleString("ko-KR")})]})]},r))}):s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"데이터 없음"})}const _me=["","DRAFT","CONFIRMED","INPROGRESS","DONE","CANCELLED"],Tme={itemCode:"",planQty:0,startDate:"",endDate:"",remark:""},kme={DRAFT:[{action:"CONFIRM",label:"확정"},{action:"CANCEL",label:"취소"}],CONFIRMED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소"}],INPROGRESS:[{action:"COMPLETE",label:"완료"}]};function Mme(e,t,n){const r=e.startDate?new Date(e.startDate).getTime():t,a=e.endDate?new Date(e.endDate).getTime():n,i=Math.max(1,n-t),l=(r-t)/i*100,o=Math.max(2,(a-r)/i*100);return{left:`${Math.max(0,l)}%`,width:`${Math.min(100,o)}%`}}function Pme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),c=Zt(),u=ur(),f=()=>u8({status:n}).then(g=>t(g||[])).catch(()=>t([]));S.useEffect(()=>{f()},[n]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(g=>o(g||[])).catch(()=>{})},[]);const d=()=>i({...Tme,_new:!0}),h=async()=>{const{_new:g,id:b,...x}=a;g?await f8(x):await d8(b,x),i(null),f()},m=async g=>{window.confirm("삭제하시겠습니까?")&&(await p8(g),f())},j=async(g,b)=>{await h8(g,b),f()},v=e.flatMap(g=>[g.startDate,g.endDate]).filter(Boolean).map(g=>new Date(g).getTime()),p=v.length?Math.min(...v):Date.now(),y=v.length?Math.max(...v):Date.now()+864e5;return s.jsxs("div",{children:[s.jsx(ut,{title:"생산계획",subtitle:"생산 일정 계획 · 간트 타임라인",actions:c&&s.jsxs(Y,{onClick:d,children:[s.jsx(ot,{size:16})," 생산계획"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:_me.map(g=>s.jsx("option",{value:g,children:g||"전체 상태"},g))})}),s.jsx(xe,{title:"생산 일정 (간트)",icon:s.jsx(OT,{size:15}),className:"mb-5",children:s.jsxs("div",{className:"space-y-2",children:[e.map(g=>{const b=Mme(g,p,y);return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-40 text-xs text-slate-300 truncate",children:g.itemName||g.itemCode}),s.jsx("div",{className:"flex-1 relative h-5 bg-ink rounded",children:s.jsx("div",{className:"absolute h-5 rounded bg-brand/60 border border-brand text-[10px] text-white flex items-center px-1 overflow-hidden",style:b,children:Number(g.planQty||0).toLocaleString()})}),s.jsx(lt,{status:g.status})]},g.id)}),e.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"생산계획이 없습니다."})]})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),s.jsx("th",{className:"text-right",children:"계획수량"}),s.jsx("th",{className:"text-left",children:"시작"}),s.jsx("th",{className:"text-left",children:"종료"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(g=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:g.itemName||g.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(g.planQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.startDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.endDate||"-"}),s.jsx("td",{children:s.jsx(lt,{status:g.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&(kme[g.status]||[]).map(b=>s.jsx("button",{onClick:()=>j(g.id,b.action),className:"text-xs text-brand hover:underline",children:b.label},b.action)),c&&g.status==="DRAFT"&&s.jsx("button",{onClick:()=>i({...g,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),u&&s.jsx("button",{onClick:()=>m(g.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},g.id)),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"생산계획이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"생산계획 작성":"생산계획 편집",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목(제품)",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(g=>s.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})}),s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:a.planQty,onChange:g=>i({...a,planQty:Number(g.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"시작일",children:s.jsx("input",{type:"date",className:"inp",value:a.startDate||"",onChange:g=>i({...a,startDate:g.target.value})})}),s.jsx(L,{label:"종료일",children:s.jsx("input",{type:"date",className:"inp",value:a.endDate||"",onChange:g=>i({...a,endDate:g.target.value})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark||"",onChange:g=>i({...a,remark:g.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:h,children:"저장"})]})]})]})}const $me=["","REQUESTED","INSPECTING","ACCEPTED","REJECTED"],Rme={partnerCode:"",itemCode:"",qty:0,lotNo:"",warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function Dme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),[f,d]=S.useState([]),h=Zt(),m=()=>m8({status:n}).then(g=>t(g||[])).catch(()=>t([]));S.useEffect(()=>{m()},[n]),S.useEffect(()=>{Jt().then(g=>o(g||[])).catch(()=>{}),t1({partnerType:"SUPPLIER"}).then(g=>u(g||[])).catch(()=>{}),_f().then(g=>d(g||[])).catch(()=>{})},[]);const j=()=>i({...Rme,_new:!0}),v=async()=>{const{_new:g,...b}=a;await y8(b),i(null),m()},p=async g=>{await v8(g.id,g.inspectionRequired?"PASS":void 0),m()},y=async g=>{const b=window.prompt("반려 사유");b!=null&&(await g8(g.id,b),m())};return s.jsxs("div",{children:[s.jsx(ut,{title:"입고",subtitle:"입고 요청 · 검수 · 입고 LOT · 재고 증가",actions:h&&s.jsxs(Y,{onClick:j,children:[s.jsx(ot,{size:16})," 입고 요청"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:$me.map(g=>s.jsx("option",{value:g,children:g||"전체 상태"},g))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"입고번호"}),s.jsx("th",{className:"text-left",children:"공급사"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-left",children:"창고"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(g=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(RT,{size:14,className:"text-brand"}),g.receivingNo||g.id]}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.partnerCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:g.itemName||g.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(g.qty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:g.lotNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.warehouseCode||"-"}),s.jsx("td",{children:s.jsx(lt,{status:g.status})}),s.jsx("td",{className:"px-4",children:s.jsx("div",{className:"flex items-center justify-end gap-2",children:h&&(g.status==="REQUESTED"||g.status==="INSPECTING")&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>p(g),title:"입고 승인",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(AT,{size:16})}),s.jsx("button",{onClick:()=>y(g),title:"반려",className:"text-rose-400 hover:text-rose-300",children:s.jsx(KT,{size:16})})]})})})]},g.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"입고 건이 없습니다."})]})]})}),a&&s.jsxs(We,{title:"입고 요청",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공급사",children:s.jsxs("select",{className:"inp",value:a.partnerCode,onChange:g=>i({...a,partnerCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(g=>s.jsx("option",{value:g.partnerCode,children:g.partnerName||g.partnerCode},g.id))]})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(g=>s.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:a.qty,onChange:g=>i({...a,qty:Number(g.target.value)})})}),s.jsx(L,{label:"LOT (미입력 시 자동)",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:g=>i({...a,lotNo:g.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:g=>i({...a,warehouseCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(g=>s.jsx("option",{value:g.warehouseCode,children:g.warehouseName||g.warehouseCode},g.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:a.locationCode,onChange:g=>i({...a,locationCode:g.target.value})})})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:a.inspectionRequired,onChange:g=>i({...a,inspectionRequired:g.target.checked})})," 수입검사(IQC) 필요"]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark,onChange:g=>i({...a,remark:g.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:v,children:"저장"})]})]})]})}const Lme=["","ORDERED","PICKING","PACKING","INSPECTED","SHIPPED","CANCELLED"],zme={partnerCode:"",orderRef:"",itemCode:"",lotNo:"",planQty:0,warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function Ime(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState(null),[h,m]=S.useState([]),[j,v]=S.useState([]),[p,y]=S.useState([]),g=Zt(),b=()=>{DI({status:a,keyword:l}).then(_=>t(_||[])).catch(()=>t([])),LI().then(r).catch(()=>{})};S.useEffect(()=>{b()},[a]),S.useEffect(()=>{t1({partnerType:"CUSTOMER"}).then(_=>m(_||[])).catch(()=>{}),Jt().then(_=>v(_||[])).catch(()=>{}),_f().then(_=>y(_||[])).catch(()=>{})},[]);const x=()=>u({...zme,_new:!0}),N=async _=>{d(await zI(_))},w=async()=>{const{_new:_,id:C,...P}=c;_?await II(P):await BI(C,P),u(null),b()},O=async _=>{const C=window.prompt(`피킹 수량 (계획 ${_.planQty})`,String(_.planQty-(_.pickedQty||0)));C!=null&&(await UI(_.id,Number(C)),b(),(f==null?void 0:f.id)===_.id&&N(_.id))},A=async _=>{const C=window.prompt(`패킹 수량 (피킹 ${_.pickedQty})`,String((_.pickedQty||0)-(_.packedQty||0)));C!=null&&(await qI(_.id,Number(C)),b(),(f==null?void 0:f.id)===_.id&&N(_.id))},E=async(_,C)=>{await HI(_.id,C),b(),(f==null?void 0:f.id)===_.id&&N(_.id)},M=async _=>{var C,P;if(window.confirm("출하 확정 시 재고가 차감되고 납품서·거래명세서가 발번됩니다. 진행할까요?"))try{await FI(_.id),b(),d(null)}catch(z){window.alert(((P=(C=z==null?void 0:z.response)==null?void 0:C.data)==null?void 0:P.message)===void 0?"출하 확정 실패":"출하 확정 실패 — 검사 합격 필요 여부를 확인하세요.")}},$=async _=>{window.confirm("취소하시겠습니까?")&&(await GI(_.id),b(),d(null))},k=[{key:"ORDERED",label:"출하지시"},{key:"PICKING",label:"피킹"},{key:"PACKING",label:"패킹"},{key:"INSPECTED",label:"검사완료"},{key:"SHIPPED",label:"출하완료"}],I=_=>(n==null?void 0:n[_])??(n==null?void 0:n[_.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"출하관리 ★",subtitle:"출하지시 · 피킹/패킹 · 출하검사(OQC) · 출하확정(재고감소·납품서·거래명세서)",actions:g&&s.jsxs(Y,{onClick:x,children:[s.jsx(ot,{size:16})," 출하지시"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:k.map(_=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:_.label}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:I(_.key).toLocaleString()})]},_.key))}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:_=>i(_.target.value),children:Lme.map(_=>s.jsx("option",{value:_,children:_||"전체 상태"},_))}),s.jsx("input",{value:l,onChange:_=>o(_.target.value),onKeyDown:_=>_.key==="Enter"&&b(),placeholder:"품목/거래처 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:b,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"출하번호"}),s.jsx("th",{className:"text-left",children:"거래처"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"계획/피킹/패킹"}),s.jsx("th",{className:"text-left",children:"검사"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(_=>s.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>N(_.id),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(um,{size:14,className:"text-brand"}),_.shippingNo]}),s.jsx("td",{className:"text-slate-400 text-xs",children:_.partnerCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:_.itemName||_.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:_.lotNo||"-"}),s.jsxs("td",{className:"text-right text-slate-300 text-xs",children:[_.planQty,"/",_.pickedQty||0,"/",_.packedQty||0]}),s.jsx("td",{children:_.inspectionRequired?s.jsx(lt,{status:_.inspectionResult||"WAIT"}):s.jsx("span",{className:"text-slate-500 text-xs",children:"불필요"})}),s.jsx("td",{children:s.jsx(lt,{status:_.status})}),s.jsx("td",{className:"px-4",onClick:C=>C.stopPropagation(),children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[g&&_.status==="ORDERED"&&s.jsx("button",{onClick:()=>O(_),title:"피킹",className:"text-sky-400 hover:text-sky-300",children:s.jsx(aw,{size:15})}),g&&_.status==="PICKING"&&s.jsx("button",{onClick:()=>A(_),title:"패킹",className:"text-violet-400 hover:text-violet-300",children:s.jsx(rw,{size:15})}),g&&_.status==="PACKING"&&_.inspectionRequired&&s.jsx("button",{onClick:()=>E(_,"PASS"),title:"출하검사",className:"text-cyan-400 hover:text-cyan-300",children:s.jsx(bs,{size:15})}),g&&(_.status==="PACKING"||_.status==="INSPECTED")&&s.jsx("button",{onClick:()=>M(_),title:"출하확정",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(iw,{size:15})}),g&&_.status!=="SHIPPED"&&_.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>$(_),title:"취소",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})})]})})]},_.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"출하 건이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"출하지시 생성",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"거래처(고객)",children:s.jsxs("select",{className:"inp",value:c.partnerCode,onChange:_=>u({...c,partnerCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(_=>s.jsx("option",{value:_.partnerCode,children:_.partnerName||_.partnerCode},_.id))]})}),s.jsx(L,{label:"주문참조",children:s.jsx("input",{className:"inp",value:c.orderRef,onChange:_=>u({...c,orderRef:_.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:_=>u({...c,itemCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(_=>s.jsxs("option",{value:_.itemCode,children:[_.itemName," (",_.itemCode,")"]},_.id))]})}),s.jsx(L,{label:"LOT 번호",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:_=>u({...c,lotNo:_.target.value})})})]}),s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.planQty,onChange:_=>u({...c,planQty:Number(_.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:c.warehouseCode,onChange:_=>u({...c,warehouseCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),p.map(_=>s.jsx("option",{value:_.warehouseCode,children:_.warehouseName||_.warehouseCode},_.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:c.locationCode,onChange:_=>u({...c,locationCode:_.target.value})})})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:c.inspectionRequired,onChange:_=>u({...c,inspectionRequired:_.target.checked})}),"출하검사(OQC) 필수"]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:_=>u({...c,remark:_.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:w,children:"저장"})]})]}),f&&s.jsxs(We,{title:`출하 상세 — ${f.shippingNo}`,onClose:()=>d(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[s.jsx(Fn,{label:"거래처",value:f.partnerCode}),s.jsx(Fn,{label:"상태",value:s.jsx(lt,{status:f.status})}),s.jsx(Fn,{label:"품목",value:`${f.itemName||""} (${f.itemCode})`}),s.jsx(Fn,{label:"LOT",value:f.lotNo||"-"}),s.jsx(Fn,{label:"계획 수량",value:f.planQty}),s.jsx(Fn,{label:"피킹/패킹/출하",value:`${f.pickedQty||0} / ${f.packedQty||0} / ${f.shippedQty||0}`}),s.jsx(Fn,{label:"검사 필수",value:f.inspectionRequired?`예 (${f.inspectionResult||"대기"})`:"아니오"}),s.jsx(Fn,{label:"창고/로케이션",value:`${f.warehouseCode||"-"} / ${f.locationCode||"-"}`}),s.jsx(Fn,{label:"납품서",value:f.deliveryNo||"-",icon:s.jsx(tw,{size:13})}),s.jsx(Fn,{label:"거래명세서",value:f.statementNo||"-",icon:s.jsx(tw,{size:13})}),s.jsx(Fn,{label:"출하일",value:f.shipDate||"-"}),s.jsx(Fn,{label:"비고",value:f.remark||"-"})]}),g&&f.status!=="SHIPPED"&&f.status!=="CANCELLED"&&s.jsxs("div",{className:"flex flex-wrap gap-2 mt-5 justify-end",children:[f.status==="ORDERED"&&s.jsxs(Y,{variant:"ghost",onClick:()=>O(f),children:[s.jsx(aw,{size:14})," 피킹"]}),f.status==="PICKING"&&s.jsxs(Y,{variant:"ghost",onClick:()=>A(f),children:[s.jsx(rw,{size:14})," 패킹"]}),f.status==="PACKING"&&f.inspectionRequired&&s.jsxs(s.Fragment,{children:[s.jsxs(Y,{variant:"ghost",onClick:()=>E(f,"PASS"),children:[s.jsx(bs,{size:14})," 검사 합격"]}),s.jsxs(Y,{variant:"danger",onClick:()=>E(f,"FAIL"),children:[s.jsx(bs,{size:14})," 검사 불합격"]})]}),(f.status==="PACKING"||f.status==="INSPECTED")&&s.jsxs(Y,{onClick:()=>M(f),children:[s.jsx(iw,{size:14})," 출하확정"]}),s.jsxs(Y,{variant:"danger",onClick:()=>$(f),children:[s.jsx(kh,{size:14})," 취소"]})]})]})]})}function Fn({label:e,value:t,icon:n}){return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-[11px] text-slate-500 mb-0.5 flex items-center gap-1",children:[n,e]}),s.jsx("div",{className:"text-slate-200",children:t})]})}function Bme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState([]),[j,v]=S.useState([]),p=Zt(),y=()=>{x8({keyword:l,warehouseCode:c}).then(x=>t(x||[])).catch(()=>t([])),b8().then(x=>r(Array.isArray(x)?x:[])).catch(()=>r([])),j8({limit:30}).then(x=>i(Array.isArray(x)?x:[])).catch(()=>i([]))};S.useEffect(()=>{y()},[c]),S.useEffect(()=>{Jt().then(x=>m(x||[])).catch(()=>{}),_f().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>d({itemCode:"",fromWarehouse:"",toWarehouse:"",fromLocation:"",toLocation:"",qty:0}),b=async()=>{await S8(f),d(null),y()};return s.jsxs("div",{children:[s.jsx(ut,{title:"재고",subtitle:"로케이션별 재고 · 안전재고 · 재고 이동(transfer) · 수불 원장",actions:p&&s.jsxs(Y,{onClick:g,children:[s.jsx(kL,{size:15})," 재고 이동"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-5",children:[s.jsx(xe,{title:"안전재고 미달",icon:s.jsx(Er,{size:15,className:"text-amber-400"}),children:s.jsxs("div",{className:"space-y-1.5 max-h-44 overflow-auto",children:[n.map((x,N)=>s.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[s.jsx("span",{children:x.itemName||x.itemCode}),s.jsxs("span",{className:"text-amber-400 text-xs",children:[Number(x.qty??x.availableQty??0)," / 안전 ",Number(x.safetyStock??0)]})]},N)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"미달 항목 없음"})]})}),s.jsx(xe,{title:"최근 수불 이력",icon:s.jsx(kT,{size:15}),className:"lg:col-span-2",children:s.jsxs("div",{className:"space-y-1 max-h-44 overflow-auto",children:[a.map((x,N)=>s.jsxs("div",{className:"flex items-center justify-between text-xs border-b border-edge/40 py-1",children:[s.jsx("span",{className:"text-slate-300",children:x.itemName||x.itemCode}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(lt,{status:x.txnType||x.refType}),s.jsxs("span",{className:Number(x.qty)<0?"text-rose-400":"text-emerald-400",children:[Number(x.qty||0)>0?"+":"",Number(x.qty||0).toLocaleString()]}),s.jsx("span",{className:"text-slate-500",children:x.createdAt?new Date(x.createdAt).toLocaleDateString("ko-KR"):""})]})]},N)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"수불 이력 없음"})]})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-44",value:c,onChange:x=>u(x.target.value),children:[s.jsx("option",{value:"",children:"전체 창고"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]}),s.jsx("input",{value:l,onChange:x=>o(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:y,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),s.jsx("th",{className:"text-left",children:"창고"}),s.jsx("th",{className:"text-left",children:"로케이션"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"재고수량"}),s.jsx("th",{className:"text-right px-4",children:"안전재고"})]})}),s.jsxs("tbody",{children:[e.map((x,N)=>{const w=Number(x.qty??x.availableQty??0),O=Number(x.safetyStock??0);return s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(Sf,{size:14,className:"text-brand"}),x.itemName||x.itemCode]}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.warehouseCode||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.locationCode||"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),s.jsx("td",{className:`text-right font-medium ${O>0&&w<O?"text-amber-400":"text-slate-200"}`,children:w.toLocaleString()}),s.jsx("td",{className:"text-right px-4 text-slate-500",children:O.toLocaleString()})]},x.id??N)}),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"재고가 없습니다."})]})]})}),f&&s.jsxs(We,{title:"재고 이동",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:f.itemCode,onChange:x=>d({...f,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"출발 창고",children:s.jsxs("select",{className:"inp",value:f.fromWarehouse,onChange:x=>d({...f,fromWarehouse:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})}),s.jsx(L,{label:"도착 창고",children:s.jsxs("select",{className:"inp",value:f.toWarehouse,onChange:x=>d({...f,toWarehouse:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"출발 로케이션",children:s.jsx("input",{className:"inp",value:f.fromLocation,onChange:x=>d({...f,fromLocation:x.target.value})})}),s.jsx(L,{label:"도착 로케이션",children:s.jsx("input",{className:"inp",value:f.toLocation,onChange:x=>d({...f,toLocation:x.target.value})})})]}),s.jsx(L,{label:"이동 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.qty,onChange:x=>d({...f,qty:Number(x.target.value)})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(Y,{onClick:b,children:"이동"})]})]})]})}const Ume=["","COUNTED","ADJUSTED"],qme={itemCode:"",warehouseCode:"",locationCode:"",lotNo:"",countedQty:0,remark:""};function Hme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),f=Zt(),d=ur(),h=()=>w8({status:n}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{h()},[n]),S.useEffect(()=>{Jt().then(p=>o(p||[])).catch(()=>{}),_f().then(p=>u(p||[])).catch(()=>{})},[]);const m=()=>i({...qme}),j=async()=>{await N8(a),i(null),h()},v=async p=>{window.confirm("재고를 실사 수량으로 보정하시겠습니까?")&&(await O8(p),h())};return s.jsxs("div",{children:[s.jsx(ut,{title:"재고실사",subtitle:"실사 카운트 · 시스템 재고 대비 차이 계산 · 재고 보정(ADJUST)",actions:f&&s.jsxs(Y,{onClick:m,children:[s.jsx(ot,{size:16})," 실사 카운트"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:Ume.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"실사번호"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"창고/로케이션"}),s.jsx("th",{className:"text-right",children:"시스템"}),s.jsx("th",{className:"text-right",children:"실사"}),s.jsx("th",{className:"text-right",children:"차이"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>{const y=Number(p.diffQty??(p.countedQty||0)-(p.systemQty||0));return s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(ET,{size:14,className:"text-brand"}),p.stocktakeNo||p.id]}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.itemName||p.itemCode}),s.jsxs("td",{className:"text-slate-400 text-xs",children:[p.warehouseCode||"-"," / ",p.locationCode||"-"]}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.systemQty||0).toLocaleString()}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.countedQty||0).toLocaleString()}),s.jsxs("td",{className:`text-right font-medium ${y===0?"text-slate-400":y>0?"text-emerald-400":"text-rose-400"}`,children:[y>0?"+":"",y.toLocaleString()]}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4 text-right",children:d&&p.status==="COUNTED"&&s.jsxs("button",{onClick:()=>v(p.id),className:"inline-flex items-center gap-1 text-xs text-brand hover:underline",children:[s.jsx(Nf,{size:12})," 보정"]})})]},p.id)}),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"실사 기록이 없습니다."})]})]})}),a&&s.jsxs(We,{title:"실사 카운트",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:p=>i({...a,warehouseCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(p=>s.jsx("option",{value:p.warehouseCode,children:p.warehouseName||p.warehouseCode},p.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:a.locationCode,onChange:p=>i({...a,locationCode:p.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:p=>i({...a,lotNo:p.target.value})})}),s.jsx(L,{label:"실사 수량",children:s.jsx("input",{type:"number",className:"inp",value:a.countedQty,onChange:p=>i({...a,countedQty:Number(p.target.value)})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark,onChange:p=>i({...a,remark:p.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:j,children:"카운트"})]})]})]})}const Fme=["","ACTIVE","CONSUMED","SHIPPED","EXPIRED"],Gme=["ACTIVE","CONSUMED","SHIPPED","EXPIRED"],Kme={itemCode:"",lotNo:"",serialNo:"",qty:0,mfgDate:"",expiryDate:"",status:"ACTIVE"};function Yme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),h=Zt(),m=()=>{A8({status:a,keyword:l}).then(y=>t(y||[])).catch(()=>t([])),C8(30).then(y=>r(Array.isArray(y)?y:[])).catch(()=>r([]))};S.useEffect(()=>{m()},[a]),S.useEffect(()=>{Jt().then(y=>d(y||[])).catch(()=>{})},[]);const j=()=>u({...Kme}),v=async()=>{await E8(c),u(null),m()},p=async(y,g)=>{await _8(y,g),m()};return s.jsxs("div",{children:[s.jsx(ut,{title:"LOT / 시리얼",subtitle:"LOT·시리얼 추적 · 유효기간 관리",actions:h&&s.jsxs(Y,{onClick:j,children:[s.jsx(ot,{size:16})," LOT 등록"]})}),s.jsx(xe,{title:"유효기간 임박 (30일)",icon:s.jsx(TL,{size:15,className:"text-amber-400"}),className:"mb-5",children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.map((y,g)=>s.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-lg px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-xs text-amber-300",children:y.lotNo}),s.jsxs("span",{className:"text-slate-400 text-xs ml-2",children:[y.itemName||y.itemCode," · ~",y.expiryDate]})]},g)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-2",children:"임박 LOT 없음"})]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:y=>i(y.target.value),children:Fme.map(y=>s.jsx("option",{value:y,children:y||"전체 상태"},y))}),s.jsx("input",{value:l,onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&m(),placeholder:"LOT/품목 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:m,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"LOT"}),s.jsx("th",{className:"text-left",children:"시리얼"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"제조"}),s.jsx("th",{className:"text-left",children:"유효"}),s.jsx("th",{className:"text-left px-4",children:"상태"})]})}),s.jsxs("tbody",{children:[e.map(y=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(wT,{size:14,className:"text-brand"}),y.lotNo]}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:y.serialNo||"-"}),s.jsx("td",{className:"text-slate-300 text-xs",children:y.itemName||y.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(y.qty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.mfgDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.expiryDate||"-"}),s.jsx("td",{className:"px-4",children:h?s.jsx("select",{value:y.status,onChange:g=>p(y.id,g.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:Gme.map(g=>s.jsx("option",{value:g,children:g},g))}):s.jsx(lt,{status:y.status})})]},y.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"LOT/시리얼이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"LOT / 시리얼 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:y=>u({...c,itemCode:y.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(y=>s.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT 번호",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:y=>u({...c,lotNo:y.target.value})})}),s.jsx(L,{label:"시리얼",children:s.jsx("input",{className:"inp",value:c.serialNo,onChange:y=>u({...c,serialNo:y.target.value})})})]}),s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:y=>u({...c,qty:Number(y.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"제조일",children:s.jsx("input",{type:"date",className:"inp",value:c.mfgDate,onChange:y=>u({...c,mfgDate:y.target.value})})}),s.jsx(L,{label:"유효기간",children:s.jsx("input",{type:"date",className:"inp",value:c.expiryDate,onChange:y=>u({...c,expiryDate:y.target.value})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:v,children:"저장"})]})]})]})}const Vme=["","IQC","IPQC","OQC"],Wme=["","PASS","FAIL","WAIT"],Xme={inspectionType:"IQC",itemCode:"",lotNo:"",qty:0,remark:""};function Qme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState(null),[h,m]=S.useState([]),j=Zt(),v=()=>{T8({inspectionType:a,result:l}).then(w=>t(w||[])).catch(()=>t([])),k8(30).then(r).catch(()=>{})};S.useEffect(()=>{v()},[a,l]),S.useEffect(()=>{Jt().then(w=>m(w||[])).catch(()=>{})},[]);const p=()=>u({...Xme}),y=async()=>{await M8(c),u(null),v()},g=w=>d({id:w.id,measured:0,lsl:"",usl:"",target:"",defectQty:0,defectCode:""}),b=async()=>{const{id:w,...O}=f;await P8(w,{measured:Number(O.measured),lsl:O.lsl===""?void 0:Number(O.lsl),usl:O.usl===""?void 0:Number(O.usl),target:O.target===""?void 0:Number(O.target),defectQty:Number(O.defectQty),defectCode:O.defectCode||void 0}),d(null),v()},x=async(w,O)=>{let A=0,E="";O==="FAIL"&&(A=Number(window.prompt("불량 수량","1")||0),E=window.prompt("불량 코드","")||""),await $8(w.id,{result:O,defectQty:A,defectCode:E}),v()},N=(n==null?void 0:n.passRate)??(n==null?void 0:n.rate);return s.jsxs("div",{children:[s.jsx(ut,{title:"검사 (IQC / IPQC / OQC)",subtitle:"수입·공정·출하 검사 · 합/불 판정 · FAIL 시 NCR 자동생성",actions:j&&s.jsxs(Y,{onClick:p,children:[s.jsx(ot,{size:16})," 검사 등록"]})}),N!=null&&s.jsx(xe,{title:"합격률 (30일)",className:"mb-5",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"text-4xl font-bold text-accent",children:[Number(N).toFixed(1),"%"]}),s.jsxs("div",{className:"text-sm text-slate-400",children:["합격 ",(n==null?void 0:n.passCount)??0," / 전체 ",(n==null?void 0:n.totalCount)??(n==null?void 0:n.total)??0]})]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-32",value:a,onChange:w=>i(w.target.value),children:Vme.map(w=>s.jsx("option",{value:w,children:w||"전체 유형"},w))}),s.jsx("select",{className:"inp w-32",value:l,onChange:w=>o(w.target.value),children:Wme.map(w=>s.jsx("option",{value:w,children:w||"전체 결과"},w))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"검사번호"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"결과"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(w=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(bs,{size:14,className:"text-brand"}),w.inspectionNo||w.id]}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:w.inspectionType})}),s.jsx("td",{className:"text-slate-300 text-xs",children:w.itemName||w.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:w.lotNo||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:Number(w.qty||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:w.result||"WAIT"})}),s.jsx("td",{className:"px-4",children:j&&(!w.result||w.result==="WAIT")&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>g(w),title:"AI 판정 보조",className:"text-accent hover:text-accent/80",children:s.jsx(zn,{size:15})}),s.jsx("button",{onClick:()=>x(w,"PASS"),title:"합격",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(wf,{size:15})}),s.jsx("button",{onClick:()=>x(w,"FAIL"),title:"불합격",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})})]})})]},w.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"검사 기록이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"검사 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"검사 유형",children:s.jsx("select",{className:"inp",value:c.inspectionType,onChange:w=>u({...c,inspectionType:w.target.value}),children:["IQC","IPQC","OQC"].map(w=>s.jsx("option",{children:w},w))})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:w=>u({...c,itemCode:w.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(w=>s.jsxs("option",{value:w.itemCode,children:[w.itemName," (",w.itemCode,")"]},w.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:w=>u({...c,lotNo:w.target.value})})}),s.jsx(L,{label:"검사 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:w=>u({...c,qty:Number(w.target.value)})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:w=>u({...c,remark:w.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:y,children:"저장"})]})]}),f&&s.jsxs(We,{title:"검사 판정 (AI 보조)",onClose:()=>d(null),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"측정값과 규격(LSL/USL/Target)을 입력하면 PASS/FAIL을 자동 판정합니다. FAIL 시 NCR이 자동 생성됩니다."}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"측정값",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.measured,onChange:w=>d({...f,measured:w.target.value})})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"LSL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.lsl,onChange:w=>d({...f,lsl:w.target.value})})}),s.jsx(L,{label:"Target",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.target,onChange:w=>d({...f,target:w.target.value})})}),s.jsx(L,{label:"USL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.usl,onChange:w=>d({...f,usl:w.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"불량 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.defectQty,onChange:w=>d({...f,defectQty:w.target.value})})}),s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:f.defectCode,onChange:w=>d({...f,defectCode:w.target.value})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsxs(Y,{onClick:b,children:[s.jsx(zn,{size:14})," 판정"]})]})]})]})}const Zme=["","IQC","IPQC","OQC"],Jme={specCode:"",itemCode:"",inspectionType:"IQC",characteristic:"",lsl:"",usl:"",target:"",unit:"",aql:"",items:[]};function eye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),c=ur(),u=()=>R8({inspectionType:n}).then(y=>t(y||[])).catch(()=>t([]));S.useEffect(()=>{u()},[n]),S.useEffect(()=>{Jt().then(y=>o(y||[])).catch(()=>{})},[]);const f=()=>i({...Jme,_new:!0}),d=y=>i({...y,items:sj(y.items,[]),_new:!1}),h=async()=>{const{_new:y,id:g,items:b,...x}=a,N={...x,items:lj(b)};y?await D8(N):await L8(g,N),i(null),u()},m=async y=>{window.confirm("삭제하시겠습니까?")&&(await z8(y),u())},j=()=>i(y=>({...y,items:[...y.items,{name:"",lsl:"",usl:"",unit:""}]})),v=(y,g,b)=>i(x=>{const N=[...x.items];return N[y]={...N[y],[g]:b},{...x,items:N}}),p=y=>i(g=>({...g,items:g.items.filter((b,x)=>x!==y)}));return s.jsxs("div",{children:[s.jsx(ut,{title:"검사기준 (Spec)",subtitle:"규격 · LSL/USL/Target · AQL · 동적 검사항목(JSON)",actions:c&&s.jsxs(Y,{onClick:f,children:[s.jsx(ot,{size:16})," 검사기준"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-32",value:n,onChange:y=>r(y.target.value),children:Zme.map(y=>s.jsx("option",{value:y,children:y||"전체 유형"},y))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"기준코드"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"특성"}),s.jsx("th",{className:"text-right",children:"LSL"}),s.jsx("th",{className:"text-right",children:"Target"}),s.jsx("th",{className:"text-right",children:"USL"}),s.jsx("th",{className:"text-left",children:"AQL"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(y=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(BT,{size:14,className:"text-brand"}),y.specCode]}),s.jsx("td",{className:"text-slate-300 text-xs",children:y.itemCode}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:y.inspectionType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.characteristic||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.lsl??"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.target??"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.usl??"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.aql??"-"}),s.jsx("td",{className:"px-4",children:c&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>d(y),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>m(y.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},y.id)),e.length===0&&s.jsx(Fe,{colSpan:9,msg:"검사기준이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"검사기준 등록":"검사기준 편집",onClose:()=>i(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"기준코드",children:s.jsx("input",{className:"inp",value:a.specCode,onChange:y=>i({...a,specCode:y.target.value})})}),s.jsx(L,{label:"검사유형",children:s.jsx("select",{className:"inp",value:a.inspectionType,onChange:y=>i({...a,inspectionType:y.target.value}),children:["IQC","IPQC","OQC"].map(y=>s.jsx("option",{children:y},y))})})]}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:y=>i({...a,itemCode:y.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(y=>s.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),s.jsx(L,{label:"특성",children:s.jsx("input",{className:"inp",value:a.characteristic,onChange:y=>i({...a,characteristic:y.target.value})})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"LSL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.lsl,onChange:y=>i({...a,lsl:y.target.value})})}),s.jsx(L,{label:"Target",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.target,onChange:y=>i({...a,target:y.target.value})})}),s.jsx(L,{label:"USL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.usl,onChange:y=>i({...a,usl:y.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"단위",children:s.jsx("input",{className:"inp",value:a.unit,onChange:y=>i({...a,unit:y.target.value})})}),s.jsx(L,{label:"AQL",children:s.jsx("input",{className:"inp",value:a.aql,onChange:y=>i({...a,aql:y.target.value})})})]})]}),s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-semibold",children:"동적 검사항목"}),s.jsxs(Y,{size:"sm",variant:"ghost",onClick:j,children:[s.jsx(ot,{size:13})," 항목"]})]}),a.items.length===0&&s.jsx("p",{className:"text-center text-slate-500 text-xs py-6 border border-dashed border-edge rounded",children:"검사항목을 추가하세요."}),s.jsx("div",{className:"space-y-2 max-h-72 overflow-auto",children:a.items.map((y,g)=>s.jsxs("div",{className:"bg-panel border border-edge rounded p-2",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsxs("span",{className:"text-[11px] text-brand",children:["항목 #",g+1]}),s.jsx("button",{onClick:()=>p(g),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:12})})]}),s.jsx("input",{placeholder:"항목명",className:"inp text-xs mb-1.5",value:y.name||"",onChange:b=>v(g,"name",b.target.value)}),s.jsxs("div",{className:"grid grid-cols-3 gap-1.5",children:[s.jsx("input",{placeholder:"LSL",className:"inp text-xs",value:y.lsl||"",onChange:b=>v(g,"lsl",b.target.value)}),s.jsx("input",{placeholder:"USL",className:"inp text-xs",value:y.usl||"",onChange:b=>v(g,"usl",b.target.value)}),s.jsx("input",{placeholder:"단위",className:"inp text-xs",value:y.unit||"",onChange:b=>v(g,"unit",b.target.value)})]})]},g))})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:h,children:"저장"})]})]})]})}const tye=["","OPEN","REVIEW","DISPOSITIONED","CLOSED"],nye=["","MINOR","MAJOR","CRITICAL"],rye=["USE_AS_IS","REWORK","SCRAP","RETURN"],aye={itemCode:"",lotNo:"",defectCode:"",severity:"MINOR",qty:0,description:""},Rv={OPEN:"REVIEW",REVIEW:"DISPOSITIONED",DISPOSITIONED:"CLOSED"};function iye(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),h=Zt(),m=()=>{I8({status:a,severity:l}).then(x=>t(x||[])).catch(()=>t([])),B8().then(r).catch(()=>{})};S.useEffect(()=>{m()},[a,l]),S.useEffect(()=>{Jt().then(x=>d(x||[])).catch(()=>{})},[]);const j=()=>u({...aye}),v=async()=>{await U8(c),u(null),m()},p=async x=>{const N=window.prompt(`처리 방식 (${rye.join("/")})`,"REWORK");N&&(await q8(x.id,N),m())},y=async x=>{const N=Rv[x.status];N&&(await H8(x.id,N),m())},g=["OPEN","REVIEW","DISPOSITIONED","CLOSED"],b=x=>(n==null?void 0:n[x])??(n==null?void 0:n[x.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"부적합 NCR",subtitle:"부적합 보고 · 처리(USE_AS_IS/REWORK/SCRAP/RETURN) · CAPA 연계",actions:h&&s.jsxs(Y,{onClick:j,children:[s.jsx(ot,{size:16})," NCR 등록"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:g.map(x=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:x}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:b(x).toLocaleString()})]},x))}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:x=>i(x.target.value),children:tye.map(x=>s.jsx("option",{value:x,children:x||"전체 상태"},x))}),s.jsx("select",{className:"inp w-32",value:l,onChange:x=>o(x.target.value),children:nye.map(x=>s.jsx("option",{value:x,children:x||"전체 심각도"},x))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"NCR"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"불량코드"}),s.jsx("th",{className:"text-left",children:"심각도"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(x=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(Er,{size:14,className:"text-rose-400"}),x.ncrNo||x.id]}),s.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.defectCode||"-"}),s.jsx("td",{children:s.jsx(lt,{status:x.severity})}),s.jsx("td",{className:"text-right text-slate-300",children:Number(x.qty||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:x.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h&&x.status==="REVIEW"&&s.jsx("button",{onClick:()=>p(x),className:"text-xs text-brand hover:underline",children:"처리방식"}),h&&Rv[x.status]&&s.jsxs("button",{onClick:()=>y(x),className:"text-xs text-brand hover:underline",children:["→ ",Rv[x.status]]})]})})]},x.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"부적합이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"부적합 NCR 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),s.jsx(L,{label:"불량코드",children:s.jsx("input",{className:"inp",value:c.defectCode,onChange:x=>u({...c,defectCode:x.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"심각도",children:s.jsx("select",{className:"inp",value:c.severity,onChange:x=>u({...c,severity:x.target.value}),children:["MINOR","MAJOR","CRITICAL"].map(x=>s.jsx("option",{children:x},x))})}),s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:x=>u({...c,qty:Number(x.target.value)})})})]}),s.jsx(L,{label:"설명",children:s.jsx("textarea",{className:"inp",value:c.description,onChange:x=>u({...c,description:x.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:v,children:"저장"})]})]})]})}const sye=["","OPEN","INPROGRESS","VERIFY","CLOSED"],lye=["","CORRECTIVE","PREVENTIVE"],Dv={OPEN:"INPROGRESS",INPROGRESS:"VERIFY",VERIFY:"CLOSED"},oye={ncrNo:"",title:"",capaType:"CORRECTIVE",rootCause:"",actionPlan:"",owner:"",dueDate:""};function cye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(null),c=Zt(),u=()=>F8({status:n,capaType:a}).then(m=>t(m||[])).catch(()=>t([]));S.useEffect(()=>{u()},[n,a]);const f=()=>o({...oye,_new:!0}),d=async()=>{const{_new:m,id:j,...v}=l;m?await G8(v):await K8(j,v),o(null),u()},h=async m=>{const j=Dv[m.status];if(!j)return;let v;j==="CLOSED"&&(v=window.prompt("효과성 평가 (예: EFFECTIVE/INEFFECTIVE)","EFFECTIVE")||void 0),await Y8(m.id,{status:j,effectiveness:v}),u()};return s.jsxs("div",{children:[s.jsx(ut,{title:"시정조치 CAPA",subtitle:"시정·예방조치(8D) · 근본원인 · 조치계획 · 효과성 검증",actions:c&&s.jsxs(Y,{onClick:f,children:[s.jsx(ot,{size:16})," CAPA 등록"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:m=>r(m.target.value),children:sye.map(m=>s.jsx("option",{value:m,children:m||"전체 상태"},m))}),s.jsx("select",{className:"inp w-40",value:a,onChange:m=>i(m.target.value),children:lye.map(m=>s.jsx("option",{value:m,children:m||"전체 유형"},m))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"CAPA"}),s.jsx("th",{className:"text-left",children:"제목"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"NCR"}),s.jsx("th",{className:"text-left",children:"담당"}),s.jsx("th",{className:"text-left",children:"기한"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(m=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(MT,{size:14,className:"text-brand"}),m.capaNo||m.id]}),s.jsx("td",{className:"text-slate-300 text-xs max-w-[220px] truncate",children:m.title}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:m.capaType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.ncrNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.owner||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.dueDate||"-"}),s.jsx("td",{children:s.jsx(lt,{status:m.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&s.jsx("button",{onClick:()=>o({...m,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),c&&Dv[m.status]&&s.jsxs("button",{onClick:()=>h(m),className:"text-xs text-brand hover:underline",children:["→ ",Dv[m.status]]})]})})]},m.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"CAPA가 없습니다."})]})]})}),l&&s.jsxs(We,{title:l._new?"CAPA 등록":"CAPA 편집",onClose:()=>o(null),wide:!0,children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"제목",children:s.jsx("input",{className:"inp",value:l.title,onChange:m=>o({...l,title:m.target.value})})}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:l.capaType,onChange:m=>o({...l,capaType:m.target.value}),children:["CORRECTIVE","PREVENTIVE"].map(m=>s.jsx("option",{children:m},m))})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"연계 NCR",children:s.jsx("input",{className:"inp",value:l.ncrNo,onChange:m=>o({...l,ncrNo:m.target.value})})}),s.jsx(L,{label:"담당자",children:s.jsx("input",{className:"inp",value:l.owner,onChange:m=>o({...l,owner:m.target.value})})}),s.jsx(L,{label:"기한",children:s.jsx("input",{type:"date",className:"inp",value:l.dueDate||"",onChange:m=>o({...l,dueDate:m.target.value})})})]}),s.jsx(L,{label:"근본 원인 (Root Cause)",children:s.jsx("textarea",{className:"inp",value:l.rootCause,onChange:m=>o({...l,rootCause:m.target.value})})}),s.jsx(L,{label:"조치 계획 (Action Plan)",children:s.jsx("textarea",{className:"inp",value:l.actionPlan,onChange:m=>o({...l,actionPlan:m.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>o(null),children:"취소"}),s.jsx(Y,{onClick:d,children:"저장"})]})]})]})}const Od={fontSize:11,fill:"#94a3b8"},TA={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"},uye={chartCode:"",itemCode:"",characteristic:"",subgroupNo:1,values:""};function fye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(null),[j,v]=S.useState([]),p=Zt(),y=()=>V8().then(A=>{const E=A||[];t(E),!n&&E.length&&r(E[0].chartCode)}).catch(()=>t([]));S.useEffect(()=>{y(),Jt().then(A=>v(A||[])).catch(()=>{})},[]);const g=()=>{n&&(W8({chartCode:n,limit:50}).then(A=>i(Array.isArray(A)?A:[])).catch(()=>i([])),X8({chartCode:n,lsl:c===""?void 0:Number(c),usl:f===""?void 0:Number(f)}).then(o).catch(()=>o(null)))};S.useEffect(()=>{g()},[n]);const b=()=>m({...uye,chartCode:n}),x=async()=>{const A=h.values.split(/[,\s]+/).map(E=>Number(E)).filter(E=>!isNaN(E));await Q8({chartCode:h.chartCode,itemCode:h.itemCode,characteristic:h.characteristic,subgroupNo:Number(h.subgroupNo),values:A}),m(null),g()},N=a.map((A,E)=>({name:A.subgroupNo??E+1,xbar:Number(A.mean??A.xbar??A.average??0),range:Number(A.range??A.r??0)})),w=l||{},O=Array.isArray(w.violations)?w.violations:[];return s.jsxs("div",{children:[s.jsx(ut,{title:"SPC 관리도",subtitle:"Xbar-R 관리한계 · Cp/Cpk 공정능력 · Western Electric 이상감지",actions:p&&n&&s.jsxs(Y,{onClick:b,children:[s.jsx(ot,{size:16})," 샘플 추가"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:A=>r(A.target.value),children:[s.jsx("option",{value:"",children:"관리도 선택"}),e.map(A=>s.jsxs("option",{value:A.chartCode,children:[A.chartCode," · ",A.characteristic||A.itemCode]},A.chartCode||A.id))]}),s.jsx("input",{className:"inp w-24",placeholder:"LSL",value:c,onChange:A=>u(A.target.value)}),s.jsx("input",{className:"inp w-24",placeholder:"USL",value:f,onChange:A=>d(A.target.value)}),s.jsx(Y,{variant:"ghost",onClick:g,children:"분석"})]}),n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:[s.jsx(Ad,{label:"X̄ (전체평균)",value:Cd(w.xbar)}),s.jsx(Ad,{label:"R̄ (평균범위)",value:Cd(w.rbar)}),s.jsx(Ad,{label:"Cp",value:Cd(w.cp),color:"text-sky-400"}),s.jsx(Ad,{label:"Cpk",value:Cd(w.cpk),color:"text-accent"}),s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsx("div",{className:"text-xs text-slate-400",children:"공정능력 등급"}),s.jsx("div",{className:"mt-2",children:s.jsx(lt,{status:w.capabilityGrade||"-"})})]})]}),w.anomaly&&s.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-center gap-2",children:[s.jsx(Er,{size:16})," 이상 패턴 감지됨 (Western Electric Rules)",O.length?` — 위반 ${O.length}건`:""]}),s.jsx(xe,{title:"X̄ 관리도 (Xbar Chart)",icon:s.jsx(G0,{size:15}),className:"mb-4",children:N.length===0?s.jsx(Fe,{msg:"샘플이 없습니다."}):s.jsx(xl,{width:"100%",height:280,children:s.jsxs(OA,{data:N,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Or,{dataKey:"name",tick:Od}),s.jsx(Ar,{tick:Od,domain:["auto","auto"]}),s.jsx(tn,{contentStyle:TA}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),w.xbarUcl!=null&&s.jsx(fa,{y:Number(w.xbarUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),w.xbar!=null&&s.jsx(fa,{y:Number(w.xbar),stroke:"#3ddc97",label:{value:"CL",fontSize:10,fill:"#3ddc97",position:"right"}}),w.xbarLcl!=null&&s.jsx(fa,{y:Number(w.xbarLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),s.jsx(Mi,{type:"monotone",dataKey:"xbar",name:"X̄",stroke:"#00a0c8",strokeWidth:2,dot:{r:3}})]})})}),s.jsx(xe,{title:"R 관리도 (Range Chart)",children:N.length===0?s.jsx(Fe,{msg:"샘플이 없습니다."}):s.jsx(xl,{width:"100%",height:240,children:s.jsxs(OA,{data:N,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Or,{dataKey:"name",tick:Od}),s.jsx(Ar,{tick:Od,domain:["auto","auto"]}),s.jsx(tn,{contentStyle:TA}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),w.rUcl!=null&&s.jsx(fa,{y:Number(w.rUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),w.rbar!=null&&s.jsx(fa,{y:Number(w.rbar),stroke:"#3ddc97",label:{value:"R̄",fontSize:10,fill:"#3ddc97",position:"right"}}),w.rLcl!=null&&s.jsx(fa,{y:Number(w.rLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),s.jsx(Mi,{type:"monotone",dataKey:"range",name:"R",stroke:"#f59e0b",strokeWidth:2,dot:{r:3}})]})})})]}):s.jsx(Fe,{msg:"관리도를 선택하세요."}),h&&s.jsxs(We,{title:"SPC 샘플 추가",onClose:()=>m(null),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"서브그룹 측정값을 입력하면 평균/범위가 자동 계산됩니다."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"관리도 코드",children:s.jsx("input",{className:"inp",value:h.chartCode,onChange:A=>m({...h,chartCode:A.target.value})})}),s.jsx(L,{label:"서브그룹 번호",children:s.jsx("input",{type:"number",className:"inp",value:h.subgroupNo,onChange:A=>m({...h,subgroupNo:A.target.value})})})]}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:h.itemCode,onChange:A=>m({...h,itemCode:A.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(A=>s.jsxs("option",{value:A.itemCode,children:[A.itemName," (",A.itemCode,")"]},A.id))]})}),s.jsx(L,{label:"특성",children:s.jsx("input",{className:"inp",value:h.characteristic,onChange:A=>m({...h,characteristic:A.target.value})})}),s.jsx(L,{label:"측정값 (콤마/공백 구분)",hint:"예: 10.1, 10.0, 9.9, 10.2, 10.0",children:s.jsx("input",{className:"inp",value:h.values,onChange:A=>m({...h,values:A.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>m(null),children:"취소"}),s.jsxs(Y,{onClick:x,children:[s.jsx(zn,{size:14})," 추가"]})]})]})]})}function Ad({label:e,value:t,color:n="text-slate-200"}){return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsx("div",{className:"text-xs text-slate-400",children:e}),s.jsx("div",{className:`text-2xl font-bold mt-1 ${n}`,children:t})]})}function Cd(e){return e==null?"-":Number(e).toFixed(3)}const dye=["","COA","MSDS","TEST_REPORT"],hye={certType:"COA",itemCode:"",lotNo:"",partnerCode:"",content:""};function pye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(null),[c,u]=S.useState([]),f=Zt(),d=()=>Z8({certType:n}).then(v=>t(v||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n]),S.useEffect(()=>{Jt().then(v=>u(v||[])).catch(()=>{})},[]);const h=()=>i({...hye}),m=async()=>{await eB(a),i(null),d()},j=async v=>o(await J8(v));return s.jsxs("div",{children:[s.jsx(ut,{title:"성적서 (Certificate)",subtitle:"COA · MSDS · 시험성적서 (content JSON)",actions:f&&s.jsxs(Y,{onClick:h,children:[s.jsx(ot,{size:16})," 성적서 발행"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-40",value:n,onChange:v=>r(v.target.value),children:dye.map(v=>s.jsx("option",{value:v,children:v||"전체 유형"},v))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"성적서번호"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-left",children:"거래처"}),s.jsx("th",{className:"text-left",children:"발행일"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(v=>s.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>j(v.id),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(TT,{size:14,className:"text-brand"}),v.certNo||v.id]}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:v.certType})}),s.jsx("td",{className:"text-slate-300 text-xs",children:v.itemName||v.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:v.lotNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:v.partnerCode||"-"}),s.jsx("td",{className:"text-slate-500 text-xs",children:v.createdAt?new Date(v.createdAt).toLocaleDateString("ko-KR"):"-"}),s.jsx("td",{className:"px-4 text-right",onClick:p=>p.stopPropagation(),children:s.jsx("button",{onClick:()=>j(v.id),className:"text-slate-400 hover:text-brand",children:s.jsx(_T,{size:15})})})]},v.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"성적서가 없습니다."})]})]})}),a&&s.jsxs(We,{title:"성적서 발행",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:a.certType,onChange:v=>i({...a,certType:v.target.value}),children:["COA","MSDS","TEST_REPORT"].map(v=>s.jsx("option",{children:v},v))})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:v=>i({...a,itemCode:v.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(v=>s.jsxs("option",{value:v.itemCode,children:[v.itemName," (",v.itemCode,")"]},v.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:v=>i({...a,lotNo:v.target.value})})}),s.jsx(L,{label:"거래처",children:s.jsx("input",{className:"inp",value:a.partnerCode,onChange:v=>i({...a,partnerCode:v.target.value})})})]}),s.jsx(L,{label:"내용 (JSON)",hint:'예: {"검사항목":"인장강도","결과":"450MPa","판정":"합격"}',children:s.jsx("textarea",{className:"inp font-mono text-xs",rows:5,value:a.content,onChange:v=>i({...a,content:v.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:m,children:"발행"})]})]}),l&&s.jsxs(We,{title:`성적서 — ${l.certNo||l.id}`,onClose:()=>o(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm mb-4",children:[s.jsx(Ed,{label:"유형",value:l.certType}),s.jsx(Ed,{label:"품목",value:`${l.itemName||""} (${l.itemCode})`}),s.jsx(Ed,{label:"LOT",value:l.lotNo||"-"}),s.jsx(Ed,{label:"거래처",value:l.partnerCode||"-"})]}),s.jsxs("div",{className:"bg-ink border border-edge rounded p-3",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"내용"}),s.jsx("pre",{className:"text-xs text-slate-300 whitespace-pre-wrap",children:lj(sj(l.content,l.content))||"-"})]})]})]})}function Ed({label:e,value:t}){return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-0.5",children:e}),s.jsx("div",{className:"text-slate-200",children:t})]})}const mye=["","RAW","SEMI","PRODUCT","SUBSIDIARY"],yye=["","ACTIVE","INACTIVE"],vye={itemCode:"",itemName:"",itemType:"PRODUCT",unit:"EA",barcode:"",spec:"",safetyStock:0,warehouseCode:"",attributes:"",status:"ACTIVE"};function gye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),f=ur(),d=()=>Jt({itemType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n,a]);const h=()=>u({...vye,_new:!0}),m=p=>u({...p,attributes:lj(sj(p.attributes,{})),_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await tB(g):await nB(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await rB(p),d())};return s.jsxs("div",{children:[s.jsx(ut,{title:"품목",subtitle:"자재 · 반제품 · 제품 · 부자재 · 바코드 · 안전재고 · 속성(JSON)",actions:f&&s.jsxs(Y,{onClick:h,children:[s.jsx(ot,{size:16})," 품목"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:mye.map(p=>s.jsx("option",{value:p,children:p||"전체 유형"},p))}),s.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:yye.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))}),s.jsx("input",{value:l,onChange:p=>o(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:d,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"품목명"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"단위"}),s.jsx("th",{className:"text-left",children:"바코드"}),s.jsx("th",{className:"text-right",children:"안전재고"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(DT,{size:14,className:"text-brand"}),p.itemCode]}),s.jsx("td",{className:"text-slate-300",children:p.itemName}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.itemType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.unit}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.barcode||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.safetyStock||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"품목이 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"품목 등록":"품목 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:c.itemCode,onChange:p=>u({...c,itemCode:p.target.value}),disabled:!c._new})}),s.jsx(L,{label:"품목명",children:s.jsx("input",{className:"inp",value:c.itemName,onChange:p=>u({...c,itemName:p.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.itemType,onChange:p=>u({...c,itemType:p.target.value}),children:["RAW","SEMI","PRODUCT","SUBSIDIARY"].map(p=>s.jsx("option",{children:p},p))})}),s.jsx(L,{label:"단위",children:s.jsx("input",{className:"inp",value:c.unit,onChange:p=>u({...c,unit:p.target.value})})}),s.jsx(L,{label:"안전재고",children:s.jsx("input",{type:"number",className:"inp",value:c.safetyStock,onChange:p=>u({...c,safetyStock:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"바코드",children:s.jsx("input",{className:"inp",value:c.barcode,onChange:p=>u({...c,barcode:p.target.value})})}),s.jsx(L,{label:"기본 창고",children:s.jsx("input",{className:"inp",value:c.warehouseCode,onChange:p=>u({...c,warehouseCode:p.target.value})})})]}),s.jsx(L,{label:"규격(spec)",children:s.jsx("input",{className:"inp",value:c.spec,onChange:p=>u({...c,spec:p.target.value})})}),s.jsx(L,{label:"속성 (JSON)",hint:'예: {"color":"red","grade":"A"}',children:s.jsx("textarea",{className:"inp font-mono text-xs",rows:3,value:c.attributes,onChange:p=>u({...c,attributes:p.target.value})})}),!c._new&&s.jsx(L,{label:"상태",children:s.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>s.jsx("option",{children:p},p))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:j,children:"저장"})]})]})]})}const xye={parentItemCode:"",childItemCode:"",qtyPer:1,seq:1,lossRate:0,bomVersion:"v1"};function bye(e,t){const n={};e.forEach(a=>{(n[a.parentItemCode]=n[a.parentItemCode]||[]).push(a)});const r=(a,i,l)=>l.has(a)||i>8?[]:(l.add(a),(n[a]||[]).flatMap(o=>[{...o,depth:i},...r(o.childItemCode,i+1,new Set(l))]));return r(t,0,new Set)}function jye(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState([]),[c,u]=S.useState(null),[f,d]=S.useState([]),h=ur(),m=()=>iB().then(b=>o(Array.isArray(b)?b:[])).catch(()=>o([])),j=()=>{if(!e){i([]);return}aB({parentItemCode:e,bomVersion:n}).then(b=>{const x=Array.isArray(b)?b:(b==null?void 0:b.rows)||(b==null?void 0:b.nodes)||[];i(x.some(N=>N.depth!=null)?x:bye(x,e))}).catch(()=>i([]))};S.useEffect(()=>{m(),Jt().then(b=>d(b||[])).catch(()=>{})},[]),S.useEffect(()=>{j()},[e,n]);const v=()=>u({...xye,parentItemCode:e,_new:!0}),p=async()=>{const{_new:b,id:x,...N}=c;b?await sB(N):await lB(x,N),u(null),m(),j()},y=async b=>{window.confirm("삭제하시겠습니까?")&&(await oB(b),m(),j())},g=f.filter(b=>["PRODUCT","SEMI"].includes(b.itemType));return s.jsxs("div",{children:[s.jsx(ut,{title:"BOM",subtitle:"자재 구성(Bill of Materials) · 소요량 · 버전 · 트리 전개",actions:h&&s.jsxs(Y,{onClick:v,children:[s.jsx(ot,{size:16})," BOM 행"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[s.jsxs("select",{className:"inp w-56",value:e,onChange:b=>t(b.target.value),children:[s.jsx("option",{value:"",children:"상위 품목 선택"}),g.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]}),s.jsx("input",{className:"inp w-28",placeholder:"버전",value:n,onChange:b=>r(b.target.value)}),s.jsxs(Y,{variant:"ghost",onClick:j,children:[s.jsx(Yo,{size:15})," 전개"]})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden mb-6",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"구성 (트리)"}),s.jsx("th",{className:"text-left",children:"하위 품목"}),s.jsx("th",{className:"text-right",children:"소요량"}),s.jsx("th",{className:"text-right",children:"손실률"}),s.jsx("th",{className:"text-left",children:"버전"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[a.map((b,x)=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-2.5 px-4",style:{paddingLeft:16+(b.depth||0)*20},children:s.jsxs("span",{className:"flex items-center gap-1 text-slate-300",children:[s.jsx(CT,{size:12,className:"text-brand"}),b.childItemName||b.childItemCode]})}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:b.childItemCode}),s.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),s.jsx("td",{className:"text-right text-slate-400 text-xs",children:b.lossRate!=null?`${b.lossRate}%`:"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"}),s.jsx("td",{className:"px-4",children:h&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>u({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>y(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},b.id??x)),a.length===0&&s.jsx(Fe,{colSpan:6,msg:e?"구성이 없습니다.":"상위 품목을 선택하면 BOM 트리가 전개됩니다."})]})]})}),s.jsxs("h3",{className:"text-sm font-semibold mb-2 flex items-center gap-1.5",children:[s.jsx(PT,{size:15,className:"text-brand"})," 전체 BOM"]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"상위"}),s.jsx("th",{className:"text-left",children:"하위"}),s.jsx("th",{className:"text-right",children:"소요량"}),s.jsx("th",{className:"text-left",children:"버전"})]})}),s.jsxs("tbody",{children:[l.slice(0,100).map(b=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-2.5 px-4 text-slate-300",children:b.parentItemCode}),s.jsx("td",{className:"text-slate-400",children:b.childItemCode}),s.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),s.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"})]},b.id)),l.length===0&&s.jsx(Fe,{colSpan:4,msg:"BOM이 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"BOM 행 추가":"BOM 행 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"상위 품목",children:s.jsxs("select",{className:"inp",value:c.parentItemCode,onChange:b=>u({...c,parentItemCode:b.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),g.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),s.jsx(L,{label:"하위 품목",children:s.jsxs("select",{className:"inp",value:c.childItemCode,onChange:b=>u({...c,childItemCode:b.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"소요량",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:c.qtyPer,onChange:b=>u({...c,qtyPer:Number(b.target.value)})})}),s.jsx(L,{label:"순서",children:s.jsx("input",{type:"number",className:"inp",value:c.seq,onChange:b=>u({...c,seq:Number(b.target.value)})})}),s.jsx(L,{label:"손실률(%)",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:c.lossRate,onChange:b=>u({...c,lossRate:Number(b.target.value)})})})]}),s.jsx(L,{label:"버전",children:s.jsx("input",{className:"inp",value:c.bomVersion,onChange:b=>u({...c,bomVersion:b.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:p,children:"저장"})]})]})]})}const Sye={itemCode:"",opSeq:1,processCode:"",processName:"",equipmentCode:"",stdTimeMin:0};function wye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),f=ur(),d=()=>cB(n).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(p=>o(p||[])).catch(()=>{}),e1().then(p=>u(p||[])).catch(()=>{})},[]);const h=()=>i({...Sye,itemCode:n,_new:!0}),m=async()=>{const{_new:p,id:y,...g}=a;p?await uB(g):await fB(y,g),i(null),d()},j=async p=>{window.confirm("삭제하시겠습니까?")&&(await dB(p),d())},v=[...e].sort((p,y)=>(p.opSeq||0)-(y.opSeq||0));return s.jsxs("div",{children:[s.jsx(ut,{title:"라우팅",subtitle:"공정 순서 · 표준시간 · 설비 매핑",actions:f&&s.jsxs(Y,{onClick:h,children:[s.jsx(ot,{size:16})," 공정"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:p=>r(p.target.value),children:[s.jsx("option",{value:"",children:"전체 / 품목 선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]}),s.jsxs(Y,{variant:"ghost",onClick:d,children:[s.jsx(Yo,{size:15})," 조회"]})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"순서"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"공정코드"}),s.jsx("th",{className:"text-left",children:"공정명"}),s.jsx("th",{className:"text-left",children:"설비"}),s.jsx("th",{className:"text-right",children:"표준시간(분)"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[v.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(IT,{size:14,className:"text-brand"}),p.opSeq]}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.itemCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.processCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.processName||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.equipmentCode||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.stdTimeMin??"-"}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>i({...p,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>j(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),v.length===0&&s.jsx(Fe,{colSpan:7,msg:"라우팅이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"공정 추가":"공정 편집",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정순서",children:s.jsx("input",{type:"number",className:"inp",value:a.opSeq,onChange:p=>i({...a,opSeq:Number(p.target.value)})})}),s.jsx(L,{label:"표준시간(분)",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.stdTimeMin,onChange:p=>i({...a,stdTimeMin:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정코드",children:s.jsx("input",{className:"inp",value:a.processCode,onChange:p=>i({...a,processCode:p.target.value})})}),s.jsx(L,{label:"공정명",children:s.jsx("input",{className:"inp",value:a.processName,onChange:p=>i({...a,processName:p.target.value})})})]}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:a.equipmentCode,onChange:p=>i({...a,equipmentCode:p.target.value}),children:[s.jsx("option",{value:"",children:"미지정"}),c.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(Y,{onClick:m,children:"저장"})]})]})]})}const Nye=["","SUPPLIER","CUSTOMER","BOTH"],Oye=["","ACTIVE","INACTIVE"],Aye={partnerCode:"",partnerName:"",partnerType:"SUPPLIER",contactName:"",contactPhone:"",contactEmail:"",address:"",status:"ACTIVE"};function Cye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),f=ur(),d=()=>t1({partnerType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n,a]);const h=()=>u({...Aye,_new:!0}),m=p=>u({...p,contactPhone:"",contactEmail:"",_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await pB(g):await mB(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await yB(p),d())};return s.jsxs("div",{children:[s.jsx(ut,{title:"거래처",subtitle:"공급사 · 고객 · 연락처 AES 암호화 저장 · 응답 마스킹 (MANAGER+)",actions:f&&s.jsxs(Y,{onClick:h,children:[s.jsx(ot,{size:16})," 거래처"]})}),s.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 text-amber-300/80 text-xs rounded-lg px-3 py-2 mb-4 flex items-center gap-2",children:[s.jsx(Vo,{size:14})," 거래처 연락처(전화·이메일)는 PII로 마스킹되어 표시됩니다. 원문은 저장 시 AES-256-GCM으로 암호화됩니다."]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:Nye.map(p=>s.jsx("option",{value:p,children:p||"전체 유형"},p))}),s.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:Oye.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))}),s.jsx("input",{value:l,onChange:p=>o(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"거래처 검색",className:"inp w-52"}),s.jsx(Y,{variant:"ghost",onClick:d,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"거래처명"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"담당"}),s.jsx("th",{className:"text-left",children:"전화"}),s.jsx("th",{className:"text-left",children:"이메일"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(NT,{size:14,className:"text-brand"}),p.partnerCode]}),s.jsx("td",{className:"text-slate-300",children:p.partnerName}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.partnerType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.contactName||"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactPhone?AA(p.contactPhone):"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactEmail?AA(p.contactEmail):"-"}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"거래처가 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"거래처 등록":"거래처 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"코드",children:s.jsx("input",{className:"inp",value:c.partnerCode,onChange:p=>u({...c,partnerCode:p.target.value}),disabled:!c._new})}),s.jsx(L,{label:"거래처명",children:s.jsx("input",{className:"inp",value:c.partnerName,onChange:p=>u({...c,partnerName:p.target.value})})})]}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.partnerType,onChange:p=>u({...c,partnerType:p.target.value}),children:["SUPPLIER","CUSTOMER","BOTH"].map(p=>s.jsx("option",{children:p},p))})}),s.jsx(L,{label:"담당자",children:s.jsx("input",{className:"inp",value:c.contactName,onChange:p=>u({...c,contactName:p.target.value})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"전화 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:s.jsx("input",{className:"inp",value:c.contactPhone,onChange:p=>u({...c,contactPhone:p.target.value})})}),s.jsx(L,{label:"이메일 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:s.jsx("input",{className:"inp",value:c.contactEmail,onChange:p=>u({...c,contactEmail:p.target.value})})})]}),s.jsx(L,{label:"주소",children:s.jsx("input",{className:"inp",value:c.address,onChange:p=>u({...c,address:p.target.value})})}),!c._new&&s.jsx(L,{label:"상태",children:s.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>s.jsx("option",{children:p},p))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:j,children:"저장"})]})]})]})}const Eye={warehouseCode:"",warehouseName:"",address:"",remark:""};function _ye(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState(null),f=ur(),d=()=>_f().then(b=>t(b||[])).catch(()=>t([]));S.useEffect(()=>{d()},[]);const h=async b=>{r(b),i(await bB(b.warehouseCode).catch(()=>[])||[])},m=()=>o({...Eye,_new:!0}),j=async()=>{const{_new:b,id:x,...N}=l;b?await vB(N):await gB(x,N),o(null),d()},v=async b=>{window.confirm("삭제하시겠습니까?")&&(await xB(b),d(),(n==null?void 0:n.id)===b&&(r(null),i([])))},p=()=>u({warehouseCode:n.warehouseCode,locationCode:"",locationName:"",binType:"SHELF"}),y=async()=>{await jB(c),u(null),h(n)},g=async b=>{window.confirm("로케이션 삭제?")&&(await SB(b),h(n))};return s.jsxs("div",{children:[s.jsx(ut,{title:"창고 / 로케이션",subtitle:"창고 · 로케이션(bin) 관리",actions:f&&s.jsxs(Y,{onClick:m,children:[s.jsx(ot,{size:16})," 창고"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"창고명"}),s.jsx("th",{className:"text-left",children:"주소"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(b=>s.jsxs("tr",{className:`border-t border-edge/50 cursor-pointer ${(n==null?void 0:n.id)===b.id?"bg-panel/60":"hover:bg-panel/30"}`,onClick:()=>h(b),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(GT,{size:14,className:"text-brand"}),b.warehouseCode]}),s.jsx("td",{className:"text-slate-300",children:b.warehouseName}),s.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[160px]",children:b.address||"-"}),s.jsx("td",{className:"px-4",onClick:x=>x.stopPropagation(),children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>o({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},b.id)),e.length===0&&s.jsx(Fe,{colSpan:4,msg:"창고가 없습니다."})]})]})}),s.jsx(xe,{title:n?`로케이션 — ${n.warehouseName}`:"로케이션 (창고 선택)",icon:s.jsx(nw,{size:15}),children:n?s.jsxs(s.Fragment,{children:[f&&s.jsx("div",{className:"mb-3",children:s.jsxs(Y,{size:"sm",variant:"ghost",onClick:p,children:[s.jsx(ot,{size:13})," 로케이션 추가"]})}),s.jsxs("div",{className:"space-y-1.5 max-h-[420px] overflow-auto",children:[a.map(b=>s.jsxs("div",{className:"flex items-center justify-between bg-panel border border-edge rounded p-2 text-sm",children:[s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(nw,{size:12,className:"text-brand"}),s.jsx("span",{className:"font-mono text-xs",children:b.locationCode})," ",s.jsx("span",{className:"text-slate-400",children:b.locationName||""})]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[11px] text-slate-500",children:b.binType||""}),f&&s.jsx("button",{onClick:()=>g(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:12})})]})]},b.id)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"로케이션이 없습니다."})]})]}):s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"왼쪽에서 창고를 선택하세요."})})]}),l&&s.jsxs(We,{title:l._new?"창고 등록":"창고 편집",onClose:()=>o(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"코드",children:s.jsx("input",{className:"inp",value:l.warehouseCode,onChange:b=>o({...l,warehouseCode:b.target.value}),disabled:!l._new})}),s.jsx(L,{label:"창고명",children:s.jsx("input",{className:"inp",value:l.warehouseName,onChange:b=>o({...l,warehouseName:b.target.value})})})]}),s.jsx(L,{label:"주소",children:s.jsx("input",{className:"inp",value:l.address,onChange:b=>o({...l,address:b.target.value})})}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:l.remark,onChange:b=>o({...l,remark:b.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>o(null),children:"취소"}),s.jsx(Y,{onClick:j,children:"저장"})]})]}),c&&s.jsxs(We,{title:"로케이션 추가",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"로케이션 코드",children:s.jsx("input",{className:"inp",value:c.locationCode,onChange:b=>u({...c,locationCode:b.target.value})})}),s.jsx(L,{label:"로케이션명",children:s.jsx("input",{className:"inp",value:c.locationName,onChange:b=>u({...c,locationName:b.target.value})})}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.binType,onChange:b=>u({...c,binType:b.target.value}),children:["SHELF","RACK","FLOOR","PALLET","BIN"].map(b=>s.jsx("option",{children:b},b))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(Y,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(Y,{onClick:y,children:"추가"})]})]})]})}function kA(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.itemName||r.itemCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.qty??r.count??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function _d(e,...t){for(const n of t)if((e==null?void 0:e[n])!=null)return Number(e[n])||0;return 0}function Tye(){const[e,t]=S.useState({}),[n,r]=S.useState({}),[a,i]=S.useState({}),[l,o]=S.useState(null),[c,u]=S.useState(null);return S.useEffect(()=>{wB(30).then(f=>t(f||{})).catch(()=>{}),NB(30).then(f=>r(f||{})).catch(()=>{}),OB().then(f=>i(f||{})).catch(()=>{}),gk(14).then(o).catch(()=>{}),AB(30,10).then(u).catch(()=>{})},[]),s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(ST,{className:"text-brand",size:20})," 분석 / KPI"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · 품질 · 재고 KPI (BI 피드 연동, 30일)"})]})}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[s.jsx(Ir,{label:"총 생산량",value:_d(e,"totalOutput","totalQty","output"),icon:s.jsx(xs,{size:13}),color:"text-brand"}),s.jsx(Ir,{label:"검사 합격률",value:_d(n,"passRate","rate").toFixed(1),unit:"%",icon:s.jsx(bs,{size:13}),color:"text-accent"}),s.jsx(Ir,{label:"불량률",value:_d(n,"defectRate").toFixed(2),unit:"%",icon:s.jsx(ao,{size:13}),color:"text-rose-400"}),s.jsx(Ir,{label:"재고 품목수",value:_d(a,"itemCount","totalItems","count"),icon:s.jsx(Sf,{size:13}),color:"text-sky-400"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-4",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),children:s.jsx(jr,{type:"AREA",data:kA(l,"생산량")})}),s.jsx(xe,{title:"품목별 생산 TOP (30일)",icon:s.jsx(ao,{size:15}),children:s.jsx(jr,{type:"BAR",data:kA(c,"생산량")})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx(xe,{title:"생산 KPI",icon:s.jsx(xs,{size:15}),children:s.jsx(MA,{o:e})}),s.jsx(xe,{title:"품질 KPI",icon:s.jsx(bs,{size:15}),children:s.jsx(MA,{o:n})})]})]})}function MA({o:e}){const t=Object.entries(e||{}).filter(([,n])=>typeof n=="number"||typeof n=="string");return t.length?s.jsx("div",{className:"space-y-1.5",children:t.map(([n,r])=>s.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 py-1.5",children:[s.jsx("span",{className:"text-slate-400 text-xs",children:n}),s.jsx("span",{className:"text-slate-200 font-medium",children:typeof r=="number"?r.toLocaleString():String(r)})]},n))}):s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"데이터 없음"})}function p$({data:e}){const t=e==null?void 0:e.applied;if(!t)return null;const n=[`mode:${t.retrievalMode}`,`기법:${t.technique}`];return t.rerank&&n.push("rerank"),t.graphrag&&n.push("graphrag"),t.hybrid&&n.push("hybrid"),t.toolUse&&n.push(`agent(${t.maxSteps})`),t.structured&&n.push("structured"),t.stream&&n.push("stream"),e!=null&&e.degraded&&n.push("⚠ degraded(폴백)"),s.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:n.map((r,a)=>s.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${r.startsWith("⚠")?"bg-amber-500/15 text-amber-300 border-amber-500/30":"bg-brand/10 text-brand border-brand/30"}`,children:r},a))})}function m$({answerId:e,query:t}){const[n,r]=S.useState("");if(!e)return null;const a=async i=>{try{await DB({answerId:e,query:t,verdict:i}),r(i==="up"?"👍 반영됨":"👎 반영됨")}catch{r("전송 실패")}};return s.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-slate-400",children:[s.jsx("span",{children:"이 답변이 도움이 됐나요?"}),s.jsx("button",{onClick:()=>a("up"),className:"p-1 rounded hover:bg-brand/10 hover:text-brand",children:s.jsx(FT,{size:13})}),s.jsx("button",{onClick:()=>a("down"),className:"p-1 rounded hover:bg-rose-500/10 hover:text-rose-300",children:s.jsx(HT,{size:13})}),n&&s.jsx("span",{className:"text-brand",children:n})]})}function y$({feature:e,question:t,answer:n}){const[r,a]=S.useState("");if(n==null)return null;const i=typeof n=="string"?n:JSON.stringify(n),l=async o=>{try{await IB({feature:e,question:t,answer:i,verdict:o}),a(o==="up"?"👍 반영됨":"👎 반영됨")}catch{a("전송 실패")}};return s.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-slate-400",children:[s.jsx("span",{children:"이 결과가 도움이 됐나요?"}),s.jsx("button",{onClick:()=>l("up"),className:"p-1 rounded hover:bg-brand/10 hover:text-brand",children:s.jsx(FT,{size:13})}),s.jsx("button",{onClick:()=>l("down"),className:"p-1 rounded hover:bg-rose-500/10 hover:text-rose-300",children:s.jsx(HT,{size:13})}),r&&s.jsx("span",{className:"text-brand",children:r})]})}function Ua({data:e}){return e==null?null:typeof e=="string"?s.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:e}):s.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:JSON.stringify(e,null,2)})}function kye(){const[e,t]=S.useState(null);return S.useEffect(()=>{xk().then(n=>t(!!((n==null?void 0:n.ollamaAvailable)??(n==null?void 0:n.available)))).catch(()=>t(!1))},[]),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(zn,{className:"text-accent",size:20})," AI 도구"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"불량분석 · 생산예측 · 예지보전 · SPC이상 · 자연어조회 · 안전재고 · 일정최적화 (Ollama 온프레미스 + Java 폴백)"})]}),s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border ${e?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e?"bg-accent":"bg-slate-500"}`}),"Ollama ",e===null?"확인 중":e?"온라인":"오프라인 (Java 폴백)"]})]}),s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h2",{className:"text-sm font-semibold flex items-center gap-2 text-brand",children:[s.jsx(Vr,{size:15})," 최신 AI 기법 (RAG · 에이전틱 · 구조화)"]}),s.jsx(jf,{to:"/ai-techniques",className:"text-xs text-slate-400 hover:text-brand underline",children:"기법 토글 설정 →"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5 mb-8",children:[s.jsx(Mye,{}),s.jsx(Pye,{})]}),s.jsx("h2",{className:"text-sm font-semibold text-slate-300 mb-3",children:"기본 AI 도구"}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[s.jsx($ye,{}),s.jsx(Rye,{}),s.jsx(Dye,{}),s.jsx(Lye,{}),s.jsx(zye,{}),s.jsx(Iye,{}),s.jsx(Bye,{})]})]})}function Mye(){var y;const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(null),[j,v]=S.useState(!1),p=async()=>{v(!0);try{const g=a.split(",").map(x=>x.trim()).filter(Boolean).map(Number),b={defectCode:e,context:n?[{note:n}]:[]};g.length&&(b.values=g,b.ucl=Number(l)||0,b.lcl=Number(c)||0,b.cl=Number(f)||0),m(await $B(b))}finally{v(!1)}};return s.jsxs(xe,{title:"불량 원인분석 + SPC 이상감지 (RAG)",icon:s.jsx(Er,{size:15}),children:[s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:e,onChange:g=>t(g.target.value),placeholder:"예: D-DIM-01"})}),s.jsx(L,{label:"컨텍스트(공정/설비/자재)",children:s.jsx("textarea",{className:"inp",value:n,onChange:g=>r(g.target.value)})}),s.jsx(L,{label:"SPC 표본값(쉼표구분, 선택)",children:s.jsx("input",{className:"inp",value:a,onChange:g=>i(g.target.value),placeholder:"예: 10.1, 10.3, 9.8, 10.5"})}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx(L,{label:"UCL",children:s.jsx("input",{className:"inp",value:l,onChange:g=>o(g.target.value)})}),s.jsx(L,{label:"LCL",children:s.jsx("input",{className:"inp",value:c,onChange:g=>u(g.target.value)})}),s.jsx(L,{label:"CL",children:s.jsx("input",{className:"inp",value:f,onChange:g=>d(g.target.value)})})]}),s.jsxs(Y,{onClick:p,disabled:j,size:"sm",children:[s.jsx(Vr,{size:13})," ",j?"분석 중…":"RCA + SPC 분석"]}),s.jsx(p$,{data:h}),s.jsx(Ua,{data:h}),s.jsx(m$,{answerId:(y=h==null?void 0:h.defect)==null?void 0:y.answerId,query:e})]})}function Pye(){var b;const[e,t]=S.useState("forecast"),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(7),[j,v]=S.useState(null),[p,y]=S.useState(!1),g=async()=>{y(!0);try{const x={kind:e};e==="pdm"?(x.equipmentCode=n,x.availability=Number(a)||0,x.downtimeCount=Number(l)||0,x.mtbfHours=Number(c)||0):(x.series=f.split(",").map(N=>N.trim()).filter(Boolean).map(Number),x.horizon=h),v(await RB(x))}finally{y(!1)}};return s.jsxs(xe,{title:"예지보전 / 수요·생산 예측 (RAG)",icon:s.jsx(ao,{size:15}),children:[s.jsx("div",{className:"flex gap-2 mb-2",children:["forecast","pdm"].map(x=>s.jsx("button",{onClick:()=>t(x),className:`px-3 py-1.5 text-xs rounded-lg border ${e===x?"bg-brand text-ink border-brand":"bg-card border-edge text-slate-300"}`,children:x==="forecast"?"수요/생산 예측":"설비 예지보전"},x))}),e==="pdm"?s.jsxs(s.Fragment,{children:[s.jsx(L,{label:"설비 코드",children:s.jsx("input",{className:"inp",value:n,onChange:x=>r(x.target.value),placeholder:"예: EQ-CNC-01"})}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx(L,{label:"가동률(0~1)",children:s.jsx("input",{className:"inp",value:a,onChange:x=>i(x.target.value)})}),s.jsx(L,{label:"비가동 횟수",children:s.jsx("input",{className:"inp",value:l,onChange:x=>o(x.target.value)})}),s.jsx(L,{label:"MTBF(시간)",children:s.jsx("input",{className:"inp",value:c,onChange:x=>u(x.target.value)})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(L,{label:"시계열(쉼표구분)",children:s.jsx("input",{className:"inp",value:f,onChange:x=>d(x.target.value),placeholder:"예: 100, 120, 95, 130"})}),s.jsx(L,{label:"예측 기간(일)",children:s.jsx("input",{type:"number",className:"inp",value:h,onChange:x=>m(Number(x.target.value))})})]}),s.jsxs(Y,{onClick:g,disabled:p,size:"sm",children:[s.jsx(Vr,{size:13})," ",p?"분석 중…":"예측 + 해석"]}),s.jsx(p$,{data:j}),s.jsx(Ua,{data:j}),s.jsx(m$,{answerId:(b=j==null?void 0:j.interpretation)==null?void 0:b.answerId,query:e})]})}function $ye(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(!1),c=async()=>{o(!0);try{i(await CB({defectCode:e,context:n}))}finally{o(!1)}};return s.jsxs(xe,{title:"불량 원인 분석",icon:s.jsx(Er,{size:15}),children:[s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value),placeholder:"예: D-CRACK-01"})}),s.jsx(L,{label:"컨텍스트(공정/설비/자재)",children:s.jsx("textarea",{className:"inp",value:n,onChange:u=>r(u.target.value)})}),s.jsxs(Y,{onClick:c,disabled:l,size:"sm",children:[s.jsx(zn,{size:13})," ",l?"분석 중…":"원인 분석"]}),s.jsx(Ua,{data:a}),s.jsx(y$,{feature:"defect-root-cause",question:e,answer:a})]})}function Rye(){const[e,t]=S.useState(""),[n,r]=S.useState(30),[a,i]=S.useState(null),[l,o]=S.useState(!1),c=async()=>{o(!0);try{i(await EB({itemCode:e,days:n}))}finally{o(!1)}};return s.jsxs(xe,{title:"수요·생산량 예측",icon:s.jsx(ao,{size:15}),children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value)})}),s.jsx(L,{label:"예측 기간(일)",children:s.jsx("input",{type:"number",className:"inp",value:n,onChange:u=>r(Number(u.target.value))})})]}),s.jsxs(Y,{onClick:c,disabled:l,size:"sm",children:[s.jsx(zn,{size:13})," ",l?"예측 중…":"예측"]}),s.jsx(Ua,{data:a})]})}function Dye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await _B({equipmentCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"설비 예지보전",icon:s.jsx(Nf,{size:15}),children:[s.jsx(L,{label:"설비 코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value),placeholder:"예: EQ-CNC-01"})}),s.jsxs(Y,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"분석 중…":"정비 권고"]}),s.jsx(Ua,{data:n})]})}function Lye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await TB({chartCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"SPC 이상 감지",icon:s.jsx(G0,{size:15}),children:[s.jsx(L,{label:"관리도 코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value)})}),s.jsxs(Y,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"감지 중…":"이상 감지"]}),s.jsx(Ua,{data:n})]})}function zye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await kB({query:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"작업지시·재고 자연어 조회",icon:s.jsx(Yo,{size:15}),children:[s.jsx(L,{label:"자연어 질의",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value),placeholder:"예: 지난주 지연된 작업지시",onKeyDown:o=>o.key==="Enter"&&l()})}),s.jsxs(Y,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"해석 중…":"질의 해석"]}),s.jsx(Ua,{data:n}),s.jsx(y$,{feature:"parse-query",question:e,answer:n})]})}function Iye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await MB({itemCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"재고 최적화·안전재고 추천",icon:s.jsx(Sf,{size:15}),children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value)})}),s.jsxs(Y,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"분석 중…":"추천"]}),s.jsx(Ua,{data:n})]})}function Bye(){const[e,t]=S.useState(null),[n,r]=S.useState(!1),a=async()=>{r(!0);try{t(await PB({}))}finally{r(!1)}};return s.jsxs(xe,{title:"생산 일정 최적화",icon:s.jsx(PL,{size:15}),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-2",children:"현재 작업지시·설비 부하 기반으로 일정 최적화를 제안합니다."}),s.jsxs(Y,{onClick:a,disabled:n,size:"sm",children:[s.jsx(zn,{size:13})," ",n?"최적화 중…":"일정 최적화 제안"]}),s.jsx(Ua,{data:e})]})}const Uye=new Set(["rag.graphrag","rag.rerank","rag.tool_use","rag.stream"]);function qye(){const[e,t]=S.useState(null),[n,r]=S.useState(""),[a,i]=S.useState(""),l=ur(),o=()=>LB().then(f=>{t(f),i("")}).catch(()=>i("RAG 토글을 불러오지 못했습니다."));S.useEffect(()=>{o()},[]);const c=async(f,d)=>{var h;r(""),i("");try{const m=await zB(f,d);t(m),r(`'${f}' 저장됨`)}catch(m){i(((h=m==null?void 0:m.response)==null?void 0:h.status)===403?"변경은 Manager+ 권한이 필요합니다.":"저장 실패")}};if(!e)return s.jsx("div",{className:"text-slate-400 text-sm",children:a||"불러오는 중…"});const u=({k:f,label:d,desc:h,on:m})=>s.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 border-b border-edge last:border-0",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[d,Uye.has(f)&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30",children:"무거움"})]}),s.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:h})]}),s.jsx("button",{disabled:!l,onClick:()=>c(f,!m),className:`shrink-0 w-11 h-6 rounded-full transition-colors relative disabled:opacity-40 ${m?"bg-brand":"bg-slate-600"}`,title:m?"ON":"OFF",children:s.jsx("span",{className:`absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all ${m?"left-5":"left-0.5"}`})})]});return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Vr,{className:"text-brand",size:20})," AI 기법 설정"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"중앙 guardia-rag 최신 기법 적용(검색 모드·리랭크·GraphRAG·에이전틱·구조화·스트리밍). 솔루션별 격리 저장."})]}),s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border ${e.ragAvailable?"text-brand border-brand/30 bg-brand/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.ragAvailable?"bg-brand":"bg-slate-500"}`}),"중앙 RAG ",e.ragAvailable?"연결됨":"미가용 (로컬 폴백)"]})]}),n&&s.jsx("div",{className:"bg-brand/10 border border-brand/30 text-brand text-sm rounded-lg px-4 py-2.5 mb-4",children:n}),a&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:a}),!l&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:"조회 전용입니다. 기법 변경은 Manager+ 권한이 필요합니다."}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[s.jsxs(xe,{title:"마스터 / 검색 모드",icon:s.jsx(Vo,{size:15}),children:[s.jsx(u,{k:"rag.enabled",label:"중앙 RAG 경유",desc:"off 시 MES 결정론 로컬 폴백으로 즉시 회귀(기존 동작).",on:e.ragEnabled}),s.jsxs("div",{className:"py-2.5 border-b border-edge",children:[s.jsx("div",{className:"text-sm font-medium mb-1.5",children:"검색 모드 (retrieval_mode)"}),s.jsx("div",{className:"flex gap-2",children:["vector","hybrid","graph"].map(f=>s.jsx("button",{disabled:!l,onClick:()=>c("rag.retrieval_mode",f),className:`px-3 py-1.5 text-xs rounded-lg border disabled:opacity-40 ${e.retrievalMode===f?"bg-brand text-ink border-brand":"bg-card border-edge text-slate-300 hover:border-brand"}`,children:f},f))}),s.jsx("div",{className:"text-xs text-slate-400 mt-1.5",children:"graphrag/hybrid 토글이 켜지면 그 모드가 우선 적용됩니다."})]}),s.jsx(u,{k:"rag.hybrid",label:"하이브리드 검색",desc:"BM25 키워드 + 벡터 앙상블. 검색 정확도↑(중간 비용).",on:e.hybrid}),s.jsx(u,{k:"rag.rerank",label:"리랭킹 (rerank)",desc:"cross-encoder/LLM 재정렬. 상위 정밀도↑(추가 추론 비용).",on:e.rerank}),s.jsx(u,{k:"rag.graphrag",label:"GraphRAG",desc:"지식그래프 기반 검색. 다중 홉 질의에 유리(고비용).",on:e.graphrag})]}),s.jsxs(xe,{title:"에이전틱 / 출력",icon:s.jsx(qL,{size:15}),children:[s.jsx(u,{k:"rag.tool_use",label:"에이전틱 tool-use (/agent)",desc:"조회 매퍼를 도구로 멀티스텝 추론. 불량 RCA·예측 해석에 활용(고비용).",on:e.toolUse}),s.jsx(u,{k:"rag.structured",label:"구조화 출력 (/structured)",desc:"JSON 스키마 강제 — 결정론적 결과 객체(경량, 기본 ON 권장).",on:e.structured}),s.jsx(u,{k:"rag.stream",label:"토큰 스트리밍 (SSE)",desc:"긴 답변 점진 표시. 동시성 위협 시 off 유지(고비용).",on:e.stream}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3",children:[s.jsx(Lv,{label:"top_k (1~20)",value:e.topK,min:1,max:20,disabled:!l,onSave:f=>c("rag.top_k",f)}),s.jsx(Lv,{label:"max_steps (1~8)",value:e.maxSteps,min:1,max:8,disabled:!l,onSave:f=>c("rag.max_steps",f)}),s.jsx(Lv,{label:"temperature (0~1)",value:e.temperature,min:0,max:1,step:.1,disabled:!l,onSave:f=>c("rag.temperature",f)}),s.jsx(Hye,{label:"생성 모델",value:e.generationModel,disabled:!l,onSave:f=>c("rag.generation_model",f)})]})]})]}),s.jsx("div",{className:"mt-4 text-xs text-slate-500",children:"보안 불변: 외부 API 0 (중앙·로컬 모두 Ollama 온프레미스). 무거운 기법은 서버 RAM 제약상 기본 off — 미가용 시 결정론 폴백(degraded:true)."})]})}function Lv({label:e,value:t,min:n,max:r,step:a=1,disabled:i,onSave:l}){const[o,c]=S.useState(String(t));return S.useEffect(()=>{c(String(t))},[t]),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400",children:e}),s.jsxs("div",{className:"flex gap-1.5 mt-1",children:[s.jsx("input",{type:"number",min:n,max:r,step:a,value:o,disabled:i,onChange:u=>c(u.target.value),className:"w-full bg-ink border border-edge rounded px-2 py-1 text-sm disabled:opacity-50"}),s.jsx(Y,{size:"sm",disabled:i,onClick:()=>l(Number(o)),children:s.jsx(cm,{size:12})})]})]})}function Hye({label:e,value:t,disabled:n,onSave:r}){const[a,i]=S.useState(t);return S.useEffect(()=>{i(t)},[t]),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400",children:e}),s.jsxs("div",{className:"flex gap-1.5 mt-1",children:[s.jsx("input",{value:a,disabled:n,onChange:l=>i(l.target.value),className:"w-full bg-ink border border-edge rounded px-2 py-1 text-sm disabled:opacity-50"}),s.jsx(Y,{size:"sm",disabled:n,onClick:()=>r(a),children:s.jsx(cm,{size:12})})]})]})}const Fye=()=>R.get("/api/admin/ai-config").then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Gye=e=>R.put("/api/admin/ai-config",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Kye=()=>R.post("/api/admin/ai-config/test",{}).then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Yye=[{id:"ollama",label:"Ollama (기본)",hint:"온프레미스 · llama3.2:1b"},{id:"qwen3",label:"Qwen3",hint:"온프레미스 · qwen3:1.7b"},{id:"deepseek",label:"DeepSeek",hint:"온프레미스 · deepseek-r1:1.5b"},{id:"glm",label:"GLM",hint:"온프레미스 · glm4:9b",ram:!0},{id:"claude",label:"Claude (외부)",hint:"api.anthropic.com · 키 필요"}],v$=["claude-sonnet-4-6","claude-haiku-4-5","claude-opus-4-8"],Qd="claude-sonnet-4-6",zv=e=>v$.includes(e)?e:Qd;function Iv(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (AI 설정은 관리자 전용).":t.includes("ERR-AI-400")?t.replace(/^ERR-AI-400:\s*/,""):"AI 설정을 처리하지 못했습니다."}function Vye(){const[e,t]=S.useState("ollama"),[n,r]=S.useState(Qd),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState(!0),[f,d]=S.useState(!1),[h,m]=S.useState(!1),[j,v]=S.useState(!1),[p,y]=S.useState(""),[g,b]=S.useState(!1),[x,N]=S.useState(null),w=()=>{d(!0),Fye().then(C=>{t(C.provider),r(zv(C.claudeModel??Qd)),i(!!C.claudeKeySet),o(C.ollamaTextModel??""),u(!!C.aiEnabled),y("")}).catch(C=>y(Iv(C))).finally(()=>d(!1))};S.useEffect(()=>{w()},[]);const O=()=>{v(!1),N(null)},A=async()=>{m(!0),v(!1);try{const C=await Gye({provider:e,claudeModel:n});t(C.provider),r(zv(C.claudeModel??Qd)),i(!!C.claudeKeySet),o(C.ollamaTextModel??""),u(!!C.aiEnabled),v(!0),y("")}catch(C){y(Iv(C))}finally{m(!1)}},E=async()=>{b(!0),N(null);try{N(await Kye())}catch(C){N({ok:!1,degraded:!1,message:Iv(C)})}finally{b(!1)}},M=e==="claude",$=e==="glm",k=M&&!a,I=!M&&!c,_=x?x.degraded?"text-amber-300":x.ok?"text-emerald-300":"text-rose-300":"";return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Vr,{size:20,className:"text-brand"})," AI 플랫폼 설정"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"불량 원인분석·자연어 조회 등 텍스트 생성에 사용할 LLM 제공자와 모델을 선택합니다."})]}),s.jsx("button",{onClick:w,disabled:f,className:"px-3 py-1.5 rounded-lg bg-card border border-edge text-sm disabled:opacity-40",children:"새로고침"})]}),p&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:p}),(k||I)&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:k?"Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 ANTHROPIC_API_KEY 설정 후 사용하세요.":"AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다."}),$&&s.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-start gap-2",children:[s.jsx(Er,{size:16,className:"mt-0.5 shrink-0"}),s.jsx("span",{children:"GLM(glm4:9b)은 약 5.5GB 로드가 필요해 현재 서버 RAM(≈2.1GB)에서는 콜드로드가 실패할 수 있습니다. 선택은 허용되지만 실패 시 자동으로 폴백(degraded)됩니다. RAM 증설 후 사용을 권장합니다."})]}),s.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("h2",{className:"text-sm font-semibold mb-4 flex items-center gap-2",children:[s.jsx(Vr,{size:16,className:"text-brand"})," 제공자 & 모델"]}),s.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:Yye.map(C=>s.jsxs("button",{onClick:()=>{t(C.id),O()},className:`text-left px-3 py-2.5 rounded-lg border text-sm transition-colors ${e===C.id?"bg-brand/15 border-brand text-brand":"bg-ink border-edge text-slate-300 hover:border-brand/50"}`,children:[s.jsxs("div",{className:"font-semibold flex items-center gap-1.5",children:[C.label,C.ram&&s.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30",children:"RAM"})]}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:C.hint})]},C.id))}),!M&&s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Ollama 텍스트 모델"}),s.jsx("div",{className:"px-3 py-2 rounded-lg bg-ink border border-edge text-sm font-mono",children:l||"llama3.2:1b"}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"온프레미스 모델 — provider 별 고정. 외부 호출 없음."})]}),M&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Claude 모델"}),s.jsx("select",{value:n,onChange:C=>{r(zv(C.target.value)),O()},className:"w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",children:v$.map(C=>s.jsx("option",{value:C,children:C},C))})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-xs text-slate-500 mb-1 flex items-center gap-1",children:[s.jsx(F0,{size:13})," API 키"]}),s.jsx("span",{className:`inline-block px-3 py-1 rounded-lg text-xs font-semibold ${a?"bg-emerald-500/15 text-emerald-300 border border-emerald-500/40":"bg-rose-500/15 text-rose-300 border border-rose-500/40"}`,children:a?"설정됨":"미설정"}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-1.5",children:"키는 서버 환경변수(ANTHROPIC_API_KEY)로만 주입되며 화면·응답·로그에 노출되지 않습니다."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("button",{onClick:A,disabled:h||f,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-40",children:[s.jsx(cm,{size:15})," ",h?"저장 중…":"저장"]}),j&&s.jsx("span",{className:"text-emerald-300 text-xs",children:"저장됨"})]})]}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("h2",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[s.jsx(ZL,{size:16,className:"text-brand"})," 연결 테스트"]}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"저장된 설정 기준으로 선택한 제공자에 짧은 ping 을 보내 연결을 확인합니다(요약 결과만)."}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:E,disabled:g,className:"px-4 py-2 rounded-lg bg-card border border-edge text-sm disabled:opacity-40 hover:border-brand/50",children:g?"테스트 중…":"테스트 실행"}),x&&s.jsx("span",{className:`text-sm ${_}`,role:"status","aria-live":"polite",children:x.message})]}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"먼저 변경 사항을 저장한 뒤 테스트하세요. Claude 실패 시 Ollama 로 자동 폴백합니다."})]})]})]})}function PA(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (SuperAdmin 전용).":/409|exist|이미/i.test(t)?"이미 존재하는 사용자명입니다.":/last|마지막|423/i.test(t)?"마지막 SuperAdmin은 강등/삭제/비활성화할 수 없습니다.":/404|not found/i.test(t)?"대상 사용자를 찾을 수 없습니다.":"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function Wye(){const[e,t]=S.useState([]),[n,r]=S.useState({username:"",password:"",displayName:"",role:"WORKER"}),[a,i]=S.useState(!1),[l,o]=S.useState(""),c=()=>BB().then(p=>{var y;t(((y=p.data)==null?void 0:y.data)||[]),o("")}).catch(p=>o(PA(p)));S.useEffect(()=>{c()},[]);const u=async p=>{try{await p(),o(""),await c()}catch(y){o(PA(y))}},f=async()=>{if(!n.username||!n.password){o("사용자명과 비밀번호를 입력하세요.");return}await u(async()=>{await UB(n),r({username:"",password:"",displayName:"",role:"WORKER"}),i(!1)})},d=(p,y)=>u(()=>qB(p.id,y)),h=p=>u(()=>HB(p.id,!p.active)),m=p=>{const y=window.prompt(`'${p.username}' 의 새 비밀번호`);y&&u(()=>FB(p.id,y))},j=p=>{window.confirm(`'${p.username}' 삭제?`)&&u(()=>GB(p.id))},v=p=>{window.confirm(`'${p.username}' 사용자의 OTP를 초기화하시겠습니까?
초기화하면 다음 로그인 시 재등록해야 합니다.`)&&u(()=>KB(p.id))};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Vo,{className:"text-brand",size:20})," 사용자 / 권한"]}),s.jsxs("button",{onClick:()=>i(!a),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[s.jsx(ot,{size:16})," 새 사용자"]})]}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),a&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-6 grid grid-cols-5 gap-3",children:[s.jsx("input",{placeholder:"사용자명",value:n.username,onChange:p=>r({...n,username:p.target.value}),className:"inp"}),s.jsx("input",{placeholder:"표시 이름",value:n.displayName,onChange:p=>r({...n,displayName:p.target.value}),className:"inp"}),s.jsx("input",{placeholder:"비밀번호",type:"password",value:n.password,onChange:p=>r({...n,password:p.target.value}),className:"inp"}),s.jsx("select",{value:n.role,onChange:p=>r({...n,role:p.target.value}),className:"inp",children:lw.map(p=>s.jsx("option",{value:p,children:p},p))}),s.jsx("button",{onClick:f,className:"px-4 rounded-lg bg-brand text-ink text-sm font-semibold",children:"저장"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"ID"}),s.jsx("th",{className:"text-left",children:"사용자명"}),s.jsx("th",{className:"text-left",children:"표시 이름"}),s.jsx("th",{className:"text-left",children:"역할"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-left",children:"생성일"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 text-slate-500",children:p.id}),s.jsx("td",{className:"font-medium",children:p.username}),s.jsx("td",{className:"text-slate-400",children:p.displayName||"-"}),s.jsx("td",{children:s.jsx("select",{value:p.role,onChange:y=>d(p,y.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:lw.map(y=>s.jsx("option",{value:y,children:y},y))})}),s.jsx("td",{children:s.jsx("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium ${p.active?"bg-accent/15 text-accent":"bg-slate-500/15 text-slate-400"}`,children:p.active?"활성":"비활성"})}),s.jsx("td",{className:"text-slate-500 text-xs",children:p.createdAt?new Date(p.createdAt).toLocaleString("ko-KR"):"-"}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-3",children:[s.jsx("button",{onClick:()=>h(p),title:p.active?"비활성화":"활성화",className:"text-slate-400 hover:text-brand",children:s.jsx(zT,{size:16})}),s.jsx("button",{onClick:()=>m(p),title:"비밀번호 재설정",className:"text-slate-400 hover:text-brand",children:s.jsx(F0,{size:16})}),s.jsx("button",{onClick:()=>v(p),title:"OTP 초기화",className:"text-slate-400 hover:text-brand",children:s.jsx(K0,{size:16})}),s.jsx("button",{onClick:()=>j(p),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:16})})]})})]},p.id)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"py-6 text-center text-slate-500",children:"사용자가 없습니다."})})]})]})})]})}function Xye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),c=()=>YB(n,a,200).then(u=>{var f;t(((f=u.data)==null?void 0:f.data)||[]),o("")}).catch(u=>{var f;return o(((f=u==null?void 0:u.response)==null?void 0:f.status)===403?"권한이 없습니다 (Manager+).":"감사 로그를 불러오지 못했습니다.")});return S.useEffect(()=>{c()},[]),s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(UT,{className:"text-brand",size:20})," 감사 로그"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("input",{placeholder:"action 필터",value:n,onChange:u=>r(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),s.jsx("input",{placeholder:"actor 필터",value:a,onChange:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),s.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm hover:border-brand",children:[s.jsx(Yo,{size:15})," 검색"]})]}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"시각"}),s.jsx("th",{className:"text-left",children:"행위자"}),s.jsx("th",{className:"text-left",children:"액션"}),s.jsx("th",{className:"text-left",children:"대상"}),s.jsx("th",{className:"text-left",children:"상세"})]})}),s.jsxs("tbody",{children:[e.map(u=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 text-slate-500 text-xs whitespace-nowrap",children:u.createdAt?new Date(u.createdAt).toLocaleString("ko-KR"):"-"}),s.jsx("td",{className:"text-slate-300",children:u.actor}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:u.action})}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:u.target||"-"}),s.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[360px]",children:u.detail||"-"})]},u.id)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"py-6 text-center text-slate-500",children:"감사 로그가 없습니다."})})]})]})})]})}function Qye(){const[e,t]=S.useState([]),[n,r]=S.useState({}),[a,i]=S.useState(""),[l,o]=S.useState(""),c=i6(),u=()=>VB().then(d=>{var j;const h=((j=d.data)==null?void 0:j.data)||[],m=Array.isArray(h)?h:Object.entries(h).map(([v,p])=>({key:v,value:String(p)}));t(m),o("")}).catch(d=>{var h;return o(((h=d==null?void 0:d.response)==null?void 0:h.status)===403?"권한이 없습니다 (Manager+).":"시스템 설정을 불러오지 못했습니다.")});S.useEffect(()=>{u()},[]);const f=async d=>{var h;i(""),o("");try{await WB(d,n[d]??""),i(`'${d}' 저장됨`),u()}catch(m){o(((h=m==null?void 0:m.response)==null?void 0:h.status)===403?"SuperAdmin 권한이 필요합니다.":"저장 실패")}};return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(qT,{className:"text-brand",size:20})," 시스템 설정"]})}),a&&s.jsx("div",{className:"bg-brand/10 border border-brand/30 text-brand text-sm rounded-lg px-4 py-2.5 mb-4",children:a}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),!c&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:"조회 전용입니다. 설정 변경은 SuperAdmin 권한이 필요합니다."}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"키"}),s.jsx("th",{className:"text-left",children:"값"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(d=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-mono text-xs text-brand align-top",children:[d.key,d.description&&s.jsx("div",{className:"text-[11px] text-slate-500 font-sans mt-0.5",children:d.description})]}),s.jsx("td",{className:"py-3",children:s.jsx("input",{className:"inp",defaultValue:d.value,disabled:!c,onChange:h=>r({...n,[d.key]:h.target.value})})}),s.jsx("td",{className:"px-4 text-right align-top",children:c&&s.jsxs("button",{onClick:()=>f(d.key),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-brand text-ink text-xs font-semibold",children:[s.jsx(cm,{size:13})," 저장"]})})]},d.key)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:3,className:"py-6 text-center text-slate-500",children:"설정 항목이 없습니다."})})]})]})})]})}const Zye="https://itsm.zioinfo.co.kr";function Jye(){const[e,t]=S.useState(null),[n,r]=S.useState(!0),[a,i]=S.useState(""),[l,o]=S.useState(!1),c=()=>{r(!0),i(""),fetch(`${Zye}/api/app/public-latest`).then(f=>f.json()).then(f=>t(f)).catch(()=>i("버전 정보를 불러올 수 없습니다. (중앙 앱 저장소 연결 실패)")).finally(()=>r(!1))};S.useEffect(()=>{c()},[]);const u=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Fg,{className:"text-brand",size:22}),s.jsx("h1",{className:"text-xl font-bold",children:"GUARDiA 통합 메신저 앱 설치"})]}),s.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[s.jsx(K0,{size:15})," 새로고침"]})]}),s.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["QR 코드를 스캔하면 ",s.jsx("span",{className:"text-brand font-semibold",children:"GUARDiA Messenger"})," 앱 설치 페이지로 이동합니다. 앱스토어 설치가 필요 없으며, 앱 업로드·버전 관리는 GUARDiA Manager에서 일원화되어 있습니다."]}),n&&s.jsx("div",{className:"text-slate-400 text-sm",children:"불러오는 중…"}),a&&s.jsx("div",{className:"bg-card border border-edge rounded-xl p-6 text-rose-400 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-8 text-center text-slate-400",children:[s.jsx(Fg,{size:36,className:"mx-auto mb-3 text-slate-600"}),"아직 등록된 앱 버전이 없습니다.",s.jsx("br",{}),s.jsx("span",{className:"text-xs",children:"GUARDiA Manager에서 APK를 업로드하면 여기에 QR이 표시됩니다."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start",children:[s.jsx("div",{className:"bg-white rounded-xl p-3 flex items-center justify-center",children:s.jsx("img",{src:e.qr_url,alt:"앱 설치 QR",className:"w-44 h-44"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Messenger"}),s.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-brand2 text-white text-xs font-semibold",children:["v",e.version]})]}),s.jsxs("div",{className:"text-xs text-slate-400 mb-4",children:[e.platform," · ",e.file_size_mb?`${e.file_size_mb}MB`:"",e.download_count!=null&&` · 다운로드 ${e.download_count}회`]}),e.release_notes&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-slate-500 uppercase tracking-wider mb-1",children:"변경점"}),s.jsx("div",{className:"text-sm text-slate-300 whitespace-pre-line bg-ink border border-edge rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[s.jsx(BL,{size:15})," 설치 페이지 열기"]}),s.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[s.jsx(IL,{size:15})," APK 직접 다운로드"]}),s.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[l?s.jsx(AT,{size:15,className:"text-accent"}):s.jsx(zL,{size:15}),l?"복사됨":"다운로드 링크 복사"]})]}),s.jsx("div",{className:"mt-4 text-[12px] text-slate-500 leading-relaxed",children:'📱 Android: APK 다운로드 후 설정 → 보안 → "알 수 없는 소스" 허용 → 설치. 앱스토어 등록이 필요 없습니다.'})]})]})]})}const oj={background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,boxShadow:"var(--uiws-shadow)"};function ta({title:e,subtitle:t,actions:n}){return s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:20},children:[s.jsxs("div",{children:[s.jsx("h1",{style:{fontSize:22,fontWeight:700,color:"var(--uiws-text)"},children:e}),t&&s.jsx("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginTop:4},children:t})]}),s.jsx("div",{style:{display:"flex",gap:8},children:n})]})}function nf({children:e,style:t}){return s.jsx("div",{style:{...oj,padding:18,...t},children:e})}function le({children:e,onClick:t,variant:n="primary",type:r="button",disabled:a}){const i={primary:{background:"var(--uiws-primary)",color:"var(--uiws-primary-contrast)",border:"none"},ghost:{background:"transparent",color:"var(--uiws-text-muted)",border:"1px solid var(--uiws-border)"},danger:{background:"var(--uiws-danger)",color:"#fff",border:"none"}};return s.jsx("button",{type:r,onClick:t,disabled:a,style:{padding:"9px 16px",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,...i[n]},children:e})}function Ne({value:e,onChange:t,placeholder:n,type:r="text",style:a}){return s.jsx("input",{type:r,value:e,placeholder:n,onChange:i=>t(i.target.value),style:{padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)",...a}})}function Ee({label:e,children:t}){return s.jsxs("label",{style:{display:"block",marginBottom:12},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:e}),t]})}function Ui({children:e}){return s.jsx(nf,{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:16},children:e})}function Ks({columns:e,rows:t,rowKey:n,onRowClick:r,empty:a="데이터가 없습니다."}){return s.jsx("div",{style:{...oj,overflow:"hidden"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:e.map(i=>s.jsx("th",{style:{textAlign:i.align??"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)",width:i.width},children:i.header},i.key))})}),s.jsx("tbody",{children:t.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:a})}):t.map(i=>s.jsx("tr",{onClick:()=>r==null?void 0:r(i),style:{cursor:r?"pointer":"default",borderBottom:"1px solid var(--uiws-border)"},onMouseEnter:l=>l.currentTarget.style.background="var(--uiws-row-hover)",onMouseLeave:l=>l.currentTarget.style.background="transparent",children:e.map(l=>s.jsx("td",{style:{padding:"11px 14px",textAlign:l.align??"left"},children:l.render?l.render(i):String(i[l.key]??"")},l.key))},n(i)))})]})})}function g$({page:e,totalPages:t,onChange:n}){return t<=1?null:s.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"center",marginTop:16},children:[s.jsx(le,{variant:"ghost",disabled:e<=0,onClick:()=>n(e-1),children:"이전"}),s.jsxs("span",{style:{alignSelf:"center",fontSize:13,color:"var(--uiws-text-muted)"},children:[e+1," / ",t]}),s.jsx(le,{variant:"ghost",disabled:e>=t-1,onClick:()=>n(e+1),children:"다음"})]})}function Ys({yn:e,yes:t="읽음",no:n="안읽음"}){const r=e==="Y";return s.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"2px 9px",borderRadius:999,color:r?"var(--uiws-success)":"var(--uiws-text-muted)",background:r?"rgba(46,204,113,0.12)":"var(--uiws-surface-2)",border:"1px solid var(--uiws-border)"},children:r?t:n})}function Pr({title:e,onClose:t,children:n,footer:r}){return s.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:s.jsxs("div",{onClick:a=>a.stopPropagation(),style:{...oj,width:"min(560px, 92vw)",maxHeight:"88vh",overflow:"auto",padding:22},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{style:{fontSize:17,fontWeight:700,color:"var(--uiws-text)"},children:e}),s.jsx("button",{onClick:t,style:{background:"none",border:"none",color:"var(--uiws-text-muted)",fontSize:20,cursor:"pointer"},children:"×"})]}),s.jsx("div",{children:n}),r&&s.jsx("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:18},children:r})]})})}function cr({label:e="불러오는 중..."}){return s.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)",fontSize:13},children:e})}const $A={ONGOING:"진행중",DONE:"종료"};function eve(){const[e,t]=S.useState([]),[n,r]=S.useState(0),[a,i]=S.useState(0),[l,o]=S.useState([]),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(!1),[j,v]=S.useState(!1),[p,y]=S.useState(null),g=async()=>{m(!0);try{const w=(await dU({page:n,size:20,progressCd:c||void 0})).data.data;t(w.content??[]),i(w.totalPages??0);const O=await hU({});o(O.data.data??[])}finally{m(!1)}};S.useEffect(()=>{g()},[n,c]);const b=[{key:"workDate",header:"근무일자",width:120},{key:"title",header:"제목"},{key:"writerNm",header:"작성자",width:120},{key:"progressCd",header:"진행",width:90,render:N=>$A[N.progressCd]??N.progressCd},{key:"commentCount",header:"댓글",width:70,align:"center"}],x=async N=>{const w=await mU(N.worklogId);y(w.data.data)};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"업무일지",subtitle:"UIWS 이식 · 업무일지 작성/조회/진행관리",actions:s.jsx(le,{onClick:()=>v(!0),children:"+ 업무일지 작성"})}),s.jsx("div",{style:{display:"flex",gap:10,marginBottom:16,flexWrap:"wrap"},children:l.map(N=>s.jsxs("div",{onClick:()=>{u(c===N.progressCd?"":N.progressCd),r(0)},style:{cursor:"pointer",padding:"12px 18px",borderRadius:10,minWidth:130,background:"var(--uiws-surface)",border:`1px solid ${c===N.progressCd?"var(--uiws-primary)":"var(--uiws-border)"}`},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)"},children:N.progressNm}),s.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--uiws-primary)"},children:N.count})]},N.progressCd))}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:f,onChange:d,placeholder:"제목 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>{r(0),g()},children:"검색"}),c&&s.jsxs(le,{variant:"ghost",onClick:()=>u(""),children:["필터 해제: ",$A[c]??c]})]}),h?s.jsx(cr,{}):s.jsxs(s.Fragment,{children:[s.jsx(Ks,{columns:b,rows:e,rowKey:N=>N.worklogId,onRowClick:x,empty:"업무일지가 없습니다."}),s.jsx(g$,{page:n,totalPages:a,onChange:r})]}),j&&s.jsx(tve,{onClose:()=>v(!1),onSaved:()=>{v(!1),g()}}),p&&s.jsx(nve,{detail:p,onClose:()=>y(null),onChanged:()=>{y(null),g()}})]})}function tve({onClose:e,onSaved:t}){const[n,r]=S.useState(""),[a,i]=S.useState(localStorage.getItem("mes_user")||"admin"),[l,o]=S.useState(new Date().toISOString().slice(0,10)),[c,u]=S.useState("NORMAL"),[f,d]=S.useState(""),h=async()=>{var m,j;d("");try{await pU({title:n,writerId:a,workDate:l,workStatusCd:c,progressCd:"ONGOING",details:[]}),t()}catch(v){d(((j=(m=v==null?void 0:v.response)==null?void 0:m.data)==null?void 0:j.message)||"저장 실패")}};return s.jsxs(Pr,{title:"업무일지 작성",onClose:e,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:e,children:"취소"}),s.jsx(le,{onClick:h,children:"저장"})]}),children:[s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:n,onChange:r,style:{width:"100%"}})}),s.jsx(Ee,{label:"작성자 ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"근무일자",children:s.jsx(Ne,{type:"date",value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"근무상태 코드",children:s.jsx(Ne,{value:c,onChange:u,style:{width:"100%"}})}),f&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:f})]})}function nve({detail:e,onClose:t,onChanged:n}){var u;const[r,a]=S.useState(""),[i,l]=S.useState(""),o=async()=>{await yU(e.worklogId),n()},c=async()=>{var f,d;l("");try{await vU(e.worklogId,r),a(""),n()}catch(h){l(((d=(f=h==null?void 0:h.response)==null?void 0:f.data)==null?void 0:d.message)||"댓글 등록 실패")}};return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:o,children:"삭제"}),s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:12},children:[e.writerNm," · ",e.workDate," · ",e.progressCd]}),s.jsxs("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:["시간대별 상세 ",((u=e.details)==null?void 0:u.length)??0,"건"]}),s.jsxs("div",{style:{marginTop:14},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:8},children:"댓글"}),(e.comments??[]).map(f=>s.jsxs("div",{style:{padding:"8px 10px",borderRadius:8,background:"var(--uiws-surface-2)",marginBottom:6,fontSize:13},children:[s.jsx("b",{children:f.writerNm})," · ",s.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:f.createdAt}),s.jsx("br",{}),f.cmtContent]},f.cmtId)),s.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[s.jsx(Ne,{value:r,onChange:a,placeholder:"댓글 입력(관리자/매니저)",style:{flex:1}}),s.jsx(le,{onClick:c,children:"등록"})]}),i&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:12,marginTop:6},children:i})]})]})}const rve=["일","월","화","수","목","금","토"];function ave(){const[e,t]=S.useState(new Date),[n,r]=S.useState("PERSONAL"),[a,i]=S.useState([]),[l,o]=S.useState(!1),[c,u]=S.useState(null),[f,d]=S.useState(null),h=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`,m=async()=>{o(!0);try{const x=await oU({type:n,view:"month",baseDate:`${h}-01`});i(x.data.data??[])}finally{o(!1)}};S.useEffect(()=>{m()},[h,n]);const v=new Date(e.getFullYear(),e.getMonth(),1).getDay(),p=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),y=[...Array(v).fill(null),...Array.from({length:p},(x,N)=>N+1)],g=x=>{const N=`${h}-${String(x).padStart(2,"0")}`;return a.filter(w=>(w.startDt??"").slice(0,10)<=N&&N<=(w.endDt??"").slice(0,10))},b=x=>t(new Date(e.getFullYear(),e.getMonth()+x,1));return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"일정",subtitle:"UIWS 이식 · 개인/부서 일정 달력",actions:s.jsx(le,{onClick:()=>u(`${h}-01`),children:"+ 일정 등록"})}),s.jsxs(nf,{style:{display:"flex",gap:10,alignItems:"center",marginBottom:16},children:[s.jsx(le,{variant:"ghost",onClick:()=>b(-1),children:"‹ 이전"}),s.jsx("div",{style:{fontWeight:700,minWidth:130,textAlign:"center",color:"var(--uiws-text)"},children:h}),s.jsx(le,{variant:"ghost",onClick:()=>b(1),children:"다음 ›"}),s.jsx("div",{style:{flex:1}}),s.jsx(le,{variant:n==="PERSONAL"?"primary":"ghost",onClick:()=>r("PERSONAL"),children:"개인"}),s.jsx(le,{variant:n==="DEPT"?"primary":"ghost",onClick:()=>r("DEPT"),children:"부서"})]}),l?s.jsx(cr,{}):s.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"hidden"},children:s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(7,1fr)"},children:[rve.map((x,N)=>s.jsx("div",{style:{padding:"10px 0",textAlign:"center",fontSize:12,fontWeight:600,color:N===0?"var(--uiws-danger)":"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:x},x)),y.map((x,N)=>s.jsxs("div",{onClick:()=>x&&u(`${h}-${String(x).padStart(2,"0")}`),style:{minHeight:96,padding:6,borderRight:"1px solid var(--uiws-border)",borderBottom:"1px solid var(--uiws-border)",cursor:x?"pointer":"default"},children:[x&&s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:4},children:x}),x&&g(x).slice(0,3).map(w=>s.jsx("div",{onClick:O=>{O.stopPropagation(),uU(w.scheduleId).then(A=>d(A.data.data))},style:{fontSize:11,padding:"2px 6px",borderRadius:6,marginBottom:3,background:"var(--uiws-primary-soft)",color:"var(--uiws-primary)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:w.title},w.scheduleId))]},N))]})}),c&&s.jsx(ive,{date:c,type:n,onClose:()=>u(null),onSaved:()=>{u(null),m()}}),f&&s.jsx(sve,{detail:f,onClose:()=>d(null),onDeleted:()=>{d(null),m()}})]})}function ive({date:e,type:t,onClose:n,onSaved:r}){const[a,i]=S.useState(""),[l,o]=S.useState(`${e}T09:00:00`),[c,u]=S.useState(`${e}T18:00:00`),[f,d]=S.useState(""),[h,m]=S.useState(""),j=async()=>{var v,p;m("");try{await cU({scheType:t,title:a,startDt:l,endDt:c,content:f,attachmentIds:[]}),r()}catch(y){m(((p=(v=y==null?void 0:y.response)==null?void 0:v.data)==null?void 0:p.message)||"저장 실패")}};return s.jsxs(Pr,{title:"일정 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"시작(yyyy-MM-ddTHH:mm:ss)",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"종료",children:s.jsx(Ne,{value:c,onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"내용",children:s.jsx(Ne,{value:f,onChange:d,style:{width:"100%"}})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function sve({detail:e,onClose:t,onDeleted:n}){const r=async()=>{await fU(e.scheduleId),n()};return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:r,children:"삭제"}),s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:8},children:[e.scheType," · ",e.startDt," ~ ",e.endDt]}),s.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)"},children:e.content||"내용 없음"})]})}function lve(){const[e,t]=S.useState("received"),[n,r]=S.useState([]),[a,i]=S.useState(0),[l,o]=S.useState(0),[c,u]=S.useState(""),[f,d]=S.useState(!1),[h,m]=S.useState(!1),[j,v]=S.useState(null),p=async()=>{d(!0);try{const w=(await(e==="received"?sU:aU)({page:a,size:20,titleKeyword:c||void 0})).data.data;r(w.content??[]),o(w.totalPages??0)}finally{d(!1)}};S.useEffect(()=>{p()},[e,a]);const y=[{key:"title",header:"제목"},{key:"senderNm",header:"보낸사람",width:130},{key:"sentAt",header:"받은시각",width:170},{key:"readYn",header:"상태",width:90,render:x=>s.jsx(Ys,{yn:x.readYn})}],g=[{key:"title",header:"제목"},{key:"receiverSummary",header:"받는사람",width:160},{key:"open",header:"개봉",width:100,align:"center",render:x=>`${x.openCount}/${x.totalCount}`},{key:"sentAt",header:"보낸시각",width:170}],b=async x=>{const N=e==="received"?await lU(x.messageId):await iU(x.messageId);v({...N.data.data,_tab:e}),e==="received"&&p()};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"쪽지",subtitle:"UIWS 이식 · 사내 쪽지 송수신",actions:s.jsx(le,{onClick:()=>m(!0),children:"+ 쪽지 보내기"})}),s.jsxs(Ui,{children:[s.jsx(le,{variant:e==="received"?"primary":"ghost",onClick:()=>{t("received"),i(0)},children:"받은쪽지함"}),s.jsx(le,{variant:e==="sent"?"primary":"ghost",onClick:()=>{t("sent"),i(0)},children:"보낸쪽지함"}),s.jsx("div",{style:{flex:1}}),s.jsx(Ne,{value:c,onChange:u,placeholder:"제목 검색",style:{minWidth:200}}),s.jsx(le,{variant:"ghost",onClick:()=>{i(0),p()},children:"검색"})]}),f?s.jsx(cr,{}):s.jsxs(s.Fragment,{children:[s.jsx(Ks,{columns:e==="received"?y:g,rows:n,rowKey:x=>x.messageId,onRowClick:b,empty:"쪽지가 없습니다."}),s.jsx(g$,{page:a,totalPages:l,onChange:i})]}),h&&s.jsx(ove,{onClose:()=>m(!1),onSent:()=>{m(!1),p()}}),j&&s.jsx(cve,{detail:j,onClose:()=>v(null)})]})}function ove({onClose:e,onSent:t}){const[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),f=async()=>{var d,h;u("");try{await rU({title:a,content:l,receivers:[{receiverId:n,rcvType:"RECV"}]}),t()}catch(m){u(((h=(d=m==null?void 0:m.response)==null?void 0:d.data)==null?void 0:h.message)||"전송 실패")}};return s.jsxs(Pr,{title:"쪽지 보내기",onClose:e,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:e,children:"취소"}),s.jsx(le,{onClick:f,children:"보내기"})]}),children:[s.jsx(Ee,{label:"받는사람 ID",children:s.jsx(Ne,{value:n,onChange:r,style:{width:"100%"}})}),s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"내용",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),c&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:c})]})}function cve({detail:e,onClose:t}){return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:10},children:[e._tab==="received"?`보낸사람: ${e.senderNm}`:`개봉 ${e.openCount}/${e.totalCount}`," · ",e.sentAt]}),s.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)",whiteSpace:"pre-wrap"},children:e.content}),e._tab==="sent"&&e.receivers&&s.jsxs("div",{style:{marginTop:14},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:"수신자 개봉현황"}),e.receivers.map((n,r)=>s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:13,padding:"4px 0"},children:[s.jsxs("span",{children:[n.receiverNm," (",n.rcvType,")"]}),s.jsx(Ys,{yn:n.readYn})]},r))]})]})}function uve(){const[e,t]=S.useState("personal"),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=new Date().toISOString().slice(0,10),o=new Date(Date.now()-6*864e5).toISOString().slice(0,10),[c,u]=S.useState(o),[f,d]=S.useState(l),h=async()=>{i(!0);try{const v=await(e==="personal"?gU:xU)({fromDate:c,toDate:f});r(v.data.data)}finally{i(!1)}};S.useEffect(()=>{h()},[e]);const m=n?[...n.fixedColumns,...n.dynamicColumns]:[];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"업무통계",subtitle:"UIWS 이식 · 근무현황 동적 피벗"}),s.jsxs(Ui,{children:[s.jsx(le,{variant:e==="personal"?"primary":"ghost",onClick:()=>t("personal"),children:"개인별 근무현황"}),s.jsx(le,{variant:e==="company"?"primary":"ghost",onClick:()=>t("company"),children:"업체별 근무현황"}),s.jsx("div",{style:{flex:1}}),s.jsx(Ne,{type:"date",value:c,onChange:u}),s.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:"~"}),s.jsx(Ne,{type:"date",value:f,onChange:d}),s.jsx(le,{variant:"ghost",onClick:h,children:"조회"})]}),a?s.jsx(cr,{}):!n||n.rows.length===0?s.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"집계 데이터가 없습니다."}):s.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"auto"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:m.map(j=>s.jsx("th",{style:{padding:"11px 14px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)",whiteSpace:"nowrap"},children:j.label},j.key))})}),s.jsx("tbody",{children:n.rows.map((j,v)=>s.jsx("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:m.map(p=>s.jsx("td",{style:{padding:"10px 14px"},children:String(j[p.key]??"")},p.key))},v))})]})})]})}function Cb(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 권한ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function fve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState(new Set),[f,d]=S.useState(null),[h,m]=S.useState(!1),j=async(g=n)=>{var b;i(!0),o("");try{const x=await bU(g||void 0);t(((b=x.data.data)==null?void 0:b.content)??[]),u(new Set)}catch(x){o(Cb(x))}finally{i(!1)}};S.useEffect(()=>{j("")},[]);const v=g=>u(b=>{const x=new Set(b);return x.has(g)?x.delete(g):x.add(g),x}),p=async()=>{if(c.size!==0&&window.confirm(`선택한 권한 ${c.size}건을 삭제하시겠습니까?`))try{await wU([...c]),await j()}catch(g){o(Cb(g))}},y=[{key:"sel",header:"",width:44,align:"center",render:g=>s.jsx("input",{type:"checkbox",checked:c.has(g.roleId),onClick:b=>b.stopPropagation(),onChange:()=>v(g.roleId)})},{key:"roleId",header:"권한ID",width:180},{key:"roleNm",header:"권한명"},{key:"roleDesc",header:"설명"},{key:"useYn",header:"사용",width:80,align:"center",render:g=>s.jsx(Ys,{yn:g.useYn,yes:"사용",no:"미사용"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"권한 관리",subtitle:"시스템관리(권한) · 역할(Role) 등록/수정/삭제 — RBAC",actions:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:p,disabled:c.size===0,children:"선택 삭제"}),s.jsx(le,{onClick:()=>{d(null),m(!0)},children:"+ 권한 등록"})]})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"권한ID/권한명 검색",style:{minWidth:240}}),s.jsx(le,{variant:"ghost",onClick:()=>j(),children:"검색"})]}),a?s.jsx(cr,{}):s.jsx(Ks,{columns:y,rows:e,rowKey:g=>g.roleId,onRowClick:g=>{d(g),m(!0)},empty:"등록된 권한이 없습니다."}),h&&s.jsx(dve,{role:f,onClose:()=>m(!1),onSaved:()=>{m(!1),j()}})]})}function dve({role:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.roleId)??""),[l,o]=S.useState((e==null?void 0:e.roleNm)??""),[c,u]=S.useState((e==null?void 0:e.roleDesc)??""),[f,d]=S.useState((e==null?void 0:e.useYn)??"Y"),[h,m]=S.useState(""),j=async()=>{if(m(""),!l.trim()){m("권한명은 필수입니다.");return}if(!r&&!a.trim()){m("권한ID는 필수입니다.");return}try{const v={roleId:a,roleNm:l,roleDesc:c,useYn:f};r?await SU(a,v):await jU(v),n()}catch(v){m(Cb(v))}};return s.jsxs(Pr,{title:r?"권한 수정":"권한 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"권한ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"권한명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"설명",children:s.jsx(Ne,{value:c,onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:f,onChange:v=>d(v.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function Bv(e){var t,n,r;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"요청을 처리하지 못했습니다."}function hve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState(!1),[c,u]=S.useState(!1),[f,d]=S.useState(!1),[h,m]=S.useState(""),[j,v]=S.useState("");S.useEffect(()=>{o(!0),NU().then(b=>{var N;const x=((N=b.data.data)==null?void 0:N.content)??[];t(x),x.length>0&&r(x[0].roleId)}).catch(b=>v(Bv(b))).finally(()=>o(!1))},[]),S.useEffect(()=>{n&&(u(!0),m(""),v(""),OU(n).then(b=>i(b.data.data??[])).catch(b=>v(Bv(b))).finally(()=>u(!1)))},[n]);const p=(b,x)=>i(N=>N.map(w=>{if(w.menuId!==b)return w;const O=w[x]==="Y"?"N":"Y";return x==="writeYn"&&O==="Y"?{...w,writeYn:"Y",readYn:"Y"}:x==="readYn"&&O==="N"?{...w,readYn:"N",writeYn:"N"}:{...w,[x]:O}})),y=(b,x)=>i(N=>N.map(w=>x&&b==="writeYn"?{...w,writeYn:"Y",readYn:"Y"}:!x&&b==="readYn"?{...w,readYn:"N",writeYn:"N"}:{...w,[b]:x?"Y":"N"})),g=async()=>{d(!0),m(""),v("");try{await AU(n,a),m("메뉴 권한 매핑이 저장되었습니다.")}catch(b){v(Bv(b))}finally{d(!1)}};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"역할-메뉴 권한",subtitle:"시스템관리(권한) · 역할별 메뉴 접근(읽기/쓰기) 매핑 — RBAC 핵심",actions:s.jsx(le,{onClick:g,disabled:f||!n,children:f?"저장 중...":"매핑 저장"})}),j&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:j}),h&&s.jsx("div",{style:{color:"var(--uiws-success)",fontSize:13,marginBottom:12},children:h}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:16,alignItems:"start"},children:[s.jsxs(nf,{style:{padding:0},children:[s.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"역할 목록"}),l?s.jsx(cr,{}):s.jsxs("div",{children:[e.length===0&&s.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"역할이 없습니다."}),e.map(b=>s.jsxs("div",{onClick:()=>r(b.roleId),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,borderLeft:`3px solid ${n===b.roleId?"var(--uiws-primary)":"transparent"}`,background:n===b.roleId?"var(--uiws-primary-soft)":"transparent",color:n===b.roleId?"var(--uiws-primary)":"var(--uiws-text)"},children:[s.jsx("div",{style:{fontWeight:600},children:b.roleNm}),s.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:b.roleId})]},b.roleId))]})]}),s.jsx(nf,{style:{padding:0,overflow:"hidden"},children:c?s.jsx(cr,{}):s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[s.jsx("th",{style:{textAlign:"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:"메뉴"}),s.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["읽기",s.jsx("br",{}),s.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[s.jsx("input",{type:"checkbox",onChange:b=>y("readYn",b.target.checked)})," 전체"]})]}),s.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["쓰기",s.jsx("br",{}),s.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[s.jsx("input",{type:"checkbox",onChange:b=>y("writeYn",b.target.checked)})," 전체"]})]})]})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:3,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"매핑 가능한 메뉴가 없습니다."})}):a.map(b=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:[s.jsxs("td",{style:{padding:"11px 14px"},children:[b.menuNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",b.menuId,")"]})]}),s.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:s.jsx("input",{type:"checkbox",checked:b.readYn==="Y",onChange:()=>p(b.menuId,"readYn")})}),s.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:s.jsx("input",{type:"checkbox",checked:b.writeYn==="Y",onChange:()=>p(b.menuId,"writeYn")})})]},b.menuId))})]})})]})]})}function Zd(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 코드입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function pve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(!1),[f,d]=S.useState(!1),[h,m]=S.useState(""),[j,v]=S.useState({open:!1,edit:null}),p=async(x="")=>{var N;u(!0),m("");try{const O=((N=(await CU(x||void 0)).data.data)==null?void 0:N.content)??[];t(O),!n&&O.length>0&&r(O[0].grpCd)}catch(w){m(Zd(w))}finally{u(!1)}};S.useEffect(()=>{p("")},[]);const y=async(x=n)=>{if(!x){i(null);return}d(!0);try{const w=(await EU(x)).data.data;i(w?{...w,values:w.values??[]}:null)}catch(N){m(Zd(N))}finally{d(!1)}};S.useEffect(()=>{y()},[n]);const g=async x=>{if(window.confirm(`코드그룹 '${x}' 와 하위 코드를 삭제하시겠습니까?`))try{await kU(x),n===x&&(r(""),i(null)),await p(l)}catch(N){m(Zd(N))}},b=[{key:"codeVal",header:"코드값",width:170},{key:"codeNm",header:"코드명"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:x=>s.jsx(Ys,{yn:x.useYn,yes:"사용",no:"미사용"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"공통코드 관리",subtitle:"시스템관리(권한) · 코드그룹/코드값 일괄 CRUD",actions:s.jsx(le,{onClick:()=>v({open:!0,edit:null}),children:"+ 코드그룹 등록"})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:h}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:l,onChange:o,placeholder:"코드그룹 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>p(l),children:"검색"})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"300px 1fr",gap:16,alignItems:"start"},children:[s.jsxs(nf,{style:{padding:0},children:[s.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"코드그룹"}),c?s.jsx(cr,{}):s.jsxs("div",{children:[e.length===0&&s.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"코드그룹이 없습니다."}),e.map(x=>s.jsxs("div",{onClick:()=>r(x.grpCd),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,display:"flex",justifyContent:"space-between",alignItems:"center",borderLeft:`3px solid ${n===x.grpCd?"var(--uiws-primary)":"transparent"}`,background:n===x.grpCd?"var(--uiws-primary-soft)":"transparent"},children:[s.jsxs("div",{children:[s.jsx("div",{style:{fontWeight:600,color:n===x.grpCd?"var(--uiws-primary)":"var(--uiws-text)"},children:x.grpNm}),s.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:x.grpCd})]}),s.jsx("div",{style:{display:"flex",gap:6},onClick:N=>N.stopPropagation(),children:s.jsx(le,{variant:"ghost",onClick:()=>g(x.grpCd),children:"삭제"})})]},x.grpCd))]})]}),s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[s.jsxs("div",{style:{fontSize:14,fontWeight:600,color:"var(--uiws-text)"},children:["코드값 ",n&&s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontWeight:400},children:["(",n,")"]})]}),s.jsx(le,{onClick:()=>a&&v({open:!0,edit:a}),disabled:!a,children:"그룹·코드값 편집"})]}),f?s.jsx(cr,{}):s.jsx(Ks,{columns:b,rows:(a==null?void 0:a.values)??[],rowKey:x=>`${n}:${x.codeVal}`,empty:n?"코드값이 없습니다.":"코드그룹을 선택하세요."})]})]}),j.open&&s.jsx(yve,{grp:j.edit,onClose:()=>v({open:!1,edit:null}),onSaved:async x=>{v({open:!1,edit:null}),await p(l),x?(r(x),await y(x)):await y()}})]})}function mve({value:e,onChange:t}){return s.jsxs("select",{value:e,onChange:n=>t(n.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}function yve({grp:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.grpCd)??""),[l,o]=S.useState((e==null?void 0:e.grpNm)??""),[c,u]=S.useState((e==null?void 0:e.useYn)??"Y"),[f,d]=S.useState(e!=null&&e.values?e.values.map(b=>({...b})):[]),[h,m]=S.useState(""),j=()=>d(b=>[...b,{codeVal:"",codeNm:"",sortOrd:b.length+1,useYn:"Y"}]),v=(b,x,N)=>d(w=>w.map((O,A)=>A===b?{...O,[x]:N}:O)),p=b=>d(x=>x.filter((N,w)=>w!==b)),y=async()=>{if(m(""),!r&&!a.trim()){m("그룹코드는 필수입니다.");return}if(!l.trim()){m("그룹명은 필수입니다.");return}for(const b of f)if(!b.codeVal.trim()||!b.codeNm.trim()){m("코드값과 코드명은 필수입니다.");return}try{const b={grpCd:a,grpNm:l,useYn:c,values:f.map(x=>({grpCd:a,codeVal:x.codeVal,codeNm:x.codeNm,sortOrd:Number(x.sortOrd)||0,useYn:x.useYn}))};r?await TU(a,b):await _U(b),n(a)}catch(b){m(Zd(b))}},g={width:"100%",padding:"6px 8px",borderRadius:6,fontSize:12,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return s.jsxs(Pr,{title:r?"코드그룹·코드값 편집":"코드그룹 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:y,children:"저장"})]}),children:[s.jsx(Ee,{label:"그룹코드",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"그룹명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsx(mve,{value:c,onChange:u})}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8,marginBottom:8},children:[s.jsxs("div",{style:{fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)"},children:["코드값 (",f.length,")"]}),s.jsx(le,{variant:"ghost",onClick:j,children:"+ 코드값 추가"})]}),s.jsx("div",{style:{border:"1px solid var(--uiws-border)",borderRadius:8,overflow:"hidden"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[s.jsx("th",{style:{padding:"7px 8px",textAlign:"left",color:"var(--uiws-text-muted)",fontWeight:600},children:"코드값"}),s.jsx("th",{style:{padding:"7px 8px",textAlign:"left",color:"var(--uiws-text-muted)",fontWeight:600},children:"코드명"}),s.jsx("th",{style:{padding:"7px 8px",width:64,color:"var(--uiws-text-muted)",fontWeight:600},children:"정렬"}),s.jsx("th",{style:{padding:"7px 8px",width:76,color:"var(--uiws-text-muted)",fontWeight:600},children:"사용"}),s.jsx("th",{style:{padding:"7px 8px",width:44}})]})}),s.jsx("tbody",{children:f.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:5,style:{padding:16,textAlign:"center",color:"var(--uiws-text-faint)"},children:"코드값이 없습니다."})}):f.map((b,x)=>s.jsxs("tr",{style:{borderTop:"1px solid var(--uiws-border)"},children:[s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{value:b.codeVal,onChange:N=>v(x,"codeVal",N.target.value),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{value:b.codeNm,onChange:N=>v(x,"codeNm",N.target.value),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{type:"number",value:String(b.sortOrd),onChange:N=>v(x,"sortOrd",Number(N.target.value)||0),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsxs("select",{value:b.useYn,onChange:N=>v(x,"useYn",N.target.value),style:g,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),s.jsx("td",{style:{padding:"5px 8px",textAlign:"center"},children:s.jsx("button",{onClick:()=>p(x),style:{background:"none",border:"none",color:"var(--uiws-danger)",cursor:"pointer",fontSize:16},children:"×"})})]},x))})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginTop:10},children:h})]})}function Eb(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 메뉴ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function vve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(j="")=>{var v;i(!0),o("");try{if(j){const p=await PU(j);t(p.data.data??[])}else{const p=await MU();t(((v=p.data.data)==null?void 0:v.content)??[])}}catch(p){o(Eb(p))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=S.useMemo(()=>{const j=e.filter(y=>!y.parentMenuId).sort((y,g)=>(y.sortOrd??0)-(g.sortOrd??0)),v=[];for(const y of j)v.push({menu:y,depth:0}),e.filter(g=>g.parentMenuId===y.menuId).sort((g,b)=>(g.sortOrd??0)-(b.sortOrd??0)).forEach(g=>v.push({menu:g,depth:1}));const p=new Set(v.map(y=>y.menu.menuId));return e.filter(y=>!p.has(y.menuId)).forEach(y=>v.push({menu:y,depth:0})),v.map(y=>({...y.menu,_depth:y.depth}))},[e]),h=async j=>{if(window.confirm(`메뉴 '${j.menuNm}' 를 삭제하시겠습니까?`))try{await DU([j.menuId]),await f(n)}catch(v){o(Eb(v))}},m=[{key:"menuNm",header:"메뉴명",render:j=>s.jsxs("span",{style:{paddingLeft:j._depth*22},children:[j._depth>0&&s.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),j.menuNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",j.menuId,")"]})]})},{key:"menuUrl",header:"URL",width:220,render:j=>j.menuUrl??"-"},{key:"programId",header:"프로그램",width:140,render:j=>j.programId??"-"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:j=>s.jsx(Ys,{yn:j.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:j=>s.jsx(le,{variant:"ghost",onClick:()=>h(j),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"메뉴 관리",subtitle:"시스템관리(권한) · 메뉴 트리(2-depth) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 메뉴 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"메뉴명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(cr,{}):s.jsx(Ks,{columns:m,rows:d,rowKey:j=>j.menuId,onRowClick:j=>u({open:!0,edit:j}),empty:"등록된 메뉴가 없습니다."}),c.open&&s.jsx(gve,{menu:c.edit,parents:e.filter(j=>!j.parentMenuId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function gve({menu:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,l]=S.useState((e==null?void 0:e.menuId)??""),[o,c]=S.useState((e==null?void 0:e.menuNm)??""),[u,f]=S.useState((e==null?void 0:e.parentMenuId)??""),[d,h]=S.useState((e==null?void 0:e.programId)??""),[m,j]=S.useState((e==null?void 0:e.menuUrl)??""),[v,p]=S.useState(String((e==null?void 0:e.sortOrd)??0)),[y,g]=S.useState((e==null?void 0:e.useYn)??"Y"),[b,x]=S.useState(""),N=async()=>{if(x(""),!a&&!i.trim()){x("메뉴ID는 필수입니다.");return}if(!o.trim()){x("메뉴명은 필수입니다.");return}try{const O={menuId:i,menuNm:o,parentMenuId:u||null,programId:d||null,menuUrl:m||null,sortOrd:Number(v)||0,useYn:y};a?await RU(i,O):await $U(O),r()}catch(O){x(Eb(O))}},w={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return s.jsxs(Pr,{title:a?"메뉴 수정":"메뉴 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:N,children:"저장"})]}),children:[s.jsx(Ee,{label:"메뉴ID",children:s.jsx(Ne,{value:i,onChange:l,style:{width:"100%",opacity:a?.6:1}})}),s.jsx(Ee,{label:"메뉴명",children:s.jsx(Ne,{value:o,onChange:c,style:{width:"100%"}})}),s.jsx(Ee,{label:"상위 메뉴",children:s.jsxs("select",{value:u??"",onChange:O=>f(O.target.value),style:w,children:[s.jsx("option",{value:"",children:"(최상위)"}),t.filter(O=>O.menuId!==i).map(O=>s.jsxs("option",{value:O.menuId,children:[O.menuNm," (",O.menuId,")"]},O.menuId))]})}),s.jsx(Ee,{label:"프로그램ID",children:s.jsx(Ne,{value:d??"",onChange:h,style:{width:"100%"}})}),s.jsx(Ee,{label:"메뉴 URL",children:s.jsx(Ne,{value:m??"",onChange:j,style:{width:"100%"}})}),s.jsx(Ee,{label:"정렬순서",children:s.jsx(Ne,{type:"number",value:v,onChange:p,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:y,onChange:O=>g(O.target.value),style:w,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),b&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:b})]})}function _b(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 부서ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function xve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(j="")=>{var v;i(!0),o("");try{const p=await LU(j||void 0);t(((v=p.data.data)==null?void 0:v.content)??[])}catch(p){o(_b(p))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=S.useMemo(()=>{const j=e.filter(y=>!y.parentDeptId).sort((y,g)=>(y.sortOrd??0)-(g.sortOrd??0)),v=[];for(const y of j)v.push({...y,_depth:0}),e.filter(g=>g.parentDeptId===y.deptId).sort((g,b)=>(g.sortOrd??0)-(b.sortOrd??0)).forEach(g=>v.push({...g,_depth:1}));const p=new Set(v.map(y=>y.deptId));return e.filter(y=>!p.has(y.deptId)).forEach(y=>v.push({...y,_depth:0})),v},[e]),h=async j=>{if(window.confirm(`부서 '${j.deptNm}' 를 삭제하시겠습니까?`))try{await BU(j.deptId),await f(n)}catch(v){o(_b(v))}},m=[{key:"deptNm",header:"부서명",render:j=>s.jsxs("span",{style:{paddingLeft:j._depth*22},children:[j._depth>0&&s.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),j.deptNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",j.deptId,")"]})]})},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:j=>s.jsx(Ys,{yn:j.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:j=>s.jsx(le,{variant:"ghost",onClick:()=>h(j),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"부서 관리",subtitle:"시스템관리(권한) · 부서 트리(2-depth) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 부서 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"부서명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(cr,{}):s.jsx(Ks,{columns:m,rows:d,rowKey:j=>j.deptId,onRowClick:j=>u({open:!0,edit:j}),empty:"등록된 부서가 없습니다."}),c.open&&s.jsx(bve,{dept:c.edit,parents:e.filter(j=>!j.parentDeptId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function bve({dept:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,l]=S.useState((e==null?void 0:e.deptId)??""),[o,c]=S.useState((e==null?void 0:e.deptNm)??""),[u,f]=S.useState((e==null?void 0:e.parentDeptId)??""),[d,h]=S.useState(String((e==null?void 0:e.sortOrd)??0)),[m,j]=S.useState((e==null?void 0:e.useYn)??"Y"),[v,p]=S.useState(""),y={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},g=async()=>{if(p(""),!a&&!i.trim()){p("부서ID는 필수입니다.");return}if(!o.trim()){p("부서명은 필수입니다.");return}try{const b={deptId:i,deptNm:o,parentDeptId:u||null,sortOrd:Number(d)||0,useYn:m};a?await IU(i,b):await zU(b),r()}catch(b){p(_b(b))}};return s.jsxs(Pr,{title:a?"부서 수정":"부서 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:g,children:"저장"})]}),children:[s.jsx(Ee,{label:"부서ID",children:s.jsx(Ne,{value:i,onChange:l,style:{width:"100%",opacity:a?.6:1}})}),s.jsx(Ee,{label:"부서명",children:s.jsx(Ne,{value:o,onChange:c,style:{width:"100%"}})}),s.jsx(Ee,{label:"상위 부서",children:s.jsxs("select",{value:u??"",onChange:b=>f(b.target.value),style:y,children:[s.jsx("option",{value:"",children:"(최상위)"}),t.filter(b=>b.deptId!==i).map(b=>s.jsxs("option",{value:b.deptId,children:[b.deptNm," (",b.deptId,")"]},b.deptId))]})}),s.jsx(Ee,{label:"정렬순서",children:s.jsx(Ne,{type:"number",value:d,onChange:h,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:m,onChange:b=>j(b.target.value),style:y,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),v&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:v})]})}function Tb(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 거래처ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function jve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(m="")=>{var j;i(!0),o("");try{const v=await UU(m||void 0);t(((j=v.data.data)==null?void 0:j.content)??[])}catch(v){o(Tb(v))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=async m=>{if(window.confirm(`거래처 '${m.companyNm}' 를 삭제하시겠습니까?`))try{await FU([m.companyId]),await f(n)}catch(j){o(Tb(j))}},h=[{key:"companyId",header:"거래처ID",width:180},{key:"companyNm",header:"거래처명"},{key:"bizNo",header:"사업자번호",width:180,render:m=>m.bizNo??"-"},{key:"useYn",header:"사용",width:80,align:"center",render:m=>s.jsx(Ys,{yn:m.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:m=>s.jsx(le,{variant:"ghost",onClick:()=>d(m),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"거래처 관리",subtitle:"시스템관리(권한) · 거래처(근무처) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 거래처 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"거래처명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(cr,{}):s.jsx(Ks,{columns:h,rows:e,rowKey:m=>m.companyId,onRowClick:m=>u({open:!0,edit:m}),empty:"등록된 거래처가 없습니다."}),c.open&&s.jsx(Sve,{company:c.edit,onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function Sve({company:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.companyId)??""),[l,o]=S.useState((e==null?void 0:e.companyNm)??""),[c,u]=S.useState((e==null?void 0:e.bizNo)??""),[f,d]=S.useState((e==null?void 0:e.useYn)??"Y"),[h,m]=S.useState(""),j=async()=>{if(m(""),!r&&!a.trim()){m("거래처ID는 필수입니다.");return}if(!l.trim()){m("거래처명은 필수입니다.");return}try{const v={companyId:a,companyNm:l,bizNo:c||null,useYn:f};r?await HU(a,v):await qU(v),n()}catch(v){m(Tb(v))}};return s.jsxs(Pr,{title:r?"거래처 수정":"거래처 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"거래처ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"거래처명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"사업자번호",children:s.jsx(Ne,{value:c??"",onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:f,onChange:v=>d(v.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}const wve=new NL;function Nve(){return s.jsx(AL,{client:wve,children:s.jsx(U5,{children:s.jsxs(v5,{children:[s.jsx(fe,{path:"/login",element:s.jsx(GU,{})}),s.jsxs(fe,{element:s.jsx(QB,{}),children:[s.jsx(fe,{path:"/dashboard",element:s.jsx(ome,{})}),s.jsx(fe,{path:"/mypage",element:s.jsx(KU,{})}),s.jsx(fe,{path:"/jobs",element:s.jsx(fme,{})}),s.jsx(fe,{path:"/progress",element:s.jsx(pme,{})}),s.jsx(fe,{path:"/workorders",element:s.jsx(gme,{})}),s.jsx(fe,{path:"/production",element:s.jsx(bme,{})}),s.jsx(fe,{path:"/process-board",element:s.jsx(Sme,{})}),s.jsx(fe,{path:"/oee",element:s.jsx(Cme,{})}),s.jsx(fe,{path:"/tracking",element:s.jsx(Eme,{})}),s.jsx(fe,{path:"/plans",element:s.jsx(Pme,{})}),s.jsx(fe,{path:"/receiving",element:s.jsx(Dme,{})}),s.jsx(fe,{path:"/shipping",element:s.jsx(Ime,{})}),s.jsx(fe,{path:"/inventory",element:s.jsx(Bme,{})}),s.jsx(fe,{path:"/stocktake",element:s.jsx(Hme,{})}),s.jsx(fe,{path:"/lotserial",element:s.jsx(Yme,{})}),s.jsx(fe,{path:"/inspection",element:s.jsx(Qme,{})}),s.jsx(fe,{path:"/spec",element:s.jsx(eye,{})}),s.jsx(fe,{path:"/ncr",element:s.jsx(iye,{})}),s.jsx(fe,{path:"/capa",element:s.jsx(cye,{})}),s.jsx(fe,{path:"/spc",element:s.jsx(fye,{})}),s.jsx(fe,{path:"/certificate",element:s.jsx(pye,{})}),s.jsx(fe,{path:"/items",element:s.jsx(gye,{})}),s.jsx(fe,{path:"/bom",element:s.jsx(jye,{})}),s.jsx(fe,{path:"/routing",element:s.jsx(wye,{})}),s.jsx(fe,{path:"/partners",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(Cye,{})})}),s.jsx(fe,{path:"/warehouses",element:s.jsx(_ye,{})}),s.jsx(fe,{path:"/analytics",element:s.jsx(Tye,{})}),s.jsx(fe,{path:"/ai-tools",element:s.jsx(kye,{})}),s.jsx(fe,{path:"/ai-techniques",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(qye,{})})}),s.jsx(fe,{path:"/admin/ai-platform",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(Vye,{})})}),s.jsx(fe,{path:"/uiws/worklog",element:s.jsx(eve,{})}),s.jsx(fe,{path:"/uiws/schedule",element:s.jsx(ave,{})}),s.jsx(fe,{path:"/uiws/message",element:s.jsx(lve,{})}),s.jsx(fe,{path:"/uiws/stats",element:s.jsx(uve,{})}),s.jsx(fe,{path:"/uiws/system/roles",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(fve,{})})}),s.jsx(fe,{path:"/uiws/system/role-menus",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(hve,{})})}),s.jsx(fe,{path:"/uiws/system/codes",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(pve,{})})}),s.jsx(fe,{path:"/uiws/system/menus",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(vve,{})})}),s.jsx(fe,{path:"/uiws/system/depts",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(xve,{})})}),s.jsx(fe,{path:"/uiws/system/companies",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(jve,{})})}),s.jsx(fe,{path:"/admin/users",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(Wye,{})})}),s.jsx(fe,{path:"/admin/audit",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(Xye,{})})}),s.jsx(fe,{path:"/admin/settings",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(Qye,{})})}),s.jsx(fe,{path:"/admin/mobile-app",element:s.jsx(Jye,{})})]}),s.jsx(fe,{path:"*",element:s.jsx(lT,{to:"/dashboard",replace:!0})})]})})})}yD.createRoot(document.getElementById("root")).render(s.jsx(T.StrictMode,{children:s.jsx(l6,{children:s.jsx(Nve,{})})}));
